summaryrefslogtreecommitdiff
path: root/init.juno.rc
blob: a5bbc12694f565fe9262a4846634c52a66962301 (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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
on init
    # mount debugfs
    mount debugfs /sys/kernel/debug /sys/kernel/debug

on init
    # disable transparent huge pages
    write /sys/kernel/mm/transparent_hugepage/enabled "never"

    # See storage config details at http://source.android.com/tech/storage/
    mkdir /mnt/shell/emulated 0700 shell shell
    mkdir /storage/emulated 0555 root root
    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

    # Disabled virtual memory randomization
    # (if randomization is enabled the AEM-JIT will have a lower cache hit rate)
    write /proc/sys/kernel/randomize_va_space 0

on fs
    mount_all /fstab.juno
    setprop ro.crypto.fuse_sdcard true

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

on post-fs
    # insert HDLCD display and Mali kernel modules
    insmod /system/modules/hdlcd.ko
    insmod /system/modules/ansi_cprng.ko
    insmod /system/modules/rng-core.ko
    insmod /system/modules/sii9022.ko

    chmod 0666 /dev/ump
    chmod 0666 /dev/mali0
    chmod 0666 /dev/graphics/fb0

on boot

    setprop ARGH ARGH
    setprop ro.radio.use-ppp no
    setprop ro.build.product generic
    setprop ro.product.device generic

# 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

# Set Display density
    setprop ro.sf.lcd_density 160

# Set supported opengles version
    setprop ro.opengles.version 196608

# change permissions for process groups
# https://bugs.launchpad.net/bugs/1037611
    chmod 0660 /dev/cpuctl

# disable RenderScript
    setprop config.disable_renderscript 1

# disable some daemons the emulator doesn't want
    stop dund
    stop akmd

# enable Google-specific location features,
# like NetworkLocationProvider and LocationCollector
    setprop ro.com.google.locationfeatures 1

    # change permissions for process groups
    # https://bugs.launchpad.net/bugs/1037611
    chmod 0660 /dev/cpuctl

# enable test harness
    setprop ro.test_harness true

    # Setup paths used for socket communication with the dhcp daemon (dhcpd)
    mkdir /data/misc/dhcp 0770 dhcp dhcp
    chown dhcp dhcp /data/misc/dhcp

service dhcpcd_eth0 /system/bin/dhcpcd -dABKL eth0
    class main
    group dhcp
    oneshot

service clock-init /system/bin/hwclock
    class main
    user root
    group root
    oneshot

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

on property:sys.boot_completed=1
    start dns_eth0

service dns_eth0 /system/bin/sh /system/bin/svc netd setdefaultifdns eth0 8.8.8.8
    user root
    group root
    disabled
    oneshot