diff --git a/build.py b/build.py index 1ead722d2..f2e330224 100755 --- a/build.py +++ b/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'], diff --git a/native/jni/core/bootstages.c b/native/jni/core/bootstages.c index fad1da698..965487ecd 100644 --- a/native/jni/core/bootstages.c +++ b/native/jni/core/bootstages.c @@ -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"); diff --git a/scripts/addon.d.sh b/scripts/addon.d.sh index b4fe7ad88..2f5902adc 100644 --- a/scripts/addon.d.sh +++ b/scripts/addon.d.sh @@ -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 } diff --git a/scripts/flash_script.sh b/scripts/flash_script.sh index da802fcf6..9750f92ca 100644 --- a/scripts/flash_script.sh +++ b/scripts/flash_script.sh @@ -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