-
Notifications
You must be signed in to change notification settings - Fork 4
/
init.rk30board.rc
executable file
·342 lines (286 loc) · 10.8 KB
/
init.rk30board.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
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
import init.rk30board.usb.rc
on early-init
export EXTERNAL_STORAGE /mnt/sdcard
mkdir /mnt/sdcard 0000 system system
# for backwards compatibility
symlink /mnt/sdcard /sdcard
export SECOND_VOLUME_STORAGE /mnt/external_sd
mkdir /mnt/external_sd 0000 system system
export THIRD_VOLUME_STORAGE /mnt/usb_storage/USB_DISK0
mkdir /mnt/usb_storage 0777 system system
# bluetooth LPM
chmod 0220 /proc/bluetooth/sleep/lpm
chmod 0220 /proc/bluetooth/sleep/btwrite
chown bluetooth net_bt_stack /proc/bluetooth/sleep/lpm
chown bluetooth net_bt_stack /proc/bluetooth/sleep/btwrite
on fs
#mount vfat mtd@user /mnt/sdcard wait noatime nodiratime nosuid nodev uid=1000,gid=1015,fmask=0702,dmask=0702
on post-fs-data
# we will remap this as /mnt/sdcard with the sdcard fuse tool
mkdir /data/media 0770 media_rw media_rw
chown media_rw media_rw /data/media
mkdir /data/misc/ppp 777 system system
chmod 777 /data/misc/ppp
copy /etc/ppp/pap-secrets /data/misc/ppp/pap-secrets
copy /etc/ppp/pppoe.conf /data/misc/ppp/pppoe.conf
on init
symlink /etc/bluez/bcm432x/BCM4329B1_TestOnly_0237_26MHz_SEMCO_B23.hcd /bcm4329_samsung.hcd
symlink /etc/bluez/bcm432x/BCM4329B1_USI_WM-BN-BM-01.hcd /bcm4329_usi.hcd
symlink /etc/bluez/bcm432x/BCM4329B1_002.002.023.0389.0000_Cybertan-Foxconn_Cls2_extLNA_EDRmaxInputLev+PeakDEVM_NT.hcd /bcm4329_cybertan.hcd
# for adobe reader mobile
export RK_ADOBE_DE_MOBILE 1
export EBOOK_PAGE_VISIBLE_NUMBER 2
export RK_ADEPT_DEVICE_TYPE mobile
export RK_ADOBE_DE_DOC_FOLDER "/mnt/sdcard/Digital Editions"
export RK_ADEPT_ACTIVATION_FILE /mnt/sdcard/.adobe-digital-editions/activation.xml
export RK_ADEPT_DEVICE_FILE /mnt/sdcard/.adobe-digital-editions/device.xml
export RK_ADEPT_DEVICE_SALT_FILE /mnt/sdcard/.adobe-digital-editions/devicesalt
export ADOBE_FONTS_DIR /system/fonts/adobefonts/
on boot
mount debugfs /sys/kernel/debug /sys/kernel/debug
chown system system /sys/devices/system/cpu/cpu1/online
chmod 0660 /sys/devices/system/cpu/cpu1/online
insmod /system/lib/modules/vpu_service.ko
insmod /system/lib/modules/rtk_btusb.ko
#backlight
chown system system /sys/class/backlight/rk28_bl/brightness
# permissions for bluetooth.
mkdir /data/misc/bluetoothd 0775 bluetooth net_bt_stack
setprop ro.bt.bdaddr_path "/data/misc/bluetoothd/bt_addr"
chown bluetooth net_bt_stack ro.bt.bdaddr_path
# for wifi
# mt7601u
chmod 0644 /system/lib/modules/mtprealloc7601Usta.ko
mkdir /data/misc/wifi 0770 wifi wifi
mkdir /data/misc/wifi/sockets 0770 wifi wifi
mkdir /data/misc/wifi/sockets/tmp 0440 wifi wifi
mkdir /data/misc/dhcp 0770 dhcp dhcp
chown dhcp dhcp /data/misc/dhcp
mkdir /data/misc/wifi 0770 wifi wifi
chmod 0660 /data/misc/wifi/wpa_supplicant.conf
chmod 0660 /data/misc/wifi/p2p_supplicant.conf
mkdir /data/misc/wifi 0770 wifi wifi
mkdir /data/misc/wifi/sockets 0770 wifi wifi
chmod 777 /data/misc/wifi/sockets
mkdir /data/misc/wpa_supplicant 0770 wifi wifi
chown wifi wifi /data/misc/wifi
# Assign TCP buffer thresholds to be ceiling val
# Increased technology maximums should be reflec
write /proc/sys/net/core/rmem_max 1220608
write /proc/sys/net/core/wmem_max 1220608
# Overlay
chmod 0666 /dev/graphics/fb1
chmod 0666 /dev/graphics/fb4
#for hdmi timem out
chown root system /sys/class/graphics/fb0/blank
chmod 0664 /sys/class/graphics/fb0/blank
# bluetooth power up/down interface
chmod 0660 /dev/ttyS0
chmod 0660 /dev/ttyS2
chmod 0660 /dev/vflash
chown bluetooth net_bt_stack /dev/vflash
chown bluetooth net_bt_stack /dev/ttyS2
chown bluetooth net_bt_stack /dev/ttyS0
chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/type
chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/state
chmod 0664 /sys/class/rfkill/rfkill0/state
chown system system /sys/mali400_utility/utility
chmod 0664 /sys/mali400_utility/utility
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/cpu0/cpufreq/scaling_setspeed
chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
chmod 0660 /dev/bthwctl
chown bluetooth net_bt_stack /dev/bthwctl
mkdir /data/bluetooth 0771 bluetooth net_bt_stack
#for rda bt
chmod 0664 /dev/tcc_bt_dev
chown bluetooth net_bt_stack /dev/tcc_bt_dev
chmod 0664 /dev/voice_modem
chown bluetooth net_bt_stack /dev/voice_modem
# $_rbox_$_modify_$_zhangxueguang_$_begin_$_20120426_$
# for usb audio
chmod 0664 /sys/class/switch/usb_audio_playback/state
chmod 0664 /sys/class/switch/usb_audio_capture/state
chown system system /sys/class/switch/usb_audio_playback/state
chown system system /sys/class/switch/usb_audio_capture/state
# for usb switch
chown system system /sys/bus/platform/drivers/usb20_otg/force_usb_mode
# create virtual SD card at /mnt/sdcard, based on the /data/media directory
# daemon will drop to user/group system/media_rw after initializing
# underlying files in /data/media will be created with user and group media_rw (1023)
#service sdcard /system/bin/sdcard /data/media 1023 1023
# class late_start
service wpa_supplicant /system/bin/wpa_supplicant \
-Dnl80211 -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf
#-Dnl80211 -iwlan0 -puse_p2p_group_interface=1 -e/data/misc/wifi/entropy.bin
# we will start as root and wpa_supplicant will switch to user wifi
# after setting up the capabilities required for WEXT
# user wifi
# group wifi inet keystore
class main
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot
service wfd /system/bin/wfd
class main
disabled
oneshot
#add for wifi direct (gwl)
service p2p_supplicant /system/bin/wpa_supplicant \
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -N \
-ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf -e/data/misc/wifi/entropy.bin -puse_p2p_group_interface=1
# we will start as root and wpa_supplicant will switch to user wifi
# after setting up the capabilities required for WEXT
# user wifi
# group wifi inet keystore
class main
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot
service esp_supplicant /system/bin/esp_supplicant \
-ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf -e/data/misc/wifi/entropy.bin -N \
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf
# we will start as root and wpa_supplicant will switch to user wifi
# after setting up the capabilities required for WEXT
# user wifi
# group wifi inet keystore
class main
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot
service rtl_supplicant /system/bin/rtl_supplicant \
-ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf -e/data/misc/wifi/entropy.bin -N \
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf
class main
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot
service hostapd /system/bin/hostapd /data/misc/wifi/hostapd.conf
class main
disabled
oneshot
# for realtek wifi
service hostapd_rtl /system/bin/hostapd_rtl /data/misc/wifi/hostapd.conf
class main
disabled
oneshot
# for mt5931 wifi
service mtk_psupplicant /system/bin/wpa_supplicant \
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -N \
-ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf -e/data/misc/wifi/entropy.bin -puse_p2p_group_interface=1
# we will start as root and wpa_supplicant will switch to user wifi
# after setting up the capabilities required for WEXT
# user wifi
# group wifi inet keystore
class main
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot
service mtk_wsupplicant /system/bin/wpa_supplicant \
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -e/data/misc/wifi/entropy.bin
# we will start as root and wpa_supplicant will switch to user wifi
# after setting up the capabilities required for WEXT
# user wifi
# group wifi inet keystore
class main
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot
service mtk_ap_daemon /system/bin/wpa_supplicant \
-iap0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf -e/data/misc/wifi/entropy.bin -puse_p2p_group_interface=1
# we will start as root and wpa_supplicant will switch to user wifi
# after setting up the capabilities required for WEXT
# user wifi
# group wifi inet keystore
class main
disabled
oneshot
service hciattach /system/bin/brcm_patchram_plus --patchram bychip --baudrate 1500000 --enable_lpm --enable_hci /dev/ttyS0
console
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service dhcpcd_wlan0 /system/bin/dhcpcd -ABKL
class main
disabled
oneshot
service iprenew_wlan0 system/bin/dhcpcd -n
class main
disabled
oneshot
service dhcpcd_p2p /system/bin/dhcpcd -aABKL
class main
disabled
oneshot
service iprenew_p2p system/bin/dhcpcd -n
class main
disabled
oneshot
# bugreport is triggered by holding down volume down, volume up and power
service bugreport /system/bin/bugreport.sh
class main
disabled
oneshot
keycodes 114 115 116
service chrome /system/bin/chrome.sh
class main
oneshot
service dhcpcd_eth0 /system/bin/dhcpcd -ABKL
class main
disabled
oneshot
service iprenew_eth0 system/bin/dhcpcd -n
class main
disabled
oneshot
service battery_charger /charger
class charger
service akmd /system/bin/akmd
class main
user system
group system
oneshot
#for store wifi mac
service wlan_mac /system/bin/wlan_mac
class main
oneshot
on property:sys.gmali.performance=ui
start pat_ui
service pat_ui /system/bin/performance ui
disabled
oneshot
on property:sys.gmali.performance=video
start pat_video
#factory
on property:ro.factory.tool=1
write /sys/class/gsensor_class/orientation gsensor={-1,0,0,0,0,1,0,-1,0}
write /sys/devices/platform/rk29-keypad/rk29key {menu:MENU,home:HOME,vol+:VOLUP,vol-:VOLDOWN,play:PLAY,esc:ESC,sensor:CAMERA}
write /sys/devices/platform/rk29_backlight/rk29backlight 100
service pat_video /system/bin/performance video
disabled
oneshot
service pppoe_setup /system/bin/pppoe-setup
disabled
oneshot
service pppoe_start /system/bin/pppoe-start
disabled
oneshot
service bplus_helper /system/bin/bplus_helper
class main
oneshot
on property:ro.rk.wifichip=mt7601u
insmod /system/lib/modules/mtprealloc7601Usta.ko
service pppoe_stop /system/bin/pppoe-stop
disabled
oneshot
service cifsmanager /data/etc/cifsmanager.sh
disabled
oneshot
##$_rbox_$_modify_$_hehua
##$_rbox_$_modify_$_begin
service iso_operate /data/bluray.sh
disabled
oneshot
##$_rbox_$_modify_$_end