blob: 937cb5c59d75d456fa81ce7f7768fe9a56e12696 [file] [log] [blame]
Dmitry Shmidtd7114332015-12-10 10:35:59 -08001import init.hikey.usb.rc
2
Vishal Bhoje72c9202015-10-23 18:10:21 +01003on init
4 # mount debugfs
5 mount debugfs /sys/kernel/debug /sys/kernel/debug
6
7 setprop wifi.interface wlan0
8
9 # Set this property so AdvancedWifiSettings would show the checkbox
10 # for Enable/Disable Active Roaming
11 setprop ro.wifi.active_roaming.enable true
12
13 # disable transparent huge pages
14 write /sys/kernel/mm/transparent_hugepage/enabled "never"
15
16 # See storage config details at http://source.android.com/tech/storage/
17 symlink /sdcard /mnt/sdcard
18 symlink /sdcard /storage/sdcard0
19
20
21 # Disabled virtual memory randomization
22 # (if randomization is enabled the AEM-JIT will have a lower cache hit rate)
23 write /proc/sys/kernel/randomize_va_space 0
24
25#bluetooth
26 #UART device
27 chmod 0660 /dev/ttyAMA1
28 chown bluetooth net_bt_stack /dev/ttyAMA1
29
30on fs
31 mount_all /fstab.hikey
32 setprop ro.crypto.fuse_sdcard false
33
Vishal Bhoje72c9202015-10-23 18:10:21 +010034on post-fs-data
35 mkdir /data/media 0770 media_rw media_rw
36 mkdir /data/misc/gatord 0700 root root
37 mkdir /data/misc/wireless 0771 system system
38 mkdir /data/misc/wifi 0771 wifi wifi
39 mkdir /data/misc/wifi/sockets 0771 wifi wifi
40 mkdir /data/misc/wifi/wapi_certs 0777 wifi wifi
41 mkdir /data/misc/dhcp 0770 dhcp dhcp
42 # Set SELinux security contexts for files used by lava.
43 restorecon_recursive /data/local/tmp/lava
44
45on post-fs
46 # insert WiFi Modules
47 insmod /system/modules/rfkill.ko
48 insmod /system/modules/wifi/compat.ko
49 insmod /system/modules/wifi/cfg80211.ko
50 insmod /system/modules/wifi/mac80211.ko
51 insmod /system/modules/wifi/wlcore.ko
52 insmod /system/modules/wifi/wl18xx.ko
53 insmod /system/modules/wifi/wlcore_sdio.ko
54
55 # BT LED sysfs entry
56 write /sys/devices/leds/leds/bt_active/trigger "hci1rx"
57
58 chmod 0666 /dev/ump
59 chmod 0666 /dev/ion
60 chmod 0666 /dev/mali
61 chown system.graphics /dev/mali
62 chmod 0666 /dev/graphics/fb0
63
64# fake some battery state
65 setprop status.battery.state Slow
66 setprop status.battery.level 5
67 setprop status.battery.level_raw 50
68 setprop status.battery.level_scale 9
69
70# Set Display density
71 setprop ro.sf.lcd_density 160
72
73# Set supported opengles version
74 setprop ro.opengles.version 196608
75
76# change permissions for process groups
77# https://bugs.launchpad.net/bugs/1037611
78 chmod 0660 /dev/cpuctl
79
80# enable Google-specific location features,
81# like NetworkLocationProvider and LocationCollector
82 setprop ro.com.google.locationfeatures 1
83
84# enable test harness
85 setprop ro.test_harness true
86
87 # Setup paths used for socket communication with the dhcp daemon (dhcpd)
88 mkdir /data/misc/dhcp 0770 dhcp dhcp
89 chown dhcp dhcp /data/misc/dhcp
90
Vishal Bhoje72c9202015-10-23 18:10:21 +010091on property:usb_speed.switch=high
92 write /sys/kernel/debug/f72c0000.usb/config "0"
93
94on property:usb_speed.switch=full
95 write /sys/kernel/debug/f72c0000.usb/config "1"
96
97#userspace daemon needed for bluetooth
98service uim /system/bin/uim
99 class main
100 user root
101 oneshot
102
103service wpa_supplicant /system/bin/wpa_supplicant \
104 -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
105 -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
106 socket wpa_wlan0 dgram 660 wifi wifi
107 class main
108 disabled
109 oneshot
110