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