Colin Cross | dd6a041 | 2010-05-14 13:42:20 -0700 | [diff] [blame] | 1 | on early-init |
| 2 | start ueventd |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 3 | |
| 4 | on init |
| 5 | export PATH /sbin |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 6 | export LD_LIBRARY_PATH .:/sbin |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 7 | export ANDROID_ROOT /system |
| 8 | export ANDROID_DATA /data |
| 9 | export EXTERNAL_STORAGE /sdcard |
| 10 | |
| 11 | symlink /system/etc /etc |
| 12 | |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 13 | mkdir /emmc |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 14 | mkdir /system |
| 15 | mkdir /data |
| 16 | mkdir /cache |
| 17 | mount /tmp /tmp tmpfs |
| 18 | |
| 19 | on boot |
| 20 | |
| 21 | ifup lo |
| 22 | hostname localhost |
| 23 | domainname localdomain |
| 24 | |
| 25 | class_start default |
| 26 | |
Colin Cross | dd6a041 | 2010-05-14 13:42:20 -0700 | [diff] [blame] | 27 | service ueventd /sbin/ueventd |
| 28 | critical |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 29 | |
| 30 | service recovery /sbin/recovery |
| 31 | |
| 32 | service adbd /sbin/adbd recovery |
Kenny Root | ecc76ba | 2010-06-28 09:01:22 -0700 | [diff] [blame] | 33 | disabled |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 34 | |
Mike Lockwood | 718a2f7 | 2011-06-29 10:22:04 -0400 | [diff] [blame] | 35 | # Always start adbd on userdebug and eng builds |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 36 | # In recovery, always run adbd as root. |
Mike Lockwood | 718a2f7 | 2011-06-29 10:22:04 -0400 | [diff] [blame] | 37 | on property:ro.debuggable=1 |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 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/enable 1 |
| 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 | #start adbd |
| 47 | setprop service.adb.root 1 |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 48 | |
Mike Lockwood | 718a2f7 | 2011-06-29 10:22:04 -0400 | [diff] [blame] | 49 | # Restart adbd so it can run as root |
Doug Zongker | fb04b87 | 2011-06-23 15:30:34 -0700 | [diff] [blame] | 50 | on property:service.adb.root=1 |
| 51 | write /sys/class/android_usb/android0/enable 0 |
| 52 | restart adbd |
| 53 | write /sys/class/android_usb/android0/enable 1 |