Amit Pundir | af628c2 | 2016-11-02 16:37:00 +0800 | [diff] [blame] | 1 | import init.${ro.hardware}.usb.rc |
Dmitry Shmidt | d711433 | 2015-12-10 10:35:59 -0800 | [diff] [blame] | 2 | |
Vishal Bhoj | e72c920 | 2015-10-23 18:10:21 +0100 | [diff] [blame] | 3 | on init |
| 4 | # mount debugfs |
| 5 | mount debugfs /sys/kernel/debug /sys/kernel/debug |
| 6 | |
Vishal Bhoj | e72c920 | 2015-10-23 18:10:21 +0100 | [diff] [blame] | 7 | # disable transparent huge pages |
| 8 | write /sys/kernel/mm/transparent_hugepage/enabled "never" |
| 9 | |
Vishal Bhoj | e72c920 | 2015-10-23 18:10:21 +0100 | [diff] [blame] | 10 | # 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 Bhoj | e72c920 | 2015-10-23 18:10:21 +0100 | [diff] [blame] | 14 | on fs |
Amit Pundir | af628c2 | 2016-11-02 16:37:00 +0800 | [diff] [blame] | 15 | mount_all /fstab.${ro.hardware} |
Vishal Bhoj | e72c920 | 2015-10-23 18:10:21 +0100 | [diff] [blame] | 16 | setprop ro.crypto.fuse_sdcard false |
| 17 | |
Vishal Bhoj | e72c920 | 2015-10-23 18:10:21 +0100 | [diff] [blame] | 18 | on post-fs |
Yongqin Liu | 05ba086 | 2016-03-23 21:22:57 +0800 | [diff] [blame] | 19 | |
| 20 | # For legacy support |
| 21 | # See storage config details at http://source.android.com/tech/storage/ |
| 22 | # since /storage is mounted on post-fs in init.rc |
Yongqin Liu | 05ba086 | 2016-03-23 21:22:57 +0800 | [diff] [blame] | 23 | symlink /sdcard /storage/sdcard0 |
| 24 | |
Vishal Bhoj | e72c920 | 2015-10-23 18:10:21 +0100 | [diff] [blame] | 25 | # BT LED sysfs entry |
Dmitry Shmidt | 883877c | 2016-09-01 13:49:00 -0700 | [diff] [blame] | 26 | write /sys/class/leds/bt_active/trigger "hci1rx" |
Vishal Bhoj | e72c920 | 2015-10-23 18:10:21 +0100 | [diff] [blame] | 27 | |
| 28 | chmod 0666 /dev/ump |
| 29 | chmod 0666 /dev/ion |
Vishal Bhoj | e72c920 | 2015-10-23 18:10:21 +0100 | [diff] [blame] | 30 | chmod 0666 /dev/graphics/fb0 |
| 31 | |
| 32 | # fake some battery state |
| 33 | setprop status.battery.state Slow |
| 34 | setprop status.battery.level 5 |
| 35 | setprop status.battery.level_raw 50 |
| 36 | setprop status.battery.level_scale 9 |
| 37 | |
| 38 | # Set Display density |
| 39 | setprop ro.sf.lcd_density 160 |
| 40 | |
| 41 | # Set supported opengles version |
| 42 | setprop ro.opengles.version 196608 |
| 43 | |
John Stultz | 6a4721f | 2016-08-17 17:48:15 -0700 | [diff] [blame] | 44 | # |
| 45 | # EAS stune boosting interfaces |
| 46 | # |
John Stultz | 17e1124 | 2017-03-14 18:14:24 -0700 | [diff] [blame] | 47 | chown system system /dev/stune/top-app/schedtune.boost |
| 48 | chown system system /dev/stune/top-app/schedtune.prefer_idle |
John Stultz | 884c713 | 2016-08-24 20:19:35 -0700 | [diff] [blame] | 49 | chown system system /dev/stune/foreground/schedtune.boost |
Andres Oportus | 17fc7d2 | 2016-09-13 11:04:33 -0700 | [diff] [blame] | 50 | chown system system /dev/stune/foreground/schedtune.prefer_idle |
John Stultz | 884c713 | 2016-08-24 20:19:35 -0700 | [diff] [blame] | 51 | chown system system /dev/stune/schedtune.boost |
John Stultz | 17e1124 | 2017-03-14 18:14:24 -0700 | [diff] [blame] | 52 | |
| 53 | write /dev/stune/top-app/schedtune.boost 10 |
| 54 | write /dev/stune/top-app/schedtune.prefer_idle 1 |
| 55 | write /dev/stune/foreground/schedtune.boost 0 |
Andres Oportus | 17fc7d2 | 2016-09-13 11:04:33 -0700 | [diff] [blame] | 56 | write /dev/stune/foreground/schedtune.prefer_idle 1 |
John Stultz | 884c713 | 2016-08-24 20:19:35 -0700 | [diff] [blame] | 57 | write /dev/stune/schedtune.boost 0 |
John Stultz | 6a4721f | 2016-08-17 17:48:15 -0700 | [diff] [blame] | 58 | |
| 59 | |
Vishal Bhoj | e72c920 | 2015-10-23 18:10:21 +0100 | [diff] [blame] | 60 | # enable Google-specific location features, |
| 61 | # like NetworkLocationProvider and LocationCollector |
| 62 | setprop ro.com.google.locationfeatures 1 |
| 63 | |
| 64 | # enable test harness |
| 65 | setprop ro.test_harness true |
| 66 | |
Yongqin Liu | 8fd6c4f | 2016-12-19 17:38:31 +0800 | [diff] [blame] | 67 | on post-fs-data |
| 68 | mkdir /data/media 0770 media_rw media_rw |
| 69 | mkdir /data/misc/gatord 0700 root root |
| 70 | # Set SELinux security contexts for files used by lava. |
| 71 | restorecon_recursive /data/local/tmp/lava |
| 72 | |
| 73 | on property:sys.boot_completed=1 |
| 74 | # update cpuset now that processors are up |
| 75 | # Foreground should contain most cores (7 is reserved for top-app) |
| 76 | write /dev/cpuset/foreground/cpus 0-6 |
| 77 | |
| 78 | # top-app gets all cpus (including reserved #7) |
| 79 | write /dev/cpuset/top-app/cpus 0-7 |
| 80 | |
| 81 | #background contains a small subset (generally one little core) |
| 82 | write /dev/cpuset/background/cpus 0 |
| 83 | |
| 84 | # add system-background cpuset, a new cpuset for system services |
| 85 | # that should not run on larger cores |
| 86 | # system-background is for system tasks that should only run on |
| 87 | # little cores, not on bigs to be used only by init |
| 88 | write /dev/cpuset/system-background/cpus 0-3 |
| 89 | |
Vishal Bhoj | e72c920 | 2015-10-23 18:10:21 +0100 | [diff] [blame] | 90 | on property:usb_speed.switch=high |
| 91 | write /sys/kernel/debug/f72c0000.usb/config "0" |
| 92 | |
| 93 | on property:usb_speed.switch=full |
| 94 | write /sys/kernel/debug/f72c0000.usb/config "1" |
| 95 | |
| 96 | #userspace daemon needed for bluetooth |
Myles Watson | 34e8b23 | 2017-02-15 14:26:09 -0800 | [diff] [blame] | 97 | service uim /vendor/bin/uim |
Vishal Bhoj | e72c920 | 2015-10-23 18:10:21 +0100 | [diff] [blame] | 98 | class main |
Yongqin Liu | 6c1cf5e | 2016-06-16 23:33:50 +0800 | [diff] [blame] | 99 | user bluetooth |
Ajay Panicker | a771b13 | 2016-09-20 11:28:28 -0700 | [diff] [blame] | 100 | group bluetooth net_bt_admin system |
Vishal Bhoj | e72c920 | 2015-10-23 18:10:21 +0100 | [diff] [blame] | 101 | oneshot |
| 102 | |
Roshan Pius | 17ea3f3 | 2017-02-23 10:17:59 -0800 | [diff] [blame] | 103 | service wpa_supplicant /system/vendor/bin/hw/wpa_supplicant \ |
Vishal Bhoj | e72c920 | 2015-10-23 18:10:21 +0100 | [diff] [blame] | 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 |