forked from LineageOS/android_device_lge_iprj-common
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.iprj-common.rc
274 lines (228 loc) · 7.81 KB
/
init.iprj-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
import init.iprj.usb.rc
on early-boot
# set RLIMIT_MEMLOCK to 64MB
setrlimit 8 67108864 67108864
on boot
# yennie.kang for AMI306
chown compass system /dev/k3g_misc
chmod 0660 /dev/k3g_misc
chown compass system /dev/k3dh_acc_misc
chmod 0660 dev/k3dh_acc_misc
chown compass system /dev/ami306
chmod 0660 dev/ami306
chown compass system /dev/ami306daemon
chmod 0660 dev/ami306daemon
chown compass system /dev/ami306hal
chmod 0660 dev/ami306hal
mkdir /data/amit 0770 compass system
mkdir /data/gesture 0770 compass system
chown system system /sys/devices/virtual/input/lge_touch/keyguard
mkdir /data/misc/bluetooth 0770 bluetooth bluetooth
chown bluetooth bluetooth /sys/module/bluetooth_power/parameters/power
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
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 /sys/class/rfkill/rfkill0/state
chmod 0660 /proc/bluetooth/sleep/proto
chown bluetooth bluetooth /dev/ttyHS0
chmod 0660 /dev/ttyHS0
chown bluetooth bluetooth /sys/devices/platform/msm_serial_hs.0/clock
chmod 0660 /sys/devices/platform/msm_serial_hs.0/clock
chmod 0660 /proc/bluetooth/sleep/lpm
chmod 0660 /proc/bluetooth/sleep/btwrite
chown bluetooth bluetooth /proc/bluetooth/sleep/lpm
chown bluetooth bluetooth /proc/bluetooth/sleep/btwrite
restorecon /proc/bluetooth/sleep/lpm
restorecon /proc/bluetooth/sleep/btwrite
chmod 0444 /proc/cmdline
chown system system /sys/devices/platform/msm-charger/at_charge
chown system system /sys/devices/platform/msm-charger/at_chcomp
chown system system /sys/devices/platform/msm-charger/at_fuelrst
chown system system /sys/devices/platform/msm-charger/at_fuelval
chown system system /sys/devices/platform/msm-charger/at_pmrst
chown system system /sys/devices/platform/msm-charger/at_batl
# Torch perms
chown system camera /sys/class/leds/spotlight/brightness
chmod 0660 /sys/class/leds/spotlight/brightness
# PowerHAL perms
chown system system /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
on init
# Backward compatibility
symlink /system/bin /bin
# See storage config details at http://source.android.com/tech/storage/
export EXTERNAL_STORAGE /storage/sdcard0
# Support legacy paths
symlink /storage/sdcard0 /sdcard
symlink /storage/sdcard0 /mnt/sdcard
chmod 0701 /mnt/media_rw
mkdir /mnt/media_rw/sdcard0 0775 system system
mkdir /storage/sdcard0 0000 system system
on fs
wait /dev/block/mmcblk0
mkdir /system
mkdir /persist 0771 system system
mkdir /mpt 0771 system system
mkdir /tombstones 0771 system system
mkdir /tombstones/modem 0771 system system
mkdir /tombstones/mdm 0771 system system
mkdir /tombstones/lpass 0771 system system
mkdir /firmware 0771 system system
mkdir /modem 0771 system system
mount_all fstab.iprj
on post-fs
# mpt partition attribute
chown system system /mpt
chmod 0771 /mpt
mkdir /data/radio 0770 radio radio
mkdir /data/misc/sensors 0775 root root
write /data/system/sensors/settings 0
chmod 0664 /data/system/sensors/settings
# We chown/chmod /lgdrm again so because mount is run as root + defaults
mkdir /lgdrm 0770 lgdrm lgdrm_acc
mount yaffs2 mtd@lgdrm /lgdrm nosuid nodev
chown lgdrm lgdrm_acc /lgdrm
chmod 0770 /lgdrm
# create dirs if not exist
mkdir /data/lgdrm 0770 lgdrm lgdrm_acc
mkdir /data/wmdrm 0770 lgdrm lgdrm_acc
# time_daemon storage
mkdir /data/time/ 0700 system system
## ANDY_END
on post-fs-data
mkdir /data/misc/wifi 0770 wifi wifi
mkdir /data/misc/wifi/sockets 0770 wifi wifi
mkdir /data/misc/dhcp 0770 dhcp dhcp
chown dhcp dhcp /data/misc/dhcp
setprop vold.post_fs_data_done 1
# Hardware tunables
chown root system /sys/class/timed_output/vibrator/amp
chmod 0664 /sys/class/timed_output/vibrator/amp
restorecon /sys/class/timed_output/vibrator/amp
chown root system /sys/devices/platform/mdp.524801/kcal
chmod 0664 /sys/devices/platform/mdp.524801/kcal
restorecon /sys/devices/platform/mdp.524801/kcal
service chargerlogo /charger
class charger
user root
on property:init.svc.chargerlogo=running
setprop sys.usb.config adb
start rmt_storage
service rmt_storage /system/bin/rmt_storage /dev/block/mmcblk0p10 /dev/block/mmcblk0p11 /dev/block/mmcblk0p13
class core
user root
service qmiproxy /system/bin/qmiproxy
class main
user radio
group radio
disabled
service qmuxd /system/bin/qmuxd
class main
user radio
group radio
disabled
service qrngd /system/bin/qrngd -f
class main
user root
service netmgrd /system/bin/netmgrd
class main
disabled
service qcom-sh /system/bin/sh /init.qcom.sh
class core
user root
oneshot
service qcom-post-boot /system/bin/sh /system/etc/init.qcom.post_boot.sh
class main
user root
disabled
oneshot
service kickstart /system/bin/qcks l
class core
user system
group system
oneshot
seclabel u:r:kickstart:s0
disabled
# Start kickstart if csfb or svlte2a target
on property:ro.baseband=csfb
wait /dev/ttyHSL1
mkdir /data/qcks 0770 system system
write /sys/module/subsystem_restart/parameters/restart_level 2
start kickstart
service mdm_script3 /system/bin/sh /system/etc/init.qcom.baseband.sh
seclabel u:r:kickstart:s0
oneshot
on property:dev.bootcomplete=1
start mdm_script3
start qcom-post-boot
service mpdecision /system/bin/mpdecision --no_sleep --avg_comp
class main
user root
disabled
service thermald /system/bin/thermald
class main
user root
group root
disabled
service time_daemon /system/bin/time_daemon
user root
group root qcom_oncrpc
class late_start
service dhcpcd_wlan0 /system/bin/dhcpcd -aBKAL
class core
disabled
oneshot
service iprenew_wlan0 /system/bin/dhcpcd -n
class main
disabled
oneshot
service dhcpcd_p2p /system/bin/dhcpcd -aABKL
class main
disabled
oneshot
service iprenew_p2p /system/bin/dhcpcd -n
class main
disabled
oneshot
service p2p_supplicant /system/bin/wpa_supplicant \
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -N \
-ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \
-O/data/misc/wifi/sockets -puse_p2p_group_interface=1 \
-e/data/misc/wifi/entropy.bin -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 wpa_supplicant /system/bin/wpa_supplicant \
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
-O/data/misc/wifi/sockets \
-e/data/misc/wifi/entropy.bin -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
on property:dev.bootcomplete=1
stop bootanim
exec /system/bin/hwaddrs
service ami304d /system/bin/ami304d
class main
user compass
group system
service hdmid /system/bin/hdmid
class late_start
socket hdmid stream 0660 root system graphics
disabled
service fuse_sdcard0 /system/bin/sdcard -u 1023 -g 1023 /mnt/media_rw/sdcard0 /storage/sdcard0
class late_start
disabled
#on property:ro.hdmi.enable=true
# start hdmid