/data/adb/magisk/magisk.apk no longer exists

This commit is contained in:
vvb2060
2022-03-18 03:56:34 +08:00
committed by John Wu
parent f0fbd9214a
commit 01a1213463
3 changed files with 9 additions and 29 deletions

View File

@ -577,16 +577,13 @@ check_data() {
find_magisk_apk() {
local DBAPK
[ -z $APK ] && APK=$NVBASE/magisk.apk
[ -f $APK ] || APK=$MAGISKBIN/magisk.apk
[ -f $APK ] || APK=/data/app/com.topjohnwu.magisk*/*.apk
[ -f $APK ] || APK=/data/app/*/com.topjohnwu.magisk*/*.apk
[ -z $APK ] && APK=/data/app/com.topjohnwu.magisk*/base.apk
[ -f $APK ] || APK=/data/app/*/com.topjohnwu.magisk*/base.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 $NVBASE/magisk.db | grep -oE 'requester..*' | cut -c10-)
[ -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
[ -z $DBAPK ] || APK=/data/user_de/0/$DBAPK/dyn/current.apk
[ -f $APK ] || [ -z $DBAPK ] || APK=/data/data/$DBAPK/dyn/current.apk
fi
[ -f $APK ] || ui_print "! Unable to detect Magisk app APK for BootSigner"
}