blob: 41f582aee7b61afa5792da0a31a80908182a02d6 [file] [log] [blame]
Amit Pundiraf628c22016-11-02 16:37:00 +08001import init.${ro.hardware}.usb.rc
Leo Yana063cbd2017-05-23 13:03:05 +08002import init.${ro.hardware}.power.rc
Dmitry Shmidtd7114332015-12-10 10:35:59 -08003
Vishal Bhoje72c9202015-10-23 18:10:21 +01004on init
5 # mount debugfs
6 mount debugfs /sys/kernel/debug /sys/kernel/debug
7
Vishal Bhoje72c9202015-10-23 18:10:21 +01008 # disable transparent huge pages
9 write /sys/kernel/mm/transparent_hugepage/enabled "never"
10
Vishal Bhoje72c9202015-10-23 18:10:21 +010011 # Disabled virtual memory randomization
12 # (if randomization is enabled the AEM-JIT will have a lower cache hit rate)
13 write /proc/sys/kernel/randomize_va_space 0
14
Vishal Bhoje72c9202015-10-23 18:10:21 +010015on fs
Amit Pundiraf628c22016-11-02 16:37:00 +080016 mount_all /fstab.${ro.hardware}
Vishal Bhoje72c9202015-10-23 18:10:21 +010017 setprop ro.crypto.fuse_sdcard false
18
Vishal Bhoje72c9202015-10-23 18:10:21 +010019on post-fs
Yongqin Liu05ba0862016-03-23 21:22:57 +080020
21 # For legacy support
22 # See storage config details at http://source.android.com/tech/storage/
23 # since /storage is mounted on post-fs in init.rc
Yongqin Liu05ba0862016-03-23 21:22:57 +080024 symlink /sdcard /storage/sdcard0
25
Vishal Bhoje72c9202015-10-23 18:10:21 +010026 # BT LED sysfs entry
Dmitry Shmidt883877c2016-09-01 13:49:00 -070027 write /sys/class/leds/bt_active/trigger "hci1rx"
Vishal Bhoje72c9202015-10-23 18:10:21 +010028
29 chmod 0666 /dev/ump
30 chmod 0666 /dev/ion
Vishal Bhoje72c9202015-10-23 18:10:21 +010031 chmod 0666 /dev/graphics/fb0
32
33# fake some battery state
34 setprop status.battery.state Slow
35 setprop status.battery.level 5
36 setprop status.battery.level_raw 50
37 setprop status.battery.level_scale 9
38
39# Set Display density
40 setprop ro.sf.lcd_density 160
41
42# Set supported opengles version
43 setprop ro.opengles.version 196608
44
John Stultz6a4721f2016-08-17 17:48:15 -070045
Vishal Bhoje72c9202015-10-23 18:10:21 +010046# enable Google-specific location features,
47# like NetworkLocationProvider and LocationCollector
48 setprop ro.com.google.locationfeatures 1
49
50# enable test harness
51 setprop ro.test_harness true
52
Yongqin Liu8fd6c4f2016-12-19 17:38:31 +080053on post-fs-data
54 mkdir /data/media 0770 media_rw media_rw
55 mkdir /data/misc/gatord 0700 root root
56 # Set SELinux security contexts for files used by lava.
57 restorecon_recursive /data/local/tmp/lava
58
59on property:sys.boot_completed=1
60 # update cpuset now that processors are up
61 # Foreground should contain most cores (7 is reserved for top-app)
62 write /dev/cpuset/foreground/cpus 0-6
63
64 # top-app gets all cpus (including reserved #7)
65 write /dev/cpuset/top-app/cpus 0-7
66
67 #background contains a small subset (generally one little core)
68 write /dev/cpuset/background/cpus 0
69
70 # add system-background cpuset, a new cpuset for system services
71 # that should not run on larger cores
72 # system-background is for system tasks that should only run on
73 # little cores, not on bigs to be used only by init
74 write /dev/cpuset/system-background/cpus 0-3
75
Vishal Bhoje72c9202015-10-23 18:10:21 +010076on property:usb_speed.switch=high
77 write /sys/kernel/debug/f72c0000.usb/config "0"
78
79on property:usb_speed.switch=full
80 write /sys/kernel/debug/f72c0000.usb/config "1"
81
82#userspace daemon needed for bluetooth
Myles Watson34e8b232017-02-15 14:26:09 -080083service uim /vendor/bin/uim
Vishal Bhoje72c9202015-10-23 18:10:21 +010084 class main
Yongqin Liu6c1cf5e2016-06-16 23:33:50 +080085 user bluetooth
Ajay Panickera771b132016-09-20 11:28:28 -070086 group bluetooth net_bt_admin system
Vishal Bhoje72c9202015-10-23 18:10:21 +010087 oneshot
88
Roshan Pius17ea3f32017-02-23 10:17:59 -080089service wpa_supplicant /system/vendor/bin/hw/wpa_supplicant \
Vishal Bhoje72c9202015-10-23 18:10:21 +010090 -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
91 -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
92 socket wpa_wlan0 dgram 660 wifi wifi
93 class main
94 disabled
95 oneshot