-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.smdk4x12.rc
More file actions
executable file
·466 lines (389 loc) · 14.9 KB
/
init.smdk4x12.rc
File metadata and controls
executable file
·466 lines (389 loc) · 14.9 KB
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
import init.smdk4x12.usb.rc
import init.bt.rc
on early-init
mkdir /efs 0771 radio system
on init
# 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/extSdCard
mkdir /storage/extSdCard 0555 root root
# map "real" external storages paths also in same way. backwards compatibility.
symlink /storage/extSdCard /mnt/extSdCard
symlink /storage/UsbDriveA /mnt/UsbDriveA
symlink /storage/UsbDriveB /mnt/UsbDriveB
symlink /storage/UsbDriveC /mnt/UsbDriveC
symlink /storage/UsbDriveD /mnt/UsbDriveD
symlink /storage/UsbDriveE /mnt/UsbDriveE
symlink /storage/UsbDriveF /mnt/UsbDriveF
export SECONDARY_STORAGE /storage/extSdCard:/storage/UsbDriveA:/storage/UsbDriveB:/storage/UsbDriveC:/storage/UsbDriveD:/storage/UsbDriveE:/storage/UsbDriveF
mkdir /storage/extSdCard 0000 system system
mkdir /storage/UsbDriveA 0000 system system
mkdir /storage/UsbDriveB 0000 system system
mkdir /storage/UsbDriveC 0000 system system
mkdir /storage/UsbDriveD 0000 system system
mkdir /storage/UsbDriveE 0000 system system
mkdir /storage/UsbDriveF 0000 system system
# To store widevine keybox
symlink /data/app /factory
mkdir /preload 0771 system system
# Vibetonz
export VIBE_PIPE_PATH /dev/pipes
mkdir /dev/pipes 0771 shell shell
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
# SA, System SW, SAMSUNG create log directory
mkdir /data/log 0775 system log
chown system log /data/log
setprop vold.post_fs_data_done 1
chmod 0775 /data/log
chmod 0775 /data/anr
# for semco wifi module
# mkdir /data/misc/dhcp 0777 dhcp dhcp
# mkdir /data/misc/wifi/sockets 0777 wifi wifi
# mkdir /data/system 0775 wifi wifi
# mkdir /data/system/wpa_supplicant 0777 wifi wifi
# give system access to wpa_supplicant.conf for backup and restore
mkdir /data/misc/wifi 0770 wifi system
mkdir /efs/wifi 0775 radio system
mkdir /efs/bluetooth 0775 radio system
mkdir /efs/imei 0775 radio system
chmod 0660 /data/misc/wifi/wpa_supplicant.conf
mkdir /data/misc/wifi/sockets 0770 wifi wifi
mkdir /data/misc/dhcp 0775 dhcp dhcp
chown dhcp dhcp /data/misc/dhcp
chown system system /efs/wifi/.mac.info
chmod 0664 /efs/wifi/.mac.info
mkdir /data/misc/radio 0775 radio system
# permissions for bluetooth.
setprop ro.bt.bdaddr_path "/efs/bluetooth/bt_addr"
chown bluetooth net_bt_stack ro.bt.bdaddr_path
chown bluetooth net_bt_stack /dev/ttySAC0
chmod 0660 /dev/ttySAC0
chmod 0660 /sys/class/rfkill/rfkill0/state
chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/state
chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/type
# for TRP/TIS
write /data/.psm.info 1
chown system root /data/.psm.info
chmod 0660 /data/.psm.info
on boot
# SISO-ANDR_PERF :: START Changing scheduler to noop during boot
write /sys/block/mmcblk0/queue/scheduler noop
# SISO-ANDR_PERF :: END
setprop ro.build.product smdk4x12
setprop ro.product.device smdk4x12
# setprop ro.radio.noril yes
# mobicore
mkdir /data/app/mcRegistry 0775 system system
chmod 0660 /dev/mobicore
chown radio system /dev/mobicore
# S.LSI secdrv mem
chown system system /dev/s5p-smem
chmod 0660 /dev/s5p-smem
# WIFI
setprop wifi.interface wlan0
symlink /dev/block/mmcblk0p4 /dev/block/param
# <Sensors & NFC>
# Input Events
chown system radio /sys/class/input/input2/enable
chown system radio /sys/class/input/input2/poll_delay
chown system radio /sys/class/input/input3/enable
chown system radio /sys/class/input/input3/poll_delay
chown system radio /sys/class/input/input4/enable
chown system radio /sys/class/input/input4/poll_delay
chown system radio /sys/class/input/input5/enable
chown system radio /sys/class/input/input5/poll_delay
chown system radio /sys/class/input/input6/enable
chown system radio /sys/class/input/input6/poll_delay
chown system radio /sys/class/input/input7/enable
chown system radio /sys/class/input/input7/poll_delay
chown system radio /sys/class/input/input8/enable
chown system radio /sys/class/input/input8/poll_delay
chown system radio /sys/class/input/input9/enable
chown system radio /sys/class/input/input9/poll_delay
# 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
# Proximity_sensor
chown system radio /sys/class/sensors/proximity_sensor/state
chown system radio /sys/class/sensors/proximity_sensor/prox_avg
chown system radio /sys/class/sensors/proximity_sensor/prox_cal
chown system radio /sys/class/sensors/proximity_sensor/vendor
chown system radio /sys/class/sensors/proximity_sensor/name
chown system radio /sys/class/sensors/proximity_sensor/prox_thresh
# Light_sensor
chown system radio /sys/class/input/input7/enable
chown system radio /sys/class/input/input7/poll_delay
chown system radio /sys/class/sensors/light_sensor/lux
chown system radio /sys/class/sensors/light_sensor/raw_data
chown system radio /sys/class/sensors/light_sensor/vendor
chown system radio /sys/class/sensors/light_sensor/name
# Gyro_sensor
chown system radio /dev/lsm330dlc_gyro_misc
chown system radio /sys/class/sensors/gyro_sensor/power_on
chown system radio /sys/class/sensors/gyro_sensor/power_off
chown system radio /sys/class/sensors/gyro_sensor/temperature
chown system radio /sys/class/sensors/gyro_sensor/selftest
chown system radio /sys/class/sensors/gyro_sensor/selftest_dps
chown system radio /sys/class/sensors/gyro_sensor/vendor
chown system radio /sys/class/sensors/gyro_sensor/name
# Barometer_sensor
chown system radio /sys/class/input/input5/pressure_reference_level
chown system radio /sys/class/input/input5/temperature_reference_level
chown system radio /sys/class/input/input5/enable_autozero
chown system radio /sys/class/input/input5/compensation_param
chown system radio /sys/class/input/input5/reg_value
chown system radio /sys/class/input/input5/reg_addr
chown system radio /sys/class/sensors/barometer_sensor/sea_level_pressure
chown system radio /sys/class/sensors/barometer_sensor/vendor
chown system radio /sys/class/sensors/barometer_sensor/name
chown system radio /sys/class/sensors/barometer_sensor/calibration
# Magnetic_sensor
chown system radio /dev/akm8975
chown system radio /sys/class/sensors/magnetic_sensor/raw_data
chown system radio /sys/class/sensors/magnetic_sensor/vendor
chown system radio /sys/class/sensors/magnetic_sensor/name
# NFC
setprop ro.nfc.port "I2C"
chmod 0600 /dev/pn544
chown nfc nfc /dev/pn544
# Vibetonz
chmod 0660 /dev/tspdrv
chown root shell /dev/tspdrv
on fs
mount_all /fstab.smdk4x12
setprop ro.crypto.fuse_sdcard true
# for LogMeIn
mount ext4 /dev/block/mmcblk0p9 /system rw wait noatime remount
chown graphics /system/bin/RescueStarter
chmod 0755 /system/bin/RescueStarter
chown graphics /system/bin/RescueServer
chmod 0755 /system/bin/RescueServer
mount ext4 /dev/block/mmcblk0p9 /system ro wait noatime remount
# 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
# MTP device permission
chmod 0660 /dev/usb_mtp_gadget
chown system system /dev/usb_mtp_gadget
# Permissions for Gscaler log level
chmod 0666 /sys/module/gsc/parameters/gsc_dbg
# create data/gps for GPS daemon
chown root system /dev/ttySAC1
chmod 0660 /dev/ttySAC1
chown root system /sys/class/sec/gps/GPS_PWR_EN/value
chmod 0664 /sys/class/sec/gps/GPS_PWR_EN/value
chown root system /sys/class/sec/gps/GPS_nRST/value
chmod 0664 /sys/class/sec/gps/GPS_nRST/value
# make sure data_system dir and perms are properly set.
mkdir /data/system 0771 system system
chown system system /data/system
mkdir /data/system/gps 0771 system system
chown system system /data/system/gps
# Permissions for backlight
chown system system /sys/class/backlight/panel/brightness
chown system system /sys/class/backlight/panel/auto_brightness
chown system system /sys/class/sec/sec_touchkey/brightness
# Permissions for LCD
chown system radio /sys/class/lcd/panel/lcd_type
chown system radio /sys/class/lcd/panel/device/hs_toggle
chown system system /sys/class/lcd/panel/power_reduce
chown system system /sys/class/graphics/fb0/lcdfreq/level
chown system system /sys/class/lcd/panel/siop_enable
# Permissions for mDNIe
chown system system /sys/class/mdnie/mdnie/mode
chown system media_rw /sys/class/mdnie/mdnie/outdoor
chown system media_rw /sys/class/mdnie/mdnie/scenario
chown system system /sys/class/mdnie/mdnie/negative
chown system system /sys/class/mdnie/mdnie/accessibility
# OTG_TEST
chown system radio /sys/class/host_notify/usb_otg/booster
chmod 0660 /sys/class/host_notify/usb_otg/booster
# Switch Device
chown system radio /sys/class/sec/switch/otg_test
chown system radio /sys/class/sec/switch/adc
# IPC sysfs
chown radio radio /sys/devices/virtual/misc/multipdp/waketime
symlink /dev/block/mmcblk0p7 /dev/mbin0
on post-fs
chown radio system /efs
chmod 0771 /efs
# SISO-ANDR_PERF :: START Changing scheduler to cfq and reseting cpu min freq to -1 after boot complete
on property:sys.boot_completed=1
write /sys/block/mmcblk0/queue/scheduler cfq
write /sys/power/cpufreq_min_limit -1
# SISO-ANDR_PERF :: END
on property:persist.sys.storage_preload=1
mount ext4 /dev/block/mmcblk0p10 /preload nosuid nodev noatime wait ro
setprop storage.preload.complete 1
on property:persist.sys.storage_preload=0
exec /system/bin/umount /preload
## Daemon processes to be run by init.
##
service ueventd /sbin/ueventd
class core
critical
service console /system/bin/sh
class core
console
disabled
group log
on property:ro.debuggable=1
start console
# create filesystem if necessary
service setup_fs /system/bin/setup_fs \
/dev/block/mmcblk0p3 \
/dev/block/mmcblk0p4
class core
user root
group root
oneshot
# RILD
service ril-daemon /system/bin/rild
class main
socket rild stream 660 root radio
socket rild-debug stream 660 radio system
user root
group radio cache inet misc audio sdcard_rw log sdcard_r
onrestart restart cpboot-daemon
service cpboot-daemon /sbin/cbd -d
class main
user root
group radio cache inet misc audio sdcard_rw log sdcard_r
# create virtual SD card at /mnt/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 /data/media /mnt/shell/emulated 1023 1023
class late_start
# -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -N \
service p2p_supplicant /system/bin/p2p_supplicant \
-ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf -e/data/misc/wifi/entropy.bin -puse_p2p_group_interface=1
class main
disabled
oneshot
service wpa_supplicant /system/bin/wpa_supplicant \
-Dnl80211 -iwlan0 -e/data/misc/wifi/entropy.bin -c/data/misc/wifi/wpa_supplicant.conf
# 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
# GPS
service gpsd /system/bin/gpsd -c /system/etc/gps.xml
class main
user gps
group system inet net_raw
ioprio be 0
# TVout
service TvoutService_C /system/bin/bintvoutservice
class main
user system
group system
on property:ro.tvout.enable=false
stop TvoutService_C
service cpboot-daemon /sbin/cbd -d
class main
user root
group radio cache inet misc audio sdcard_rw log sdcard_r
# mobicore
service mcDriverDaemon /system/bin/mcDriverDaemon -r /system/app/FFFFFFFF000000000000000000000001.drbin
class late_start
user system
group system
# Vibetonz
service immvibed /system/bin/immvibed
class core
user shell
group shell
oneshot
#for WiFi MFG(TestMode)
service mfgloader /system/bin/mfgloader
class main
disabled
oneshot
service wlandutservice /system/bin/wlandutservice
class main
user system
group wifi net_raw net_admin system inet
disabled
oneshot
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
# for LogMeIn
service RescueStarter /system/bin/RescueStarter
class core
user graphics
group input graphics
# Bluetooth LE 2 wired Test
service LE_dut_cmd_on /system/bin/bttestintf enable
group bluetooth net_bt_admin
disabled
oneshot
service LE_dut_cmd_off /system/bin/bttestintf disable
group bluetooth net_bt_admin
disabled
oneshot
service bttestdaemon /system/bin/bttestd
class main
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
# SA, System SW, SAMSUNG
service bugreport /system/bin/bugmailer.sh -v
class main
disabled
oneshot
keycodes 114 115 116
# Runtime Compcache
service rtccd /system/bin/rtccd -a 200M
class core
user root
on property:ro.dumpstate.dmesg=1
write /proc/sys/kernel/dmesg_restrict 0