summaryrefslogtreecommitdiff
path: root/init.rc
blob: fd35b8d93190361051d0649179c88d0d2a05c785 (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
on fs
    mount_all /fstab.unknown
    swapon_all /fstab.unknown

on init
    # See storage config details at http://source.android.com/tech/storage/
    mkdir /storage/sdcard 0555 root root

    export EXTERNAL_STORAGE /storage/sdcard

    # Support legacy paths
    #symlink /storage/sdcard /sdcard
    #symlink /storage/sdcard /mnt/sdcard

on boot
    exec -- /system/bin/init.sh

    # update cpuset now that processors are up
    # This setup depends on ro.maxcpu being set, at least 4 cores, 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-${ro.maxcpu}

    write /dev/cpuset/foreground/boost/cpus 1-${ro.maxcpu}
    write /dev/cpuset/foreground/cpus 1-${ro.maxcpu}
    write /dev/cpuset/background/cpus ${ro.maxcpu}
    write /dev/cpuset/system-background/cpus 1-${ro.maxcpu}
    write /dev/cpuset/top-app/cpus 0-${ro.maxcpu}

    # Allow system to change brightness
    chown system system /sys/class/backlight/pic-backlight/brightness

# 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