diff options
Diffstat (limited to 'rootdir')
-rw-r--r-- | rootdir/init.rc | 50 |
1 files changed, 40 insertions, 10 deletions
diff --git a/rootdir/init.rc b/rootdir/init.rc index eaee442..7d2addb 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -12,7 +12,7 @@ import /init.trace.rc on early-init # Set init and its forked children's oom_adj. - write /proc/1/oom_adj -16 + write /proc/1/oom_score_adj -1000 # Apply strict SELinux checking of PROT_EXEC on mmap/mprotect calls. write /sys/fs/selinux/checkreqprot 0 @@ -264,6 +264,7 @@ on post-fs-data mkdir /data/misc/wifi 0770 wifi wifi mkdir /data/misc/wifi/sockets 0770 wifi wifi mkdir /data/misc/wifi/wpa_supplicant 0770 wifi wifi + mkdir /data/misc/ethernet 0770 system system mkdir /data/misc/dhcp 0770 dhcp dhcp mkdir /data/misc/user 0771 root root # give system access to wpa_supplicant.conf for backup and restore @@ -336,9 +337,9 @@ on boot write /proc/sys/vm/overcommit_memory 1 write /proc/sys/vm/min_free_order_shift 4 chown root system /sys/module/lowmemorykiller/parameters/adj - chmod 0664 /sys/module/lowmemorykiller/parameters/adj + chmod 0220 /sys/module/lowmemorykiller/parameters/adj chown root system /sys/module/lowmemorykiller/parameters/minfree - chmod 0664 /sys/module/lowmemorykiller/parameters/minfree + chmod 0220 /sys/module/lowmemorykiller/parameters/minfree # Tweak background writeout write /proc/sys/vm/dirty_expire_centisecs 200 @@ -427,11 +428,19 @@ on boot setprop net.tcp.default_init_rwnd 60 class_start core - class_start main on nonencrypted + class_start main class_start late_start +on property:vold.decrypt=trigger_default_encryption + start defaultcrypto + +on property:vold.decrypt=trigger_encryption + start surfaceflinger + start encrypt + class_start main + on charger class_start charger @@ -488,11 +497,6 @@ service healthd /sbin/healthd critical seclabel u:r:healthd:s0 -service healthd-charger /sbin/healthd -n - class charger - critical - seclabel u:r:healthd:s0 - service console /system/bin/sh class core console @@ -529,6 +533,7 @@ service servicemanager /system/bin/servicemanager onrestart restart zygote onrestart restart media onrestart restart surfaceflinger + onrestart restart inputflinger onrestart restart drm service vold /system/bin/vold @@ -562,6 +567,12 @@ service surfaceflinger /system/bin/surfaceflinger group graphics drmrpc onrestart restart zygote +service inputflinger /system/bin/inputflinger + class main + user system + group input + onrestart restart zygote + service drm /system/bin/drmserver class main user drm @@ -573,6 +584,20 @@ service media /system/bin/mediaserver group audio camera inet net_bt net_bt_admin net_bw_acct drmrpc mediadrm ioprio rt 4 +# One shot invocation to deal with encrypted volume. +service defaultcrypto /system/bin/vdc --wait cryptfs mountdefaultencrypted + disabled + oneshot + # vold will set vold.decrypt to trigger_restart_framework (default + # encryption) or trigger_restart_min_framework (other encryption) + +# One shot invocation to encrypt unencrypted volumes +service encrypt /system/bin/vdc --wait cryptfs enablecrypto inplace default + disabled + oneshot + # vold will set vold.decrypt to trigger_restart_framework (default + # encryption) + service bootanim /system/bin/bootanimation class main user graphics @@ -584,7 +609,7 @@ service installd /system/bin/installd class main socket installd stream 600 system system -service flash_recovery /system/etc/install-recovery.sh +service flash_recovery /system/bin/install-recovery.sh class main oneshot @@ -626,3 +651,8 @@ service mdnsd /system/bin/mdnsd socket mdnsd stream 0660 mdnsr inet disabled oneshot + +service pre-recovery /system/bin/uncrypt + class main + disabled + oneshot |