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