forked from CyanogenMod/android_device_lge_p999
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.p999.rc
246 lines (207 loc) · 7.58 KB
/
init.p999.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
import init.star.usb.rc
on init
export TMPDIR /data/local/tmp
export PHONE_STORAGE /storage/sdcard0 #internal_storage
export EXTERNAL_STORAGE /storage/sdcard1 #external_storage
# Backward compatibility
symlink /system/bin /bin
# create mountpoints for storage
mkdir /storage 0050 system sdcard_r
mkdir /storage/sdcard1 0000 system system #external_storage
mkdir /storage/sdcard0 0000 system system #internal_storage
symlink /storage/sdcard1 /sdcard
symlink /storage/sdcard1 /mnt/sdcard
symlink /storage/sdcard0 /emmc
symlink /storage/sdcard0 /mnt/emmc
#20100722, [email protected], Add external security folder [START]
mkdir /mnt/extsecure 0700 root root
mkdir /mnt/extsecure/staging 0700 root root
mkdir /mnt/extsecure/extasec 0700 root root
#20100722, [email protected], Add external security folder [END]
# Secure container public mount points.
mkdir /mnt/asec 0700 root system
mount tmpfs tmpfs /mnt/asec mode=0755,gid=1000
#20100722, [email protected], Add external security folder [START]
mkdir /mnt/extasec 0700 root system
mount tmpfs tmpfs /mnt/extasec mode=0755,gid=1000 noatime
#20100722, [email protected], Add external security folder [END]
## ANDY_PORTING LGDRM [[email protected] 100401]
mkdir /lgdrm 0770 system audio
## ANDY_END
on early-init
start hwprops
on fs
# mount partitions
mount ext4 /dev/block/mmcblk0p1 /system wait
mount ext4 /dev/block/mmcblk0p1 /system ro noatime remount barrier=1 wait
# We chown/chmod /data again so because mount is run as root + defaults
mount ext4 /dev/block/mmcblk0p7 /data nosuid nodev noatime barrier=1 wait
chown system system /data
chmod 0771 /data
mount ext4 /dev/block/mmcblk0p2 /cache nosuid nodev noatime barrier=1 wait
chown system cache /cache
chmod 0770 /cache
mount ext3 /dev/block/mmcblk0p6 /lgdrm nosuid nodev noatime
on post-fs
## LGE
mkdir /data/nv
chown system system /data/nv
chmod 0711 /data/nv
## LGE
chmod 0777 /data/misc/wifi/config_mac # 20101202 [email protected] [WLAN] AT command - MAC address read/write function
mkdir /data/audioprop 0777 system system
# 20100716 [email protected] <make wifi directory> [START]
# WIFI
mkdir /data/misc/wifi/sockets 0770 wifi wifi
setprop wifi.supplicant_scan_interval 20
setprop wifi.interface wlan0
# DHCP
mkdir /data/misc/dhcp 0777 system system
# 20100716 [email protected] <make wifi directory> [END]
## ANDY_PORTING LGDRM [[email protected] 100401]
# create dirs if not exist
mkdir /data/lgdrm 0770 root root
mkdir /data/wmdrm 0770 root root
setprop vold.post_fs_data_done 1
on boot
setprop net.tcp.buffersize.default 4096,87380,196608,4096,16384,110208
setprop net.tcp.buffersize.wifi 4096,87380,393216,4096,16384,110208
setprop net.tcp.buffersize.umts 4096,87380,393216,4096,16384,110208
setprop net.tcp.buffersize.edge 4096,26280,393216,4096,16384,35040
setprop net.tcp.buffersize.gprs 4096,8760,393216,4096,8760,11680
setprop net.tcp.buffersize.hspa 4096,87380,393216,4096,16384,110208
# Define sensor settings
chown system system /sys/devices/platform/tegra_gyro_accel/tilt_onoff
chown system system /sys/devices/platform/tegra_gyro_accel/tap_onoff
chown system system /sys/devices/platform/tegra_gyro_accel/shake_onoff
chown system system /sys/devices/platform/tegra_gyro_accel/snap_onoff
chown system system /sys/devices/platform/tegra_gyro_accel/flip_onoff
chown system system /sys/devices/platform/tegra_gyro_accel/tilt_delay
chown system system /sys/devices/platform/star_aat2870.0/lsensor_onoff
chown system system /sys/devices/platform/star_aat2870.0/alc
# light controls
chown system system /sys/class/leds/buttonpanel/brightness
chown system system /sys/class/leds/buttonpanel/enable
chown system system /sys/class/leds/buttonpanel/pulse
chown system system /sys/class/leds/buttonpanel/pulse_interval
# 20101107, [email protected], FOTA [START]
mkdir /data/fota 0777 system system
chown system system /data/fota
chmod 0777 /data/fota
chmod 777 /dev/block/mmcblk0p3
# kernel read permission
chmod 644 /dev/block/mmcblk0p5
# 20101107, [email protected], FOTA [END]
## LGE's bluetooth stuff
# bluetooth permissions
chmod 0660 /dev/ttyHS2
chown bluetooth bluetooth /dev/ttyHS2
chmod 0660 /sys/class/rfkill/rfkill0/state
chmod 0660 /sys/class/rfkill/rfkill0/type
chmod 0660 /sys/class/rfkill/rfkill1/state
chmod 0660 /sys/class/rfkill/rfkill1/type
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
chown bluetooth bluetooth /sys/class/rfkill/rfkill1/state
chown bluetooth bluetooth /sys/class/rfkill/rfkill1/type
# 20101121 BT: [email protected] - For the BD Address Read / Write
chmod 0666 /sys/devices/platform/star_bd_address/bdaddr_if
write /sys/class/rfkill/rfkill0/state 0
### End of LGE bluetooth
chmod 0644 /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
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
#directory to hwui blacklist
mkdir /data/local/hwui.deny 0775 system system
setprop vold.post_fs_data_done 1
service hwprops /sbin/hwprops
class core
disabled
oneshot
service lgdrm /system/bin/lgdrmserver
class core
user root
group sdcard_rw radio
service dhcpcd_wlan0 /system/bin/dhcpcd -ABKL
class core
disabled
oneshot
service iprenew_wlan0 /system/bin/dhcpcd -n
class main
disabled
oneshot
on property:init.svc.wpa_supplicant=stopped
stop dhcpcd_wlan0
service wpa_supplicant /system/bin/wpa_supplicant -Dwext -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf
class main
socket wpa_wlan0 dgram 0660 wifi wifi
disabled
oneshot
service secureclockd /system/bin/secureclockd
class main
oneshot
user system
group system
service hdmid /system/bin/hdmid
class main
user system
group system
disabled
## disable immersion vibrator, we want the standard API
#service immvibed /system/bin/immvibed
# user shell
# group shell
# oneshot
service nvrm_daemon /system/bin/nvrm_daemon
class core
user root
#onrestart restart servicemanager
# Daemon for Gyro Sensor
service motion /system/bin/motion
class main
user system
group system
oneshot
disabled
on property:dev.bootcomplete=1
start hdmid
start motion
service rawip_vsnet1 /system/bin/init.vsnet 1
class main
user root
group radio cache inet misc net_admin net_raw
disabled
oneshot
service rawip_vsnet2 /system/bin/init.vsnet 2
class main
user root
group radio cache inet misc net_admin net_raw
disabled
oneshot
service rawip_vsnet3 /system/bin/init.vsnet 3
class main
user root
group radio cache inet misc net_admin net_raw
disabled
oneshot
service rawip_vsnet4 /system/bin/init.vsnet 4
class main
user root
group radio cache inet misc net_admin net_raw
disabled
oneshot
service hciattach /system/bin/brcm_patchram_plus --enable_hci --enable_lpm \
--baudrate 3000000 --patchram /etc/firmware/BCM4329B1_002.002.023.0735.0745.hcd /dev/ttyHS2
class main
user bluetooth
group bluetooth net_bt_admin
disabled
## Avoid receiving the power-off from the framework
## to prevent radio init issues in the next boot
on property:sys.shutdown.requested=1
stop ril-daemon
on property:sys.shutdown.requested=1recovery
stop ril-daemon