forked from ZeeRooo/android_device_lge_e400
-
Notifications
You must be signed in to change notification settings - Fork 1
/
init.e0.rc
308 lines (257 loc) · 11.6 KB
/
init.e0.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
import init.e0.usb.rc
on init
export TMPDIR /data/local/tmp
export EXTERNAL_STORAGE /storage/sdcard0
# Backward compatibility
symlink /system/bin /bin
# Storage
on early-init
mkdir /storage 0050 system sdcard_r
mkdir /storage/sdcard0 0000 system system
mkdir /storage/sdcard1 0000 system system
symlink /storage/sdcard0 /sdcard
on emmc-fs
# mount mmc partitions
wait /dev/block/mmcblk0p14
mount ext4 /dev/block/mmcblk0p14 /system data=ordered,barrier=1
symlink /data/misc/wifi/WCN1314_qcom_cfg.ini /system/etc/firmware/wlan/volans/WCN1314_qcom_cfg.ini
mount ext4 /dev/block/mmcblk0p14 /system remount 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
#setprop ro.crypto.fuse_sdcard true
wait /dev/block/mmcblk0p21
mount ext4 /dev/block/mmcblk0p21 /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
# 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/sens 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
#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 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
#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
# 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
chown system system /sys/class/android_usb/android0/f_mass_storage/lun0/file
chmod 0660 /sys/class/android_usb/android0/f_mass_storage/lun0/file
chown system system /sys/class/android_usb/android0/f_mass_storage/lun1/file
chmod 0660 /sys/class/android_usb/android0/f_mass_storage/lun1/file
on boot
mkdir /data/radio 0770 radio radio
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
chmod 0660 /data/hostapd/hostapd.conf
# 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
chown system system /sys/class/input/input2/range
chown system system /sys/class/input/input2/bandwidth
chown system system /sys/class/input/input2/mode
chown system system /sys/class/input/input2/value
chown system system /sys/class/input/input2/delay
chown system system /sys/class/input/input2/update
chown system system /sys/class/input/input2/selftest
chown system system /sys/class/input/input2/offset_filt_x
chown system system /sys/class/input/input2/offset_filt_y
chown system system /sys/class/input/input2/offset_filt_z
chown system system /sys/class/input/input2/fast_calibration_x
chown system system /sys/class/input/input2/fast_calibration_y
chown system system /sys/class/input/input2/fast_calibration_z
chown system system /sys/class/input/input2/eeprom_writing
chown system system /sys/class/input/input2/softreset
chmod 0666 /sys/bus/i2c/drivers/proximity_gp2ap/4-0044/enable
chmod 0666 /sys/bus/i2c/drivers/proximity_gp2ap/5-0044/enable
chown system system /sys/devices/platform/i2c-gpio.6/i2c-6/6-007d/enable
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
# Fix FFC
write /proc/sys/kernel/randomize_va_space 1
service rmt_storage /system/bin/rmt_storage /dev/block/mmcblk0p10 /dev/block/mmcblk0p11 /dev/block/mmcblk0p17
class core
user root
disabled
service sensord /system/bin/sensord
user system
group compass misc input
class core
oneshot
service setapversion /system/bin/lgapversion
class main
disabled
oneshot
on property:gsm.version.baseband=""
start setapversion
## WLAN
service wpa_supplicant /system/bin/logwrapper /system/bin/wpa_supplicant -Dwext -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf
class late_start
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 -BKAL
class late_start
disabled
oneshot
service iprenew_wlan0 /system/bin/dhcpcd -n
class late_start
disabled
oneshot
service qmiproxy /system/bin/qmiproxy
class late_start
user radio
group radio
service qmuxd /system/bin/qmuxd
class late_start
user radio
group radio
service netmgrd /system/bin/netmgrd
class late_start
service ril-daemon1 /system/bin/rild -c 1
class main
socket rild1 stream 660 root radio
socket rild-debug1 stream 660 radio system
user root
disabled
group radio cache inet misc audio sdcard_rw qcom_oncrpc qcom_diag log diag
service hciattach /system/bin/logwrapper /system/bin/sh /system/etc/init.qcom.bt.sh
class main
user bluetooth
group qcom_oncrpc bluetooth net_bt_admin
disabled
#start camera server as daemon
service qcamerasvr /system/bin/mm-qcamera-daemon
class late_start
user camera
group camera system inet audio
## 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