summaryrefslogtreecommitdiff
path: root/init.common.rc
blob: 8d181e0635506d62341d15e5689fadf06f8a01be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import init.${ro.hardware}.usb.rc
import init.${ro.hardware}.power.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

    # Initialize cpusets to boot-time values
    write /dev/cpuset/foreground/cpus 0-3
    write /dev/cpuset/background/cpus 0-3
    write /dev/cpuset/system-background/cpus 0-3
    write /dev/cpuset/top-app/cpus 0-3

on boot
    # 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

on property:sys.boot_completed=1
    # update cpuset now that processors are up
    # Foreground should contain most cores (3 is reserved for top-app)
    write /dev/cpuset/foreground/cpus 0-2

    # top-app gets all cpus (including reserved #3)
    write /dev/cpuset/top-app/cpus 0-3

    #background contains a small subset (generally one little core)
    write /dev/cpuset/background/cpus 0

    # add system-background cpuset, a new cpuset for system services
    # that should not run on larger cores
    # system-background is for system tasks that should only run on
    # little cores, not on bigs to be used only by init
    write /dev/cpuset/system-background/cpus 0-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