2012-08-08 22:06:26 +02:00
|
|
|
import /init.recovery.${ro.hardware}.rc
|
|
|
|
|
2010-05-14 22:42:20 +02:00
|
|
|
on early-init
|
2014-01-13 15:44:42 +01:00
|
|
|
# Apply strict SELinux checking of PROT_EXEC on mmap/mprotect calls.
|
|
|
|
write /sys/fs/selinux/checkreqprot 0
|
|
|
|
|
|
|
|
# Set the security context for the init process.
|
|
|
|
# This should occur before anything else (e.g. ueventd) is started.
|
|
|
|
setcon u:r:init:s0
|
|
|
|
|
2010-05-14 22:42:20 +02:00
|
|
|
start ueventd
|
2013-06-04 22:11:44 +02:00
|
|
|
start healthd
|
2009-03-04 04:28:42 +01:00
|
|
|
|
|
|
|
on init
|
2014-01-14 18:50:35 +01:00
|
|
|
export PATH /sbin:/system/bin
|
2009-03-04 04:28:42 +01:00
|
|
|
export ANDROID_ROOT /system
|
|
|
|
export ANDROID_DATA /data
|
|
|
|
export EXTERNAL_STORAGE /sdcard
|
|
|
|
|
|
|
|
symlink /system/etc /etc
|
|
|
|
|
|
|
|
mkdir /sdcard
|
|
|
|
mkdir /system
|
|
|
|
mkdir /data
|
|
|
|
mkdir /cache
|
2014-01-14 18:50:35 +01:00
|
|
|
mount tmpfs tmpfs /tmp
|
2009-03-04 04:28:42 +01:00
|
|
|
|
2012-03-19 23:52:03 +01:00
|
|
|
chown root shell /tmp
|
|
|
|
chmod 0775 /tmp
|
|
|
|
|
2012-01-10 21:16:04 +01:00
|
|
|
write /sys/class/android_usb/android0/enable 0
|
|
|
|
write /sys/class/android_usb/android0/idVendor 18D1
|
|
|
|
write /sys/class/android_usb/android0/idProduct D001
|
|
|
|
write /sys/class/android_usb/android0/functions adb
|
|
|
|
write /sys/class/android_usb/android0/iManufacturer ${ro.product.manufacturer}
|
|
|
|
write /sys/class/android_usb/android0/iProduct ${ro.product.model}
|
|
|
|
write /sys/class/android_usb/android0/iSerial ${ro.serialno}
|
|
|
|
|
|
|
|
|
2009-03-04 04:28:42 +01:00
|
|
|
on boot
|
|
|
|
|
|
|
|
ifup lo
|
|
|
|
hostname localhost
|
|
|
|
domainname localdomain
|
|
|
|
|
|
|
|
class_start default
|
|
|
|
|
2013-08-30 21:20:16 +02:00
|
|
|
on property:sys.powerctl=*
|
|
|
|
powerctl ${sys.powerctl}
|
|
|
|
|
2010-05-14 22:42:20 +02:00
|
|
|
service ueventd /sbin/ueventd
|
|
|
|
critical
|
2014-01-13 15:44:42 +01:00
|
|
|
seclabel u:r:ueventd:s0
|
2009-03-04 04:28:42 +01:00
|
|
|
|
2013-06-04 22:11:44 +02:00
|
|
|
service healthd /sbin/healthd -n
|
|
|
|
critical
|
2014-01-13 15:44:42 +01:00
|
|
|
seclabel u:r:healthd:s0
|
2013-06-04 22:11:44 +02:00
|
|
|
|
2009-03-04 04:28:42 +01:00
|
|
|
service recovery /sbin/recovery
|
2014-01-13 15:44:42 +01:00
|
|
|
seclabel u:r:recovery:s0
|
2009-03-04 04:28:42 +01:00
|
|
|
|
|
|
|
service adbd /sbin/adbd recovery
|
2010-06-28 18:01:22 +02:00
|
|
|
disabled
|
2013-09-11 22:24:32 +02:00
|
|
|
socket adbd stream 660 system system
|
2014-01-13 15:44:42 +01:00
|
|
|
seclabel u:r:adbd:s0
|
2009-03-04 04:28:42 +01:00
|
|
|
|
2011-06-29 16:22:04 +02:00
|
|
|
# Always start adbd on userdebug and eng builds
|
|
|
|
on property:ro.debuggable=1
|
2011-06-19 08:52:01 +02:00
|
|
|
write /sys/class/android_usb/android0/enable 1
|
2009-03-04 04:28:42 +01:00
|
|
|
start adbd
|
|
|
|
|
2011-06-29 16:22:04 +02:00
|
|
|
# Restart adbd so it can run as root
|
2011-06-24 00:30:34 +02:00
|
|
|
on property:service.adb.root=1
|
|
|
|
write /sys/class/android_usb/android0/enable 0
|
|
|
|
restart adbd
|
|
|
|
write /sys/class/android_usb/android0/enable 1
|