-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathinit.rk30board.rc
executable file
·229 lines (188 loc) · 6.91 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
import init.rk30board.usb.rc
import init.${ro.hardware}.bootmode.${ro.bootmode}.rc
import init.${ro.hardware}.environment.rc
import init.connectivity.rc
on early-init
export SECOND_VOLUME_STORAGE /mnt/external_sd
export SECONDARY_STORAGE /mnt/external_sd
mkdir /mnt/external_sd 0000 system system
export THIRD_VOLUME_STORAGE /mnt/usb_storage
mkdir /mnt/usb_storage 0000 system system
on post-fs
insmod /system/lib/modules/ump.ko
insmod /system/lib/modules/mali.ko mali_dvfs=50,100,133,160,200,266,400 mali_init_clock=50
insmod /system/lib/modules/rk30_mirroring.ko
insmod /system/lib/modules/rk29-ipp.ko
# AP6476 GPS permission
chmod 755 /system/bin/glgps
chown root system /system/bin/glgps
chmod 644 /system/lib/hw/gps.default.so
chown root system /system/lib/hw/gps.default.so
mkdir /data/gps
chmod 770 /data/gps
chown system net_bt_stack /data/gps
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
setprop vold.post_fs_data_done 1
on init
# 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/
mkdir /mnt/internal_sd 0000 system system
mkdir /mnt/shell/emulated 0700 shell shell
mkdir /storage 0751 root sdcard_r
mkdir /storage/emulated 0555 root root
on boot
setprop UserVolumeLabel "Android"
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
chown wifi wifi /sys/class/rkwifi/driver
chown wifi wifi /sys/class/rkwifi/power
#backlight
chown system system /sys/class/backlight/rk28_bl/brightness
#for hdmi timem out
chown root system /sys/class/graphics/fb0/blank
chmod 0664 /sys/class/graphics/fb0/blank
#for bonovo's android box add by zbiao
chmod 0666 /dev/bonovo_mcu_status
chmod 0666 /dev/bonovo_mcu_update
chmod 0666 /dev/bonovo_irctl
chmod 0666 /dev/bonovo_virtual_serial
chmod 0666 /dev/bonovo_handle
chmod 0666 /dev/bonovo_canbus
chmod 0666 /dev/bonovo_rds
chmod 0666 /dev/ttyS3
chmod 0666 /dev/bonovo_tty
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
# 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 -u 1023 -g 1023 -l /data/media /mnt/shell/emulated
class main
on property:ro.factory.hasUMS=false
symlink /storage/emulated/legacy /sdcard
symlink /storage/emulated/legacy /mnt/sdcard
symlink /storage/emulated/legacy /storage/sdcard0
symlink /mnt/shell/emulated/0 /storage/emulated/legacy
mount rootfs rootfs / ro remount
on property:ro.factory.hasUMS=cdrom
symlink /storage/emulated/legacy /sdcard
symlink /storage/emulated/legacy /mnt/sdcard
symlink /storage/emulated/legacy /storage/sdcard0
symlink /mnt/shell/emulated/0 /storage/emulated/legacy
mount rootfs rootfs / ro remount
on property:ro.factory.hasUMS=true
symlink /mnt/internal_sd /sdcard
symlink /mnt/internal_sd /mnt/sdcard
symlink /mnt/internal_sd /storage/sdcard0
mount rootfs rootfs / ro remount
stop sdcard
# Binding fuse mount point to /storage/emulated/legacy
#on property:init.svc.sdcard=running
# wait /mnt/shell/emulated/0
# mount none /mnt/shell/emulated/0 /storage/emulated/legacy bind
service wfd /system/bin/wfd
class main
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 dhcpcd_bt-pan /system/bin/dhcpcd -ABKL
class main
disabled
oneshot
service iprenew_bt-pan /system/bin/dhcpcd -n
class main
disabled
oneshot
on property:ro.boot.charger.emmc=1
mount ext4 /dev/block/platform/emmc/by-name/system /system wait ro noatime nodiratime
start console
mount ext4 /dev/block/platform/emmc/by-name/metadata /metadata wait noatime nodiratime nosuid nodev noauto_da_alloc,discard
start charger
on property:ro.boot.charger.emmc=0
insmod /rk30xxnand_ko.ko
mount ext4 mtd@system /system wait ro noatime nodiratime noauto_da_alloc
start console
mount ext4 mtd@metadata /metadata wait noatime nodiratime nosuid nodev noauto_da_alloc
start charger
on charger
setprop ro.boot.charger.emmc 0
export PATH /sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
export LD_LIBRARY_PATH /vendor/lib:/system/lib
setprop sys.usb.config adb
service charger /charger
disabled
service akmd /system/bin/akmd
class main
user system
group system
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
on property:ro.rk.btchip=broadcom.bplus
start gpsd
service gpsd /system/bin/glgps -c /system/etc/gps/gpsconfig.xml
class main
disabled
user root
group system