mirror of
https://github.com/topjohnwu/Magisk
synced 2024-11-13 20:54:12 +01:00
Fix bootloop when upgrading from older Magisk
This commit is contained in:
parent
c0ac2d540b
commit
d149af9628
2
build.py
2
build.py
@ -106,7 +106,7 @@ def build_binary(args):
|
||||
header('* Building binaries: ' + ' '.join(targets))
|
||||
|
||||
# Force update logging.h timestamp to trigger recompilation for the flags to make a difference
|
||||
|
||||
os.utime(os.path.join('native', 'jni', 'include', 'logging.h'))
|
||||
|
||||
# Basic flags
|
||||
base_flags = 'MAGISK_VERSION=\"{}\" MAGISK_VER_CODE={} MAGISK_DEBUG={}'.format(config['version'], config['versionCode'],
|
||||
|
@ -585,7 +585,7 @@ void startup() {
|
||||
close(root);
|
||||
|
||||
// Alternative binaries paths
|
||||
char *alt_bin[] = { "/cache/data_bin", "/data/magisk",
|
||||
char *alt_bin[] = { "/cache/data_bin", "/data/.magisk",
|
||||
"/data/data/com.topjohnwu.magisk/install",
|
||||
"/data/user_de/0/com.topjohnwu.magisk/install", NULL };
|
||||
char *bin_path = NULL;
|
||||
@ -602,6 +602,7 @@ void startup() {
|
||||
}
|
||||
|
||||
// Remove legacy stuffs
|
||||
rm_rf("/data/magisk");
|
||||
unlink("/data/magisk.img");
|
||||
unlink("/data/magisk_debug.log");
|
||||
|
||||
|
@ -27,7 +27,7 @@ initialize() {
|
||||
. $MAGISKBIN/util_functions.sh
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
|
@ -79,7 +79,7 @@ ui_print "- Constructing environment"
|
||||
check_data
|
||||
|
||||
if $DATA; then
|
||||
MAGISKBIN=/data/magisk
|
||||
MAGISKBIN=/data/.magisk
|
||||
$DATA_DE && MAGISKBIN=/data/adb/magisk
|
||||
run_migrations
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user