forked from Evervolv/android_device_htc_bravo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.bravo.rc
142 lines (113 loc) · 4.05 KB
/
init.bravo.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
import init.bravo.usb.rc
on init
mkdir /storage 0050 system sdcard_r
mkdir /mnt/media_rw/sdcard0 0700 media_rw media_rw
mkdir /storage/sdcard0 0700 root root
# for backwards compatibility
symlink /storage/sdcard0 /sdcard
symlink /storage/sdcard0 /mnt/sdcard
export EXTERNAL_STORAGE /storage/sdcard0
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
chown radio radio /sys/module/pm/parameters/idle_sleep_mode
# bluetooth MAC address programming
chown bluetooth bluetooth /sys/module/board_bravo/parameters/bdaddr
setprop ro.bt.bdaddr_path /sys/module/board_bravo/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/blue/brightness
chown system system /sys/class/leds/blue/blink
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 0660 /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
#sdcard daemon
service fuse_sdcard0 /system/bin/sdcard -u 1023 -g 1023 -d /mnt/media_rw/sdcard0 /storage/sdcard0
class late_start
disabled
# compass/accelerometer daemon
service akmd /system/bin/akmd
class main
user compass
group compass misc input
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 -aABKL
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
# Wifi - Tethering
on property:init.svc.wpa_supplicant=stopped
stop dhcpcd
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
service dspcrashd /system/bin/dspcrashd