Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Flashing patched boot.img fails with (bootloader) Preflash validation failed #8389

Open
poIyduekes opened this issue Sep 12, 2024 · 17 comments

Comments

@poIyduekes
Copy link

so as the title says, flashing from fastboot fails with (bootloader) Preflash validation failed
but a different way of patching works for some reason, that is installing the latest 7 months old stable 27.0 build, patching and flashing boot.img with that build, updating the app to latest canary, do a direct install from magisk installation methods and the boot.img will be patched and flashed fine, i haven't uploaded recovery logs since i used fastboot but i have uploaded the patched boot.img that returns the error: https://file.io/EGEkNhXlsQJo

Device:Moto E7 Plus
Android version:14
Magisk version name:27.0
Magisk version code:27007

@yujincheng08 yujincheng08 closed this as not planned Won't fix, can't repro, duplicate, stale Sep 15, 2024
@christiandavid82
Copy link

I experienced the same problem with a Motorola Edge 30 ultra (Android 14 Stock ROM, Firmware XT2241-2_EQS_RETEU_14_U1SQS34.52-21-1-13) Magisk 28 generated a corrupted boot file, but Magisk 27 worked as expected.

original boot.img Extracted from the above ROM
magisk_patched-27000_UBPvy.zip Fastboot: Works
magisk_patched-28000_KQF2T.zip Fastboot:(bootloader) Preflash validation failed

After installing via fastboot a boot.img generated with Magisk 27 i updated in the app to Magisk 28 and from there updated and everything works.

@canyie
Copy link
Collaborator

canyie commented Dec 8, 2024

I'm reopening this as requested by another dev

@canyie canyie reopened this Dec 8, 2024
@mirh
Copy link

mirh commented Dec 21, 2024

FWIW I can report the same issue on the original Motorola Edge (racer) too.

@kkilobyte
Copy link

kkilobyte commented Jan 3, 2025

Same issue on Motorola Moto G Power 5G - 2023 (devonn / Spectrum) on Magisk v28.1. Using Magisk v27.0 and then using the Direct Install method to update to Magisk v28.1 works fine.

On my TCL 20 XE (Boost) I don't experience this problem even on Magisk v28.1

@TroyMitchell911
Copy link

wow! Thank you very much @wismos-0rg.
I encountered the same error and followed your instructions to switch to v27.0. everything is working fine now.

Device: Motorola Razr 2022 (XT2251-1)
Android version: 14

@bitrot-alpha
Copy link

bitrot-alpha commented Jan 8, 2025

just chiming in that I'm experience the same issue on a Motorola Razr 2023 lynkco (XT2323-2) on Android 14. Switching to Magisk v27.0 worked.

I thought I messed something up by fiddling with Termux in root because I couldn't perform OTA update, but it turns out it was related to this issue with Magisk.

@SonyStinks
Copy link

In case new posters missed this:

The published workaround (use Magisk v27.0) WORKS for Motorola Edge (racer), at least. I bet it works on the other phones, too.

Try it if you're still having problems. Just uninstall Magisk completely, and install the Magisk v27.0 release from February 2024, then Select and Patch a File --> patch an ORIGINAL boot.img. Then flash that like normal.

Please note the UNRELATED problem with modern Motorola devices--that fastboot mode cannot be used and bootloader mode must be used instead, which then bootloops while connected to USB and/or gives "No such device" errors in fastboot--can be resolved by using an ARM64 device, such as a RaspberryPi.

The combination of these two issues was seriously THAT frustrating, so I'm posting both workarounds here.
"This worked for me!"--9 January 2025

@halcyon
Copy link

halcyon commented Jan 11, 2025

Had the exact same problem with Motorola One 5G Ace (Kiev). Workaround of utilizing Magisk v27.0 worked, thank you @SonyStinks .

@Heat84
Copy link

Heat84 commented Jan 13, 2025

Please note the UNRELATED problem with modern Motorola devices--that fastboot mode cannot be used and bootloader mode must be used instead, which then bootloops while connected to USB and/or gives "No such device" errors in fastboot--can be resolved by using an ARM64 device, such as a RaspberryPi.

Wow! I thought I was the only one having this problem. For me the device isn't being seen in Fastboot. I haven't had boot loops.

For the first issue, someone suggested here: (#8597 (comment)) upgrading to 28 after flashing the patched boot.img and everything is working again. But if you do that, won't you have the problem again the next time you flash a patched boot.img? I don't feel like finding out.

@philblue1
Copy link

Same on Motorola g 5g LOS21 December.
Just did the deprecated
adb sideload Magisk-v28.1.apk
in LOS Recovery, the finalizing reflash in Android and it works.
Why is that method deprecated anyway? used it for years.

@mirh
Copy link

mirh commented Jan 15, 2025

#1856, fbb4f85 and #6676 give some hints.
One way to put this, is that patching the kernel is already hard enough (as evidenced by this issue). Flashing from recovery also has to take into account its device environment (and not that it's impossible, but it arguably even requires slightly different skills).

@GameTesterDev
Copy link

I've learned that Motorola does not like any Magisk version above 27.0... They still have not fixed the issue,

@Heat84
Copy link

Heat84 commented Feb 5, 2025

I've learned that Motorola does not like any Magisk version above 27.0... They still have not fixed the issue,

But Lygisk works just fine. And you don't lose root after weekly updates with Lygisk😀.

@Heat84
Copy link

Heat84 commented Feb 5, 2025

Same on Motorola g 5g LOS21 December. Just did the deprecated adb sideload Magisk-v28.1.apk in LOS Recovery, the finalizing reflash in Android and it works. Why is that method deprecated anyway? used it for years.

Because programmers love using the word depreciated.😛 And you spelled it wrong.

@derfolie
Copy link

derfolie commented Feb 7, 2025

Same problem with moto g9 play. But after following using v27.0 to flash boot.img, I was able to get magisk working.

@JmeLche
Copy link

JmeLche commented Feb 16, 2025

Hi, I need help, for a few days, I can't get root access what ways I didn't try
Moto Edge 50 pro android 14

Image
Image

Image

(bootloader) kernel: uefi
(bootloader) version-bootloader[0]: MBM-3.0-eqe_g-d43b2da80b1-240916-U3U
(bootloader) version-bootloader[1]: MS34.69-8-3-1-7ee820
(bootloader) product: eqe
(bootloader) board: eqe
(bootloader) secure: yes
(bootloader) lcs-state: SECURE_PROD_MODE
(bootloader) hwrev: PVT
(bootloader) radio: ROW
(bootloader) storage-type: UFS
(bootloader) emmc: N/A
(bootloader) ufs: 512GB SKhynix H9QT2GGMN6X200 FV=A003 WB=4096
(bootloader) ram: 12GB SKHYNIX LP4x DIE=24Gb M5-M8=06 07 00 54
(bootloader) cpu: SM_CAMANO 1.0
(bootloader) cid: 0x0032
(bootloader) channelid: 0x00
(bootloader) uid: 0010FB2C0026B0E1
(bootloader) token: inactive
(bootloader) securestate: flashing_unlocked
(bootloader) factory-modes: disabled
(bootloader) verity-state: enforcing (0)
(bootloader) iswarrantyvoid: yes
(bootloader) chipid: 000004570010FB2C
(bootloader) max-download-size: 805306368
(bootloader) reason: Volume down key pressed
(bootloader) esimid: 89033023553429010000020512241844
(bootloader) meid:
(bootloader) date: 07-10-2024
(bootloader) sku: XT2403-2
(bootloader) carrier_sku: XT2403-2
(bootloader) battid: SB18E05583
(bootloader) battery-voltage: 4301
(bootloader) iccid:
(bootloader) cust_md5:
(bootloader) max-sparse-size: 268435456
(bootloader) poweroffalarm: 0
(bootloader) ro.carrier: reteu
(bootloader) ro.build.fingerprint[0]: motorola/eqe_ge/eqe:14/U3UMS34.69-
(bootloader) ro.build.fingerprint[1]: 8-3-1/7ee820-ce451:user/release-ke
(bootloader) ro.build.fingerprint[2]: ys
(bootloader) ro.build.version.qcom[0]: AU_LINUX_ANDROID_LA.VENDOR.13.2.0
(bootloader) ro.build.version.qcom[1]: .R1.11.00.00.925.219
(bootloader) version-baseband[0]: M7550_DE312_18.58.01.51R EQE_PVT_ROWDS
(bootloader) version-baseband[1]: DS_CUST
(bootloader) kernel.version[0]: Linux version 5.15.123-android13-8-00061
(bootloader) kernel.version[1]: -g24d246e7e5c1-ab12029621 (build-user@bu
(bootloader) kernel.version[2]: ild-host) (Android (8508608, based on r4
(bootloader) kernel.version[3]: 50784e) clang version 14.0.7 (https://an
(bootloader) kernel.version[4]: droid.googlesource.com/toolchain/llvm-pr
(bootloader) kernel.version[5]: oject 4c603efb0cca074e9238af8b4106c30add
(bootloader) kernel.version[6]: 4418f6), LLD 14.0.7) #1 SMP PREEMPT Fri
(bootloader) kernel.version[7]: Jun 28 13:54:10 UTC 2024
(bootloader) git:xbl_config: MBM-3.0-eqe_g-da3e99c31-240916
(bootloader) git:xbl_ramdump: MBM-3.0-eqe_g-da3e99c31-240916
(bootloader) git:uefi: MBM-3.0-eqe_g-da3e99c31-240916
(bootloader) git:abl[0]: MBM-3.0-eqe_g-d43b2da80b1-240916-U3UMS34.69-8-3
(bootloader) git:abl[1]: -1-7ee820
(bootloader) git:aop: MBM-3.0-eqe_g-697c2e9d-240916
(bootloader) git:aop_config: MBM-3.0-eqe_g-697c2e9d-240916
(bootloader) git:tz: MBM-3.0-eqe_g-34725d13-240916
(bootloader) git:hyp: MBM-3.0-eqe_g-34725d13-240916
(bootloader) git:devcfg: MBM-3.0-eqe_g-34725d13-240916
(bootloader) git:keymaster: MBM-3.0-eqe_g-27cb8bd6-240916
(bootloader) git:storsec: MBM-3.0-eqe_g-27cb8bd6-240916
(bootloader) git:uefisecapp: MBM-3.0-eqe_g-27cb8bd6-240916
(bootloader) git:prov: MBM-3.0-eqe_g-34725d13-240916
(bootloader) git:qupfw: MBM-3.0-eqe_g-38534f9-240916
(bootloader) git:cpucp: MBM-3.0-eqe_g-38534f9-240916
(bootloader) git:shrm: MBM-3.0-eqe_g-da3e99c31-240916
(bootloader) frp-state: no protection (0)
(bootloader) current-slot: a
(bootloader) running-bl-slot: _a/_a
(bootloader) running-boot-lun: 1
(bootloader) slot-count: 2
(bootloader) slot-successful:_a: yes
(bootloader) slot-successful:_b: no
(bootloader) slot-unbootable:_a: no
(bootloader) slot-unbootable:_b: no
(bootloader) slot-retry-count:_a: 6
(bootloader) slot-retry-count:_b: 0
(bootloader) logical-block-size: 0x1000
(bootloader) erase-block-size: 0x1000
(bootloader) is-userspace: no
(bootloader) pcb-part-no: SB28E10425
(bootloader) primary-display: csot_vtdr6126_c_667_1220p_dsc_vdo_144hz_v2
(bootloader) secondary-display: none
(bootloader) fdr-allowed: yes
all: listed above
Finished. Total time: 0.054s

@Heat84
Copy link

Heat84 commented Feb 16, 2025

Hi, I need help, for a few days, I can't get root access what ways I didn't try Moto Edge 50 pro android 14

Use Lygisk . Motorola phones have a problem with Magisk 28. A good thing about using Lygisk is that your phone won't lose root after weekly updates😀. All you have to do is uninstall Magisk and boot into recovery to install Lygisk. If you have an SD card, you can put the Lygisk APK on it before you boot into recovery and install Lygisk without needing ADB. Make sure you change the file extension to zip when you put the Lygisk APK on the SD card. If you do it with ADB, you also need to change the file extension to ZIP. The first time you open Lygisk after installing it, it'll need to install a last part of the app. That's done in Android. You'll need to reboot after you do that.

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

No branches or pull requests