-
Notifications
You must be signed in to change notification settings - Fork 24
/
init.spica.rc
255 lines (209 loc) · 6.78 KB
/
init.spica.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
import init.spica.usb.rc
on post-fs-data
mkdir /data/cache
chown system cache /data/cache
chmod 0771 /data/cache
symlink /data/cache /cache
chown system cache /cache
chmod 0771 /cache
# This may have been created by the recovery system with odd permissions
chown system cache /cache/recovery
chmod 0770 /cache/recovery
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
on boot
mount debugfs /sys/kernel/debug /sys/kernel/debug
symlink /system/etc /etc
# configure conservative cpufreq governor
write /sys/devices/system/cpu/cpufreq/conservative/sampling_rate 200000
write /sys/devices/system/cpu/cpufreq/conservative/sampling_down_factor 3
write /sys/devices/system/cpu/cpufreq/conservative/freq_step 17
setprop ro.build.product spica
setprop ro.product.device spica
setprop ro.radio.use-ppp no
on fs
# Remount /system read-only, because it was mounted rw first (see: init.rc)
mount ubifs /dev/ubi0_0 /system ro remount
# /data
mount ubifs /dev/ubi1_0 /data rw
# Show boot logo as early as possible
exec /system/bin/show_logo
# Mount /efs
mkdir /efs 0775 radio radio
mount ubifs /dev/ubi3_0 /efs rw sync
chown radio radio /efs
chmod 775 /efs
chmod 770 /efs/bluetooth
chmod 770 /efs/imei
#symlinks for samsung RIL
mkdir /radio 0775 radio radio
symlink /dev/block/bml10 /radio/modem.bin
chown radio radio /radio/modem.bin
chmod 0664 /radio/modem.bin
# change permission for accelerometer
chown system system /sys/class/input/input3/poll
chmod 0660 /sys/class/input/input3/poll
# permissions for bluetooth.
# chown bluetooth bluetooth /efs/bluetooth
# chown bluetooth bluetooth ro.bt.bdaddr_path
chmod 0660 /sys/class/rfkill/rfkill0/state
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
# Permissions for System Server and daemons.
chown system system /sys/class/backlight/s6d05a-lcd/brightness
on post-fs
# allow system to modify cpufreq control files
chown root system /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
chown root system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chown root system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
service servicemanager /system/bin/servicemanager
class core
user system
group system
critical
onrestart restart zygote
onrestart restart media
service vold /system/bin/vold
class core
socket vold stream 0660 root mount
ioprio be 2
service netd /system/bin/netd
class main
socket netd stream 0660 root system
socket dnsproxyd stream 0660 root inet
service debuggerd /system/bin/debuggerd
class main
service ril-daemon /system/bin/rild
class main
socket rild stream 660 root radio
socket rild-debug stream 660 radio system
user root
group radio cache inet misc audio sdcard_rw log
service surfaceflinger /system/bin/surfaceflinger
class main
user system
group graphics
onrestart restart zygote
service zygote /system/bin/app_process -Xzygote /system/bin --zygote --start-system-server
class main
socket zygote stream 666
onrestart write /sys/android_power/request_state wake
onrestart write /sys/power/state on
onrestart restart media
onrestart restart netd
service drm /system/bin/drmserver
class main
user drm
group system inet drmrpc
service media /system/bin/mediaserver
class main
user media
group audio camera inet net_bt net_bt_admin net_bw_acct drmrpc
ioprio rt 4
service bootanim /system/bin/bootanimation
class main
user graphics
group graphics
disabled
oneshot
service dbus /system/bin/dbus-daemon --system --nofork
class main
socket dbus stream 660 bluetooth bluetooth
user bluetooth
group bluetooth net_bt_admin
service bluetoothd /system/bin/bluetoothd -n
class main
socket bluetooth stream 660 bluetooth bluetooth
socket dbus_bluetooth stream 660 bluetooth bluetooth
# init.rc does not yet support applying capabilities, so run as root and
# let bluetoothd drop uid to bluetooth with the right linux capabilities
group bluetooth net_bt_admin misc
disabled
service installd /system/bin/installd
class main
socket installd stream 600 system system
service flash_recovery /system/etc/install-recovery.sh
class main
oneshot
service racoon /system/bin/racoon
class main
socket racoon stream 600 system system
# IKE uses UDP port 500. Racoon will setuid to vpn after binding the port.
group vpn net_admin inet
disabled
oneshot
service mtpd /system/bin/mtpd
class main
socket mtpd stream 600 system system
user vpn
group vpn net_admin inet net_raw
disabled
oneshot
service keystore /system/bin/keystore /data/misc/keystore
class main
user keystore
group keystore
socket keystore stream 666
service dumpstate /system/bin/dumpstate -s
class main
socket dumpstate stream 0660 shell log
disabled
oneshot
service wpa_supplicant /system/bin/wpa_supplicant \
-Dnl80211 -iwlan0 -puse_p2p_group_interface=1 -e/data/misc/wifi/entropy.bin
class main
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot
service dhcpcd_wlan0 /system/bin/dhcpcd -ABKL
class main
disabled
oneshot
service dhcpcd_p2p /system/bin/dhcpcd -aABKL
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_p2p /system/bin/dhcpcd -n
class main
disabled
oneshot
service iprenew_bnep0 /system/bin/dhcpcd -n
class main
disabled
oneshot
service bdaddr /system/bin/bdaddr_read
user root
disabled
oneshot
on property:init.svc.bootanim=running
start bdaddr
service hciattach /system/bin/brcm_patchram_plus --enable_hci --enable_lpm \
--baudrate 3000000 --patchram /system/etc/bcm4325.hcd /dev/ttySAC1
class main
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
# bugreport is triggered by holding down volume down, volume up and power
service bugreport /system/bin/dumpstate -d -v -o /sdcard/bugreports/bugreport
disabled
oneshot
keycodes 114 115 116
service efs-daemon /system/bin/efsd
class main
user root
group radio cache inet misc audio sdcard_rw net_admin net_raw