summaryrefslogtreecommitdiff
path: root/init.common.rc
diff options
context:
space:
mode:
Diffstat (limited to 'init.common.rc')
-rw-r--r--init.common.rc63
1 files changed, 63 insertions, 0 deletions
diff --git a/init.common.rc b/init.common.rc
new file mode 100644
index 0000000..6eaf705
--- /dev/null
+++ b/init.common.rc
@@ -0,0 +1,63 @@
+import init.${ro.hardware}.usb.rc
+
+on fs
+ mount_all /fstab.${ro.hardware}
+ swapon_all /fstab.${ro.hardware}
+ setprop ro.crypto.fuse_sdcard false
+
+on init
+ # For legacy support
+ # See storage config details at http://source.android.com/tech/storage/
+ # since /storage is mounted on post-fs in init.rc
+ symlink /sdcard /storage/sdcard0
+
+on boot
+ # update cpuset now that processors are up, and
+ # assumes homogeneous cores.
+ # The constraints are:
+ # CPU 0 is reserved for the top app
+ # background is limited to the last CPU
+
+ # First, reset foreground to all cpus, so boost can be modified
+ write /dev/cpuset/foreground/cpus 0-3
+
+ write /dev/cpuset/foreground/boost/cpus 1-3
+ write /dev/cpuset/foreground/cpus 1-3
+ write /dev/cpuset/background/cpus 3
+ write /dev/cpuset/system-background/cpus 1-3
+ write /dev/cpuset/top-app/cpus 0-3
+
+ # fake some battery state
+ setprop status.battery.state Slow
+ setprop status.battery.level 5
+ setprop status.battery.level_raw 50
+ setprop status.battery.level_scale 9
+
+on early-boot
+ mount debugfs debugfs /sys/kernel/debug
+ chmod 755 /sys/kernel/debug
+ chmod 755 /sys/kernel/debug/sync
+ chown graphics graphics /sys/kernel/debug/sync/sw_sync
+ chmod 777 /sys/kernel/debug/sync/sw_sync
+ chown graphics graphics /sys/kernel/debug/sync/info
+
+ setprop ro.hardware.gralloc gbm
+ setprop ro.hardware.hwcomposer drm
+ setprop debug.sf.no_hw_vsync 1
+ setprop hwc.drm.use_framebuffer_target 1
+ setprop hwc.drm.use_overlay_planes 0
+ setprop ro.sf.lcd_density 160
+
+ # Set supported opengles version
+ setprop ro.opengles.version 196608
+
+ # If an app forces screen rotation, revert it once the apps closes
+ setprop persist.demo.rotationlock 1
+
+service wpa_supplicant /vendor/bin/hw/wpa_supplicant \
+ -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf \
+ -Dnl80211 -g@android:wpa_wlan0
+ socket wpa_wlan0 dgram 660 wifi wifi
+ class main
+ disabled
+ oneshot