Amit Pundir | c738b81 | 2019-06-19 16:13:49 +0530 | [diff] [blame^] | 1 | import init.${ro.hardware}.usb.rc |
| 2 | import init.${ro.hardware}.power.rc |
| 3 | |
| 4 | on fs |
| 5 | mount_all /vendor/etc/init/fstab.${ro.hardware} |
| 6 | swapon_all /vendor/etc/init/fstab.${ro.hardware} |
| 7 | setprop ro.crypto.fuse_sdcard false |
| 8 | |
| 9 | on init |
| 10 | # For legacy support |
| 11 | # See storage config details at http://source.android.com/tech/storage/ |
| 12 | # since /storage is mounted on post-fs in init.rc |
| 13 | symlink /sdcard /storage/sdcard0 |
| 14 | |
| 15 | # Initialize cpusets to boot-time values |
| 16 | write /dev/cpuset/foreground/cpus 0-7 |
| 17 | write /dev/cpuset/background/cpus 0-7 |
| 18 | write /dev/cpuset/system-background/cpus 0-7 |
| 19 | write /dev/cpuset/top-app/cpus 0-7 |
| 20 | |
| 21 | on boot |
| 22 | # fake some battery state |
| 23 | setprop status.battery.state Slow |
| 24 | setprop status.battery.level 5 |
| 25 | setprop status.battery.level_raw 50 |
| 26 | setprop status.battery.level_scale 9 |
| 27 | |
| 28 | on early-boot |
| 29 | mount debugfs debugfs /sys/kernel/debug |
| 30 | chmod 755 /sys/kernel/debug |
| 31 | chmod 755 /sys/kernel/debug/sync |
| 32 | chown graphics graphics /sys/kernel/debug/sync/sw_sync |
| 33 | chmod 777 /sys/kernel/debug/sync/sw_sync |
| 34 | chown graphics graphics /sys/kernel/debug/sync/info |
| 35 | |
| 36 | setprop ro.hardware.gralloc gbm |
| 37 | setprop ro.hardware.hwcomposer drm |
| 38 | setprop debug.sf.no_hw_vsync 1 |
| 39 | setprop hwc.drm.use_framebuffer_target 1 |
| 40 | setprop hwc.drm.use_overlay_planes 0 |
| 41 | setprop ro.sf.lcd_density 160 |
| 42 | |
| 43 | # Set supported opengles version |
| 44 | setprop ro.opengles.version 196608 |
| 45 | |
| 46 | # If an app forces screen rotation, revert it once the apps closes |
| 47 | setprop persist.demo.rotationlock 1 |
| 48 | |
| 49 | on zygote-start |
| 50 | mkdir /data/vendor/wifi 0770 wifi wifi |
| 51 | mkdir /data/vendor/wifi/wpa 0770 wifi wifi |
| 52 | mkdir /data/vendor/wifi/wpa/sockets 0770 wifi wifi |
| 53 | |
| 54 | on property:sys.boot_completed=1 |
| 55 | # update cpuset now that processors are up |
| 56 | # Foreground should contain most cores (7 is reserved for top-app) |
| 57 | write /dev/cpuset/foreground/cpus 0-6 |
| 58 | |
| 59 | # top-app gets all cpus (including reserved #7) |
| 60 | write /dev/cpuset/top-app/cpus 0-7 |
| 61 | |
| 62 | #background contains a small subset (generally one little core) |
| 63 | write /dev/cpuset/background/cpus 0 |
| 64 | |
| 65 | # add system-background cpuset, a new cpuset for system services |
| 66 | # that should not run on larger cores |
| 67 | # system-background is for system tasks that should only run on |
| 68 | # little cores, not on bigs to be used only by init |
| 69 | write /dev/cpuset/system-background/cpus 0-3 |
| 70 | |
| 71 | service wpa_supplicant /vendor/bin/hw/wpa_supplicant \ |
| 72 | -Dnl80211 -g@android:wpa_wlan0 |
| 73 | interface android.hardware.wifi.supplicant@1.0::ISupplicant default |
| 74 | interface android.hardware.wifi.supplicant@1.1::ISupplicant default |
| 75 | socket wpa_wlan0 dgram 660 wifi wifi |
| 76 | class main |
| 77 | disabled |
| 78 | oneshot |