From e4f94c4c52b6641d475c7ea75fcba74a7dae6d3d Mon Sep 17 00:00:00 2001 From: jenslody Date: Thu, 22 Apr 2021 12:49:03 +0200 Subject: [PATCH] Adapt find_magisk_apk for A11 Add a fallback for Android 11's new app location. --- scripts/util_functions.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/util_functions.sh b/scripts/util_functions.sh index 53e3387a5..3f845bb22 100644 --- a/scripts/util_functions.sh +++ b/scripts/util_functions.sh @@ -553,11 +553,13 @@ find_magisk_apk() { [ -z $APK ] && APK=/data/adb/magisk.apk [ -f $APK ] || APK=/data/magisk/magisk.apk [ -f $APK ] || APK=/data/app/com.topjohnwu.magisk*/*.apk + [ -f $APK ] || APK=/data/app/*/com.topjohnwu.magisk*/*.apk if [ ! -f $APK ]; then DBAPK=$(magisk --sqlite "SELECT value FROM strings WHERE key='requester'" 2>/dev/null | cut -d= -f2) [ -z $DBAPK ] && DBAPK=$(strings /data/adb/magisk.db | grep -E '^.requester.' | cut -c11-) [ -z $DBAPK ] || APK=/data/user_de/*/$DBAPK/dyn/*.apk [ -f $APK ] || [ -z $DBAPK ] || APK=/data/app/$DBAPK*/*.apk + [ -f $APK ] || [ -z $DBAPK ] || APK=/data/app/*/$DBAPK*/*.apk fi [ -f $APK ] || ui_print "! Unable to detect Magisk app APK for BootSigner" }