From 1b4a3d2d9f3d0c04cc353d6aef1a30ad2240ce4d Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Wed, 1 Jan 2020 14:19:24 +0800 Subject: [PATCH] More precise env detection in non-root --- app/src/main/res/raw/nonroot_utils.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/raw/nonroot_utils.sh b/app/src/main/res/raw/nonroot_utils.sh index 7c8ae1812..88a5db68b 100644 --- a/app/src/main/res/raw/nonroot_utils.sh +++ b/app/src/main/res/raw/nonroot_utils.sh @@ -1,6 +1,7 @@ mount_partitions() { [ "`getprop ro.build.ab_update`" = "true" ] && SLOT=`getprop ro.boot.slot_suffix` - [ "`getprop ro.build.system_root_image`" = "true" ] && SYSTEM_ROOT=true || SYSTEM_ROOT=false + # Check whether non rootfs root dir exists + grep ' / ' /proc/mounts | grep -qv 'rootfs' && SYSTEM_ROOT=true || SYSTEM_ROOT=false } get_flags() {