-
Notifications
You must be signed in to change notification settings - Fork 5
/
init.qcom.rc
executable file
·194 lines (163 loc) · 6.67 KB
/
init.qcom.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
# Based on Huawei M860 Eclair init.
service dhcp-service /system/bin/netcfg eth0 dhcp
oneshot
on property:dev.bootcomplete=1
stop dhcp-service
start dhcp-service
on boot
# cpufreq configurations
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 245760
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/cpufreq/ondemand/sampling_rate 20000
write /sys/devices/system/cpu/cpufreq/ondemand/up_threshold 76
write /sys/devices/system/cpu/cpufreq/ondemand/down_threshold 60
# Setup bluetooth
chown bluetooth bluetooth /sys/module/bluetooth_power/parameters/power
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
chown bluetooth bluetooth /proc/bluetooth/sleep/proto
chown system system /sys/module/sco/parameters/disable_esco
chmod 0660 /sys/module/bluetooth_power/parameters/power
chmod 0660 /sys/class/rfkill/rfkill0/state
chmod 0660 /proc/bluetooth/sleep/proto
chown bluetooth bluetooth /dev/ttyHS0
chmod 0660 /dev/ttyHS0
# create WIFI filesystem structure
mkdir /data/misc 01771 system misc
mkdir /data/misc/wifi 0770 system wifi
mkdir /data/misc/wifi/wpa_supplicant
chown wifi wifi /data/misc/wifi/wpa_supplicant
chmod 770 /data/misc/wifi/wpa_supplicant
mkdir /data/misc/wifi/sockets
chown system wifi /data/misc/wifi/sockets
chmod 770 /data/misc/wifi/sockets
mkdir /data/misc/dhcp 0770 dhcp dhcp
chown dhcp dhcp /data/misc/dhcp
mkdir /data/system 0775 system system
symlink /data/misc/wifi/wpa_supplicant /data/system/wpa_supplicant
# Permissions for ril
chmod 0777 /dev/oncrpc
chmod 0777 /dev/oncrpc/00000000:0
chmod 0777 /dev/oncrpc/30000002:00020000
chmod 0777 /dev/oncrpc/3000000a:00010000
chmod 0777 /dev/oncrpc/30000012:00010000
chmod 0777 /dev/oncrpc/30000013:00020000
chmod 0777 /dev/oncrpc/30000014:00010000
chmod 0777 /dev/oncrpc/30000017:00010000
chmod 0777 /dev/oncrpc/3000001a:00010000
chmod 0777 /dev/oncrpc/30000048:00010000
chmod 0777 /dev/oncrpc/3000005f:00010000
chmod 0777 /dev/oncrpc/30000060:00010000
chmod 0777 /dev/oncrpc/30000061:00010000
chmod 0777 /dev/oncrpc/30000064:00010000
chmod 0777 /dev/oncrpc/30000066:00010000
chmod 0777 /dev/oncrpc/3000006b:00010000
chmod 0777 /dev/oncrpc/30000081:00010000
chmod 0777 /dev/oncrpc/30000089:00010000
chmod 0777 /dev/oncrpc/3000008c:00040000
chmod 0777 /dev/oncrpc/30000091:00020000
chmod 0777 /dev/oncrpc/30000093:00000000
chmod 0777 /dev/oncrpc/30000096:00000000
chmod 0777 /dev/oncrpc/3000fffd:00000000
chmod 0777 /dev/oncrpc/30000000:ad750db4
chmod 0777 /dev/oncrpc/30000003:a7eed910
chmod 0777 /dev/oncrpc/3000000e:a4de1f0e
chmod 0777 /dev/oncrpc/30000016:9ac802c5
chmod 0777 /dev/oncrpc/30000019:821a1945
chmod 0777 /dev/oncrpc/3000001b:fae9727e
chmod 0777 /dev/oncrpc/3000001d:ba845703
chmod 0777 /dev/oncrpc/30000048:00010000
chmod 0777 /dev/oncrpc/3000003c:cc5478d4
chmod 0777 /dev/oncrpc/3000005b:a60286b0
chmod 0777 /dev/oncrpc/3000fe00:a82d4624
chown radio /dev/smd*
mkdir /data/local
chmod 0777 /data/local
chown radio shell /data/local
mkdir /data/local/tmp
chmod 0777 /data/local/tmp
chown radio shell /data/local/tmp
# SD card polling
chown system system /sys/bus/platform/devices/msm_sdcc.1/polling
chown system system /sys/bus/platform/devices/msm_sdcc.2/polling
chown system system /sys/devices/platform/msm_hsusb/composition
# Enable MASS storage on SDCARD
write /sys/devices/platform/mass_storage/lun0/file /dev/block/mmcblk0p1
write /sys/bus/platform/drivers/msm_sdcc/msm_sdcc.1/polling 1
write /sys/bus/platform/drivers/msm_sdcc/msm_sdcc.2/polling 1
# Sensors
chmod 0666 /dev/akm8973_aot
chmod 0666 /dev/akm8973_dev
chmod 0666 /dev/accel
# Not sure what this is but it was in HUAWEI init
chmod 0777 /dev/input/event0
chmod 0666 /dev/input/event1
chmod 0666 /dev/input/event2
chmod 0666 /dev/input/event3
# logs
chmod 0777 /sys/kernel/logger/log_main/enable
chmod 0777 /sys/kernel/logger/log_events/enable
chmod 0777 /sys/kernel/logger/log_radio/enable
chmod 0777 /sys/kernel/logger/log_main/priority
chmod 0777 /sys/kernel/logger/log_events/priority
chmod 0777 /sys/kernel/logger/log_radio/priority
# Increase read throughput from sd card
write /sys/block/mmcblk0/bdi/read_ahead_kb 4096
# Enable low memory killer to check file pages
write /sys/module/lowmemorykiller/parameters/minfile 0,0,0,4632,5632,6144
write /sys/module/lowmemorykiller/parameters/check_filepages 1
# lowmem killer minfree adjustments
write /sys/module/lowmemorykiller/parameters/minfree 1536,3072,4096,21000,23000,25000
# fb0 should not be world writable
chmod 0667 /dev/graphics/fb0
service rmt_storage /system/bin/rmt_storage /dev/block/mmcblk0p10 /dev/block/mmcblk0p11
user root
disabled
on property:init.svc.hcid=running
write /sys/devices/virtual/bluetooth/hci0/idle_timeout 7000
service hci_qcomm_init /system/bin/log -t qcom-bluetooth -p i "hci_qcomm_init service requested"
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service qmuxd /system/bin/qmuxd
service hciattach /system/bin/sh /system/etc/init.qcom.bt.sh
user bluetooth
group qcom_oncrpc bluetooth net_bt_admin system
disabled
oneshot
service hcid /system/bin/hcid -s -n -f /etc/bluez/hcid.conf
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 hcid drop uid to bluetooth with the right linux capabilities
group bluetooth net_bt_admin misc
disabled
# logcat switch at boot
service log_logcat /system/bin/logcat
disabled
oneshot
on property:persist.service.logcat.enable=1
start log_logcat
on property:persist.service.logcat.enable=0
stop log_logcat
# START HUAWEI RPC SERVICE
service oem_rpc_svc /system/bin/oem_rpc_svc
oneshot
# HUAWEI WPA SETTING
service wpa_supplicant /system/bin/wpa_supplicant -Dwext -ieth0 -W -c /data/misc/wifi/wpa_supplicant.conf
socket wpa_eth0 dgram 660 wifi wifi
group system wifi inet dhcp
disabled
oneshot
service dhcpcd_eth0 /system/bin/dhcpcd -ABKL eth0
disabled
oneshot
service iprenew_eth0 /system/bin/dhcpcd -n
disabled
oneshot
# Compass / Accelerometer daemon
service akmd /system/bin/akmd2
user compass
group compass misc input