mirror of
https://github.com/topjohnwu/Magisk
synced 2024-11-13 20:54:12 +01:00
parent
927f69fe30
commit
96b93bd876
@ -34,9 +34,7 @@ initialize() {
|
||||
# Load utility functions
|
||||
. $MAGISKBIN/util_functions.sh
|
||||
|
||||
APK=/data/adb/magisk.apk
|
||||
[ -f $APK ] || APK=/data/magisk/magisk.apk
|
||||
[ -f $APK ] || APK=/data/app/com.topjohnwu.magisk*/*.apk
|
||||
find_manager_apk
|
||||
}
|
||||
|
||||
show_logo() {
|
||||
|
@ -434,3 +434,13 @@ unmount_magisk_img() {
|
||||
$MAGISKBIN/magisk imgtool resize $IMG $newSizeM >&2
|
||||
fi
|
||||
}
|
||||
|
||||
find_manager_apk() {
|
||||
APK=/data/adb/magisk.apk
|
||||
[ -f $APK ] || APK=/data/magisk/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'" | cut -d= -f2`
|
||||
[ -z "$DBAPK" ] || APK=/data/app/$DBAPK*/*.apk
|
||||
fi
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user