-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.rpi4.rc
56 lines (46 loc) · 1.77 KB
/
init.rpi4.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
#import /vendor/etc/init/hw/init.rpi4.usb.rc
on init
# mount debugfs
mount debugfs /sys/kernel/debug /sys/kernel/debug mode=755
# Support legacy paths
symlink /sdcard /mnt/sdcard
symlink /sdcard /storage/sdcard0
on fs
mount_all /vendor/etc/fstab.rpi4
on post-fs-data
# Bluetooth
chmod 0660 /sys/class/rfkill/rfkill0/state
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
# Set indication (checked by vold) that we have finished this action
setprop vold.post_fs_data_done 1
on zygote-start
# Create the directories used by the Wireless subsystem
mkdir /data/misc/wifi 0770 wifi wifi
mkdir /data/misc/wifi/wpa_supplicant 0770 wifi wifi
mkdir /data/vendor/wifi 0771 wifi wifi
mkdir /data/vendor/wifi/wpa 0770 wifi wifi
mkdir /data/vendor/wifi/wpa/sockets 0770 wifi wifi
mkdir /data/misc/dhcp 0770 dhcp dhcp
chown dhcp dhcp /data/misc/dhcp
on boot
setprop net.dns1 8.8.8.8
setprop net.dns2 8.8.4.4
# fake some battery state
setprop status.battery.state Slow
setprop status.battery.level 5
setprop status.battery.level_raw 50
setprop status.battery.level_scale 9
setprop service.adb.tcp.port 5555
start adbd
service wpa_supplicant /vendor/bin/hw/wpa_supplicant \
-iwlan0 -Dnl80211 -c/vendor/etc/wifi/wpa_supplicant.conf \
-I/vendor/etc/wifi/wpa_supplicant_overlay.conf \
-O/data/vendor/wifi/wpa/sockets -g@android:wpa_wlan0
interface [email protected]::ISupplicant default
interface [email protected]::ISupplicant default
interface [email protected]::ISupplicant default
class main
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot