forked from hjunii/android_device_lge_p990
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.cm-star.rc
276 lines (222 loc) · 8.87 KB
/
init.cm-star.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
import init.star.usb.rc
on init
export TMPDIR /data/local/tmp
mkdir /mnt/media_rw/sdcard0 0700 media_rw media_rw
mkdir /storage/sdcard0 0700 root root
mkdir /mnt/media_rw/sdcard1 0700 media_rw media_rw
mkdir /storage/sdcard1 0700 root root
export EXTERNAL_STORAGE /storage/sdcard0
export SECONDARY_STORAGE /storage/sdcard1
# Support legacy paths
symlink /storage/sdcard0 /sdcard
symlink /storage/sdcard0 /mnt/sdcard
symlink /storage/sdcard0 /storage/sdcard
# Backward compatibility
symlink /system/bin /bin
# 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
write /sys/class/firmware/timeout 5
on fs
on post-fs
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 180
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
# Hall IC
chmod 0644 /sys/devices/platform/star_hall/onoff
chmod 0644 /sys/devices/platform/star_hall/sensing
chown system system /sys/devices/platform/star_hall/onoff
chown system system /sys/devices/platform/star_hall/sensing
# Proximity
chmod 0644 /sys/devices/platform/tegra-i2c.1/i2c-2/2-0044/status
chmod 0644 /sys/devices/platform/tegra-i2c.1/i2c-2/2-0044/enable
chown system system /sys/devices/platform/tegra-i2c.1/i2c-2/2-0044/status
chown system system /sys/devices/platform/tegra-i2c.1/i2c-2/2-0044/enable
#MOBII_CHNANGE_E 20120213 [email protected] : Appy Sensor Porting
chmod 0664 /sys/devices/platform/i2c-gpio.5/i2c-5/5-0060/alc
chown system system /sys/devices/platform/i2c-gpio.5/i2c-5/5-0060/alc
# Battery
# audio
chmod 0664 /sys/power/suspend/mode
chown system audio /sys/power/suspend/mode
# LGE_CHANGE_S [[email protected]] 2012-02-15
chown audio audio /dev/pts29
# LGE_CHANGE_E [[email protected]] 2012-02-15
# Power management settings
write /sys/module/cpuidle/parameters/lp2_in_idle 1
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/i2c-gpio.5/i2c-5/5-0060/lsensor_onoff
chown system system /sys/devices/platform/i2c-gpio.5/i2c-5/5-0060/alc
chown system system /sys/class/backlight/aat2870-backlight/brightness
chown system system /sys/class/backlight/aat2870-backlight/brightness_mode
# 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
# kernel read permission
chmod 644 /dev/block/mmcblk0p6
chmod 777 /dev/block/mmcblk0p5
# 20101107, [email protected], FOTA [END]
## LGE's bluetooth stuff
# bluetooth permissions
chmod 0660 /dev/ttyHS2
chown bluetooth net_bt_stack /dev/ttyHS2
chmod 0660 /sys/class/rfkill/rfkill0/state
chmod 0660 /sys/class/rfkill/rfkill0/type
chmod 0220 /proc/bluetooth/sleep/lpm
chmod 0220 /proc/bluetooth/sleep/btwrite
chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/state
chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/type
chown bluetooth net_bt_stack /proc/bluetooth/sleep/lpm
chown bluetooth net_bt_stack /proc/bluetooth/sleep/btwrite
write /sys/class/rfkill/rfkill0/state 0
### End of LGE bluetooth
chmod 0644 /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
chmod 0644 /sys/devices/system/cpu/cpu1/cpufreq/cpuinfo_cur_freq
# Tegra specific cpufreq policy stuff
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
chown system system /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
chmod 0664 /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chown system system /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
chmod 0664 /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
chown system system /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
chmod 0664 /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
chown system system /sys/module/cpu_tegra/parameters/cpu_user_cap
chmod 0664 /sys/module/cpu_tegra/parameters/cpu_user_cap
# Default Read Ahead value for sdcards
write /sys/block/mmcblk0/queue/read_ahead_kb 2048
write /sys/block/mmcblk1/queue/read_ahead_kb 2048
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
service lgdrm /system/bin/lgdrmserver
class core
user root
group sdcard_rw radio
service dhcpcd_wlan0 /system/bin/dhcpcd -aBKAL
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 \
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
-O/data/misc/wifi/sockets \
-e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
class main
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot
on boot
setprop nvcpud.enabled true
setprop nvcpud.config_refresh_ms -1
service nvcpud /system/bin/nvcpud
class main
user root
group root
# 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
### KSM
write /sys/kernel/mm/ksm/pages_to_scan 100
write /sys/kernel/mm/ksm/sleep_millisecs 500
write /sys/kernel/mm/ksm/run 1
### ZRAM
write /proc/sys/vm/page-cluster 0
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 vsnet1_down /system/bin/init.vsnet-down 1
user root
group radio cache inet misc
disabled
oneshot
service vsnet2_down /system/bin/init.vsnet-down 2
user root
group radio cache inet misc
disabled
oneshot
service fuse_sdcard0 /system/bin/sdcard -u 1023 -g 1023 -d /mnt/media_rw/sdcard0 /storage/sdcard0
class late_start
disabled
service fuse_sdcard1 /system/bin/sdcard -u 1023 -g 1023 -d /mnt/media_rw/sdcard1 /storage/sdcard1
class late_start
disabled