summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--BoardConfigCommon.mk1
-rw-r--r--recovery.rc60
2 files changed, 61 insertions, 0 deletions
diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk
index dfd4a28..dfe7ee0 100644
--- a/BoardConfigCommon.mk
+++ b/BoardConfigCommon.mk
@@ -92,6 +92,7 @@ BOARD_HAVE_BLUETOOTH_BCM := true
BOARD_USES_SECURE_SERVICES := true
# Recovery
+TARGET_RECOVERY_INITRC := device/samsung/p5100/recovery.rc
TARGET_RECOVERY_PIXEL_FORMAT := "BGRA_8888"
BOARD_UMS_LUNFILE := "/sys/class/android_usb/f_mass_storage/lun0/file"
BOARD_USES_MMCUTILS := true
diff --git a/recovery.rc b/recovery.rc
new file mode 100644
index 0000000..b237846
--- /dev/null
+++ b/recovery.rc
@@ -0,0 +1,60 @@
+on early-init
+ start ueventd
+
+on init
+ export PATH /sbin
+ export ANDROID_ROOT /system
+ export ANDROID_DATA /data
+ export EXTERNAL_STORAGE /sdcard
+
+ symlink /system/etc /etc
+
+ mkdir /boot
+ mkdir /sdcard
+ mkdir /sd-ext
+ mkdir /datadata
+ mkdir /emmc
+ mkdir /system
+ mkdir /data
+ mkdir /cache
+ mount /tmp /tmp tmpfs
+
+ chown root shell /tmp
+ chmod 0775 /tmp
+
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 04e8
+ write /sys/class/android_usb/android0/idProduct 6860
+ write /sys/class/android_usb/android0/functions adb
+ write /sys/class/android_usb/android0/iManufacturer ${ro.product.manufacturer}
+ write /sys/class/android_usb/android0/iProduct ${ro.product.model}
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+
+
+on boot
+
+ ifup lo
+ hostname localhost
+ domainname localdomain
+
+ class_start default
+
+service ueventd /sbin/ueventd
+ critical
+
+service recovery /sbin/recovery
+
+service adbd /sbin/adbd recovery
+ disabled
+
+# Always start adbd on userdebug and eng builds
+on property:ro.debuggable=1
+ #write /sys/class/android_usb/android0/enable 1
+ #start adbd
+ setprop service.adb.root 1
+
+# Restart adbd so it can run as root
+on property:service.adb.root=1
+ write /sys/class/android_usb/android0/enable 0
+ restart adbd
+ write /sys/class/android_usb/android0/enable 1