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
diff --git a/twrp.cpp b/twrp.cpp
index 3102efd..2399c0b 100644
--- a/twrp.cpp
+++ b/twrp.cpp
@@ -333,7 +333,7 @@
#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) {