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 |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 5 | |
| 6 | on init |
| 7 | export PATH /sbin |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 8 | export LD_LIBRARY_PATH .:/sbin |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 9 | export ANDROID_ROOT /system |
| 10 | export ANDROID_DATA /data |
| 11 | export EXTERNAL_STORAGE /sdcard |
| 12 | |
Matt Mower | 556411f | 2013-02-17 16:52:44 -0600 | [diff] [blame] | 13 | mkdir /boot |
| 14 | mkdir /recovery |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 15 | mkdir /system |
| 16 | mkdir /data |
| 17 | mkdir /cache |
| 18 | mount /tmp /tmp tmpfs |
| 19 | |
Matt Mower | 556411f | 2013-02-17 16:52:44 -0600 | [diff] [blame] | 20 | chown root shell /tmp |
| 21 | chmod 0775 /tmp |
| 22 | |
| 23 | write /sys/class/android_usb/android0/enable 0 |
| 24 | write /sys/class/android_usb/android0/idVendor 18D1 |
| 25 | write /sys/class/android_usb/android0/idProduct D001 |
| 26 | write /sys/class/android_usb/android0/functions adb |
| 27 | write /sys/class/android_usb/android0/iManufacturer ${ro.product.manufacturer} |
| 28 | write /sys/class/android_usb/android0/iProduct ${ro.product.model} |
| 29 | write /sys/class/android_usb/android0/iSerial ${ro.serialno} |
| 30 | |
| 31 | |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 32 | on boot |
| 33 | |
| 34 | ifup lo |
| 35 | hostname localhost |
| 36 | domainname localdomain |
| 37 | |
| 38 | class_start default |
| 39 | |
Colin Cross | dd6a041 | 2010-05-14 13:42:20 -0700 | [diff] [blame] | 40 | service ueventd /sbin/ueventd |
| 41 | critical |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 42 | |
| 43 | service recovery /sbin/recovery |
| 44 | |
| 45 | service adbd /sbin/adbd recovery |
Kenny Root | ecc76ba | 2010-06-28 09:01:22 -0700 | [diff] [blame] | 46 | disabled |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 47 | |
Mike Lockwood | 718a2f7 | 2011-06-29 10:22:04 -0400 | [diff] [blame] | 48 | # Always start adbd on userdebug and eng builds |
| 49 | on property:ro.debuggable=1 |
Dees_Troy | 0cd4cc2 | 2013-06-09 20:56:38 +0000 | [diff] [blame] | 50 | #write /sys/class/android_usb/android0/enable 1 |
| 51 | #start adbd |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 52 | setprop service.adb.root 1 |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 53 | |
Mike Lockwood | 718a2f7 | 2011-06-29 10:22:04 -0400 | [diff] [blame] | 54 | # Restart adbd so it can run as root |
Doug Zongker | fb04b87 | 2011-06-23 15:30:34 -0700 | [diff] [blame] | 55 | on property:service.adb.root=1 |
| 56 | write /sys/class/android_usb/android0/enable 0 |
| 57 | restart adbd |
| 58 | write /sys/class/android_usb/android0/enable 1 |