blob: e26027a137e99acf1cc3f34a59917cb4d207a448 [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
Dees_Troy51a0e822012-09-05 15:24:24 -04006 export LD_LIBRARY_PATH .:/sbin
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -08007 export ANDROID_ROOT /system
8 export ANDROID_DATA /data
9 export EXTERNAL_STORAGE /sdcard
10
11 symlink /system/etc /etc
12
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080013 mkdir /system
14 mkdir /data
15 mkdir /cache
16 mount /tmp /tmp tmpfs
17
18on boot
19
20 ifup lo
21 hostname localhost
22 domainname localdomain
23
24 class_start default
25
Colin Crossdd6a0412010-05-14 13:42:20 -070026service ueventd /sbin/ueventd
27 critical
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080028
29service recovery /sbin/recovery
30
31service adbd /sbin/adbd recovery
Kenny Rootecc76ba2010-06-28 09:01:22 -070032 disabled
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080033
Mike Lockwood718a2f72011-06-29 10:22:04 -040034# Always start adbd on userdebug and eng builds
Dees_Troy51a0e822012-09-05 15:24:24 -040035# In recovery, always run adbd as root.
Mike Lockwood718a2f72011-06-29 10:22:04 -040036on property:ro.debuggable=1
Dees_Troy51a0e822012-09-05 15:24:24 -040037 write /sys/class/android_usb/android0/enable 0
38 write /sys/class/android_usb/android0/idVendor 18D1
39 write /sys/class/android_usb/android0/idProduct D001
40 write /sys/class/android_usb/android0/functions adb
41 #write /sys/class/android_usb/android0/enable 1
42 write /sys/class/android_usb/android0/iManufacturer $ro.product.manufacturer
43 write /sys/class/android_usb/android0/iProduct $ro.product.model
44 write /sys/class/android_usb/android0/iSerial $ro.serialno
45 #start adbd
46 setprop service.adb.root 1
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080047
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