blob: 39724d066b01aba6bf45d3548cca54229a376181 [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
Todd Poynor2f2c9882013-06-04 13:11:44 -07005 start healthd
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -08006
7on init
Doug Zongker55d65422014-01-14 09:50:35 -08008 export PATH /sbin:/system/bin
Dees_Troy51a0e822012-09-05 15:24:24 -04009 export LD_LIBRARY_PATH .:/sbin
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080010 export ANDROID_ROOT /system
11 export ANDROID_DATA /data
12 export EXTERNAL_STORAGE /sdcard
13
Matt Mower556411f2013-02-17 16:52:44 -060014 mkdir /boot
15 mkdir /recovery
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080016 mkdir /system
17 mkdir /data
18 mkdir /cache
Doug Zongker55d65422014-01-14 09:50:35 -080019 mount tmpfs tmpfs /tmp
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080020
Matt Mower556411f2013-02-17 16:52:44 -060021 chown root shell /tmp
22 chmod 0775 /tmp
23
24 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
Jason Riordan26ff4c02014-01-16 22:44:15 -050044on property:sys.storage.ums_enabled=1
45 write /sys/class/android_usb/android0/enable 0
46 write /sys/class/android_usb/android0/functions adb,mass_storage
47 write /sys/class/android_usb/android0/enable 1
48
49on property:sys.storage.ums_enabled=0
50 write /sys/class/android_usb/android0/enable 0
51 write /sys/class/android_usb/android0/functions adb
52 write /sys/class/android_usb/android0/enable ${service.adb.root}
53
Colin Crossdd6a0412010-05-14 13:42:20 -070054service ueventd /sbin/ueventd
55 critical
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080056
Todd Poynor2f2c9882013-06-04 13:11:44 -070057service healthd /sbin/healthd -n
58 critical
59
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080060service recovery /sbin/recovery
61
62service adbd /sbin/adbd recovery
Kenny Rootecc76ba2010-06-28 09:01:22 -070063 disabled
Doug Zongkercc2958f2013-09-11 13:24:32 -070064 socket adbd stream 660 system system
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080065
Mike Lockwood718a2f72011-06-29 10:22:04 -040066# Always start adbd on userdebug and eng builds
67on property:ro.debuggable=1
Dees_Troy0cd4cc22013-06-09 20:56:38 +000068 #write /sys/class/android_usb/android0/enable 1
69 #start adbd
Dees_Troy51a0e822012-09-05 15:24:24 -040070 setprop service.adb.root 1
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080071
Mike Lockwood718a2f72011-06-29 10:22:04 -040072# Restart adbd so it can run as root
Doug Zongkerfb04b872011-06-23 15:30:34 -070073on property:service.adb.root=1
74 write /sys/class/android_usb/android0/enable 0
75 restart adbd
76 write /sys/class/android_usb/android0/enable 1