Update injecttwrp for Epic 4G Touch
diff --git a/recovery.cpp b/recovery.cpp
index b8fc45f..b1333ea 100644
--- a/recovery.cpp
+++ b/recovery.cpp
@@ -893,8 +893,15 @@
#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