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 --- twrp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'twrp.cpp') diff --git a/twrp.cpp b/twrp.cpp index 3102efdc0..2399c0bb3 100644 --- a/twrp.cpp +++ b/twrp.cpp @@ -333,7 +333,7 @@ int main(int argc, char **argv) { #ifndef TW_OEM_BUILD // Check if system has never been changed - TWPartition* sys = PartitionManager.Find_Partition_By_Path("/system"); + TWPartition* sys = PartitionManager.Find_Partition_By_Path(PartitionManager.Get_Android_Root_Path()); TWPartition* ven = PartitionManager.Find_Partition_By_Path("/vendor"); if (sys) { -- cgit v1.2.3