forked from csolanol/ngiordano-csolanol_Morrison_Device
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinit.morrison.rc
More file actions
260 lines (221 loc) · 7.22 KB
/
init.morrison.rc
File metadata and controls
260 lines (221 loc) · 7.22 KB
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
on init
setprop sys.motorola.infactory 0
on boot
mkdir /data/radio 0770 radio radio
mkdir /data/misc/wifi 0777 wifi wifi
mkdir /data/misc/wifi/sockets 0777 wifi wifi
mkdir /data/system 0771 system system
mkdir /data/system/wpa_supplicant 0771 wifi wifi
mkdir /data/media system 0775 system
mkdir /data/misc/dhcp 0770 dhcp dhcp
exec /sbin/charge_only_mode
# Interactive governor
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 528000
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 122880
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor interactive
# Reboot to recovery
chown system system /dev/mtd/mtd3
chmod 0777 /data/misc/wifi
exec rmdir /data/misc/wifi/sockets
exec rm /data/misc/dhcp/dhcpcd-eth0.lease
exec rm /data/misc/dhcp/dhcpcd-eth0.pid
chown wifi wifi /data/misc/wifi/wpa_supplicant.conf
# chown bluetooth bluetooth /sys/module/board_morrison/parameters/bluetooth_power_on
# chmod 0660 /sys/module/board_morrison/parameters/bluetooth_power_on
exec chown bluetooth bluetooth /proc/bt_power
chmod 0666 /proc/bt_power
mkdir /data/radio 0777 system system
chmod 0660 /dev/smdcntl0
chmod 0660 /dev/smdcntl1
chmod 0660 /dev/smdcntl2
chmod 0660 /dev/ttyHS0
chmod 0777 /dev/oncrpc
chmod 0777 /dev/oncrpc/00000000:0
chmod 0777 /dev/oncrpc/30000000:959ac044
chmod 0777 /dev/oncrpc/30000002:00020000
chmod 0777 /dev/oncrpc/30000003:a7eed910
chmod 0777 /dev/oncrpc/3000000a:00010000
chmod 0777 /dev/oncrpc/3000000e:d0b61921
chmod 0777 /dev/oncrpc/3000000f:1c5a0000
chmod 0777 /dev/oncrpc/30000013:00020000
chmod 0777 /dev/oncrpc/30000014:00010000
chmod 0777 /dev/oncrpc/30000016:8ca03b11
chmod 0777 /dev/oncrpc/30000019:821a1945
chmod 0777 /dev/oncrpc/3000001a:00010000
chmod 0777 /dev/oncrpc/3000001b:d6b8aee8
chmod 0777 /dev/oncrpc/3000001d:ba845703
chmod 0777 /dev/oncrpc/3000003c:d0fd1992
chmod 0777 /dev/oncrpc/30000048:00020000
chmod 0777 /dev/oncrpc/3000005b:e63bc050
chmod 0777 /dev/oncrpc/3000005f:d9769667
chmod 0777 /dev/oncrpc/30000061:00010000
chmod 0777 /dev/oncrpc/30000064:00010000
chmod 0777 /dev/oncrpc/3000006b:00010000
chmod 0777 /dev/oncrpc/30000081:00010000
chmod 0777 /dev/oncrpc/3000008c:00010000
chmod 0777 /dev/oncrpc/30000101:00010000
chmod 0777 /dev/oncrpc/30000200:00000000
chmod 0777 /dev/oncrpc/30000802:00010000
chmod 0777 /dev/oncrpc/30001120:00010000
# Vibrator
chown system system /sys/class/vibrator/vibrator/enable
# BT
symlink /dev/ttyHS0 /dev/ttyMSM0
chown bluetooth bluetooth /dev/ttyMSM0
chown bluetooth bluetooth /dev/ttyHS0
chmod 0770 /dev/ttyMSM0
chmod 0770 /dev/ttyHS0
# 12m
mkdir /data/local/12m 0771 system system
mkdir /data/local/12m/batch 0771 system system
mkdir /data/local/12m/batch/log 0771 system system
# E-compass
chown system system /dev/akm8973_aot
chown system system /dev/akm8973_dev
# Accelerometer
chown system system /sys/class/i2c-adapter/i2c-0/0-0018/mode
chmod 0664 /sys/class/i2c-adapter/i2c-0/0-0018/mode
chown system system /dev/accelerometer
chmod 0664 /dev/accelerometer
chown system system /dev/lis331dlh
chmod 0664 /dev/lis331dlh
# hw accel
symlink /dev/msm_hw3dc /dev/hw3dc
symlink /dev/msm_hw3dm /dev/hw3dm
chown system graphics /dev/hw3dc
chown system graphics /dev/hw3dm
chmod 666 /dev/msm_hw3dc
chmod 660 /dev/msm_hw3dm
# proximity
chown system system /dev/proximity
chmod 0664 /dev/proximity
# Permissions changes needed for TCMD
chown system system /dev/blan_enable
chmod 0660 /dev/blan_enable
chown system system /dev/misc_helper
chmod 0660 /dev/misc_helper
chown system graphics /dev/graphics/fb0
# Google Skymap wants to copybit fb0 but requests no special privileges
chmod 0666 /dev/graphics/fb0
chmod 0644 /dev/block/mmcblk0p1
# Permissions needed for port_bridge
chown root system /dev/ttyHSUSB0
chmod 0660 /dev/ttyHSUSB0
# Clearing FM/BT reference count temp file contents
write /data/bluedroid_ref 123456
chmod 0777 /data/bluedroid_ref
# Set WiFi interface name
setprop wifi.interface eth0
# Set up touchpad
chown system system /dev/touchpad
chmod 0664 /dev/touchpad
# Set RIL
setprop rild.libpath /system/lib/libril-qc-1.so
setprop rild.libargs "-d /dev/smd0"
# Modemlog
service modemlog /system/bin/modemlog
class TOOL
user system
oneshot
# MMClog
service mmclog /system/bin/mmclog
class TOOL
oneshot
# Speed up SDCard
write /sys/block/mmcblk0/bdi/read_ahead_kb 4096
# Touchpad driver
service touchpad /system/bin/touchpad -a /data/touchpad.log
class HW
user system
oneshot
# FMRadio Service
# service fmradio /system/bin/fmradioserver
# class BT
service dhcpcd_eth0 /system/bin/dhcpcd -ABKL -d eth0
class WLAN
#user system #- this makes socket() calls fail with permission denied
group dhcp
disabled
oneshot
service autoip /system/bin/dhcpcd -B -d eth0
class WLAN
#user system #- this makes socket() calls fail with permission denied
group dhcp
disabled
oneshot
service wpa_supplicant /system/bin/wpa_supplicant -D wext -i eth0 -c /data/misc/wifi/wpa_supplicant.conf
class WLAN
socket wpa_eth0 dgram 0660 wifi wifi
disabled
oneshot
# E-compass daemon
service akmd2 /system/bin/akmd2 -f /system/etc/akm/akmd_set.cfg
user system
group input
class HW
oneshot
## TCMD
#service tcmd /system/bin/tcmd_engine usb0
# user system - this makes reboot failing
# group system inet
# class TCMD
service port_bridge /system/bin/port_bridge /dev/smd0 /dev/ttyHSUSB0
user radio
group system
class TCMD
service btenable /system/xbin/busybox sh /system/bin/btenable.sh
oneshot
service hciattach /system/bin/hciattach -s 3000000 /dev/ttyMSM0 any 3000000 flow
group bluetooth net_bt_admin misc
disabled
oneshot
service fuel_gauge /system/bin/fuel_gauge --all
class TCMD
oneshot
service qmuxd /system/bin/qmuxd
class HW
on property:sys.motorola.suspended=1
class_stop zygote_services
on property:sys.motorola.suspended=0
class_start zygote_services
#on property:sys.motorola.infactory=1
# class_start ADB
# class_start TCMD
# class_start TOOL
# class_start ANDROID
# class_start MEDIA
# class_start BT
# class_start WLAN
# class_start HW
on property:sys.motorola.infactory=2
class_start ADB
class_start TCMD
class_start TOOL
class_start RIL
class_start pre-zygote_services
class_start zygote_services
class_start post-zygote_services
class_start ANDROID
class_start MEDIA
class_start BT
class_start WLAN
class_start HW
on property:sys.motorola.infactory=0
class_start ADB
class_start TOOL
class_start RIL
class_start pre-zygote_services
class_start zygote_services
class_start post-zygote_services
class_start ANDROID
class_start MEDIA
class_start BT
class_start WLAN
class_start HW
class_start TCMD
on property:persist.factorytest=1
stop zygote
on property:persist.factorytest=2
stop zygote
on property:persist.factorytest=0
start zygote