blob: 27cfe00dfeef51c70b8affa95faedb7b08669d96 [file] [log] [blame]
Matt Mower556411f2013-02-17 16:52:44 -06001import /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
Dees_Troy51a0e822012-09-05 15:24:24 -04008 export LD_LIBRARY_PATH .:/sbin
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -08009 export ANDROID_ROOT /system
10 export ANDROID_DATA /data
11 export EXTERNAL_STORAGE /sdcard
12
13 symlink /system/etc /etc
14
Matt Mower556411f2013-02-17 16:52:44 -060015 mkdir /boot
16 mkdir /recovery
17 mkdir /sdcard
18 mkdir /internal_sd
19 mkdir /external_sd
20 mkdir /sd-ext
21 mkdir /datadata
22 mkdir /emmc
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080023 mkdir /system
24 mkdir /data
25 mkdir /cache
26 mount /tmp /tmp tmpfs
27
Matt Mower556411f2013-02-17 16:52:44 -060028 chown root shell /tmp
29 chmod 0775 /tmp
30
31 write /sys/class/android_usb/android0/enable 0
32 write /sys/class/android_usb/android0/idVendor 18D1
33 write /sys/class/android_usb/android0/idProduct D001
34 write /sys/class/android_usb/android0/functions adb
35 write /sys/class/android_usb/android0/iManufacturer ${ro.product.manufacturer}
36 write /sys/class/android_usb/android0/iProduct ${ro.product.model}
37 write /sys/class/android_usb/android0/iSerial ${ro.serialno}
38
39
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080040on boot
41
42 ifup lo
43 hostname localhost
44 domainname localdomain
45
46 class_start default
47
Colin Crossdd6a0412010-05-14 13:42:20 -070048service ueventd /sbin/ueventd
49 critical
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080050
51service recovery /sbin/recovery
52
53service adbd /sbin/adbd recovery
Kenny Rootecc76ba2010-06-28 09:01:22 -070054 disabled
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080055
Mike Lockwood718a2f72011-06-29 10:22:04 -040056# Always start adbd on userdebug and eng builds
57on property:ro.debuggable=1
Matt Mower556411f2013-02-17 16:52:44 -060058 write /sys/class/android_usb/android0/enable 1
59 start adbd
Dees_Troy51a0e822012-09-05 15:24:24 -040060 setprop service.adb.root 1
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080061
Mike Lockwood718a2f72011-06-29 10:22:04 -040062# Restart adbd so it can run as root
Doug Zongkerfb04b872011-06-23 15:30:34 -070063on property:service.adb.root=1
64 write /sys/class/android_usb/android0/enable 0
65 restart adbd
66 write /sys/class/android_usb/android0/enable 1