scripts: fix find_manager_apk
- the strings fallback was broken when the preceding character changed from 5 to ! recently, this new regex should cover any preceding character going forward
This commit is contained in:
parent
ce84f1762c
commit
125ee46685
@ -527,12 +527,13 @@ check_data() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
find_manager_apk() {
|
find_manager_apk() {
|
||||||
|
local DBAPK
|
||||||
[ -z $APK ] && APK=/data/adb/magisk.apk
|
[ -z $APK ] && APK=/data/adb/magisk.apk
|
||||||
[ -f $APK ] || APK=/data/magisk/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
|
if [ ! -f $APK ]; then
|
||||||
DBAPK=`magisk --sqlite "SELECT value FROM strings WHERE key='requester'" 2>/dev/null | cut -d= -f2`
|
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 5requester | cut -c11-`
|
[ -z $DBAPK ] && DBAPK=$(strings /data/adb/magisk.db | grep -E '^.requester.' | cut -c11-)
|
||||||
[ -z $DBAPK ] || APK=/data/user_de/*/$DBAPK/dyn/*.apk
|
[ -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
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user