summaryrefslogtreecommitdiffstats
path: root/twrp.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--twrp.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/twrp.cpp b/twrp.cpp
index 32b411c93..d4e861daf 100644
--- a/twrp.cpp
+++ b/twrp.cpp
@@ -120,6 +120,18 @@ int main(int argc, char **argv) {
bool Cache_Wipe = false, Factory_Reset = false, Perform_Backup = false;
{
+ TWPartition* misc = PartitionManager.Find_Partition_By_Path("/misc");
+ if (misc != NULL) {
+ if (misc->Current_File_System == "emmc") {
+ set_device_type('e');
+ set_device_name(misc->Actual_Block_Device.c_str());
+ } else if (misc->Current_File_System == "mtd") {
+ set_device_type('m');
+ set_device_name(misc->MTD_Name.c_str());
+ } else {
+ LOGERR("Unknown file system for /misc\n");
+ }
+ }
get_args(&argc, &argv);
int index, index2, len;