forked from Evervolv/android_device_htc_passion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.mahimahi.rc
155 lines (127 loc) · 4.65 KB
/
init.mahimahi.rc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
import init.mahimahi.usb.rc
on init
export EXTERNAL_STORAGE /storage/sdcard0
mkdir /mnt/media_rw/sdcard0 0700 media_rw media_rw
mkdir /storage/sdcard0 0700 root root
mkdir /sd-ext 0771 system system
symlink /storage/sdcard0 /sdcard
symlink /storage/sdcard0 /mnt/sdcard
on fs
# mount mtd partitions
# Mount /system rw first to give the filesystem a chance to save a checkpoint
mount yaffs2 mtd@system /system
mount yaffs2 mtd@system /system ro remount
mount yaffs2 mtd@userdata /data nosuid nodev
mount yaffs2 mtd@cache /cache nosuid nodev
on post-fs-data
mkdir /data/misc/wifi 0770 wifi wifi
mkdir /data/misc/wifi/sockets 0770 wifi wifi
mkdir /data/misc/dhcp 0770 dhcp dhcp
chown dhcp dhcp /data/misc/dhcp
on boot
mount debugfs /sys/kernel/debug /sys/kernel/debug
# bluetooth power up/down interface
chown bluetooth bluetooth /dev/ttyHS0
chmod 0600 /dev/ttyHS0
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
chmod 0660 /sys/class/rfkill/rfkill0/state
# bluetooth MAC address programming
chown bluetooth bluetooth /sys/module/board_mahimahi/parameters/bdaddr
setprop ro.bt.bdaddr_path /sys/module/board_mahimahi/parameters/bdaddr
# bluetooth car dock pin
chown system system /sys/class/switch/dock/bt_pin
# Permissions for Liblights.
chown system system /sys/class/leds/green/brightness
chown system system /sys/class/leds/green/blink
chown system system /sys/class/leds/amber/brightness
chown system system /sys/class/leds/amber/blink
chown system system /sys/class/leds/red/brightness
chown system system /sys/class/leds/red/blink
chown system system /sys/class/leds/blue/brightness
chown system system /sys/class/leds/blue/blink
chown system system /sys/class/leds/jogball-backlight/brightness
chown system system /sys/class/leds/jogball-backlight/color
chown system system /sys/class/leds/jogball-backlight/period
chown system system /sys/class/leds/button-backlight/brightness
chown system system /sys/class/leds/lcd-backlight/brightness
# flashlight
chown system camera /sys/devices/platform/flashlight.0/leds/flashlight/brightness
chmod 0666 /sys/devices/platform/flashlight.0/leds/flashlight/brightness
# enable the GPS
setprop ro.ril.def.agps.mode 2
# performance tweaks for flash
write /sys/block/mtdblock3/bdi/read_ahead_kb 4
write /sys/block/mtdblock4/bdi/read_ahead_kb 4
write /sys/block/mtdblock5/bdi/read_ahead_kb 4
# Wakelock debug
write /sys/module/wakelock/parameters/debug_mask 7
# Fast dormancy settings
setprop ro.ril.fast.dormancy.rule 1
setprop ro.ril.fd.scron.timeout 4
setprop ro.ril.fd.scroff.timeout 3
# Compass/Accelerometer daemon
service akmd /system/bin/akmd
class main
user compass
group compass misc input
#sdcard daemon
service fuse_sdcard0 /system/bin/sdcard -u 1023 -g 1023 -d /mnt/media_rw/sdcard0 /storage/sdcard0
class late_start
disabled
on property:init.svc.wpa_supplicant=stopped
stop dhcpcd
service wpa_supplicant /system/bin/wpa_supplicant \
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
-O/data/misc/wifi/sockets -e/data/misc/wifi/entropy.bin \
-g@android:wpa_wlan0
class main
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot
# wifi
service dhcpcd_wlan0 /system/bin/dhcpcd -aABDKL
class main
disabled
oneshot
# bluetooth
service dhcpcd_bnep0 /system/bin/dhcpcd -ABKL
class main
disabled
oneshot
# wifi
service iprenew_wlan0 /system/bin/dhcpcd -n
class main
disabled
oneshot
# bluetooth
service iprenew_bnep0 /system/bin/dhcpcd -n
class main
disabled
oneshot
# Bugreport is triggered by the KEY_VOLUMEUP and BTN_MOUSE keycodes
service bugreport /system/bin/dumpstate -d -v -o /sdcard/bugreports/bugreport
class main
disabled
oneshot
keycodes 115 272
service qcom-post-boot /system/bin/sh /system/etc/init.qcom.post_boot.sh
class late_start
user root
disabled
oneshot
on property:dev.bootcomplete=1
start qcom-post-boot
# KSM
write /sys/kernel/mm/ksm/pages_to_scan 100
write /sys/kernel/mm/ksm/sleep_millisecs 500
# VPN
mkdir /data/misc/vpn 0770 system vpn
chown system vpn /data/misc/vpn
mkdir /data/misc/vpn/profiles 0770 system vpn
chown system vpn /data/misc/vpn/profiles
# Allow system to have access to /dev/tun directory
mkdir /dev/tun 0770 system vpn
chown system vpn /dev/tun
chmod 0770 /dev/tun
service dspcrashd /system/bin/dspcrashd