-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathinit.sun4i.rc
executable file
·160 lines (132 loc) · 5.61 KB
/
init.sun4i.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
import init.sun4i.usb.rc
on early-init
export EXTERNAL_STORAGE /storage/sdcard1
export SECONDARY_STORAGE /storage/sdcard0
mkdir /storage 0050 system sdcard_r
mkdir /storage/sdcard0 0000 system system
mkdir /storage/sdcard1 0000 system system
mkdir /storage/sdcard2 0000 system system
symlink /storage/sdcard1 /sdcard
symlink /storage/sdcard2 /usbdisk
symlink /storage/sdcard0 /extsd
symlink /storage/sdcard1 /mnt/sdcard
on fs
symlink /dev/block/nanda /dev/block/bootloader
symlink /dev/block/nandc /dev/block/boot
symlink /dev/block/nandd /dev/block/system
symlink /dev/block/nande /dev/block/data
symlink /dev/block/nandg /dev/block/recovery
symlink /dev/block/nandh /dev/block/cache
#exec /system/bin/e2fsck -y /dev/block/system
#exec /system/bin/e2fsck -y /dev/block/data
#exec /system/bin/e2fsck -y /dev/block/cache
mount ext4 /dev/block/system /system wait ro noatime nodev barrier=0 nobh data=writeback noauto_da_alloc
mount ext4 /dev/block/data /data wait noatime nodev barrier=0 nobh data=writeback noauto_da_alloc
mount ext4 /dev/block/cache /cache wait noatime nodev barrier=0 nobh data=writeback noauto_da_alloc
on post-fs
# bluetooth power up/down interface
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
chmod 0660 /sys/class/rfkill/rfkill0/state
chown bluetooth bluetooth /sys/class/rfkill/rfkill1/type
chown bluetooth bluetooth /sys/class/rfkill/rfkill1/state
chmod 0660 /sys/class/rfkill/rfkill1/state
write /sys/class/rfkill/rfkill0/state 0
setprop rw.bluetooth.status "0"
on post-fs-data
mkdir /data/misc/wifi 0771 wifi wifi
mkdir /data/misc/wifi/sockets 0771 wifi wifi
mkdir /data/misc/dhcp 0771 dhcp dhcp
on boot
insmod /system/lib/modules/ump.ko #Mail 400M
insmod /system/lib/modules/mali.ko #Mail 400M
insmod /system/lib/modules/videobuf-core.ko
insmod /system/lib/modules/videobuf-dma-contig.ko
insmod /system/lib/modules/mma7660.ko #Gsensor
insmod /system/lib/modules/gt2005.ko #Camera for Aurora v1,2
insmod /system/lib/modules/hi253.ko #Camera for Aurora v3
insmod /system/lib/modules/gc0307.ko #Camera for Explay 701
insmod /system/lib/modules/sun4i_csi0.ko
insmod /system/lib/modules/usbnet.ko #USB Internet sharing
insmod /system/lib/modules/asix.ko
insmod /system/lib/modules/qf9700.ko
insmod /system/lib/modules/mcs7830.ko
insmod /system/lib/modules/rtl8150.ko #Ethernet Controller
insmod /system/lib/modules/ft5x_ts.ko #Ft5x Touchscreen
insmod /system/lib/modules/ft5x_ts_v3.ko #Ft5x Touchscreen v3
insmod /system/lib/modules/goodix_touch.ko #Goodix Touchscreen
chown system system /sys/class/timed_output/sun4i-vibrator/enable
# Enable interactive governor
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor interactive
# Lower maximum frequency when screen is off
write /sys/devices/system/cpu/cpu0/cpufreq/screen_off_max_freq 700000
# cpufreq interactive governor: timer 20ms, min sample 20ms, hispeed 700MHz
write /sys/devices/system/cpu/cpufreq/interactive/timer_rate 20000
write /sys/devices/system/cpu/cpufreq/interactive/min_sample_time 20000
write /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq 700000
# chown adequately for power HAL
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse
chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_rate
chown system system /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
chown system system /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
chown system system /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
chown system system /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
# wifi related service
service wpa_supplicant /system/bin/wpa_supplicant -D wext -i wlan0 \
-c /data/misc/wifi/wpa_supplicant.conf -e /data/misc/wifi/entropy.bin
class main
socket wpa_wlan0 dgram 0660 wifi wifi
group system wifi inet
disabled
oneshot
service p2p_supplicant /system/bin/wpa_supplicant -D wext -i wlan0 \
-c /data/misc/wifi/wpa_supplicant.conf -e /data/misc/wifi/entropy.bin
class main
socket wpa_wlan0 dgram 0660 wifi wifi
group system wifi inet
disabled
oneshot
# dhcpcd daemons
service dhcpcd_wlan0 /system/bin/dhcpcd -aABKL
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
service dhcpcd_eth0 /system/bin/dhcpcd -ABKL
class main
disabled
oneshot
service iprenew_eth0 /system/bin/dhcpcd -n
class main
disabled
oneshot
service u3gmonitor /system/bin/u3gmonitor
class main
user root
group root
oneshot
service hciattach /system/bin/hciattach -n -s 115200 /dev/ttyS1 rda 1500000
class main
user root
group bluetooth net_bt_admin
disabled
oneshot
# adb over network
on property:service.adb.tcp.port=5555
stop adbd
start adbd
on property:service.adb.tcp.port=-1
stop adbd
start adbd