summaryrefslogtreecommitdiffstats
path: root/recovery.cpp
diff options
context:
space:
mode:
authorDees_Troy <dees_troy@teamw.in>2012-10-16 17:43:20 +0200
committerDees_Troy <dees_troy@teamw.in>2012-10-16 17:43:20 +0200
commit06b4fe97eff1f03540919c2900ccaf217a75fa2e (patch)
tree1aab3027899ad286258eb859cc801e99dcd91412 /recovery.cpp
parentFix weird keyboard problem (diff)
downloadandroid_bootable_recovery-06b4fe97eff1f03540919c2900ccaf217a75fa2e.tar
android_bootable_recovery-06b4fe97eff1f03540919c2900ccaf217a75fa2e.tar.gz
android_bootable_recovery-06b4fe97eff1f03540919c2900ccaf217a75fa2e.tar.bz2
android_bootable_recovery-06b4fe97eff1f03540919c2900ccaf217a75fa2e.tar.lz
android_bootable_recovery-06b4fe97eff1f03540919c2900ccaf217a75fa2e.tar.xz
android_bootable_recovery-06b4fe97eff1f03540919c2900ccaf217a75fa2e.tar.zst
android_bootable_recovery-06b4fe97eff1f03540919c2900ccaf217a75fa2e.zip
Diffstat (limited to 'recovery.cpp')
-rw-r--r--recovery.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/recovery.cpp b/recovery.cpp
index b8fc45f70..b1333eaa5 100644
--- a/recovery.cpp
+++ b/recovery.cpp
@@ -893,8 +893,15 @@ main(int argc, char **argv) {
#ifdef TW_INCLUDE_INJECTTWRP
// Back up TWRP Ramdisk if needed:
+ TWPartition* Boot = PartitionManager.Find_Partition_By_Path("/boot");
+
LOGI("Backing up TWRP ramdisk...\n");
- system("injecttwrp --backup /tmp/backup_recovery_ramdisk.img");
+ if (Boot == NULL || Boot->Current_File_System != "emmc")
+ system("injecttwrp --backup /tmp/backup_recovery_ramdisk.img");
+ else {
+ string injectcmd = "injecttwrp --backup /tmp/backup_recovery_ramdisk.img bd=" + Boot->Actual_Block_Device;
+ system(injectcmd.c_str());
+ }
LOGI("Backup of TWRP ramdisk done.\n");
#endif