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
|
|
|
|
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-06-27 00:35:51 +02:00
|
|
|
mkdir /sideload
|
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
|
|
|
|
|
2014-06-24 22:43:39 +02:00
|
|
|
write /proc/sys/kernel/panic_on_oops 1
|
2015-01-09 00:59:23 +01:00
|
|
|
write /proc/sys/vm/max_map_count 1000000
|
2014-06-24 22:43:39 +02:00
|
|
|
|
2014-02-20 02:41:02 +01:00
|
|
|
on fs
|
|
|
|
mkdir /dev/usb-ffs 0770 shell shell
|
|
|
|
mkdir /dev/usb-ffs/adb 0770 shell shell
|
|
|
|
mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000
|
|
|
|
|
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
|
2014-02-20 02:41:02 +01:00
|
|
|
write /sys/class/android_usb/android0/f_ffs/aliases adb
|
2012-01-10 21:16:04 +01:00
|
|
|
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
|
|
|
|
|
2014-06-25 01:29:16 +02:00
|
|
|
# Load properties from /system/ + /factory after fs mount.
|
2015-07-06 19:44:33 +02:00
|
|
|
on load_system_props_action
|
|
|
|
load_system_props
|
2014-06-25 01:29:16 +02:00
|
|
|
|
2014-10-21 05:02:57 +02:00
|
|
|
on firmware_mounts_complete
|
|
|
|
rm /dev/.booting
|
|
|
|
|
2014-06-25 01:29:16 +02:00
|
|
|
# Mount filesystems and start core system services.
|
|
|
|
on late-init
|
|
|
|
trigger early-fs
|
|
|
|
trigger fs
|
|
|
|
trigger post-fs
|
|
|
|
trigger post-fs-data
|
|
|
|
|
|
|
|
# Load properties from /system/ + /factory after fs mount. Place
|
|
|
|
# this in another action so that the load will be scheduled after the prior
|
|
|
|
# issued fs triggers have completed.
|
2015-07-06 19:44:33 +02:00
|
|
|
trigger load_system_props_action
|
2014-06-25 01:29:16 +02:00
|
|
|
|
2014-10-21 05:02:57 +02:00
|
|
|
# Remove a file to wake up anything waiting for firmware
|
|
|
|
trigger firmware_mounts_complete
|
|
|
|
|
2014-06-25 01:29:16 +02:00
|
|
|
trigger early-boot
|
|
|
|
trigger boot
|
|
|
|
|
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-09-14 01:34:12 +02:00
|
|
|
service healthd /sbin/healthd -r
|
2013-06-04 22:11:44 +02:00
|
|
|
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
|
|
|
|
2014-01-18 18:22:50 +01:00
|
|
|
service adbd /sbin/adbd --root_seclabel=u:r:su:s0 --device_banner=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
|