This repository has been archived by the owner on Dec 27, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
init.swift.rc
121 lines (86 loc) · 3.48 KB
/
init.swift.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
on fs
mkdir /misc
mount yaffs2 mtd@misc /misc nosuid nodev
chown system system /misc
chmod 0777 /misc
mkdir /misc/sensor 0777 system system
mkdir /misc/ms3c 0775 system system
mkdir /misc2
mount yaffs2 mtd@misc2 /misc2 nosuid nodev
chown system system /misc2
chmod 0777 /misc2
chmod 666 /dev/oncrpc/3000000e:00060000
## Copy stock files to a writeable location
copy /system/etc/ms3c_transformation.cfg /misc/ms3c/transformation.cf
copy /system/etc/ms3c_charger_offset.cfg /misc/ms3c/charger_offset.cf
chown system system /misc/ms3c/transformation.cf
chown system system /misc/ms3c/charger_offset.cf
on property:dev.bootcomplete=1
#+++FIH_misty enable keypad interrupt until boot complete
chmod 0666 /sys/module/7x27_kybd/parameters/EnableKeyIntrrupt
write /sys/module/7x27_kybd/parameters/EnableKeyIntrrupt 1
#---enable keypad interrupt until boot complete
on boot
## cpufreq configurations
write /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate 500000
## RIL needs this
mkdir /data/radio 0777
mkdir /data/misc/bluetooth 0770 bluetooth 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
chown bluetooth bluetooth /sys/devices/platform/msm_serial_hs.0/clock
chmod 0660 /sys/devices/platform/msm_serial_hs.0/clock
# Create the directories used by the Wireless subsystem
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
## Wifi RFKill
chown wifi wifi /sys/class/rfkill/rfkill1/state
chmod 0660 /sys/class/rfkill/rfkill1/state
## Needed because sensor_server runs as system
chmod 666 /dev/compass
# LED blinkers
chown system system /sys/class/leds/red/blink
chown system system /sys/class/leds/green/blink
chown system system /sys/bus/i2c/devices/0-0045/powerbtn
chmod 666 /sys/class/backlight/rt9393/brightness
chown 666 /sys/class/backlight/rt9393/max_brightness
chown 666 /sys/class/backlight/rt9393/actual_brightness
# Speed up SD Card
write /sys/block/mmcblk0/bdi/read_ahead_kb 2048
on property:init.svc.bluetoothd=running
write /sys/devices/virtual/bluetooth/hci0/idle_timeout 7000
start abtfilt
service hciattach /system/bin/sh /system/bin/init.qcom.bt.sh
user bluetooth
group qcom_oncrpc bluetooth net_bt_admin
disabled
oneshot
service wpa_supplicant /system/bin/wpa_supplicant -Dwext -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf
group wifi inet
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot
service hostapd /system/bin/logwrapper /system/bin/hostapd /data/misc/wifi/hostapd.conf
group wifi inet
socket wpa_athap0 dgram 660 wifi wifi
disabled
oneshot
service dhcpcd_wlan0 /system/bin/dhcpcd -B wlan0
disabled
oneshot
service abtfilt /system/bin/abtfilt -c -d -z -n
disabled
oneshot
service qmuxd /system/bin/qmuxd
user root
group root