Created
January 15, 2014 13:20
-
-
Save sakuramilk/8436063 to your computer and use it in GitHub Desktop.
0001-Add-recovery-preprocess.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 433e766e8b6b8cf6bb4639b61fb76f5a9c0aae47 Mon Sep 17 00:00:00 2001 | |
From: sakuramilk <[email protected]> | |
Date: Wed, 15 Jan 2014 22:18:30 +0900 | |
Subject: [PATCH] Add recovery-preprocess | |
--- | |
Android.mk | 8 ++++++++ | |
recovery-prepprocess | 19 +++++++++++++++++++ | |
2 files changed, 27 insertions(+) | |
create mode 100755 recovery-prepprocess | |
diff --git a/Android.mk b/Android.mk | |
index 59a5f2d..36f05ce 100644 | |
--- a/Android.mk | |
+++ b/Android.mk | |
@@ -226,6 +226,14 @@ LOCAL_SRC_FILES := killrecovery.sh | |
include $(BUILD_PREBUILT) | |
include $(CLEAR_VARS) | |
+LOCAL_MODULE := recovery_preprocess | |
+LOCAL_MODULE_TAGS := optional | |
+LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES | |
+LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin | |
+LOCAL_SRC_FILES := recovery_preprocess | |
+include $(BUILD_PREBUILT) | |
+ | |
+include $(CLEAR_VARS) | |
LOCAL_SRC_FILES := verifier_test.c verifier.c | |
diff --git a/recovery-prepprocess b/recovery-prepprocess | |
new file mode 100755 | |
index 0000000..b5c7180 | |
--- /dev/null | |
+++ b/recovery-prepprocess | |
@@ -0,0 +1,19 @@ | |
+#!/sbin/busybox sh | |
+ | |
+export readonly MBS_MNT_SDCARD_PATH=/external_sd | |
+export readonly MBS_THEME_PATH=$MBS_MNT_SDCARD_PATH/clockworkmod/theme | |
+export readonly MBS_BLKDEV_SDCARD=/dev/block/mmcblk1p1 | |
+func_init_theme() | |
+{ | |
+ mkdir -p $MBS_MNT_SDCARD_PATH | |
+ /sbin/busybox mount -t vfat $MBS_BLKDEV_SDCARD $MBS_MNT_SDCARD_PATH | |
+ | |
+ if [ -d $MBS_THEME_PATH ]; then | |
+ /sbin/busybox cp -r $MBS_THEME_PATH/* /res/ | |
+ fi | |
+ /sbin/busybox umount $MBS_MNT_SDCARD_PATH | |
+} | |
+ | |
+func_init_theme | |
+exec /sbin/recovery | |
+ | |
-- | |
1.7.9.5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment