-
Notifications
You must be signed in to change notification settings - Fork 41
/
init.lge-shared.rc
324 lines (268 loc) · 11.8 KB
/
init.lge-shared.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
import init.lge.usb.rc
on init
export EXTERNAL_STORAGE /storage/sdcard0
# Backward compatibility
symlink /system/bin /bin
# create mountpoints for storage
mkdir /storage 0050 system sdcard_r
mkdir /storage/sdcard0 0000 system system
mkdir /storage/sdcard1 0000 system system
symlink /storage/sdcard0 /sdcard
# NFC
chmod 0600 /dev/pn544
chown nfc nfc /dev/pn544
setprop ro.nfc.port I2C
# Torch perms
chown system camera /sys/devices/platform/i2c-gpio.3/i2c-3/3-0030/brightness_uA
chmod 0660 /sys/devices/platform/i2c-gpio.3/i2c-3/3-0030/brightness_uA
on emmc-fs
# mount mmc partitions
wait /dev/block/mmcblk0p14
mount ext4 /dev/block/mmcblk0p14 /system ro data=ordered,barrier=1
wait /dev/block/mmcblk0p15
exec /system/bin/demigod_make_ext4fs -e /dev/block/mmcblk0p15 /persist
exec /system/bin/e2fsck -p /dev/block/mmcblk0p15
mount ext4 /dev/block/mmcblk0p15 /persist nosuid nodev data=ordered,barrier=1
wait /dev/block/mmcblk0p16
exec /system/bin/demigod_make_ext4fs -e /dev/block/mmcblk0p16 /cache
exec /system/bin/e2fsck -p /dev/block/mmcblk0p16
mount ext4 /dev/block/mmcblk0p16 /cache nosuid nodev data=ordered,barrier=1
wait /dev/block/mmcblk0p18
exec /system/bin/demigod_make_ext4fs -e /dev/block/mmcblk0p18 /persist-lg
exec /system/bin/e2fsck -p /dev/block/mmcblk0p18
mount ext4 /dev/block/mmcblk0p18 /persist-lg nosuid nodev data=ordered,barrier=1
#setprop ro.crypto.fuse_sdcard true
wait /dev/block/mmcblk0p20
mount ext4 /dev/block/mmcblk0p20 /data nosuid nodev noatime barrier=1,data=ordered,noauto_da_alloc,errors=continue
# LGE_CHANGE_E [[email protected]] 20120215
on post-fs
## [email protected] [2011-07-26] - Referred from Victor model
start rmt_storage
# msm specific files that need to be created on /data
on post-fs-data
mkdir /data/radio 0770 radio radio
# 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
#+s LGBT_COMMON_FUNCTION_BRINGUP - [email protected] 2011-12-10
mkdir /data/misc/bluetooth 0770 bluetooth bluetooth
mkdir /data/misc/bluetoothd 0770 bluetooth bluetooth #moved from init.rc - [email protected]
#+e LGBT_COMMON_FUNCTION_BRINGUP
mkdir /data/misc/wifi 0775 wifi radio
mkdir /data/misc/wifi/sockets 0770 wifi wifi
mkdir /data/misc/wifi/wpa_supplicant 0770 wifi wifi
mkdir /data/misc/dhcp 0770 dhcp dhcp
chown dhcp dhcp /data/misc/dhcp
## Sensors daemon stuff
mkdir /data/misc/sensor 2755 system compass
# Mounting of persist is moved to 'on emmc-fs' and 'on fs' sections
# We chown/chmod /persist again so because mount is run as root + defaults
chown system system /persist
chmod 0771 /persist
chmod 0664 /sys/devices/platform/msm_sdcc.1/polling
chmod 0664 /sys/devices/platform/msm_sdcc.2/polling
chmod 0664 /sys/devices/platform/msm_sdcc.3/polling
chmod 0664 /sys/devices/platform/msm_sdcc.4/polling
# Chown polling nodes as needed from UI running on system server
chown system system /sys/devices/platform/msm_sdcc.1/polling
chown system system /sys/devices/platform/msm_sdcc.2/polling
chown system system /sys/devices/platform/msm_sdcc.3/polling
chown system system /sys/devices/platform/msm_sdcc.4/polling
# // U0 public AAT [email protected] 20120303 [START] KCAL problem fix
chown system system /sys/devices/platform/msm_fb.525057/mdp_kcal
# // U0 public AAT [email protected] 20120303 [END]
chmod 0755 /sys/devices/platform/msm_fb.525057/mdp_kcal
#Write Permissions to Owner & Group. Make system as Owner & Group.
chmod 0664 /sys/devices/platform/msm-battery/chg_current_change
chown system system /sys/devices/platform/msm-battery/chg_current_change
#Create the symlink to qcn wpa_supplicant folder for ar6000 wpa_supplicant
mkdir /data/system 0775 system system
#Create directories for wiper services
mkdir /data/wpstiles/ 0755 shell
mkdir /data/wiper 0755 location qcom_oncrpc
#Create directories for gpsone_daemon services
mkdir /data/misc/gpsone_d 0770 system system
#Create directories for QuIPS
mkdir /data/misc/quipc 0770 gps system
#Create directory from IMS services
mkdir /data/shared 0755
#Provide the access to hostapd.conf only to root and group
chmod 0660 /data/hostapd/hostapd.conf
# Create /data/time folder for time-services
mkdir /data/time/ 0700 system system
mkdir /data/fpri 0777 system system
copy /proc/last_kmsg /data/dontpanic/last_kmsg
chown root log /data/dontpanic/last_kmsg
chmod 0640 /data/dontpanic/last_kmsg
# NFC
# Create directories for wiper services
mkdir /data/wpstiles/ 0755 shell
mkdir /data/wiper 0755 location qcom_oncrpc
# Create directories for gpsone_daemon services
mkdir /data/misc/gpsone_d 0770 gpsone_d qcom_oncrpc
# Create directory from IMS services
mkdir /data/shared 0755
# Log Service [START]
mkdir /data/logger 0771 system system
chown system system /data/logger
chmod 0771 /data/logger
# Log Service [END]
# Dummy file, to keep the API happy. The default firmware does both modes
write /data/misc/wifi/fwpath ""
chmod 0666 /data/misc/wifi/fwpath
on boot
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
chown bluetooth bluetooth /sys/module/hci_smd/parameters/hcismd_set
chmod 0660 /sys/module/bluetooth_power/parameters/power
chmod 0660 /sys/module/hci_smd/parameters/hcismd_set
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 0444 /sys/devices/platform/msm_hsusb/gadget/usb_state
# Remove write permissions to video related nodes
chmod 0664 /sys/devices/virtual/graphics/fb1/hpd
chmod 0664 /sys/devices/virtual/graphics/fb1/video_mode
chmod 0664 /sys/devices/virtual/graphics/fb1/format_3d
# Change owner and group for media server and surface flinger
chown media system /sys/devices/virtual/graphics/fb1/format_3d
#For netmgr daemon to inform the USB driver of the correct transport
chown radio radio /sys/class/usb_composite/rmnet_smd_sdio/transport
#To allow interfaces to get v6 address when tethering is enabled
write /proc/sys/net/ipv6/conf/rmnet0/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet1/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet2/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet3/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet4/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet5/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet6/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet7/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet_sdio0/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet_sdio1/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet_sdio2/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet_sdio3/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet_sdio4/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet_sdio5/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet_sdio6/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet_sdio7/accept_ra 2
write /proc/sys/vm/vfs_cache_pressure 100
chmod 0664 /sys/class/leds/lcd-backlight/alc
chown system system /sys/class/leds/lcd-backlight/alc
chmod 0664 /sys/class/leds/lcd-backlight/brightness
# rmt-storage
chown system system /sys/devices/platform/rs300000a7.65536/send_sync
chmod 0764 /sys/devices/platform/rs300000a7.65536/send_sync
#write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ondemand
#write /sys/devices/system/cpu/cpufreq/ondemand/up_threshold 90
#write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 245760
#write /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate 25000
#chown system system /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
chown system /sys/devices/platform/rs300000a7.65536/force_sync
chown system /sys/devices/platform/rs300000a7.65536/sync_sts
chown system /sys/devices/platform/rs300100a7.65536/force_sync
chown system /sys/devices/platform/rs300100a7.65536/sync_sts
#chown system /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
service rmt_storage /system/bin/rmt_storage /dev/block/mmcblk0p10 /dev/block/mmcblk0p11 /dev/block/mmcblk0p17
class core
user root
disabled
## LGE_CHANGE_S, U0-SENSOR [[email protected]] 2011-09-96
# compass/accelerometer daemon for U0
service sensord /system/bin/sensord
class core
oneshot
## LGE_CHANGE_E
service setapversion /system/bin/lgapversion
class main
disabled
oneshot
on property:gsm.version.baseband=""
start setapversion
## WLAN
service p2p_supplicant /system/bin/logwrapper /system/bin/wpa_supplicant -Dnl80211 -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf
class late_start
# user root
group wifi inet
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot
service wpa_supplicant /system/bin/logwrapper /system/bin/wpa_supplicant -Dnl80211 -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf
class late_start
# user root
group wifi inet
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot
on property:init.svc.wpa_supplicant=stopped
stop dhcpcd
on property:wlan.driver.status=loading
write /sys/devices/platform/msm_sdcc.2/polling 1
on property:wlan.driver.status=failed
write /sys/devices/platform/msm_sdcc.2/polling 0
on property:wlan.driver.status=unloaded
write /sys/devices/platform/msm_sdcc.2/polling 0
on property:wlan.driver.status=ok
write /sys/devices/platform/msm_sdcc.2/polling 0
service dhcpcd_wlan0 /system/bin/dhcpcd -aBKAL
class late_start
disabled
oneshot
service iprenew_wlan0 /system/bin/dhcpcd -n
class late_start
disabled
oneshot
service qmiproxy /system/bin/qmiproxy
class core
user radio
group radio
service qmuxd /system/bin/qmuxd
class core
user radio
group radio
service netmgrd /system/bin/netmgrd
class core
service hciattach /system/bin/logwrapper /system/bin/sh /system/etc/init.qcom.bt.sh
class late_start
user bluetooth
group qcom_oncrpc bluetooth net_bt_admin
disabled
oneshot
service sdcard /system/bin/sdcard /data/media 1023 1023
class late_start
## TEMPORARY. WE NEED AN FSTAB TO USE mount_all
on property:dev.bootcomplete=1
start setapversion
class_start late_start
service charger /charger
class charger
user root
group root
oneshot
service hostapd /system/bin/hostapd -dddd /data/misc/wifi/hostapd.conf
class late_start
user root
group root
oneshot
disabled
#start camera server as daemon
service qcamerasvr /system/bin/mm-qcamera-daemon
class late_start
user camera
group camera system inet audio
# Values from the original post_boot scriptage
on property:dev.bootcomplete=1
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "ondemand"
write /sys/devices/system/cpu/cpufreq/ondemand/up_threshold 90
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 245760
write /sys/devices/platform/msm_sdcc.1/idle_timeout 10
write /sys/module/pm2/modes/cpu0/power_collapse/suspend_enabled 1
write /sys/module/pm2/modes/cpu0/power_collapse/idle_enabled 1
write /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate 25000
write /sys/module/lowmemorykiller/parameters/adj 0,1,2,4,9,12
write /proc/sys/vm/min_free_kbytes 5120