forked from teamacid/android_device_samsung_galaxys4gmtd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.herring.rc
447 lines (380 loc) · 17.7 KB
/
init.herring.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
import init.herring.usb.rc
on init
loglevel 9
export EXTERNAL_STORAGE /mnt/sdcard
mkdir /mnt/sdcard 0000 system system
symlink /mnt/sdcard /sdcard
# We will create our own ril-daemon service in class 'core' because the
# rild doesn't like being killed. (During device encryption.)
stop ril-daemon
on fs
# We chown/chmod /efs because mount is run as root + defaults
mkdir /efs 0775 radio radio
chown radio radio /efs
# Mount /system rw first to give the filesystem a chance to save a checkpoint
mkdir /radio 0775 radio radio
mount yaffs2 mtd@radio /radio
chmod 0775 /radio
chmod 0775 /radio/modem.bin
chown radio radio /radio
chown radio radio /radio/modem.bin
mount yaffs2 mtd@efs /efs
mount yaffs2 mtd@system /system
mount yaffs2 mtd@userdata /data
mount yaffs2 mtd@cache /cache
chmod 770 /efs/bluetooth
chmod 770 /efs/imei
mkdir /gps 771 gps system
chown gps system /gps
# +STE GPS Daemon
# create data/gps for GPS demon
# GPS_CHIPSET_STE_GNS7560
chown gps gps /dev/s3c2410_serial1
chmod 660 /dev/s3c2410_serial1
mkdir /data/gps 771 gps system
chown gps system /data/gps
chown gps gps /sys/class/sec/gps/GPS_PWR_EN/value
chmod 664 /sys/class/sec/gps/GPS_PWR_EN/value
chown gps gps /sys/class/sec/gps/GPS_nRST/value
chmod 664 /sys/class/sec/gps/GPS_nRST/value
# not sure if these are needed or not, but it cant hurt...
chown gps gps /data/CGPS_LOG.txt
chmod 0770 /data/CGPS_LOG.txt
chown gps gps /data/EVENT_LOG.txt
chmod 0770 /data/EVENT_LOG.txt
chown gps gps /data/GNB_DEBUG.txt
chmod 0770 /data/GNB_DEBUG.txt
chown gps gps /data/GPS_NV_Data.bin
chmod 0770 /data/GPS_NV_Data.bin
chown gps gps /data/GPS_UTC_Calib.bin
chmod 0770 /data/GPS_UTC_Calib.bin
chown gps gps /data/HALGPS_conf.cfg
chmod 0770 /data/HALGPS_conf.cfg
chown gps gps /data/NAV_DEBUG.txt
chmod 0770 /data/NAV_DEBUG.txt
chown gps gps /data/NMEA_DEBUG.txt
chmod 0770 /data/NMEA_DEBUG.txt
on post-fs
# permissions for MTP device node_temporary permission_will be changed 0660
chmod 0660 /dev/usb_mtp_gadget
chown system system /dev/usb_mtp_gadget
symlink /radio/modem.bin /dev/block/bml12
# for sensor control
chown system input /sys/class/input/input0/enable
chown system input /sys/class/input/input0/delay
chown system input /sys/class/input/input0/wake
chown system input /sys/class/input/input0/data
chown system input /sys/class/input/input1/enable
chown system input /sys/class/input/input1/delay
chown system input /sys/class/input/input1/wake
chown system input /sys/class/input/input1/threshold
chown system input /sys/class/input/input1/distortion
chown system input /sys/class/input/input1/shape
chown system input /sys/class/input/input1/offsets
chown system input /sys/class/input/input1/filter_enable
chown system input /sys/class/input/input1/filter_len
chown system input /sys/class/input/input1/data
chown system input /sys/class/input/input1/status
chown system input /sys/class/input/input1/position
chown system input /sys/class/input/input2/enable
chown system input /sys/class/input/input2/delay
chown system input /sys/class/input/input2/wake
chown system input /sys/class/input/input3/enable
chown system input /sys/class/input/input3/delay
chown system input /sys/class/input/input3/wake
chown compass input /sys/class/input/input4/offsets
chown system input /sys/class/input/input5/enable
chown system input /sys/class/input/input5/delay
chown system input /sys/class/input/input5/wake
chown system input /sys/class/input/input6/enable
chown system input /sys/class/input/input6/delay
chown system input /sys/class/input/input6/wake
chown system input /sys/class/input/input7/enable
chown system input /sys/class/input/input7/delay
chown system input /sys/class/input/input7/wake
chown system input /sys/class/input/input8/enable
chown system input /sys/class/input/input8/delay
chown system input /sys/class/input/input8/wake
chown system input /dev/i2c-1
chown system input /dev/i2c-12
# Change permissions for modem.
chown radio system /sys/class/modemctl/xmm/control
chown radio system /sys/class/net/svnet0/waketime
chown radio system /sys/class/net/svnet0/pdp/activate
chown radio system /sys/class/net/svnet0/pdp/deactivate
chown radio system /sys/class/net/svnet0/pdp/suspend
chown radio system /sys/class/net/svnet0/pdp/resume
on post-fs-data
setprop vold.post_fs_data_done 1
on boot
mount debugfs /sys/kernel/debug /sys/kernel/debug
setprop ro.build.product herring
setprop ro.product.device herring
setprop ro.radio.noril yes
setprop ro.crypto.keyfile.userdata /efs/userdata_footer
# fake some battery state
setprop status.battery.state Slow
setprop status.battery.level 5
setprop status.battery.level_raw 50
setprop status.battery.level_scale 9
# phone
setprop ro.telephony.call_ring.multiple 0
# to enable wifi
setprop wifi.interface "eth0"
#setprop wifi.driver.status "ok"
#wifi permissions
mkdir /data/wifi 0777 wifi wifi
chown wifi system /data/misc/wifi
chmod 0777 /data/misc/wifi/
chmod 0777 /data/wifi/
mkdir /data/misc/wifi/sockets 0770 wifi system
chmod 0664 /system/etc/wifi/wpa_supplicant.conf
chown wifi system /data/misc/wifi/wpa_supplicant.conf
mkdir /data/misc/dhcpcd 0771 dhcp dhcp
chown dhcp dhcp /data/misc/dhcpcd
mkdir /data/misc/dhcp 0770 dhcp dhcp
chown dhcp dhcp /data/misc/dhcp
# radio permissions
mkdir /data/misc/radio 0771 radio radio
# change permission for uart_switch
chown radio radio /sys/class/sec/uart_switch/UART_SEL/value
chown compass root /sys/class/input/input3/distortion
chown compass root /sys/class/input/input3/offsets
chown compass root /sys/class/input/input3/shape
chown compass root /sys/class/input/input3/threshold
chmod 660 /sys/class/sec/uart_switch/UART_SEL/value
#change permissions for USB
chown radio system /sys/class/sec/switch/usb_sel
chown radio system /sys/class/sec/switch/uart_sel
chown radio system /sys/class/sec/switch/usb_state
chown radio system /sys/class/sec/switch/disable_vbus
chown radio system /sys/devices/platform/android_usb/tethering
chown radio system /sys/devices/platform/android_usb/KiesStatus
chown radio system /sys/devices/platform/android_usb/UsbMenuSel
chown radio system /sys/devices/platform/android_usb/AskOnStatus
chown radio system /sys/devices/platform/android_usb/AskOnMenuSel
chown radio system /sys/devices/virtual/misc/melfas_touchkey/touch_sensitivity
chown radio system /sys/devices/virtual/misc/melfas_touchkey/enable_disable
chown radio system /sys/devices/virtual/misc/melfas_touchkey/brightness
chown radio system /sys/devices/virtual/misc/melfas_touchkey/touch_update
chown radio system /sys/devices/virtual/misc/melfas_touchkey/touch_version
chown system system /sys/devices/virtual/misc/melfas_touchkey/brightness
#change permissions for fuel gauge
chown radio system /sys/class/sec/fg_atcom_test/set_fuel_gauage_read
chown radio system /sys/class/sec/fg_atcom_test/set_fuel_gauage_reset
#change permissions for battery
chown radio system /sys/class/power_supply/battery/batt_vol
chown radio system /sys/class/power_supply/battery/batt_vol_adc
chown radio system /sys/class/power_supply/battery/batt_temp
chown radio system /sys/class/power_supply/battery/batt_temp_adc
chown radio system /sys/class/power_supply/battery/charging_source
chown radio system /sys/class/power_supply/battery/fg_soc
chown radio system /sys/class/power_supply/battery/reset_soc
chown radio system /sys/class/power_supply/battery/charging_mode_booting
chown radio system /sys/class/power_supply/battery/batt_temp_check
chown radio system /sys/class/power_supply/battery/batt_full_check
chown radio system /sys/class/power_supply/battery/batt_type
chown radio system /sys/class/power_supply/battery/batt_use
chown radio system /sys/class/power_supply/battery/batt_vol_adc_cal
chown radio system /sys/class/power_supply/battery/batt_temp_adc_cal
chown radio system /sys/class/power_supply/battery/batt_vol_adc_aver
chown radio system /sys/class/power_supply/battery/batt_test_mode
chown radio system /sys/class/power_supply/battery/batt_vol_aver
chown radio system /sys/class/power_supply/battery/batt_temp_aver
chown radio system /sys/class/power_supply/battery/batt_temp_adc_aver
chown radio system /sys/class/power_supply/battery/batt_v_f_adc
chown radio system /sys/class/power_supply/battery/batt_chg_current
chown radio system /sys/class/power_supply/battery/charging_source
chown radio system /sys/class/power_supply/battery/vibrator
chown radio system /sys/class/power_supply/battery/camera
chown radio radio /sys/class/power_supply/battery/mp3
chown radio radio /sys/class/power_supply/battery/video
chown radio system /sys/class/power_supply/battery/talk_gsm
chown radio system /sys/class/power_supply/battery/talk_wcdma
chown radio system /sys/class/power_supply/battery/data_call
chown radio system /sys/class/power_supply/battery/wifi
chown radio system /sys/class/power_supply/battery/gps
chown radio system /sys/class/power_supply/battery/device_state
chown radio system /sys/class/power_supply/battery/batt_compendation
chown radio system /sys/class/power_supply/battery/is_booting
chown radio radio /sys/class/power_supply/battery/call
chown radio radio /sys/class/power_supply/battery/music
chown radio radio /sys/class/power_supply/battery/browser
chown radio radio /sys/class/power_supply/battery/hotspot
chown radio radio /sys/class/power_supply/battery/wimax
#for jack control
chown radio system /sys/class/jack/jack_selector/select_jack
#change permissions for touch
chown radio system /sys/class/sec/qt602240_noise_test/set_refer0
chown radio system /sys/class/sec/qt602240_noise_test/set_delta0
chown radio system /sys/class/sec/qt602240_noise_test/set_refer1
chown radio system /sys/class/sec/qt602240_noise_test/set_delta1
chown radio system /sys/class/sec/qt602240_noise_test/set_refer2
chown radio system /sys/class/sec/qt602240_noise_test/set_delta2
chown radio system /sys/class/sec/qt602240_noise_test/set_refer3
chown radio system /sys/class/sec/qt602240_noise_test/set_delta3
chown radio system /sys/class/sec/qt602240_noise_test/set_refer4
chown radio system /sys/class/sec/qt602240_noise_test/set_delta4
chown radio system /sys/class/sec/qt602240_noise_test/set_referminmax
chown radio system /sys/class/sec/qt602240_noise_test/set_deltaminmax
chown radio system /sys/class/sec/qt602240_noise_test/set_threshould
chown radio system /sys/class/sec/qt602240_atcom_test/set_qt_update
chown radio system /sys/class/sec/qt602240_atcom_test/set_qt_firm_version
chown radio system /sys/class/sec/qt602240_atcom_test/set_qt_firm_status
chown radio system /sys/class/sec/qt602240_atcom_test/set_qt_firm_version_read
chown radio system /sys/class/touch/switch/set_power
chown radio system /sys/class/touch/switch/set_acquisition
chown radio system /sys/class/touch/switch/set_touchscreen
chown radio system /sys/class/touch/switch/set_keyarray
chown radio system /sys/class/touch/switch/set_total
chown radio system /sys/class/touch/switch/set_write
chown radio system /sys/class/touch/switch/set_noise
chown radio system /sys/class/touch/switch/set_grip
chown radio system /sys/class/touch/qt_stylus/config_mode
#change permissions for lcd
chown radio system /sys/class/lcd/s5p_lcd/lcd_power
chown radio radio /sys/class/gammaset/switch_gammaset/gammaset_file_cmd
chown radio radio /sys/class/aclset/switch_aclset/aclset_file_cmd
chown radio system /sys/class/sec/sec_lcd/lcdtype_file_cmd
chown radio radio /sys/class/mdnieset_ui/switch_mdnieset_ui/mdnieset_ui_file_cmd
chown radio radio /sys/class/mdnieset_outdoor/switch_mdnieset_outdoor/mdnieset_outdoor_file_cmd
#change permissions for touchkey
chown system system /sys/class/sec/t_key/brightness
chown system system /sys/class/sec/t_key/enable_disable
# Set BLN permissions
chown system system /sys/class/misc/backlightnotification/notification_led
chown radio system /sys/class/misc/level/control
# Permissions for System Server and daemons.
chown radio system /sys/power/dvfslock_ctrl
chmod 0660 /sys/power/dvfslock_ctrl
chown system system /sys/class/leds/red/trigger
chown system system /sys/class/leds/blue/trigger
chown system system /sys/class/leds/red/delay_on
chown system system /sys/class/leds/red/delay_off
chown system system /sys/class/leds/blue/delay_on
chown system system /sys/class/leds/blue/delay_off
chown system system /sys/devices/platform/s3c-keypad/brightness
chown system system /sys/devices/platform/s3c-keypad/key_pressed
# +++++++++++++++++++++++++++++++++++++++++++
# for Bluetooth
chown bluetooth bluetooth /sys/module/bluetooth_power/parameters/power
chown bluetooth bluetooth /proc/bluetooth/sleep/proto
chown system system /sys/module/sco/parameters/disable_esco
chmod 0660 /sys/module/bluetooth_power/parameters/power
chmod 0660 /proc/bluetooth/sleep/proto
chown bluetooth bluetooth /dev/uinput
chmod 0660 /dev/uinput
chown bluetooth bluetooth /dev/s3c2410_serial0
chmod 0660 /dev/s3c2410_serial0
chmod 0770 /sys/class/rfkill/rfkill0/state
chmod 0770 /sys/class/rfkill/rfkill1/state
chmod 0770 /sys/class/rfkill/rfkill2/state
chmod 0770 /sys/class/rfkill/rfkill3/state
chmod 0770 /sys/class/rfkill/rfkill0/type
chmod 0770 /sys/class/rfkill/rfkill1/type
chmod 0770 /sys/class/rfkill/rfkill2/type
chmod 0770 /sys/class/rfkill/rfkill3/type
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
chown bluetooth bluetooth /sys/class/rfkill/rfkill1/state
chown bluetooth bluetooth /sys/class/rfkill/rfkill2/state
chown bluetooth bluetooth /sys/class/rfkill/rfkill3/state
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
chown bluetooth bluetooth /sys/class/rfkill/rfkill1/type
chown bluetooth bluetooth /sys/class/rfkill/rfkill2/type
chown bluetooth bluetooth /sys/class/rfkill/rfkill3/type
# allow system to modify cpufreq control files
chown root system /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
chown root system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chown root system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
# +++++++++++++++++++++++++++++++++++++++++++
# for datarouter
chown system system /dev/ttyGS0
chown system system /dev/dun
# +++++++++++++++++++++++++++++++++++++++++++
chown system system /sys/class/backlight/s5p_bl/brightness
setprop net.tcp.buffersize.hspa 4096,87380,393216,4096,16384,110208
# Samsung USB Mode : system properties are linked with sysfs
# write /sys/class/sec/switch/UsbMenuSel 0
on property:persist.service.usb.setting=0
write /sys/devices/platform/android_usb/UsbMenuSel 0
on property:persist.service.usb.setting=1
write /sys/devices/platform/android_usb/UsbMenuSel 1
on property:persist.service.usb.setting=2
write /sys/devices/platform/android_usb/UsbMenuSel 2
on property:persist.service.usb.setting=3
write /sys/devices/platform/android_usb/UsbMenuSel 3
on property:persist.service.usb.setting=4
write /sys/devices/platform/android_usb/UsbMenuSel 4
service orientationd /system/vendor/bin/orientationd
class late_start
user compass
group input
service geomagneticd /system/vendor/bin/geomagneticd
class late_start
user compass
group system input
service gps-daemon /system/vendor/bin/gpsd -c /system/etc/gps.xml
class late_start
socket gps seqpacket 0660 gps system
user gps
group gps system inet
oneshot
service new-ril-daemon /system/bin/rild
class core
socket rild stream 660 root radio
socket rild-debug stream 660 radio system
user root
group radio cache inet misc audio sdcard_rw log
# 3D init
service pvrsrvinit /system/vendor/bin/pvrsrvinit
class core
user root
group root
oneshot
service wpa_supplicant /system/bin/wpa_supplicant -W -Dwext -ieth0 -c /data/misc/wifi/wpa_supplicant.conf
class main
socket wpa_eth0 dgram 0660 wifi wifi
disabled
oneshot
service dhcpcd_eth0 /system/bin/dhcpcd -ABKL
class main
disabled
oneshot
service iprenew_eth0 /system/bin/dhcpcd -n
class main
disabled
oneshot
service bdaddr /system/bin/bdaddr_read
class main
user root
disabled
oneshot
on property:init.svc.bootanim=running
start bdaddr
on property:ro.debuggable=1
start adbd
# NOTE: lpm is disabled
service hciattach /system/bin/brcm_patchram_plus --enable_hci \
--baudrate 3000000 --patchram /system/bin/BCM4329B1_002.002.023.0746.0832.hcd /dev/s3c2410_serial0
class main
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
# bugreport is triggered by holding down volume down, volume up and power
service bugreport /system/bin/dumpstate -d -v -o /sdcard/bugreports/bugreport
class main
disabled
oneshot
keycodes 114 115 116
service tvout /system/bin/tvoutserver
class late_start
user system
group graphics
service tvouthack /system/bin/tvouthack
user system
group graphics
disabled