forked from CyanogenMod/android_device_motorola_sholes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.sholes.rc
executable file
·206 lines (171 loc) · 6.23 KB
/
init.sholes.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
on early-boot
# Adjust the out of memory thresholds to account for the larget
# space on sholes. These numbers are in pages (4k). Must be kept
# in sync with init.rc. This must be done before the regular init.rc
# since these properies can't change once set.
setprop ro.FOREGROUND_APP_MEM 2048
setprop ro.VISIBLE_APP_MEM 3072
setprop ro.SECONDARY_SERVER_MEM 6144
setprop ro.BACKUP_APP_MEM 6144
setprop ro.HOME_APP_MEM 6144
setprop ro.HIDDEN_APP_MEM 7168
setprop ro.CONTENT_PROVIDER_MEM 8192
setprop ro.EMPTY_APP_MEM 8192
chmod 0666 /dev/DspBridge
class_start media_early_init
on boot
# Overwrite what init.rc selected for the memory killer params to match above.
write /sys/module/lowmemorykiller/parameters/minfree 2048,3072,6144,7168,8192,8192
chown compass compass /dev/lis331dlh
chmod 660 /dev/lis331dlh
chown compass compass /dev/akm8973
chmod 660 /dev/akm8973
chown compass compass /dev/sfh7743
chmod 660 /dev/sfh7743
chown compass compass /dev/akm8973_dev
chmod 660 /dev/akm8973_dev
chown compass compass /dev/akm8973_aot
chmod 660 /dev/akm8973_aot
chown radio radio /dev/ttyUSB0
chmod 640 /dev/ttyUSB0
chown radio radio /dev/ttyS0
chmod 640 /dev/ttyS0
chown radio radio /dev/ts0710mux0
chmod 640 /dev/ts0710mux0
chown radio radio /dev/ts0710mux1
chmod 640 /dev/ts0710mux1
chown radio radio /dev/ts0710mux2
chmod 640 /dev/ts0710mux2
chown radio radio /dev/ts0710mux3
chmod 640 /dev/ts0710mux3
chown radio radio /dev/ts0710mux4
chmod 640 /dev/ts0710mux4
chown radio radio /dev/ts0710mux5
chmod 640 /dev/ts0710mux5
chown radio radio /dev/ts0710mux6
chmod 640 /dev/ts0710mux6
chown radio radio /dev/ts0710mux7
chmod 640 /dev/ts0710mux7
chown radio radio /dev/ts0710mux8
chmod 640 /dev/ts0710mux8
chown radio radio /dev/ts0710mux9
chmod 640 /dev/ts0710mux9
# wifi dirs
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
mount yaffs2 mtd@pds /config ro no-checkpoint-write
# 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
# bluetooth uart
chown bluetooth bluetooth /dev/ttyS1
chmod 0660 /dev/ttyS1
# Temp workaround for HP library cleanup
symlink /dev/hp3a-omap /dev/hp3A-omap
# Permissions for video
chmod 0770 /dev/hp3a-omap
chmod 0770 /dev/hplens-omap
chmod 0770 /dev/video0
chmod 0770 /dev/video1
chmod 0770 /dev/video2
chown media camera /dev/hp3a-omap
chown media camera /dev/hplens-omap
chown media camera /dev/video0
chown media graphics /dev/video1
chown media graphics /dev/video2
# Permissions for lighting
chown system system /sys/class/leds/lcd-backlight/als
chown system system /sys/class/leds/lcd-backlight/pwm_mode
chown system system /sys/class/leds/red/blink
chmod 0660 /sys/class/leds/torch-flash/camera_strobe
chmod 0660 /sys/class/leds/torch-flash/flash_light
chown system system /sys/class/leds/torch-flash/camera_strobe
chown system system /sys/class/leds/torch-flash/flash_light
# flashlight
chown system camera /sys/class/leds/spotlight/brightness
chmod 0660 /sys/class/leds/spotlight/brightness
# Permissions for 3D
chmod 0666 /dev/pvrsrvkm
chown system graphics /dev/pvrsrvkm
# Power Management Settings
write /sys/devices/platform/ohci.0/usb2/2-3/power/level auto
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 250000
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 600000
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ondemand
write /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold 93
write /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate 30000
# Wakelock debug
write /sys/module/wakelock/parameters/debug_mask 7
# Enable panic on softlockup
write /proc/sys/kernel/softlockup_panic 1
# Load traffic shaping modules
insmod /system/lib/modules/ifb.ko
insmod /system/lib/modules/act_mirred.ko
insmod /system/lib/modules/sch_ingress.ko
insmod /system/lib/modules/act_police.ko
insmod /system/lib/modules/cls_u32.ko
insmod /system/lib/modules/sch_htb.ko
insmod /system/lib/modules/em_u32.ko
# Ecompass daemon
service akmd2 /system/bin/akmd2
user compass
group compass misc input
service wlan_loader /system/bin/wlan_loader \
-f /system/etc/wifi/fw_wlan1271.bin -i /system/etc/wifi/tiwlan.ini \
-e /config/wifi/nvs_map.bin
disabled
oneshot
service wpa_supplicant /system/bin/wpa_supplicant \
-Dtiwlan0 -itiwlan0 -c/data/misc/wifi/wpa_supplicant.conf
# we will start as root and wpa_supplicant will switch to user wifi
# after setting up the capabilities required for WEXT
# user wifi
# group wifi inet keystore
socket wpa_tiwlan0 dgram 660 wifi wifi
disabled
oneshot
service dhcpcd /system/bin/dhcpcd -ABKL
disabled
oneshot
service battd /system/bin/battd
socket battdsock stream 0660 root mount
oneshot
service pppd-ril /system/bin/pppd-ril /dev/ttyUSB0 call pppd-ril.options plugin /system/lib/libpppd_plugin-ril.so
user root
disabled
oneshot
service hciattach /system/bin/hciattach \
-n -t 10 /dev/ttyS1 texasalt 3000000 flow
user bluetooth
group bluetooth net_bt_admin
disabled
service baseimage /system/bin/dspexec -v -T /system/lib/dsp/baseimage.dof
class media_early_init
oneshot
service pvrsrv /system/bin/pvrsrvinit
user root
oneshot
# bugreport is triggered by the KEY_LEFTSHIFT and KEY_MENU keycodes
service bugreport /system/bin/dumpstate -d -v -o /sdcard/bugreports/bugreport
disabled
oneshot
keycodes 42 139
service tcmd /system/bin/tcmd
oneshot
disabled
service ftmipcd /system/bin/ftmipcd
oneshot
disabled
service mdm_panicd /system/bin/mdm_panicd
oneshot
on property:ro.bootmode=factorycable
start tcmd
start ftmipcd
#get BP version and save to misc
service savebpver /system/bin/SaveBPVer
oneshot
on property:dev.bootcomplete=1
start savebpver