This repository has been archived by the owner on Apr 28, 2021. It is now read-only.
forked from kb7sqi/device_motorola_motus
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathinit.motus.rc
executable file
·217 lines (177 loc) · 6.71 KB
/
init.motus.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
on init
exec /sbin/charge_only_mode
on boot
# wifi
mkdir /data/misc/wifi 0770 wifi wifi
mkdir /data/misc/wifi/sockets 0770 wifi wifi
# remove leftovers
exec rm /data/misc/dhcp/dhcpcd-eth0.lease
exec rm /data/misc/dhcp/dhcpcd-eth0.pid
mkdir /data/misc/dhcp 0770 dhcp dhcp
mkdir /data/misc/cal 0770 system system
mkdir /data/radio 0770 radio radio
# 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 system system /sys/module/sco/parameters/disable_esco
symlink /dev/ttyHS0 /dev/ttyMSM0
chmod 0666 /dev/msm_snd
# Camera
chown system camera /dev/msm_camera/msm_camera0
chown system camera /dev/camera0
chmod 0664 /dev/camera0
chown system camera /dev/video20
chmod 0664 /dev/video20
mkdir /cache/tmp 0666 system system
mount tmpfs tmpfs /cache/tmp
# Broadcom stuff
chown bluetooth bluetooth /proc/bt_power
chmod 0666 /proc/bt_power
# Reboot to recovery
chown system system /dev/mtd/mtd3
# proximity
chown system system /sys/devices/platform/sfh7743.-2/proximity
symlink /sys/devices/platform/sfh7743.-2/proximity /dev/proximity
# laptop mode
write /proc/sys/vm/laptop_mode 5
# wakelocks
chown system camera /sys/class/leds/flashlight/brightness
chown system system /sys/class/leds/keyboard-backlight/brightness
chmod 0664 /sys/class/leds/keyboard-backlight/brightness
chown system system /sys/class/leds/keyboard-tcmd/brightness
chmod 0664 /sys/class/leds/keyboard-tcmd/brightness
chown system system /sys/class/leds/lcd-backlight/brightness
chmod 0660 /sys/class/leds/lcd-backlight/brightness
chown system system /sys/class/leds/lcd-backlight/suspend
chown system system /sys/class/leds/lcd-nr-backlight/brightness
chown system system /sys/class/leds/button-tcmd/brightness
chown system system /sys/class/leds/button-backlight/brightness
chmod 0660 /sys/class/leds/button-backlight/brightness
chown system system /sys/class/leds/messaging/brightness
chown system system /sys/class/leds/messaging/blink
chown system system /dev/als
chmod 0664 /dev/als
chown bluetooth bluetooth /sys/module/bluetooth_power/parameters/power
chown bluetooth bluetooth /proc/bluetooth/sleep/proto
chmod 0660 /sys/module/bluetooth_power/parameters/power
chmod 0660 /proc/bluetooth/sleep/proto
chown bluetooth bluetooth /dev/ttyHS0
chmod 0660 /dev/ttyHS0
chmod 0666 /dev/msm_snd
chmod 0660 /dev/smdcntl0
chmod 0660 /dev/smdcntl1
chmod 0660 /dev/smdcntl2
# Vibrator
chown system system /sys/class/vibrator/vibrator/enable
chmod 0664 /sys/class/vibrator/vibrator/enable
# 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
# 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
# hw accel
symlink /dev/msm_hw3dc /dev/hw3dc
symlink /dev/msm_hw3dm /dev/hw3dm
# Minipad
chown system system /dev/minipad
chmod 0664 /dev/minipad
# Camera LED brightness attributes accessible to all
chown system camera /sys/devices/platform/flashlight.0/leds/flashlight/brightness
chmod 0660 /sys/devices/platform/flashlight.0/leds/flashlight/brightness
chmod 0666 /sys/class/leds/flashlight/brightness
chmod 0666 /sys/class/leds/cam-torch/brightness
chown system system /sys/devices/platform/camera-led.0/leds/cam-torch
chown system camera /sys/devices/platform/camera-led.0/leds/cam-torch/brightness
chmod 0660 /sys/devices/platform/camera-led.0/leds/cam-torch/brightness
# Copybit
symlink /dev/graphics/fb0 /dev/fb0
# Clearing FM/BT reference count temp file contents
write /data/bluedroid_ref 123456
chmod 0777 /data/bluedroid_ref
# cpufreq configurations
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chown system system /sys/devices/system/cpu/cpu0/cpufreq/sampling_rate
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 122880
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 528000
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor lagfree
#We should fine tune this for BackFLip
#write /sys/devices/system/cpu/cpufreq/interactive/go_maxspeed_load 85
# E-Compass daemon
service akmd2 /system/bin/akmd2 -f /system/etc/akm/akmd_set.cfg
user system
group misc input compass system
oneshot
## TCMD
service tcmd /system/bin/tcmd_engine usb0
socket local_tcmd stream 0660 system system
class TCMD
service fuel_gauge /system/bin/fuel_gauge --all
oneshot
service qmuxd /system/bin/qmuxd
oneshot
service dhcpcd_eth0 /system/bin/dhcpcd -ABKL -d eth0
#user system #- this makes socket() calls fail with permission denied
group dhcp
disabled
oneshot
service iprenew_eth0 /system/bin/dhcpcd -n
group dhcp
disabled
oneshot
service autoip /system/bin/dhcpcd -B -d eth0
#user system #- this makes socket() calls fail with permission denied
group dhcp
disabled
oneshot
service wpa_supplicant /system/bin/wpa_supplicant -Dwext -ieth0 -c/data/misc/wifi/wpa_supplicant.conf
# user system - this makes socket() calls fail with permission denied
# group wifi system
socket wpa_eth0 dgram 660 wifi system
disabled
oneshot
service dhcpcd /system/bin/dhcpcd -ABKL
disabled
oneshot
#bluetooth
service hciattach /system/bin/hciattach -s 3000000 /dev/ttyMSM0 any 3000000 flow
group bluetooth net_bt_admin misc
disabled
oneshot
#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
# Speed up SDCard
write /sys/block/mmcblk0/bdi/read_ahead_kb 1024
# touchpad service
service touchpad /system/bin/touchpad -a /data/touchpad.log
user system
group input misc
oneshot
service minipad_firmware /system/bin/minipadut -a
user system
group input misc
oneshot
service minipad_on /system/bin/minipadut -enable
user system
group input misc
oneshot
disabled
service minipad_off /system/bin/minipadut -disable
user system
group input misc
oneshot
disabled
on property:persist.service.backtrack=1
start minipad_on
on property:persist.service.backtrack=0
start minipad_off