blob: 318ffc9bf413ad060b441cdf6471aded3ea48778 [file] [log] [blame]
Amit Pundiraf628c22016-11-02 16:37:00 +08001import init.${ro.hardware}.usb.rc
Dmitry Shmidtd7114332015-12-10 10:35:59 -08002
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
Vishal Bhoje72c9202015-10-23 18:10:21 +010010 # Disabled virtual memory randomization
11 # (if randomization is enabled the AEM-JIT will have a lower cache hit rate)
12 write /proc/sys/kernel/randomize_va_space 0
13
Vishal Bhoje72c9202015-10-23 18:10:21 +010014on fs
Amit Pundiraf628c22016-11-02 16:37:00 +080015 mount_all /fstab.${ro.hardware}
Vishal Bhoje72c9202015-10-23 18:10:21 +010016 setprop ro.crypto.fuse_sdcard false
17
Vishal Bhoje72c9202015-10-23 18:10:21 +010018on post-fs-data
19 mkdir /data/media 0770 media_rw media_rw
20 mkdir /data/misc/gatord 0700 root root
Vishal Bhoje72c9202015-10-23 18:10:21 +010021 # Set SELinux security contexts for files used by lava.
22 restorecon_recursive /data/local/tmp/lava
23
24on post-fs
Yongqin Liu05ba0862016-03-23 21:22:57 +080025
26 # For legacy support
27 # See storage config details at http://source.android.com/tech/storage/
28 # since /storage is mounted on post-fs in init.rc
Yongqin Liu05ba0862016-03-23 21:22:57 +080029 symlink /sdcard /storage/sdcard0
30
Vishal Bhoje72c9202015-10-23 18:10:21 +010031 # BT LED sysfs entry
Dmitry Shmidt883877c2016-09-01 13:49:00 -070032 write /sys/class/leds/bt_active/trigger "hci1rx"
Vishal Bhoje72c9202015-10-23 18:10:21 +010033
34 chmod 0666 /dev/ump
35 chmod 0666 /dev/ion
Vishal Bhoje72c9202015-10-23 18:10:21 +010036 chmod 0666 /dev/graphics/fb0
37
38# fake some battery state
39 setprop status.battery.state Slow
40 setprop status.battery.level 5
41 setprop status.battery.level_raw 50
42 setprop status.battery.level_scale 9
43
44# Set Display density
45 setprop ro.sf.lcd_density 160
46
47# Set supported opengles version
48 setprop ro.opengles.version 196608
49
Yongqin Liu16c8b0a2016-03-23 21:35:50 +080050 # update cpuset now that processors are up
John Stultz2d63a362016-08-23 10:56:20 -070051 # Foreground should contain most cores (7 is reserved for top-app)
52 write /dev/cpuset/foreground/cpus 0-6
Yongqin Liu16c8b0a2016-03-23 21:35:50 +080053
John Stultz2d63a362016-08-23 10:56:20 -070054 # top-app gets all cpus (including reserved #7)
55 write /dev/cpuset/top-app/cpus 0-7
Yongqin Liu16c8b0a2016-03-23 21:35:50 +080056
57 #background contains a small subset (generally one little core)
58 write /dev/cpuset/background/cpus 0
59
60 # add system-background cpuset, a new cpuset for system services
61 # that should not run on larger cores
62 # system-background is for system tasks that should only run on
63 # little cores, not on bigs to be used only by init
John Stultz2d63a362016-08-23 10:56:20 -070064 write /dev/cpuset/system-background/cpus 0-3
Yongqin Liu16c8b0a2016-03-23 21:35:50 +080065
John Stultz6a4721f2016-08-17 17:48:15 -070066 #
67 # EAS stune boosting interfaces
68 #
John Stultz884c7132016-08-24 20:19:35 -070069 chown system system /dev/stune/foreground/schedtune.boost
Andres Oportus17fc7d22016-09-13 11:04:33 -070070 chown system system /dev/stune/foreground/schedtune.prefer_idle
John Stultz884c7132016-08-24 20:19:35 -070071 chown system system /dev/stune/schedtune.boost
72 write /dev/stune/foreground/schedtune.boost 10
Andres Oportus17fc7d22016-09-13 11:04:33 -070073 write /dev/stune/foreground/schedtune.prefer_idle 1
John Stultz884c7132016-08-24 20:19:35 -070074 write /dev/stune/schedtune.boost 0
John Stultz6a4721f2016-08-17 17:48:15 -070075
76
Vishal Bhoje72c9202015-10-23 18:10:21 +010077# enable Google-specific location features,
78# like NetworkLocationProvider and LocationCollector
79 setprop ro.com.google.locationfeatures 1
80
81# enable test harness
82 setprop ro.test_harness true
83
Vishal Bhoje72c9202015-10-23 18:10:21 +010084on property:usb_speed.switch=high
85 write /sys/kernel/debug/f72c0000.usb/config "0"
86
87on property:usb_speed.switch=full
88 write /sys/kernel/debug/f72c0000.usb/config "1"
89
90#userspace daemon needed for bluetooth
Myles Watson34e8b232017-02-15 14:26:09 -080091service uim /vendor/bin/uim
Vishal Bhoje72c9202015-10-23 18:10:21 +010092 class main
Yongqin Liu6c1cf5e2016-06-16 23:33:50 +080093 user bluetooth
Ajay Panickera771b132016-09-20 11:28:28 -070094 group bluetooth net_bt_admin system
Vishal Bhoje72c9202015-10-23 18:10:21 +010095 oneshot
96
97service wpa_supplicant /system/bin/wpa_supplicant \
98 -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
99 -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
100 socket wpa_wlan0 dgram 660 wifi wifi
101 class main
102 disabled
103 oneshot