-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.bcm21553.rc
262 lines (213 loc) · 8.13 KB
/
init.bcm21553.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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
on post-fs
# permissions for system server and daemons (accelerometer & magnetic & proximity)
mkdir /data/misc/sensors 0777 system misc
chown root system /dev/mmc328x
chown root system /dev/ecompass_ctrl
chown root system /dev/bma222
chown root system /dev/proximity
chmod 0660 /dev/mmc328x
chmod 0660 /dev/ecompass_ctrl
chmod 0660 /dev/bma222
chmod 0660 /dev/proximity
chmod 0660 /data/misc/sensors/ecs_nvm
chmod 0660 /data/misc/sensors/accel_offset
chown system system /sys/class/input/input0/enable
chown system system /sys/class/input/input0/poll_delay
chmod 0660 /sys/class/input/input0/enable
chmod 0660 /sys/class/input/input0/poll_delay
on boot
chown system system /sys/class/backlight/aat1401-backlight/brightness
chown system system /sys/class/backlight/pwm-keypad-backlight.0/brightness
chmod 0660 /dev/bcm_kril
chown root radio /dev/bcm_kril
chmod 0660 /dev/bcm_vsp
chmod 0660 /dev/bcm_atc
chown system system /dev/bcm_kpdp
chown shell system /dev/bcm_atc
chmod 0660 /dev/bcm_alsa_voip
chown radio system /dev/bcm_alsa_voip
chmod 0666 /dev/v3d
# insmod /system/lib/modules/memalloc.ko
insmod /system/lib/modules/hx170dec.ko
insmod /system/lib/modules/h6270enc.ko
insmod /system/lib/modules/gememalloc.ko
# insmod /system/lib/modules/ge_drv.ko
insmod /system/lib/modules/brcm_switch.ko
insmod /system/lib/modules/bcm_headsetsw.ko
chmod 0777 /dev/camera
chown system system /sys/bcm/cache
chmod 0771 /dev/ttyGS0
chown system system /dev/ttyGS0
chown system system /dev/ttyS0
chown system system /sys/module/bcm215xx_pm/parameters/debug
#for ASE application
mkdir /data/brcm
mkdir /data/brcm/ase
mkdir /data/brcm/ase/extras
mkdir /data/brcm/ase/scripts
chmod 0777 /data/brcm
chmod 0777 /data/brcm/ase
chmod 0777 /data/brcm/ase/extras
chmod 0777 /data/brcm/ase/scripts
copy /system/etc/adb.sh /data/brcm/ase/scripts/adb.sh
copy /system/etc/rndis.sh /data/brcm/ase/scripts/rndis.sh
copy /system/etc/logcfg.sh /data/brcm/ase/scripts/logcfg.sh
copy /system/etc/modem.sh /data/brcm/ase/scripts/modem.sh
copy /system/etc/atmode.sh /data/brcm/ase/scripts/atmode.sh
copy /system/etc/usbconfig.sh /data/brcm/ase/scripts/usbconfig.sh
chmod 0777 /data/brcm/ase/scripts/adb.sh
chmod 0777 /data/brcm/ase/scripts/rndis.sh
chmod 0777 /data/brcm/ase/scripts/logcfg.sh
chmod 0777 /data/brcm/ase/scripts/modem.sh
chmod 0777 /data/brcm/ase/scripts/atmode.sh
chmod 0777 /data/brcm/ase/scripts/usbconfig.sh
# for kexec
chmod 755 /system/bin/kexec
chmod 0771 /data
chmod 0777 /data/kexec.sh
#runSysCmd
mkdir /data/misc/utils 0777
#permisssion for cacheops
chmod 0666 /dev/cache-ops
#DHCP Service init
setprop wifi.interface "eth0"
mkdir /system/etc/wifi 0770 wifi wifi
chmod 0777 /system/etc/wifi
chmod 0777 /system/etc/wifi/wpa_supplicant.conf
# chmod 0777 /system/etc/wifi/nvram.txt
# chown wifi wifi /system/etc/wifi/nvram.txt
chown wifi wifi /system/etc/wifi/wpa_supplicant.conf
#wpa_supplicant control socket for android wifi.c (android private socket)
mkdir /data/misc/wifi 0775 wifi wifi
mkdir /data/misc/wifi/sockets 0775 wifi wifi
chmod 0775 /data/misc/wifi/sockets
chmod 0775 /data/misc/wifi
chmod 0775 /data/misc/wifi/wpa_supplicant.conf
chown wifi wifi /data/misc/wifi
chown wifi wifi /data/misc/wifi/wpa_supplicant.conf
mkdir /data/misc/dhcp 0770 dhcp dhcp
chown dhcp dhcp /data/misc/dhcp
chmod 0775 /data/misc/dhcp
chmod 0777 /data/misc/wifi/wl
chown wifi wifi /data/misc/wifi/wl
chmod 0777 /data/misc/wifi/iperf
chown wifi wifi /data/misc/wifi/iperf
chmod 0777 /data/misc/wifi/nvram.txt
chown wifi wifi /data/misc/wifi/nvram.txt
copy /system/etc/wifi/.nvmac.info /data/misc/wifi/.nvmac.info
chmod 0666 /data/misc/wifi/.nvmac.info
chown wifi wifi /data/misc/wifi/.nvmac.info
# wpa_supplicant socket (unix socket mode)
mkdir /data/system/wpa_supplicant 0771 wifi wifi
chmod 0771 /data/system/wpa_supplicant
chown wifi wifi /data/system/wpa_supplicant
# Let wifi control BT_VREG_CTL GPIO
chown wifi wifi /sys/class/gpio/gpio21/value
chmod 0664 /sys/class/gpio/gpio21/value
# for bluetooth. change access rights as btld runs as bluetooth user
chown root bluetooth /dev/ttyS1
chmod 0660 /dev/ttyS1
chown root bluetooth /sys/class/rfkill/rfkill0
chown root bluetooth /sys/class/rfkill/rfkill0/state
chown root bluetooth /sys/class/rfkill/rfkill0/claim
chown root bluetooth /sys/class/rfkill/rfkill0/soft
chmod 0664 /sys/class/rfkill/rfkill0/state
chmod 0664 /sys/class/rfkill/rfkill0/claim
chmod 0664 /sys/class/rfkill/rfkill0/soft
chown root bluetooth /sys/class/sound/controlC0/FMDirectPlay
chmod 0664 /sys/class/sound/controlC0/FMDirectPlay
chown root net_bt_admin /sys/devices/system/cpu/cpufreq/bcm21553/dvfs
chmod 0664 /sys/devices/system/cpu/cpufreq/bcm21553/dvfs
copy /system/etc/local.prop /data/local.prop
chown system bluetooth /data/local.prop
chmod 0660 /data/local.prop
# setprop service.brcm.bt.patchfile /system/bin/BCM2075C0_TestConfig_0017_TCL_CGPIO3.hcd
#for GPS files
chown gps system /dev/ttyS2
write /sys/class/gpio/export 56
chown gps system /sys/class/gpio/gpio56/value
chown gps system /sys/class/gpio/gpio56/direction
write /sys/class/gpio/gpio56/value 0
write /sys/class/gpio/gpio56/direction out
write /sys/class/gpio/export 23
chown gps system /sys/class/gpio/gpio23/value
chown gps system /sys/class/gpio/gpio23/direction
write /sys/class/gpio/gpio23/value 0
write /sys/class/gpio/gpio23/direction out
chown gps system /data/gps/glgpsctrl
chown gps system /dev/bcm_gps
chown gps system /dev/bcm_cntin
#for VT config
mkdir /data/vt 0777
chmod 0777 /system/etc/vt/3g324mConfig.val
chmod 0777 /system/etc/vt/testplay.3gp
chmod 0777 /system/etc/vt/testplay.jpg
chmod 0777 /system/etc/vt/testplay.bmp
copy /system/etc/vt/3g324mConfig.val /data/vt/3g324mConfig.val
copy /system/etc/vt/testplay.3gp /data/vt/testplay.3gp
copy /system/etc/vt/testplay.jpg /data/vt/testplay.jpg
copy /system/etc/vt/testplay.bmp /data/vt/testplay.bmp
chmod 0777 /data/vt/3g324mConfig.val
chmod 0777 /data/vt/testplay.3gp
chmod 0777 /data/vt/testplay.jpg
chmod 0777 /data/vt/testplay.bmp
chmod 0777 /mnt/sdcard/vt
# chmod 0777 /dev/pmem_adsp
# Use misc partition for flash OTP access
chown root radio /dev/mtd/mtd9
chmod 0640 /dev/mtd/mtd9
# rename apanic files with timestamp
service ap_log_ren /system/bin/sh /system/etc/apanic_rename.sh
oneshot
#runSysCmd
service runSysCmd /system/bin/runSysCmd /data/misc/utils/setusbmode.txt 70
oneshot
service gpsd /system/bin/glgps -c /system/etc/gps/glconfig4751.xml
user gps
group system sdcard_rw inet
#STOPSHIP: Remove logwrapper and -d option before production
service hciattach /system/bin/brcm_patchram_plus --enable_hci --enable_lpm --baudrate 3000000 \
--patchram /system/bin/BCM4330B1_002.001.003.0485.0506.hcd \
-d /dev/ttyS1
user bluetooth
group bluetooth net_bt_admin
disabled
#DHCP
#service wpa_supplicant /system/bin/wpa_supplicant -dd -Dwext -ieth0 -c /system/etc/wifi/wpa_supplicant.conf
# disabled
# oneshot
service wpa_supplicant /system/bin/wpa_supplicant -dd -Dwext -ieth0 -c /data/misc/wifi/wpa_supplicant.conf
socket eth0 dgram 775 wifi wifi
disabled
oneshot
service dhcpcd /system/bin/dhcpcd -BKL eth0
disabled
oneshot
on property:init.svc.wpa_supplicant=stopped
stop dhcpcd
#for WiFi MFG(TestMode)
service mfgloader /system/bin/mfgloader
disabled
oneshot
service wlandutservice /system/bin/wlandutservice
user system
group wifi net_raw net_admin system inet
disabled
oneshot
#service macloader /system/bin/macloader
# oneshot
# end of wifi
# Kexec enable
service kexec /data/kexec.sh
oneshot
#usb_portd
service console /system/bin/usb_portd
console
user system
group vpn net_admin net_raw radio system log mount
oneshot
#start memsicd service
service memsicd /system/bin/memsicd
user system
group system
oneshot