1import /init.recovery.${ro.hardware}.rc 2 3on early-init 4 # Set the security context of /postinstall if present. 5 restorecon /postinstall 6 7 start ueventd 8 9on init 10 export ANDROID_ROOT /system 11 export ANDROID_DATA /data 12 export EXTERNAL_STORAGE /sdcard 13 14 symlink /system/bin /bin 15 symlink /system/etc /etc 16 17 mount cgroup none /acct cpuacct 18 mkdir /acct/uid 19 20 mkdir /sdcard 21 mkdir /system 22 mkdir /data 23 mkdir /cache 24 mkdir /sideload 25 mount tmpfs tmpfs /tmp 26 27 chown root shell /tmp 28 chmod 0775 /tmp 29 30 write /proc/sys/kernel/panic_on_oops 1 31 write /proc/sys/vm/max_map_count 1000000 32 33on fs 34 write /sys/class/android_usb/android0/f_ffs/aliases adb 35 mkdir /dev/usb-ffs 0770 shell shell 36 mkdir /dev/usb-ffs/adb 0770 shell shell 37 mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000 38 39 write /sys/class/android_usb/android0/enable 0 40 write /sys/class/android_usb/android0/idVendor 18D1 41 write /sys/class/android_usb/android0/idProduct D001 42 write /sys/class/android_usb/android0/functions adb 43 write /sys/class/android_usb/android0/iManufacturer ${ro.product.manufacturer} 44 write /sys/class/android_usb/android0/iProduct ${ro.product.model} 45 write /sys/class/android_usb/android0/iSerial ${ro.serialno} 46 47on boot 48 ifup lo 49 hostname localhost 50 domainname localdomain 51 52 class_start default 53 54# Load properties from /system/ + /factory after fs mount. 55on load_system_props_action 56 load_system_props 57 58on firmware_mounts_complete 59 rm /dev/.booting 60 61# Mount filesystems and start core system services. 62on late-init 63 trigger early-fs 64 trigger fs 65 trigger post-fs 66 trigger post-fs-data 67 68 # Load properties from /system/ + /factory after fs mount. Place 69 # this in another action so that the load will be scheduled after the prior 70 # issued fs triggers have completed. 71 trigger load_system_props_action 72 73 # Remove a file to wake up anything waiting for firmware 74 trigger firmware_mounts_complete 75 76 trigger early-boot 77 trigger boot 78 79service ueventd /sbin/ueventd 80 critical 81 seclabel u:r:ueventd:s0 82 83service charger /charger -r 84 critical 85 seclabel u:r:charger:s0 86 87service recovery /sbin/recovery 88 seclabel u:r:recovery:s0 89 90service adbd /sbin/adbd --root_seclabel=u:r:su:s0 --device_banner=recovery 91 disabled 92 socket adbd stream 660 system system 93 seclabel u:r:adbd:s0 94 95# Always start adbd on userdebug and eng builds 96on property:ro.debuggable=1 97 write /sys/class/android_usb/android0/enable 1 98 start adbd 99 100# Restart adbd so it can run as root 101on property:service.adb.root=1 102 write /sys/class/android_usb/android0/enable 0 103 restart adbd 104 write /sys/class/android_usb/android0/enable 1 105