blob: abc7b318ba3de508f32721b75b73c2721a228b26 [file] [log] [blame]
Colin Crossf510f062012-08-08 13:06:26 -07001import /init.recovery.${ro.hardware}.rc
2
Colin Crossdd6a0412010-05-14 13:42:20 -07003on early-init
4 start ueventd
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -08005
6on init
7 export PATH /sbin
8 export ANDROID_ROOT /system
9 export ANDROID_DATA /data
10 export EXTERNAL_STORAGE /sdcard
11
12 symlink /system/etc /etc
13
14 mkdir /sdcard
15 mkdir /system
16 mkdir /data
17 mkdir /cache
18 mount /tmp /tmp tmpfs
19
Doug Zongker703ed152012-03-19 15:52:03 -070020 chown root shell /tmp
21 chmod 0775 /tmp
22
Doug Zongker66392482012-01-10 12:16:04 -080023 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 Projectc24a8e62009-03-03 19:28:42 -080032on boot
33
34 ifup lo
35 hostname localhost
36 domainname localdomain
37
38 class_start default
39
Colin Crossdd6a0412010-05-14 13:42:20 -070040service ueventd /sbin/ueventd
41 critical
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080042
43service recovery /sbin/recovery
44
45service adbd /sbin/adbd recovery
Kenny Rootecc76ba2010-06-28 09:01:22 -070046 disabled
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080047
Mike Lockwood718a2f72011-06-29 10:22:04 -040048# Always start adbd on userdebug and eng builds
49on property:ro.debuggable=1
Mike Lockwood7e58b652011-06-19 02:52:01 -040050 write /sys/class/android_usb/android0/enable 1
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080051 start adbd
52
Mike Lockwood718a2f72011-06-29 10:22:04 -040053# Restart adbd so it can run as root
Doug Zongkerfb04b872011-06-23 15:30:34 -070054on property:service.adb.root=1
55 write /sys/class/android_usb/android0/enable 0
56 restart adbd
57 write /sys/class/android_usb/android0/enable 1