forked from ohanar/android_device_samsung_smdk4210-tab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.smdkc210.common.rc
304 lines (244 loc) · 9.84 KB
/
init.smdkc210.common.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
on early-init
export EXTERNAL_STORAGE /mnt/sdcard
export SECONDARY_STORAGE /mnt/emmc
mkdir /mnt 0775 system system
mkdir /mnt/sdcard 0755 system system
mkdir /mnt/emmc 0775 system system
# for backwards compatibility
symlink /mnt/sdcard /sdcard
symlink /mnt/emmc /emmc
mkdir /mnt/usbdisk 0775 system system
mkdir /efs 0771 radio system
mkdir /preload 0771 system system
mkdir /mnt/.lfs 0755 root root
on init
# Filesystem image public mount points.
mkdir /mnt/.lfs 0755 root root
# ko files for vibrator
insmod /lib/modules/vibrator.ko
# Vibetonz
export VIBE_PIPE_PATH /dev/pipes
mkdir /dev/pipes 0771 shell shell
on post-fs
# to eliminate delay of "wait_for_coldboot_done", move these 2 lines here
insmod /lib/modules/j4fs.ko
mount j4fs /dev/block/mmcblk0p4 /mnt/.lfs
on post-fs-data
# we will remap this as /mnt/sdcard with the sdcard fuse tool
mkdir /data/media 0775 media_rw media_rw
chown media_rw media_rw /data/media
# give system access to wpa_supplicant.conf for backup and restore
mkdir /data/misc/wifi/sockets 0770 wifi wifi
mkdir /data/misc/dhcp 0770 dhcp dhcp
mkdir /data/misc/dhcpcd 0770 dhcp dhcp
chown dhcp dhcp /data/misc/dhcp
chown dhcp dhcp /data/misc/dhcpcd
# create log system
mkdir /data/log 0775 system log
chown system log /data/log
chown system system /data/anr
chmod 0775 /data/log
chmod 0775 /data/anr
chmod 0662 /dev/log/radio
chmod 0662 /dev/log/main
chmod 0662 /dev/log/event
#Change Permission /data/app for booting time
# chmod 0771 /data/app
# chown system system /data/app
mkdir /data/misc/radio 0775 radio system
#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
# setup for alsa snd device
symlink /dev/snd/pcmC0D0c /dev/pcmC0D0c
symlink /dev/snd/pcmC0D0p /dev/pcmC0D0p
symlink /dev/snd/controlC0 /dev/controlC0
symlink /dev/snd/timer /dev/timer
symlink /dev/snd/hwC0D0 /dev/hwC0D0
chmod 0777 /dev/pcmC0D0c
chmod 0777 /dev/pcmC0D0p
chmod 0777 /dev/controlC0
chmod 0777 /dev/timer
chmod 0777 /dev/hwC0D0
chmod 0777 /dev/snd/pcmC0D0c
chmod 0777 /dev/snd/pcmC0D0p
chmod 0777 /dev/snd/controlC0
chmod 0777 /dev/snd/timer
chmod 0777 /dev/snd/hwC0D0
# Set indication (checked by vold) that we have finished this action
setprop vold.post_fs_data_done 1
on boot
mount debugfs /sys/kernel/debug /sys/kernel/debug
setprop ro.build.product smdkc210
setprop ro.product.device smdkc210
# 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
# sensor
chown root system /dev/mpu
chown root system /dev/mpuirq
chown root system /dev/accelirq
chown root system /dev/timerirq
chmod 0660 /dev/mpu
chmod 0660 /dev/mpuirq
chmod 0660 /dev/accelirq
chmod 0660 /dev/timerirq
chmod 664 /sys/class/sensors/accelerometer_sensor/calibration
chown system system /sys/class/sensors/accelerometer_sensor/calibration
# permission for HDMI audio path
chown media audio /sys/devices/virtual/hdmi_audio/hdmi_audio/hdmi_audio_set_ext
# Permissions for System Server and daemons.
chown radio system /sys/class/sec/sec_switch/uart_sel
chmod 664 /sys/class/sec/sec_switch/uart_sel
chown radio system /sys/class/sec/sec_switch/usb_sel
chmod 664 /sys/class/sec/sec_switch/usb_sel
chown system system /sys/class/backlight/backlight/brightness
# Permissions for battery
chown radio system /sys/devices/platform/sec-battery/power_supply/battery/reset_soc
chown radio system /sys/devices/platform/sec-battery/power_supply/battery/siop_activated
# Permissions for input devices
chown system radio /sys/devices/virtual/sec/sec_key/sec_key_pressed
chown system radio /sys/devices/virtual/sec/tsp_noise_test/set_firm_version
chown system radio /sys/devices/virtual/sec/tsp_noise_test/set_threshould
chown system radio /sys/devices/virtual/sec/tsp_noise_test/set_all_delta
chown system radio /sys/devices/virtual/sec/tsp_noise_test/set_all_refer
chown system radio /sys/devices/virtual/sec/tsp_noise_test/set_delta4
chown system radio /sys/devices/virtual/sec/tsp_noise_test/set_refer4
chown system radio /sys/devices/virtual/sec/tsp_noise_test/set_delta3
chown system radio /sys/devices/virtual/sec/tsp_noise_test/set_refer3
chown system radio /sys/devices/virtual/sec/tsp_noise_test/set_delta2
chown system radio /sys/devices/virtual/sec/tsp_noise_test/set_refer2
chown system radio /sys/devices/virtual/sec/tsp_noise_test/set_delta1
chown system radio /sys/devices/virtual/sec/tsp_noise_test/set_refer1
chown system radio /sys/devices/virtual/sec/tsp_noise_test/set_delta0
chown system radio /sys/devices/virtual/sec/tsp_noise_test/set_refer0
chown system radio /sys/devices/virtual/sec/tsp_noise_test/disp_all_deltadata
chown system radio /sys/devices/virtual/sec/tsp_noise_test/disp_all_refdata
chown system radio /sys/devices/virtual/sec/tsp_noise_test/set_module_off
chown system radio /sys/devices/virtual/sec/tsp_noise_test/set_module_on
chown system radio /sys/devices/virtual/sec/sec_touchscreen/tsp_firm_version_panel
chown system radio /sys/devices/virtual/sec/sec_touchscreen/tsp_firm_version_phone
chown system radio /sys/devices/virtual/sec/sec_touchscreen/tsp_firm_update_status
chown system radio /sys/devices/virtual/sec/sec_touchscreen/tsp_firm_update
chown system radio /sys/devices/virtual/sec/sec_touchscreen/tsp_threshold
chown system radio /sys/devices/virtual/sec/sec_touchscreen/mxt_touchtype
# OTG Test
chown system radio /sys/class/host_notify/usb_otg/booster
chmod 0664 /sys/class/host_notify/usb_otg/booster
# Permissions for LCD
chown radio system /sys/class/lcd/lcd/acl_enable
# Permissions for mDNIe
chown system media_rw /sys/class/mdnie/mdnie/background_effect
chown system media_rw /sys/class/mdnie/mdnie/outdoor
chown system media_rw /sys/class/mdnie/mdnie/scenario
# Permissions for Torch
chown system media_rw /sys/class/camera/backcam/flash
chown system media_rw /sys/class/camera/rear/flash
# Permissions for DFMS
chown radio system /sys/class/lcd/lcd/lcdtype
# Vibetonz
chmod 0660 /dev/tspdrv
chown root shell /dev/tspdrv
# GPS
# UART device
chmod 0660 /dev/s3c2410_serial1
chown root system /dev/s3c2410_serial1
mkdir /data/gps 0771 system system
chown system system /data/gps
chmod 0664 /sys/class/sec/gps/GPS_PWR_EN/value
chown root system /sys/class/sec/gps/GPS_PWR_EN/value
chmod 0664 /sys/class/sec/gps/GPS_nRST/value
chown root system /sys/class/sec/gps/GPS_nRST/value
# MTP permission
chmod 0660 /dev/usb_mtp_gadget
chown system system /dev/usb_mtp_gadget
# keys
chown radio system /sys/class/sec/sec_key/wakeup_keys
# bluetooth
# UART device
chmod 0660 /dev/s3c2410_serial0
chown bluetooth bluetooth /dev/s3c2410_serial0
# power up/down interface
chmod 0660 /sys/class/rfkill/rfkill0/state
chmod 0660 /sys/class/rfkill/rfkill0/type
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
#chmod 6777 /system/bin/bcm_dut
# bluetooth MAC address programming
setprop ro.bt.bdaddr_path "/data/misc/bluetoothd/bt_addr"
chown bluetooth bluetooth ro.bt.bdaddr_path
# DVFS upper/under lock sysfs
chown radio system /sys/power/cpufreq_min_limit
chmod 0664 /sys/power/cpufreq_min_limit
chown radio system /sys/power/cpufreq_max_limit
chmod 0664 /sys/power/cpufreq_max_limit
chown radio system /sys/power/cpufreq_table
chmod 0444 /sys/power/cpufreq_table
# for datarouter
chown system system /dev/ttyGS0
chown system system /dev/dun
# Vibetonz
service immvibed /system/bin/immvibed
class core
user shell
group shell
oneshot
# Wifi
service wpa_supplicant /system/bin/wpa_supplicant \
-Dar6003 -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf
class main
socket wpa_wlan0 dgram 0660 wifi wifi
user wifi
group wifi system inet net_admin net_raw keystore
disabled
oneshot
service dhcpcd_wlan0 /system/bin/dhcpcd -ABKL wlan0
class main
disabled
oneshot
service iprenew_wlan0 /system/bin/dhcpcd -n
class main
disabled
oneshot
# 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 wil be created with user and group media_rw (1023)
service sdcard /system/bin/sdcard /data/media 1023 1023
class late_start
# TVout
service tvout /system/bin/tvoutserver
class main
user system
group graphics
# Always start root adbd on userdebug and eng builds
on property:ro.debuggable=1
setprop service.adb.root 1
on property:service.adb.root=1
setprop ro.secure 0
restart adbd
setprop ro.secure 1