Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

"Preflash Validation Failed" when Flashing Magisk-Patched Boot Image (v28+) #8718

Open
saitarunsareddy opened this issue Jan 17, 2025 · 4 comments

Comments

@saitarunsareddy
Copy link

Device: Moto G64 5G India
Android version: 14
Magisk version name: 218327f
Magisk version code: 28101

When attempting to flash a Magisk-patched boot image created using Magisk v28 or v28.1 on a Moto G64 5G device, the process fails with the error:

Preflash validation failed

However, when the boot image is patched using Magisk v27, the flashing process completes successfully without errors. This suggests a compatibility issue introduced in Magisk v28+ that prevents the bootloader from accepting the patched boot image.


Device Information:

  • Device Model: Moto G64 5G India
  • Android Version: 14
  • Bootloader Status: Unlocked
  • Firmware Version: CANCUNF_G_SYS_U1TDS34.100_46_7_2 (Latest)
  • Magisk Version: v28.0, v28.1 (fails), v27.0 (works)
  • Fastboot Version: fastboot version 35.0.2-12147458

Steps to Reproduce:

  1. Extract the stock boot.img from the firmware.

  2. Patch the boot.img using Magisk v28.0 or v28.1.

  3. Flash the patched boot image via fastboot:

    fastboot flash boot magisk_patched.img
    
  4. Observe the error:

    Preflash validation failed
    
  5. Repeat the same process using Magisk v27.0 to patch the boot.img.

  6. Flashing succeeds without errors.


Expected Behavior:

The Magisk-patched boot image created with v28+ should flash successfully, as it does with v27.


Observed Behavior:

  • Magisk v28+ patched boot image results in "Preflash validation failed."
  • Magisk v27 patched boot image flashes successfully.

Attached Magisk patched images of v27, v28 and v28.1 uploaded in Google Drive and shared the link below:

Google Drive

Attached screenshots of fastboot error for 3 different boot images.

Image
Image
Image

Thank you for your assistance in resolving this issue.

@Yorikiro
Copy link

Having a similar issue with poco F5 pro, no error message on fastboot, but cellphone won't boot

@DJLevel3
Copy link

Same issue on Moto G Stylus 5g 2024 (boston)

@John0n1
Copy link

John0n1 commented Jan 24, 2025

It seems like a regression introduced in Magisk v28 related to boot image padding is causing the "Preflash validation failed" error on some devices.

The release notes for v28 mention a change in MagiskBoot: "Don't pad zeros if signed boot image is larger". It is highly likely that this change is the root cause of the problem. It's possible that some bootloaders are sensitive to the exact size and padding of the boot image, and the new padding behavior in v28 is not compatible with these bootloaders.

@A-Australian
Copy link

Maybe flash empty vb-meta?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants