Matt Mower | 556411f | 2013-02-17 16:52:44 -0600 | [diff] [blame] | 1 | import /init.recovery.${ro.hardware}.rc |
| 2 | |
Colin Cross | dd6a041 | 2010-05-14 13:42:20 -0700 | [diff] [blame] | 3 | on early-init |
| 4 | start ueventd |
Todd Poynor | 2f2c988 | 2013-06-04 13:11:44 -0700 | [diff] [blame] | 5 | start healthd |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 6 | |
| 7 | on init |
| 8 | export PATH /sbin |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 9 | export LD_LIBRARY_PATH .:/sbin |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 10 | export ANDROID_ROOT /system |
| 11 | export ANDROID_DATA /data |
| 12 | export EXTERNAL_STORAGE /sdcard |
| 13 | |
Matt Mower | 556411f | 2013-02-17 16:52:44 -0600 | [diff] [blame] | 14 | mkdir /boot |
| 15 | mkdir /recovery |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 16 | mkdir /system |
| 17 | mkdir /data |
| 18 | mkdir /cache |
| 19 | mount /tmp /tmp tmpfs |
| 20 | |
Matt Mower | 556411f | 2013-02-17 16:52:44 -0600 | [diff] [blame] | 21 | chown root shell /tmp |
| 22 | chmod 0775 /tmp |
| 23 | |
| 24 | write /sys/class/android_usb/android0/enable 0 |
| 25 | write /sys/class/android_usb/android0/idVendor 18D1 |
| 26 | write /sys/class/android_usb/android0/idProduct D001 |
| 27 | write /sys/class/android_usb/android0/functions adb |
| 28 | write /sys/class/android_usb/android0/iManufacturer ${ro.product.manufacturer} |
| 29 | write /sys/class/android_usb/android0/iProduct ${ro.product.model} |
| 30 | write /sys/class/android_usb/android0/iSerial ${ro.serialno} |
| 31 | |
| 32 | |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 33 | on boot |
| 34 | |
| 35 | ifup lo |
| 36 | hostname localhost |
| 37 | domainname localdomain |
| 38 | |
| 39 | class_start default |
| 40 | |
Doug Zongker | 77ea71d | 2013-08-30 12:20:16 -0700 | [diff] [blame] | 41 | on property:sys.powerctl=* |
| 42 | powerctl ${sys.powerctl} |
| 43 | |
Jason Riordan | 26ff4c0 | 2014-01-16 22:44:15 -0500 | [diff] [blame] | 44 | on property:sys.storage.ums_enabled=1 |
| 45 | write /sys/class/android_usb/android0/enable 0 |
| 46 | write /sys/class/android_usb/android0/functions adb,mass_storage |
| 47 | write /sys/class/android_usb/android0/enable 1 |
| 48 | |
| 49 | on property:sys.storage.ums_enabled=0 |
| 50 | write /sys/class/android_usb/android0/enable 0 |
| 51 | write /sys/class/android_usb/android0/functions adb |
| 52 | write /sys/class/android_usb/android0/enable ${service.adb.root} |
| 53 | |
Colin Cross | dd6a041 | 2010-05-14 13:42:20 -0700 | [diff] [blame] | 54 | service ueventd /sbin/ueventd |
| 55 | critical |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 56 | |
Todd Poynor | 2f2c988 | 2013-06-04 13:11:44 -0700 | [diff] [blame] | 57 | service healthd /sbin/healthd -n |
| 58 | critical |
| 59 | |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 60 | service recovery /sbin/recovery |
| 61 | |
| 62 | service adbd /sbin/adbd recovery |
Kenny Root | ecc76ba | 2010-06-28 09:01:22 -0700 | [diff] [blame] | 63 | disabled |
Doug Zongker | cc2958f | 2013-09-11 13:24:32 -0700 | [diff] [blame] | 64 | socket adbd stream 660 system system |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 65 | |
Mike Lockwood | 718a2f7 | 2011-06-29 10:22:04 -0400 | [diff] [blame] | 66 | # Always start adbd on userdebug and eng builds |
| 67 | on property:ro.debuggable=1 |
Dees_Troy | 0cd4cc2 | 2013-06-09 20:56:38 +0000 | [diff] [blame] | 68 | #write /sys/class/android_usb/android0/enable 1 |
| 69 | #start adbd |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 70 | setprop service.adb.root 1 |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 71 | |
Mike Lockwood | 718a2f7 | 2011-06-29 10:22:04 -0400 | [diff] [blame] | 72 | # Restart adbd so it can run as root |
Doug Zongker | fb04b87 | 2011-06-23 15:30:34 -0700 | [diff] [blame] | 73 | on property:service.adb.root=1 |
| 74 | write /sys/class/android_usb/android0/enable 0 |
| 75 | restart adbd |
| 76 | write /sys/class/android_usb/android0/enable 1 |