forked from ivendor/android_device_samsung_ariesve
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.qcom.rc
289 lines (240 loc) · 10.7 KB
/
init.qcom.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
import init.qcom.usb.rc
on init
export EXTERNAL_STORAGE /mnt/sdcard
export SECONDARY_STORAGE /mnt/external_sd
mkdir /mnt/sdcard 0000 system system
symlink /mnt/sdcard /sdcard
mkdir /mnt/external_sd 0000 system system
symlink /mnt/external_sd /external_sd
mkdir /persist 0771 system system
mkdir /efs 0771 system system
insmod /lib/modules/bthid.ko
on early-boot
# set RLIMIT_MEMLOCK to 64MB
setrlimit 8 67108864 67108864
on boot
mount debugfs /sys/kernel/debug /sys/kernel/debug
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/rfkill1/type
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
chown bluetooth bluetooth /sys/class/rfkill/rfkill1/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 /sys/class/rfkill/rfkill1/state
chmod 0660 /proc/bluetooth/sleep/proto
chown bluetooth bluetooth ro.bt.bdaddr_path
chown bluetooth bluetooth /sys/devices/platform/msm_serial_hs.0/clock
chmod 0660 /sys/devices/platform/msm_serial_hs.0/clock
# Force Power Down
chmod 0660 /sys/class/sec/pm/power_down
chown root system /sys/class/sec/pm/power_down
# accelerometer
chown system input /sys/class/input/input4/enable
chown system input /sys/class/input/input4/delay
chown system input /sys/class/input/input4/position
chown system input /sys/class/input/input4/threshold
chown system input /sys/class/input/input4/wake
chown system input /sys/class/input/input4/data
chown system input /sys/class/input/input4/calibration
# geomagnetic
chown system input /sys/class/input/input5/enable
chown system input /sys/class/input/input5/delay
chown system input /sys/class/input/input5/filter_enable
chown system input /sys/class/input/input5/filter_len
chown system input /sys/class/input/input5/data
chown system input /sys/class/input/input5/status
chown system input /sys/class/input/input5/wake
chown system input /sys/class/input/input5/position
# geomagnetic raw
chown system input /sys/class/input/input6/enable
chown system input /sys/class/input/input6/delay
chown system input /sys/class/input/input6/data
chown system input /sys/class/input/input6/threshold
chown system input /sys/class/input/input6/distortion
chown system input /sys/class/input/input6/shape
chown compass input /sys/class/input/input6/offsets
# orientation
chown system input /sys/class/input/input7/enable
chown system input /sys/class/input/input7/delay
chown system input /sys/class/input/input7/wake
chown system input /sys/class/input/input7/data
chown system input /sys/class/input/input7/status
# proximity
chown system input /sys/class/input/input8/enable
chown system input /sys/class/input/input8/delay
chown system input /sys/class/input/input8/wake
chown system input /sys/class/input/input8/data
chown system input /sys/class/input/input8/status
# light sensor
chown system input /sys/class/input/input9/enable
chown system input /sys/class/input/input9/delay
chown system input /sys/class/input/input9/wake
chown system input /sys/class/input/input9/data
chown system input /sys/class/input/input9/status
chown system input /sys/class/input/input9/testmode
write /sys/class/input/input6/threshold 1
write /sys/class/input/input6/distortion " 15 15 15"
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_hsusb/gadget/wakeup
# for Jig
chmod 0664 /sys/devices/virtual/jig/jig/jig
# for jack control
chown system system /sys/class/jack/jack_selector/select_jack
# Amp Tun (YDA165)
chown system audio /sys/devices/virtual/misc/amp/mode
chown system audio /sys/devices/virtual/misc/amp/in1_gain
chown system audio /sys/devices/virtual/misc/amp/in2_gain
chown system audio /sys/devices/virtual/misc/amp/hp_att
chown system audio /sys/devices/virtual/misc/amp/hp_gainup
chown system audio /sys/devices/virtual/misc/amp/sp_att
chown system audio /sys/devices/virtual/misc/amp/sp_gainup
chown system audio /sys/devices/virtual/misc/amp/gain_all
chown system audio /sys/devices/virtual/misc/amp/save
# Codec Tun (QTR)
chown system audio /sys/class/marimba/marimba_gain/codec_tune_enable
chown system audio /sys/class/marimba/marimba_gain/analog_headset_rx_left_gain
chown system audio /sys/class/marimba/marimba_gain/analog_headset_rx_right_gain
chown system audio /sys/class/marimba/marimba_gain/digital_rx_left_gain
chown system audio /sys/class/marimba/marimba_gain/digital_rx_right_gain
chown system audio /sys/class/marimba/marimba_gain/digital_tx_left_gain
chown system audio /sys/class/marimba/marimba_gain/digital_tx_right_gain
chown system audio /sys/class/marimba/marimba_gain/analog_tx_left_gain
chown system audio /sys/class/marimba/marimba_gain/analog_tx_right_gain
chown system audio /sys/class/marimba/marimba_gain/auxpga_left_gain
chown system audio /sys/class/marimba/marimba_gain/auxpga_right_gain
chown system audio /sys/devices/virtual/misc/amp/gain_all
chown system audio /sys/class/marimba/marimba_gain/save
# 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
# Permissions for kernel
chown radio system sys/devices/virtual/graphics/fb1/video_mode
chown radio radio sys/devices/virtual/gammaset/switch_gammaset/gammaset_file_cmd
chown radio radio sys/devices/virtual/aclset/switch_aclset/aclset_file_cmd
chown radio system sys/devices/virtual/sec/sec_lcd/lcd_power
chown radio system sys/devices/virtual/sec/sec_lcd/lcdtype_file_cmd
chown radio system sys/devices/virtual/misc/melfase_touchkey/enable_disable
chown radio system sys/devices/virtual/misc/melfas_touchkey/brightness
chown radio system sys/devices/virtual/misc/melfas_touchkey/touch_update
chown radio system sys/devices/virtual/misc/melfas_touchkey/touch_version
chown radio system sys/devices/virtual/sec/switch/usb_state
chown radio system sys/devices/virtual/sec/switch/disable_vbus
chown radio system sys/devices/virtual/sec/switch/usb_sel
chown radio system sys/devices/platform/msm_sdcc.2/polling
chown radio system sys/devices/platform/msm_sdcc.1/polling
chown radio system sys/devices/platform/android_usb/tethering
chown radio system sys/devices/platform/android_usb/UsbMenuSel
chown radio system sys/devices/virtual/graphics/fb1/hpd
chown system system sys/class/misc/notification/led
chown system system sys/class/misc/notification/bl_timeout
# for silent reset
chown system system /proc/dump_enable
chown system system /proc/silent
chown system system /proc/nosim_handler
copy /data/dump_enable /proc/dump_enable
# disable performance capturing
write /sys/devices/platform/msm_sdcc.1/perf 0
write /sys/devices/platform/msm_sdcc.2/perf 0
write /sys/devices/platform/msm_sdcc.4/perf 0
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 245760
write /sys/devices/system/cpu/cpufreq/ondemand/up_threshold 90
write /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate 75000
chown system /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
chown system /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
chown system /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
on emmc-fs
chmod 0666 /dev/block/mmcblk0p14
wait /dev/block/mmcblk0p15
mount ext4 /dev/block/mmcblk0p15 /system ro barrier=1
mount ext4 /dev/block/mmcblk0p12 /persist nosuid nodev barrier=0
mount ext4 /dev/block/mmcblk0p16 /cache nosuid nodev barrier=0
mount ext4 /dev/block/mmcblk0p27 /efs nosuid nodev noatime wait
wait /dev/block/mmcblk0p17
exec /system/bin/e2fsck -p /dev/block/mmcblk0p17
mount ext4 /dev/block/mmcblk0p17 /data nosuid nodev noatime wait barrier=1 noauto_da_alloc
setprop ro.crypto.tmpfs_options size=128m,mode=0771,uid=1000,gid=1000
chown radio system /efs
chmod 0771 /efs
on post-fs-data
# create log system
mkdir /data/log 0775 system log
mkdir /data/misc/radio 0775 radio system
mkdir /data/radio 0770 radio radio
mkdir /data/misc/wifi 0770 wifi wifi
mkdir /data/misc/wifi/sockets 0770 wifi wifi
mkdir /data/misc/dhcp 0770 dhcp dhcp
setprop vold.post_fs_data_done 1
service wpa_supplicant /system/bin/wpa_supplicant \
-Dwext -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf
class main
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot
service dhcpcd_wlan0 /system/bin/dhcpcd -ABKL
class main
disabled
oneshot
service dhcpcd_bnep0 /system/bin/dhcpcd -ABKL
class main
disabled
oneshot
service iprenew_wlan0 /system/bin/dhcpcd -n
class main
disabled
oneshot
service iprenew_bnep0 /system/bin/dhcpcd -n
class main
disabled
oneshot
service hciattach /system/bin/brcm_patchram_plus --enable_hci --enable_lpm \
--baudrate 3000000 --patchram /vendor/firmware/bcm4329.hcd /dev/ttyHS0
class main
user bluetooth
group bluetooth net_bt_admin
disabled
service rmt_storage /system/bin/rmt_storage
class core
user root
group radio
disabled
on property:ro.emmc=1
start rmt_storage
service get_macaddrs /system/bin/get_macaddrs
class main
user root
oneshot
disabled
# create filesystems if necessary
service setup_fs /system/bin/setup_fs /dev/block/mmcblk0p16 /dev/block/mmcblk0p17
class core
user root
group root
oneshot
service orientationd /system/bin/orientationd
class main
user compass
group input
service geomagneticd /system/bin/geomagneticd
class main
user compass
group system input
service playlpm /system/bin/playlpm
class charger
user root
oneshot
service lpmkey /system/bin/charging_mode
class charger
user root
oneshot
on property:sys.radio.shutdown=true
write /sys/devices/platform/rs300000a7.65536/force_sync 1
on property:init.svc.ril-daemon=running
start get_macaddrs