summaryrefstree
path: root/boot/ramdisk/init.sp9832a_2h11.rc
blob: bc7cdf8f3e0d988423ce70fd4c9c859174f5b2d0 (plain)
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
import /init.sc8830.rc
import /init.storage.rc

on early-boot
    chmod 660 /proc/cpgge/wdtirq
    chmod 660 /proc/cpgge/stop
    chmod 660 /proc/cpgge/start
    chmod 660 /proc/cpgge/modem
    chmod 660 /proc/cpgge/dsp

    chown system root /proc/cpgge/wdtirq
    chown system root /proc/cpgge/stop
    chown system root /proc/cpgge/start
    chown system root /proc/cpgge/modem
    chown system root /proc/cpgge/dsp

on post-fs-data
    mkdir /data/local/slogmodem 0770 shell system
    mkdir /data/modem_log 0770 shell system

on boot
    insmod /lib/modules/focaltech_ts.ko

    chmod 666 /dev/ttyS0
    chmod 660 /proc/bluetooth/sleep/proto
    chmod 660 /sys/class/rfkill/rfkill0/state
    chmod 660 /sys/class/rfkill/rfkill0/type
    chmod 660 /proc/bluetooth/sleep/btwrite
    chmod 660 /sys/devices/70000000.uart/uart_conf
    chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
    chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
    chown bluetooth net_bt_stack /proc/bluetooth/sleep/proto
    chown bluetooth net_bt_stack /proc/bluetooth/sleep/btwrite
    chown bluetooth net_bt_stack /sys/devices/70000000.uart/uart_conf

    mkdir /data/misc/wifi 0770 wifi wifi
    mkdir /data/misc/wifi/sockets 0770 wifi wifi
    mkdir /data/misc/wifi/wpa_supplicant 0770 wifi wifi
    mkdir /data/system 0770 system system
    mkdir /etc/wifi 0770 wifi wifi
    write /data/misc/wifi/fwpath sta_mode
    chmod 660 /data/misc/wifi/fwpath
    chown wifi wifi /data/misc/wifi/fwpath
    rmdir /data/system/wpa_supplicant
    mkdir /data/misc/dhcp 0770 dhcp dhcp
    #to observe dnsmasq.leases file for dhcp information
    chown dhcp system /data/misc/dhcp
    setprop wifi.interface wlan0
    mkdir /data/misc/dhcp6c 0770 dhcp dhcp
    chown dhcp system /data/misc/dhcp6c

	mkdir /data/gnss/ 0777 system system
	mkdir /data/gnss/bin/ 0777 system system
	mkdir /data/gnss/supl/ 0777 system system
	mkdir /data/gnss/config/ 0777 system system
	mkdir /data/gnss/lte/ 0777 system system
	chmod 666 /data/gnss/bin/gnssmodem.bin
	chmod 666 /data/gnss/config/config.xml
	chmod 666 /data/gnss/supl/supl.xml
	chmod 666 /data/gnss/supl/spirentroot.cer
	chmod 666 /data/gnss/lte/ext.eph
	chmod 666 /data/gnss/lte/jpleph.405
	chmod 666 /data/gnss/gnss.log
	chmod 666 /data/gnss/nmea.log
	chmod 666 /data/gnss/tsx.dat

	chown media audio /productinfo/module.file
	chmod 666  /productinfo/module.file
#modify permission for flashlight attributes file
	chown cameraserver system /sys/devices/virtual/flash_test/flash_test/flash_value
	chmod 660 /sys/devices/virtual/flash_test/flash_test/flash_value

service download /system/bin/download
    class core
    user system
    group system shell wifi bluetooth
    oneshot

service gnss_download /system/bin/gnss_download
    class core
    user system
    group system
    oneshot

service gpsd /system/bin/gpsd
    class core
    user system
    group gps system shell inet net_raw wifi

service hfag /system/bin/sdptool add --channel=10 HFAG
    user bluetooth
    group bluetooth net_bt_admin
    disabled
    oneshot

service hsag /system/bin/sdptool add --channel=11 HSAG
    user bluetooth
    group bluetooth net_bt_admin
    disabled
    oneshot

service opush /system/bin/sdptool add --channel=12 OPUSH
    user bluetooth
    group bluetooth net_bt_admin
    disabled
    oneshot

service pbap /system/bin/sdptool add --channel=19 PBAP
    user bluetooth
    group bluetooth net_bt_admin
    disabled
    oneshot

#service hciattach /system/bin/hciattach -n /dev/sttybt0 sprd_shark
#    socket bluetooth stream 660 bluetooth bluetooth
#    user bluetooth
#    group wifi bluetooth net_bt_admin net_bt inet net_raw net_admin system
#    disabled
#    oneshot

service btld  /system/bin/btld -lpm 0 -hb 3000000
    user root
    group bluetooth net_bt_admin
    disabled
    oneshot

service p2p_supplicant /system/bin/wpa_supplicant \
    -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -I/system/etc/wifi/wpa_supplicant_overlay.conf -N \
    -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0 -dd
    #   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
    class main
    socket wpa_wlan0 dgram 660 wifi wifi
    disabled
    oneshot

service wpa_supplicant /system/bin/wpa_supplicant \
    -Dnl80211 -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf -g@android:wpa_wlan0 -dd
    group system wifi inet keystore
    socket wpa_wlan0 dgram 660 wifi wifi
    disabled
    oneshot

service dhcp6c_wifi /system/bin/dhcp6c -c /data/misc/dhcp6c/dhcp6c.conf
    disabled
    oneshot

on alarm
    insmod /lib/modules/focaltech_ts.ko

# chown for engineermode
chown system system /sys/module/smsg/parameters/assert_trigger
chown system system /sys/power/avs_log