aboutsummaryrefslogtreecommitdiff
path: root/init.otterx.rc
blob: 2b0c3e28aeab5023c11e65ee6a9c856d2bd63d38 (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
import init.otter-common.rc
import init.omap4.rc
import init.otterx.usb.rc

on init
    export EXTERNAL_STORAGE /storage/emulated/legacy
    export EMULATED_STORAGE_SOURCE /mnt/shell/emulated
    export EMULATED_STORAGE_TARGET /storage/emulated

    # Support legacy paths
    symlink /storage/emulated/legacy /sdcard
    symlink /storage/emulated/legacy /mnt/sdcard
    symlink /storage/emulated/legacy /storage/sdcard0
    symlink /mnt/shell/emulated/0 /storage/emulated/legacy

on fs
    # zRAM read only 1 page at a time
    write /proc/sys/vm/page-cluster 0

    mkdir /factory 0775 radio radio
    mount_all /fstab.otterx
    swapon_all /fstab.otterx
    setprop ro.crypto.fuse_sdcard true

    # We chown/chmod /factory because mount is run as root + defaults
    chown radio radio /factory
    chmod 0775 /factory

on post-fs-data
    mkdir /data/media 0770 media_rw media_rw

on charger
    wait /dev/block/platform/omap/omap_hsmmc.1/by-name/system
    mount ext4 /dev/block/platform/omap/omap_hsmmc.1/by-name/system /system ro barrier=1

service sdcard /system/bin/sdcard -u 1023 -g 1023 -l /data/media /mnt/shell/emulated
    class late_start

service charger /sbin/healthd -c
    class charger
    critical
    seclabel u:r:healthd:s0