From 9d6feb53115e2dcc49a644400da4d62a16c1c3c6 Mon Sep 17 00:00:00 2001 From: Captain Throwback Date: Fri, 27 Jul 2018 10:05:24 -0400 Subject: twrp: use ANDROID_ROOT environment variable instead of hard-coded /system path I updated most of the references I found, but there might be more For devices that have to mount system at /system_root, this allows system to be bind mounted to /system and detected properly by TWRP Change-Id: I9f142fd8cec392f5b88e95476258dab9c21a9aac --- twrpAdbBuFifo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'twrpAdbBuFifo.cpp') diff --git a/twrpAdbBuFifo.cpp b/twrpAdbBuFifo.cpp index f98eb0556..22bfa4054 100644 --- a/twrpAdbBuFifo.cpp +++ b/twrpAdbBuFifo.cpp @@ -309,7 +309,7 @@ bool twrpAdbBuFifo::Restore_ADB_Backup(void) { part_settings.Part->Set_Backup_FileName(Backup_FileName); PartitionManager.Set_Restore_Files(path); - if (path.compare("/system") == 0) { + if (path.compare(PartitionManager.Get_Android_Root_Path()) == 0) { if (part_settings.Part->Is_Read_Only()) { if (!twadbbu::Write_TWERROR()) LOGERR("Unable to write to TWRP ADB Backup.\n"); -- cgit v1.2.3