forked from darchstar/android_device_samsung_epic4gtouch
-
Notifications
You must be signed in to change notification settings - Fork 5
/
init.smdk4210.rc
463 lines (394 loc) · 17.7 KB
/
init.smdk4210.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
import init.smdk4210.usb.rc
on early-init
export PHONE_STORAGE /mnt/sdcard
export EXTERNAL_STORAGE /mnt/external_sd
mkdir /mnt 0775 system system
mkdir /mnt/sdcard 0000 system system
mkdir /mnt/external_sd 0000 system system
mkdir /mnt/usbdisk 0000 system system
mkdir /efs 0771 radio system
mkdir /preload 0771 system system
mkdir /mnt/.lfs 0755 root root
# for backwards compatibility
symlink /mnt/sdcard /sdcard
symlink /mnt/external_sd /external_sd
#my way is better than anyone
symlink /system/vendor /vendor
# Disable CFQ slice idle delay
write /sys/block/mmcblk0/queue/iosched/slice_idle 0
# FIXME: permissions for tvout
chmod 0777 /dev/graphics/fb0
chmod 0777 /dev/graphics/fb10
chmod 0777 /dev/graphics/fb11
on fs
# mount ext4 partitions
mount ext4 /dev/block/mmcblk0p9 /system noatime wait ro
mount ext4 /dev/block/mmcblk0p7 /cache nosuid nodev noatime wait
mount ext4 /dev/block/mmcblk0p10 /data nosuid nodev noatime wait
mount ext4 /dev/block/mmcblk0p12 /preload nosuid nodev noatime wait
mount ext4 /dev/block/mmcblk0p1 /efs nosuid nodev noatime wait
mkdir /efs/bluetooth
mkdir /efs/wifi
chown radio system /efs/bluetooth
chown radio system /efs/wifi
chmod 0775 /efs/bluetooth
chmod 0775 /efs/wifi
mkdir /data/misc/vpn/profiles 0770 system system
mkdir /data/misc/radio 0775 radio system
chmod 0770 /data/misc/wifi
on post-fs-data
#load modules
insmod /system/lib/modules/cyasswitch.ko
insmod /system/lib/modules/j4fs.ko
insmod /system/lib/modules/scsi_wait_scan.ko
mount j4fs /dev/block/mmcblk0p4 /mnt/.lfs
# GPS
chown root system /dev/ttySAC1
chmod 0660 /dev/ttySAC1
chown root root /sys/class/sec/gps/GPS_PWR_EN/value
chmod 0664 /sys/class/sec/gps/GPS_PWR_EN/value
chown root root /sys/class/sec/gps/GPS_nRST/value
chmod 0664 /sys/class/sec/gps/GPS_nRST/value
mkdir /data/gps 771 system system
chown system system /data/gps
# give system access to wpa_supplicant.conf for backup and restore
mkdir /data/misc/wifi 0770 wifi wifi
chmod 0770 /data/misc/wifi
chmod 0660 /data/misc/wifi/wpa_supplicant.conf
mkdir /data/misc/wifi/sockets 0770 wifi wifi
mkdir /data/misc/dhcp 0770 dhcp dhcp
chown dhcp dhcp /data/misc/dhcp
# LED Light Triggers
chown system system /sys/class/leds/red/trigger
chmod 0644 /sys/class/leds/red/trigger
chown system system /sys/class/leds/blue/trigger
chmod 0644 /sys/class/leds/blue/trigger
#DRM directory creation
mkdir /system/etc/security/.drm 0775
chown root root /system/etc/security/.drm
chmod 0775 /system/etc/security/.drm
# Added for Playready DRM Support
mkdir /data/data/.drm 0775
chown drm system /data/data/.drm
chmod 0775 /data/data/.drm
mkdir /data/data/.drm/.playready 0775
chown drm system /data/data/.drm/.playready
chmod 0775 /data/data/.drm/.playready
#Added drm folder to copy drm plugins
mkdir /system/lib/drm 0775
chown root root /system/lib/drm
chmod 0775 /system/lib/drm
# DivX DRM
mkdir /efs/.files 0775
mkdir /efs/.files/.dx1 0775
mkdir /efs/.files/.dm33 0775
mkdir /efs/.files/.mp301 0775
chown media system /efs/.files/.dx1
chown media system /efs/.files/.dm33
chown media system /efs/.files/.mp301
chmod 0775 /efs/.files/.dx1
chmod 0775 /efs/.files/.dm33
chmod 0775 /efs/.files/.mp301
# MTP Device permission.
chmod 0660 /dev/usb_mtp_gadget
chown system system /dev/usb_mtp_gadget
# terminal mode
chown root root /sys/class/android_usb/android0/terminal_version
chmod 0444 /sys/class/android_usb/android0/terminal_version
# NFC
# setprop ro.nfc.port "I2C"
# chmod 0600 /dev/pn544
# chown nfc nfc /dev/pn544
# setup for alsa snd device
chmod 0770 /dev/snd/pcmC0D0c
chmod 0770 /dev/snd/pcmC0D0p
chmod 0770 /dev/snd/controlC0
chmod 0770 /dev/snd/timer
chmod 0770 /dev/snd/hwC0D0
# create log system
mkdir /data/log 0775 system log
chown system log /data/log
chmod 0775 /data/log
chmod 0775 /data/anr
chmod 0662 /dev/log/radio
chmod 0662 /dev/log/main
chmod 0662 /dev/log/event
#panorama directory creation
mkdir /data/pxtmpdir 0775
chown system system /data/pxtmpdir
chmod 0775 /data/pxtmpdir
# Permissions for gpio_keys.
chown radio system /sys/class/sec/sec_key/wakeup_keys
chmod 0660 /sys/class/sec/sec_key/wakeup_keys
write /sys/class/sec/sec_key/wakeup_keys 102,116
# Add permission for ATM. 2010.03.20
chown radio system /sys/devices/platform/i2c-gpio.9/i2c-9/9-0036/power_supply/fuelgauge/fg_read_soc
chown radio system /sys/devices/platform/i2c-gpio.9/i2c-9/9-0036/power_supply/fuelgauge/fg_reset_soc
chown radio system /sys/devices/platform/sec-battery/power_supply/battery/batt_lpm_state
chown radio system /sys/devices/platform/sec-battery/power_supply/battery/fg_psoc
chown radio system /sys/devices/platform/sec-battery/power_supply/battery/system_rev
chown radio system /sys/devices/platform/sec-battery/power_supply/battery/batt_current_adc
chown radio system /sys/devices/platform/sec-battery/power_supply/battery/batt_test_value
chown radio system /sys/devices/platform/sec-battery/power_supply/battery/batt_temp_adc_spec
chown radio system /sys/devices/platform/sec-battery/power_supply/battery/batt_temp_check
chown radio system /sys/devices/platform/sec-battery/power_supply/battery/batt_full_check
chown radio system /sys/devices/platform/sec-battery/power_supply/battery/batt_type
chown radio system /sys/devices/platform/sec-battery/power_supply/battery/mp3
chown radio system /sys/devices/platform/sec-battery/power_supply/battery/video
chown radio system /sys/devices/platform/sec-battery/power_supply/battery/batt_lp_charging
chown radio system /sys/devices/platform/sec-battery/power_supply/battery/charging_source
chown radio system /sys/devices/platform/sec-battery/power_supply/battery/batt_temp_adc_avg
chown radio system /sys/devices/platform/sec-battery/power_supply/battery/batt_temp_adc
chown radio system /sys/devices/platform/sec-battery/power_supply/battery/batt_temp
chown radio system /sys/devices/platform/sec-battery/power_supply/battery/batt_vfocv
chown radio system /sys/devices/platform/sec-battery/power_supply/battery/batt_soc
chown radio system /sys/devices/platform/sec-battery/power_supply/battery/batt_vol
chown radio system /sys/devices/platform/sec-battery/power_supply/battery/wimax
chown system system /sys/class/backlight/panel/brightness
chown system system /sys/class/power_supply/battery/temp
chmod 0444 /sys/class/power_supply/battery/temp
# Permissions for input devices
chown root root /sys/devices/virtual/sec/sec_key/sec_key_pressed
chmod 0660 /sys/devices/virtual/sec/sec_key/sec_key_pressed
chown radio system /sys/devices/virtual/sec/sec_touchkey/enable_disable
chmod 0660 /sys/devices/virtual/sec/sec_touchkey/enable_disable
chown radio system /sys/devices/virtual/sec/sec_touchkey/recommended_version
chmod 0660 /sys/devices/virtual/sec/sec_touchkey/recommended_version
chown radio system /sys/devices/virtual/sec/sec_touchkey/touch_sensitivity
chmod 0660 /sys/devices/virtual/sec/sec_touchkey/touch_sensitivity
chown radio system /sys/devices/virtual/sec/sec_touchkey/brightness
chmod 0660 /sys/devices/virtual/sec/sec_touchkey/brightness
chown radio system /sys/devices/virtual/sec/sec_touchkey/touchkey_brightness
chmod 0660 /sys/devices/virtual/sec/sec_touchkey/touchkey_brightness
chown radio system /sys/devices/virtual/sec/sec_touchkey/touchkey_back
chmod 0660 /sys/devices/virtual/sec/sec_touchkey/touchkey_back
chown radio system /sys/devices/virtual/sec/sec_touchkey/touchkey_menu
chmod 0660 /sys/devices/virtual/sec/sec_touchkey/touchkey_menu
chown radio system /sys/devices/virtual/sec/sec_touchkey/touchkey_firm_version_panel
chmod 0660 /sys/devices/virtual/sec/sec_touchkey/touchkey_firm_version_panel
chown radio system /sys/devices/virtual/sec/sec_touchkey/touchkey_firm_version_phone
chmod 0660 /sys/devices/virtual/sec/sec_touchkey/touchkey_firm_version_phone
chown radio system /sys/devices/virtual/sec/sec_touchkey/touchkey_firm_update_status
chmod 0660 /sys/devices/virtual/sec/sec_touchkey/touchkey_firm_update_status
chown radio system /sys/devices/virtual/sec/sec_touchkey/touchkey_firm_update
chmod 0660 /sys/devices/virtual/sec/sec_touchkey/touchkey_firm_update
chown radio system /sys/devices/virtual/sec/sec_touchkey/updated_version
chmod 0660 /sys/devices/virtual/sec/sec_touchkey/updated_version
chown radio system /sys/devices/virtual/sec/tsp_noise_test/set_firm_version
chown radio system /sys/devices/virtual/sec/tsp_noise_test/set_threshould
chown radio system /sys/devices/virtual/sec/tsp_noise_test/set_all_delta
chown radio system /sys/devices/virtual/sec/tsp_noise_test/set_all_refer
chown radio system /sys/devices/virtual/sec/tsp_noise_test/set_delta4
chown radio system /sys/devices/virtual/sec/tsp_noise_test/set_refer4
chown radio system /sys/devices/virtual/sec/tsp_noise_test/set_delta3
chown radio system /sys/devices/virtual/sec/tsp_noise_test/set_refer3
chown radio system /sys/devices/virtual/sec/tsp_noise_test/set_delta2
chown radio system /sys/devices/virtual/sec/tsp_noise_test/set_refer2
chown radio system /sys/devices/virtual/sec/tsp_noise_test/set_delta1
chown radio system /sys/devices/virtual/sec/tsp_noise_test/set_refer1
chown radio system /sys/devices/virtual/sec/tsp_noise_test/set_delta0
chown radio system /sys/devices/virtual/sec/tsp_noise_test/set_refer0
chown radio system /sys/devices/virtual/sec/tsp_noise_test/disp_all_deltadata
chown radio system /sys/devices/virtual/sec/tsp_noise_test/disp_all_refdata
chown radio system /sys/devices/virtual/sec/tsp_noise_test/set_module_off
chown radio system /sys/devices/virtual/sec/tsp_noise_test/set_module_on
chown radio system /sys/devices/virtual/sec/sec_touchscreen/tsp_firm_version_panel
chown radio system /sys/devices/virtual/sec/sec_touchscreen/tsp_firm_version_phone
chown radio system /sys/devices/virtual/sec/sec_touchscreen/tsp_firm_update_status
chown radio system /sys/devices/virtual/sec/sec_touchscreen/tsp_firm_update
chown radio system /sys/devices/virtual/sec/sec_touchscreen/tsp_threshold
chown radio system /sys/devices/virtual/sec/sec_touchscreen/tsp_config_version
chown radio system /sys/devices/virtual/sec/sec_touchscreen/tsp_touchtype
# Permissions for bluetooth
setprop ro.bt.bdaddr_path "/efs/bluetooth/bt_addr"
chown bluetooth bluetooth /efs/bluetooth/bt_addr
chown bluetooth bluetooth /dev/ttySAC0
chmod 0600 /efs/bluetooth/bt_addr
chmod 0600 /dev/ttySAC0
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
chmod 0660 /sys/class/rfkill/rfkill0/state
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
chmod 0444 /sys/class/rfkill/rfkill0/type
on property:ril.cdma.data_state=1
restart pppd_cdma
on property:ril.cdma.data_state=0
stop pppd_cdma
# Vibetonz
chown root shell /dev/tspdrv
chmod 0660 /dev/tspdrv
chown system system /sys/vibrator/pwm_val
chmod 0660 /sys/vibrator/pwm_val
# Permissions for LCD
chown radio system /sys/class/lcd/panel/lcd_power
chmod 0664 /sys/class/lcd/panel/lcd_power
chown radio system /sys/class/lcd/panel/lcd_type
chmod 0664 /sys/class/lcd/panel/lcd_type
chown radio radio /sys/class/lcd/panel/gamma_mode
chmod 0664 /sys/class/lcd/panel/gamma_mode
chown radio radio /sys/class/lcd/panel/power_reduce
chmod 0664 /sys/class/lcd/panel/power_reduce
chown radio radio /sys/class/backlight/panel/auto_brightness
chmod 0664 /sys/class/backlight/panel/auto_brightness
# Permissions for mDNIe
chown radio radio /sys/devices/platform/samsung-pd.2/mdnie/mdnie/mdnie/mode
chmod 0660 /sys/devices/platform/samsung-pd.2/mdnie/mdnie/mdnie/mode
chown radio radio /sys/devices/platform/samsung-pd.2/mdnie/mdnie/mdnie/outdoor
chmod 0660 /sys/devices/platform/samsung-pd.2/mdnie/mdnie/mdnie/outdoor
chown radio radio /sys/devices/platform/samsung-pd.2/mdnie/mdnie/mdnie/scenario
chmod 0660 /sys/devices/platform/samsung-pd.2/mdnie/mdnie/mdnie/scenario
chown radio radio /sys/devices/platform/samsung-pd.2/mdnie/mdnie/mdnie/negative
chmod 0660 /sys/devices/platform/samsung-pd.2/mdnie/mdnie/mdnie/negative
write /sys/devices/platform/samsung-pd.2/mdnie/mdnie/mdnie/scenario 4
# Permissions for uart_sel and usb_sel
chown radio system /sys/class/sec/switch/uart_sel/value
chmod 0660 /sys/class/sec/switch/uart_sel/value
chown radio system /sys/class/sec/switch/usb_sel
chmod 0660 /sys/class/sec/switch/usb_sel
chown radio system /sys/class/sec/switch/audio_path
chmod 0660 /sys/class/sec/switch/audio_path
chown radio system /sys/class/sec/switch/otg_test
chmod 0660 /sys/class/sec/switch/otg_test
chown radio system /sys/class/sec/switch/adc_debounce_time
chmod 0660 /sys/class/sec/switch/adc_debounce_time
chown radio system /sys/class/sec/switch/status
chmod 0660 /sys/class/sec/switch/status
chown radio system /sys/class/sec/switch/adc
chmod 0660 /sys/class/sec/switch/adc
chown radio system /mnt/.lfs/sw_sel
# Permissions for OTG Test
chown root root /sys/class/host_notify/usb_otg/booster
chmod 0660 /sys/class/host_notify/usb_otg/booster
# Permission for radio
chown radio system /sys/devices/platform/s5p-ehci/ehci_power
chown radio system /sys/devices/platform/s5p-ehci/ehci_runtime
chown root root /sys/devices/virtual/misc/multipdp/waketime
# for datarouter
chown system system /dev/dun
chown system system /dev/ttyGS0
chown system system /dev/ttyGS1
chown system system /dev/ttyGS2
chown system system /dev/ttyGS3
# DVFS - cpufreq ondemand
write /sys/devices/system/cpu/cpufreq/ondemand/down_differential 5
write /sys/devices/system/cpu/cpufreq/ondemand/up_threshold 85
on boot
chown radio radio /sys/class/backlight/pwm-backlight/brightness
chmod 0664 /sys/class/backlight/pwm-backlight/brightness
chown radio radio /sys/devices/virtual/misc/melfas_touchkey/brightness
chmod 0664 /sys/devices/virtual/misc/melfas_touchkey/brightness
#panorama directory creation
mkdir /data/pxtmpdir 0775
chown system system /data/pxtmpdir
chmod 0775 /data/pxtmpdir
# Permissions for dvfs lock
chown system system /sys/power/cpufreq_max_limit
chown system system /sys/power/cpufreq_min_limit
chmod 0660 /sys/power/cpufreq_max_limit
chmod 0660 /sys/power/cpufreq_min_limit
chown radio system /sys/power/gpu_lock
chmod 0660 /sys/power/gpu_lock
mount debugfs /sys/kernel/debug /sys/kernel/debug
setprop ro.build.product SPH-D710
setprop ro.product.device SPH-D710
setprop ro.radio.noril yes
# Permisions for sensors
chown radio system /sys/devices/virtual/K3G_GYRO-dev/k3g/gyro_selftest
chown radio system /sys/devices/virtual/K3G_GYRO-dev/k3g/gyro_get_temp
chown radio system /sys/devices/virtual/K3G_GYRO-dev/k3g/gyro_power_on
chown radio system /sys/devices/virtual/accelerometer/accelerometer/acc_file
chown radio system /sys/devices/virtual/sec/gsensorcal/calibration
# for device encryption
setprop vold.post_fs_data_done 1
# permissions for NFC
# setprop ro.nfc.port "I2C"
# chmod 0600 /dev/pn544
# chown nfc nfc /dev/pn544
# Device Encryption by B2B Security Lab.
setprop ro.crypto.keyfile.userdata /efs/metadata
# 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
service wpa_supplicant /system/bin/wpa_supplicant \
-Dnl80211 -puse_p2p_group_interface=1 -e/data/misc/wifi/entropy.bin
class main
socket wpa_wlan0 dgram 0660 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
service pppd_cdma /system/bin/pppd_runner
class main
user root
group radio cache inet misc system
disabled
oneshot
# for bluetooth
service hciattach /system/bin/brcm_patchram_plus --enable_hci --enable_lpm --no2bytes --tosleep 50000 \
--baudrate 3000000 --use_baudrate_for_download --patchram /system/bin/bcm4330B1.hcd \
--scopcm=0,0,0,0,0,0,0,3,3,0 /dev/ttySAC0
class main
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
# bluetooth mac address
service bdaddr /system/bin/bdaddr_read
class main
user root
disabled
oneshot
# Wimax changes
service dhcpcd_uwbr0 /system/bin/dhcpcd -ABKL
class main
disabled
oneshot
# wimax
service iprenew_uwbr0 /system/bin/dhcpcd -n
class main
disabled
oneshot
# GPS
service gpsd /system/bin/gpsd
class main
user system
group system inet
# TVout
service TvoutService_C /system/bin/bintvoutservice
class main
user system
group graphics
service initd /system/xbin/busybox run-parts /system/etc/init.d
user root
oneshot
disabled
# bugreport is triggered by holding down volume down, volume up and power
#service bugreport /system/bin/bugmailer.sh -v
# class main
# disabled
# oneshot
# keycodes 114 115 116
service wimax_route /system/bin/route add default dev uwbr0
class main
disabled
oneshot
service wlandutservice /system/bin/wlandutservice
user system
group wifi net_raw net_admin system inet
disabled
oneshot