What this is ------------ A first-hand run of Magisk v31.1's own boot image patching, made by magiskguide.com on October 27, 2026 (UTC). The three .txt files next to this one are the unedited terminal output: each command is shown after "$ " and followed by exactly what it printed. This was done on a computer, not a phone. Nothing was flashed or booted. It shows what Magisk changes inside a boot image, using real files. Inputs ------ - Magisk-v31.1.apk, downloaded from https://github.com/topjohnwu/Magisk/releases/download/v31.1/Magisk-v31.1.apk SHA-256 89cefac0a318afa39fb3880c45c87b036c05bc1ebf02a7a715b7f8d7c26ac6e7 (matches the digest GitHub publishes for the release asset). From it we used assets/boot_patch.sh, assets/util_functions.sh and the arm64-v8a libmagiskinit.so, libmagisk.so and libinit-ld.so, renamed the way the app names them (magiskinit, magisk, init-ld). - Google's GKI boot image android12-5.10-2026-07_r2, downloaded from https://dl.google.com/android/gki/gki-certified-boot-android12-5.10-2026-07_r2.zip (listed on source.android.com, "android12-5.10 release builds"). Zip SHA-256 b39003b8d014ea251580b1f403d40c9e15b8a73ca510e672c3bd8d45ada138b7 The one difference from the app ------------------------------- The app runs boot_patch.sh with the ARM build of magiskboot on the phone. A computer can't run ARM binaries, so we built magiskboot for x86-64 Linux from the same source: the v31.1 tag of github.com/topjohnwu/Magisk (commit 0972f67, "Release Magisk v31.1"), which supports host builds. cd native/src RUSTC_BOOTSTRAP=1 CC=clang CXX=clang++ CXXFLAGS=-stdlib=libc++ CXXSTDLIB=c++ \ cargo build --release -p magiskboot --bin magiskboot \ --target x86_64-unknown-linux-gnu Toolchain: rustc 1.97.0, Ubuntu clang 18.1.3 with libc++ 18, Linux x86_64. native/out/generated/flags.h and flags.rs were written as Magisk's build.py writes them for a release build (version 31.1, version code 31100). Resulting magiskboot SHA-256: d5229a6a475aaf57e34238c56d1071bf079205e7aa930602e13699508df948c8 The patch flags are the ones the app passes on a current encrypted A/B phone with a vbmeta partition (util_functions.sh get_flags): KEEPVERITY=true KEEPFORCEENCRYPT=true PATCHVBMETAFLAG=false RECOVERYMODE=false LEGACYSAR=false, with BOOTMODE=true as in the app. Expected messages in 2-patch.txt -------------------------------- - "./magisk: cannot execute binary file: Exec format error": the script asks the ARM magisk binary for the phone's pre-init partition. On a computer it can't run, so that optional line is skipped; on a phone the partition name is added to .backup/.magisk. - "Failed to patch" (three times): boot_patch.sh tries three optional kernel hex patches that only apply to Samsung kernels (its comments: "Remove Samsung RKP", "Remove Samsung defex", "Disable Samsung PROCA"). None of the patterns are in Google's GKI kernel, so the stock kernel is kept unchanged, as the script intends (the last command in 3-inspect-and-restore.txt shows the kernel is byte-identical). Corrections: hello@magiskguide.com