blob: a301779aae48b242eb05dd5b40804530e3fc3e70 [file] [log] [blame]
Colin Crossdd6a0412010-05-14 13:42:20 -07001on early-init
2 start ueventd
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -08003
4on init
5 export PATH /sbin
6 export ANDROID_ROOT /system
7 export ANDROID_DATA /data
8 export EXTERNAL_STORAGE /sdcard
9
10 symlink /system/etc /etc
11
12 mkdir /sdcard
13 mkdir /system
14 mkdir /data
15 mkdir /cache
16 mount /tmp /tmp tmpfs
17
Doug Zongkere83b7cf2012-01-09 15:16:13 -080018 write /sys/class/android_usb/android0/enable 0
19 write /sys/class/android_usb/android0/idVendor 18D1
20 write /sys/class/android_usb/android0/idProduct D001
21 write /sys/class/android_usb/android0/functions adb
22 write /sys/class/android_usb/android0/iManufacturer $ro.product.manufacturer
23 write /sys/class/android_usb/android0/iProduct $ro.product.model
24 write /sys/class/android_usb/android0/iSerial $ro.serialno
25
26
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080027on boot
28
29 ifup lo
30 hostname localhost
31 domainname localdomain
32
33 class_start default
34
Colin Crossdd6a0412010-05-14 13:42:20 -070035service ueventd /sbin/ueventd
36 critical
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080037
38service recovery /sbin/recovery
39
40service adbd /sbin/adbd recovery
Kenny Rootecc76ba2010-06-28 09:01:22 -070041 disabled
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080042
Mike Lockwood718a2f72011-06-29 10:22:04 -040043# Always start adbd on userdebug and eng builds
44on property:ro.debuggable=1
Mike Lockwood7e58b652011-06-19 02:52:01 -040045 write /sys/class/android_usb/android0/enable 1
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080046 start adbd
47
Mike Lockwood718a2f72011-06-29 10:22:04 -040048# Restart adbd so it can run as root
Doug Zongkerfb04b872011-06-23 15:30:34 -070049on property:service.adb.root=1
50 write /sys/class/android_usb/android0/enable 0
51 restart adbd
52 write /sys/class/android_usb/android0/enable 1