-
Notifications
You must be signed in to change notification settings - Fork 9
/
init.rhea_ss_corsica.rc
484 lines (396 loc) · 15.8 KB
/
init.rhea_ss_corsica.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
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
import init.bcm2165x.usb.rc
import init.bt.rc
import init.log.rc
on early-init
loglevel 9
mkdir /efs 0771 radio system
on init
mkdir /tmp
mount tmpfs tmpfs /tmp
chmod 1775 /tmp
# See storage config details at http://source.android.com/tech/storage/
mkdir /mnt/shell/emulated 0700 shell shell
mkdir /storage/emulated 0555 root root
export EXTERNAL_STORAGE /storage/emulated/legacy
export EMULATED_STORAGE_SOURCE /mnt/shell/emulated
export EMULATED_STORAGE_TARGET /storage/emulated
# Support legacy paths
symlink /storage/emulated/legacy /sdcard
symlink /storage/emulated/legacy /mnt/sdcard
symlink /storage/emulated/legacy /storage/sdcard0
symlink /mnt/shell/emulated/0 /storage/emulated/legacy
export SECONDARY_STORAGE /storage/sdcard1
mkdir /mnt/media_rw/sdcard1 0700 media_rw media_rw
mkdir /storage/sdcard1 0700 root root
symlink /efs /factory
symlink /dev/block/mmcblk0p11 /dev/block/param
# We will create our own ril-daemon service with different perm and sockets
stop ril-daemon
on post-fs-data
# we will remap this as /storage/sdcard with the sdcard fuse tool
mkdir /data/media 0770 media_rw media_rw
chown media_rw media_rw /data/media
# Set indication (checked by vold) that we have finished this action
setprop vold.post_fs_data_done 1
#for wifi
mkdir /efs/wifi 0775 radio system
mkdir /efs/bluetooth 0775 radio system
mkdir /efs/imei 0775 radio system
mkdir /data/misc/wifi 0775 wifi system
mkdir /data/misc/wifi/sockets 0770 wifi wifi
mkdir /data/misc/dhcp 0775 dhcp dhcp
mkdir /system/etc/wifi 0775 wifi wifi
chown system system /efs/wifi/.mac.info
chmod 0664 /efs/wifi/.mac.info
chown system system /efs/imei/.nvmac.info
chmod 0664 /efs/imei/.nvmac.info
# for TRP/TIS
write /data/.psm.info 1
chown system root /data/.psm.info
chmod 0660 /data/.psm.info
#for ASE application
mkdir /data/brcm
mkdir /data/brcm/ase
mkdir /data/brcm/ase/extras
mkdir /data/brcm/ase/scripts
chmod 0775 /data/brcm
chmod 0775 /data/brcm/ase
chmod 0775 /data/brcm/ase/extras
chmod 0775 /data/brcm/ase/scripts
mkdir /data/brcm/utils
chmod 0775 /data/brcm/utils
chown system system /sys/class/sec/sec_touchscreen/call_connected
chmod 0660 /sys/class/sec/sec_touchscreen/call_connected
chown system system /sys/class/sec/sec_touchscreen/call_disconnected
chmod 0660 /sys/class/sec/sec_touchscreen/call_disconnected
chown system system /sys/class/backlight/panel/brightness
chmod 0660 /sys/class/backlight/panel/brightness
chown system system /sys/class/backlight/keypad-led/brightness
chmod 0660 /sys/class/backlight/keypad-led/brightness
chown system system /sys/class/backlight/touchkey-led/brightness
chmod 0660 /sys/class/backlight/touchkey-led/brightness
# permissions for sensors (accelerometer & magnetic & proximity)
chown root system /dev/hscd_i2c
chown root system /dev/alps_io
chown root system /dev/k3dh
chmod 0660 /dev/hscd_i2c
chmod 0660 /dev/alps_io
chmod 0660 /dev/k3dh
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
# SISO-ANDR_PERF :: START Changing scheduler to noop during boot
write /sys/block/mmcblk0/queue/scheduler noop
# SISO-ANDR_PERF :: END
chown system system /sys/devices/platform/pwm-backlight.0/backlight/pwm-backlight.0/brightness
# Permissions for bluetooth
setprop ro.bt.bdaddr_path "/efs/bluetooth/bt_addr"
chown bluetooth bluetooth ro.bt.bdaddr_path
# chown bluetooth bluetooth /dev/ttySAC0
# chmod 0600 /dev/ttySAC0
chmod 0660 /sys/class/rfkill/rfkill0/state
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
# Permission for /proc/cmdline
chmod 0644 /proc/cmdline
# <Sensors & NFC>
# Accelerometer_sensor
chown system radio /dev/accelerometer
chown system radio /sys/class/sensors/accelerometer_sensor
chown system radio /sys/class/sensors/accelerometer_sensor/raw_data
chown system radio /sys/class/sensors/accelerometer_sensor/calibration
chown system radio /sys/class/sensors/accelerometer_sensor/reactive_alert
chown system radio /sys/class/sensors/accelerometer_sensor/vendor
chown system radio /sys/class/sensors/accelerometer_sensor/name
# Magnetic_sensor
chown system radio /dev/magnetic_sensor
chown system radio /sys/class/sensors/magnetic_sensor/raw_data
chown system radio /sys/class/sensors/magnetic_sensor/selftest
chown system radio /sys/class/sensors/magnetic_sensor/vendor
chown system radio /sys/class/sensors/magnetic_sensor/name
mount debugfs /sys/kernel/debug /sys/kernel/debug
# required so RIL can open kernel RPC drivers
chmod 0660 /dev/bcm_rpc
chmod 0660 /dev/bcm_irpc
chown radio radio /dev/bcm_rpc
chown radio radio /dev/bcm_irpc
chmod 0660 /dev/bcm_atc
chown shell system /dev/bcm_atc
mkdir /data/atx
chown system system /data/atx
chmod 0771 /data/atx
chown system system /dev/bcm_log
chmod 0660 /dev/bcm_log
chown system system /dev/bcm_audio_log
chmod 0660 /dev/bcm_audio_log
chown system system /dev/ttyGS0
chown system system /dev/ttyGS1
chown system system /dev/ttyS0
chown system system /dev/ttyS1
chmod 0666 /dev/ttyS1
chown system system /proc/bcm_fuse_net_config
chown system system /dev/block/mmcblk0
chmod 0660 /dev/block/mmcblk0
chown system system /dev/mem
#security driver
chmod 0660 /dev/bcm_security
chown radio root /dev/bcm_security
mkdir /data/sec 0770
chown radio root /data/sec
# BCMPMU drivers
chown -R system system /sys/devices/platform/bcmpmu*/*
# fake some battery state
setprop status.battery.state Slow
setprop status.battery.level 10
setprop status.battery.level_raw 100
setprop status.battery.level_scale 10
# Set permission for Widevine DRM temporarily
chmod 0777 /dev/s5p-smem
rm /data/app/tlcd_sock
# Enable dithering algorithm
setprop fb.force.dithering 1
# permissions for gps.
mkdir /data/gps 0770 gps system
chown gps system /data/gps
chmod 0770 /data/gps
chown gps system /system/etc/gps/glconfig.xml
chmod 0660 /system/etc/gps/glconfig.xml
chown gps system /system/etc/gps
chmod 0770 /system/etc/gps
chown gps system /system/bin/glgps
chmod 0770 /system/bin/glgps
chown gps system /system/bin/gpslogd
chmod 0777 /system/bin/gpslogd
chmod 0777 /dev/i2c-1
chmod 0777 /proc/i2c/i2c1/rxFIFO
chown gps system /dev/gps_irq
chmod 0660 /dev/gps_irq
write /sys/class/gpio/export 28
chown gps system /sys/class/gpio/gpio28/value
chown gps system /sys/class/gpio/gpio28/direction
write /sys/class/gpio/gpio28/direction out
write /sys/class/gpio/gpio28/value 0
write /sys/class/gpio/export 97
chown radio system /sys/class/gpio/gpio97/value
chown radio system /sys/class/gpio/gpio97/direction
write /sys/class/gpio/gpio97/direction out
write /sys/class/gpio/gpio97/value 0
#for bluetooth. permission for host interface
chown root bluetooth /dev/ttyS0
chmod 0777 /dev/ttyS0
# Permission for pm debug - force sleep
chown system system /sys/module/rhea_pm_dbg/parameters/debug
# SEC_PRODUCT_FEATURE_COMMON_USE_MULTISIM
setprop ro.multisim.simslotcount 2
# for multi csc
chown radio radio /proc/LinuStoreIII/efs_info
chmod 0664 /proc/LinuStoreIII/efs_info
# for protecting key string
chown radio radio /proc/LinuStoreIII/keystr
chmod 0664 /proc/LinuStoreIII/keystr
# for ril_prop
chown radio radio /proc/LinuStoreIII/ril_prop
chmod 0664 /proc/LinuStoreIII/ril_prop
# for fsbuild_check
chown radio radio /proc/LinuStoreIII/fsbuild_check
chmod 0664 /proc/LinuStoreIII/fsbuild_check
# for recovery_opts
chown system radio /proc/LinuStoreIII/recovery_opts
chmod 0664 /proc/LinuStoreIII/recovery_opts
# Audio (Earjack)
chown system radio /sys/class/audio/earjack/select_jack
chown system radio /sys/class/audio/earjack/key_state
chown system radio /sys/class/audio/earjack/state
chown media system /sys/class/audio/earjack/reselect_jack
# Permissions for touch
chown system radio /sys/class/sec/tsp/cmd
# Permissions for Touchkey
chown system radio /sys/class/sec/sec_touchkey/touchkey_menu
chown system radio /sys/class/sec/sec_touchkey/touchkey_back
chown system radio /sys/class/sec/sec_touchkey/touchkey_threshold
# Accy
chown radio system /sys/devices/platform/bcmpmu_accy/jiglock
# Permissions for Camera
chown system radio /sys/class/camera/rear/rear_camfw
chown system radio /sys/class/camera/rear/rear_camtype
chown system radio /sys/class/camera/rear/rear_flash
chown system radio /sys/class/camera/rear/isp_core
chown system radio /sys/class/camera/front/front_camfw
chown system radio /sys/class/camera/front/front_camtype
chown system radio /sys/class/flash/flash/flash_power
chown radio system /sys/devices/platform/samsung-pd.5/s3c-fimc.2/range_mode
chmod 0660 /sys/devices/platform/samsung-pd.5/s3c-fimc.2/range_mode
# Switch Device
chown system radio /sys/class/sec/switch/adc
#voice Soulution
copy /system/etc/DiamondVoice.txt /data/DiamondVoice.txt
chmod 0777 /data/DiamondVoice.txt
copy /system/etc/DiamondVoice_Filter.txt /data/DiamondVoice_Filter.txt
chmod 0777 /data/DiamondVoice_Filter.txt
insmod /system/lib/modules/VoiceSolution.ko
on fs
mount_all /fstab.rhea_ss_corsica
setprop ro.crypto.fuse_sdcard true
# For NV Read/Write
chown radio system /dev/block/mmcblk0p18
chmod 0770 /dev/block/mmcblk0p18
# Permissions for DVFS
chown radio system /sys/power/cpufreq_table
chown radio system /sys/power/cpufreq_max_limit
chown radio system /sys/power/cpufreq_min_limit
chmod 0660 /sys/power/cpufreq_table
chmod 0660 /sys/power/cpufreq_max_limit
chmod 0660 /sys/power/cpufreq_min_limit
# Logging required to save file in /data/brcm for configuration
mkdir /data/brcm
chmod 0775 /data/brcm
#for touch fw
chown system system /sys/class/sec/tsp/cmd
chmod 0660 /sys/class/sec/tsp/cmd
chown system system /sys/class/sec/tsp/cmd_status
chmod 0660 /sys/class/sec/tsp/cmd_status
chown system system /sys/class/sec/tsp/cmd_result
chmod 0660 /sys/class/sec/tsp/cmd_result
chown system system /sys/class/sec/sec_touchscreen/tsp_firm_version_phone
chmod 0660 /sys/class/sec/sec_touchscreen/tsp_firm_version_phone
chown system system /sys/class/sec/sec_touchscreen/tsp_firm_version_panel
chmod 0660 /sys/class/sec/sec_touchscreen/tsp_firm_version_panel
chown system system /sys/class/sec/sec_touchscreen/tsp_firm_update
chmod 0660 /sys/class/sec/sec_touchscreen/tsp_firm_update
chown system system /sys/class/sec/sec_touchscreen/tsp_firm_update_status
chmod 0660 /sys/class/sec/sec_touchscreen/tsp_firm_update_status
chown system system /sys/class/sec/sec_touchscreen/tsp_threshold
chmod 0660 /sys/class/sec/sec_touchscreen/tsp_threshold
chown system system /sys/class/sec/sec_touchscreen/touchkey_menu
chmod 0660 /sys/class/sec/sec_touchscreen/touchkey_menu
chown system system /sys/class/sec/sec_touchscreen/touchkey_home
chmod 0660 /sys/class/sec/sec_touchscreen/touchkey_home
chown system system /sys/class/sec/sec_touchscreen/touchkey_back
chmod 0660 /sys/class/sec/sec_touchscreen/touchkey_back
chown system system /sys/class/sec/sec_touchkey/touchkey_back
chmod 0660 /sys/class/sec/sec_touchkey/touchkey_back
chown system system /sys/class/sec/sec_touchkey/touchkey_menu
chmod 0660 /sys/class/sec/sec_touchkey/touchkey_menu
chown system system /sys/class/sec/sec_touchkey/touchkey_threshold
chmod 0660 /sys/class/sec/sec_touchkey/touchkey_threshold
chown system radio /sys/class/sec/switch/adc
on post-fs
chown radio system /efs
chmod 0771 /efs
# create filesystem if necessary
service setup_fs /system/bin/setup_fs \
/dev/block/mmcblk0p3 \
/dev/block/mmcblk0p4
class core
user root
group root
oneshot
#at_distributor for making concerned about factory.
service at_distributor /system/bin/at_distributor
class main
user root
group root
oneshot
# RILD
service rhea-ril-daemon /system/bin/rild
class main
socket rild stream 660 root radio
socket rild1 stream 660 root radio
socket rild-debug stream 660 radio system
user root
group radio cache inet misc audio system sdcard_rw log sdcard_r
# create virtual SD card at /storage/sdcard, based on the /data/media directory
# daemon will drop to user/group system/media_rw after initializing
# underlying files in /data/media will be created with user and group media_rw (1023)
service sdcard /system/bin/sdcard -u 1023 -g 1023 -l /data/media /mnt/shell/emulated
class late_start
service wpa_supplicant /system/bin/logwrapper /system/bin/wpa_supplicant \
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
-I/system/etc/wifi/wpa_supplicant_overlay.conf \
-e/data/misc/wifi/entropy.bin \
-O/data/misc/wifi/sockets -g@android:wpa_wlan0
# we will start as root and wpa_supplicant will switch to user wifi
# after setting up the capabilities required for WEXT
# user wifi
# group wifi inet keystore
class main
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot
service p2p_supplicant /system/bin/logwrapper /system/bin/wpa_supplicant \
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
-I/system/etc/wifi/wpa_supplicant_overlay.conf -N \
-ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \
-I/system/etc/wifi/p2p_supplicant_overlay.conf \
-e/data/misc/wifi/entropy.bin -puse_p2p_group_interface=1 \
-O/data/misc/wifi/sockets -g@android:wpa_wlan0
# we will start as root and wpa_supplicant will switch to user wifi
# after setting up the capabilities required for WEXT
# user wifi
# group wifi inet keystore
class main
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot
service dhcpcd_wlan0 /system/bin/dhcpcd -ABKL
class main
disabled
oneshot
service dhcpcd_p2p /system/bin/dhcpcd -aABKL
class main
disabled
oneshot
service iprenew_wlan0 /system/bin/dhcpcd -n
class main
disabled
oneshot
service iprenew_p2p /system/bin/dhcpcd -n
class main
disabled
oneshot
# Bluetooth PAN
service dhcpcd_bt-pan /system/bin/dhcpcd -ABKL
class main
disabled
oneshot
service iprenew_bt-pan /system/bin/dhcpcd -n
class main
disabled
oneshot
# TODO: btld is only used for FM
service macloader /system/bin/macloader
class main
oneshot
on property:init.svc.macloader=stopped
chown system root /data/.cid.info
chmod 0664 /data/.cid.info
chown system root /data/.rev
chmod 0660 /data/.rev
# end of wifi
service gpsd /system/bin/glgps -c /system/etc/gps/glconfig.xml
class late_start
user gps
group system sdcard_rw inet root radio wifi
# Run ATX over UART
service console /system/bin/atx -l -d
class main
console
oneshot
user system
group vpn net_admin net_raw radio system sdcard_rw log mount
# Run bkmgrd automatically on startup
service bkmgrd /system/bin/bkmgrd
class main
oneshot
user root
group radio system log
#Indicate boot complete to PM to complete PM initialization
on property:dev.bootcomplete=1
write /sys/module/rhea_pwr_mgr/parameters/pm_late_init 1
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ondemand
# fusewrapped external sdcard daemon running as media_rw (1023)
service fuse_sdcard1 /system/bin/sdcard -u 1023 -g 1023 -d /mnt/media_rw/sdcard1 /storage/sdcard1
class late_start
disabled