blob: 9b2a9914358a14324d72a9b7f85cc025b5cf6391 [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
Todd Poynor2f2c9882013-06-04 13:11:44 -07005 start healthd
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -08006
7on init
8 export PATH /sbin
9 export ANDROID_ROOT /system
10 export ANDROID_DATA /data
11 export EXTERNAL_STORAGE /sdcard
12
13 symlink /system/etc /etc
14
15 mkdir /sdcard
16 mkdir /system
17 mkdir /data
18 mkdir /cache
19 mount /tmp /tmp tmpfs
20
Doug Zongker703ed152012-03-19 15:52:03 -070021 chown root shell /tmp
22 chmod 0775 /tmp
23
Doug Zongker66392482012-01-10 12:16:04 -080024 write /sys/class/android_usb/android0/enable 0
25 write /sys/class/android_usb/android0/idVendor 18D1
26 write /sys/class/android_usb/android0/idProduct D001
27 write /sys/class/android_usb/android0/functions adb
28 write /sys/class/android_usb/android0/iManufacturer ${ro.product.manufacturer}
29 write /sys/class/android_usb/android0/iProduct ${ro.product.model}
30 write /sys/class/android_usb/android0/iSerial ${ro.serialno}
31
32
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080033on boot
34
35 ifup lo
36 hostname localhost
37 domainname localdomain
38
39 class_start default
40
Doug Zongker77ea71d2013-08-30 12:20:16 -070041on property:sys.powerctl=*
42 powerctl ${sys.powerctl}
43
Colin Crossdd6a0412010-05-14 13:42:20 -070044service ueventd /sbin/ueventd
45 critical
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080046
Todd Poynorbe968092013-09-13 16:34:12 -070047service healthd /sbin/healthd -r
Todd Poynor2f2c9882013-06-04 13:11:44 -070048 critical
49
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080050service recovery /sbin/recovery
51
52service adbd /sbin/adbd recovery
Kenny Rootecc76ba2010-06-28 09:01:22 -070053 disabled
Doug Zongkercc2958f2013-09-11 13:24:32 -070054 socket adbd stream 660 system system
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
Mike Lockwood7e58b652011-06-19 02:52:01 -040058 write /sys/class/android_usb/android0/enable 1
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080059 start adbd
60
Mike Lockwood718a2f72011-06-29 10:22:04 -040061# Restart adbd so it can run as root
Doug Zongkerfb04b872011-06-23 15:30:34 -070062on property:service.adb.root=1
63 write /sys/class/android_usb/android0/enable 0
64 restart adbd
65 write /sys/class/android_usb/android0/enable 1