Skip to content

Instantly share code, notes, and snippets.

View MarkusMaal's full-sized avatar
✈️

Markus Maal MarkusMaal

✈️
View GitHub Profile
@CFM880
CFM880 / flash_all.bat
Created October 11, 2025 11:27
fix xiaomi pad5 stuck in fastboot and Failed to load/authenticate boot image: Device Error
fastboot %* getvar product 2>&1 | findstr /r /c:"^product: *nabu" || echo Missmatching image and device
fastboot %* getvar product 2>&1 | findstr /r /c:"^product: *nabu" || exit /B 1
fastboot %* flash partition:0 %~dp0images\gpt_both0.bin || @echo "flash partition:0 error" && exit /B 1
fastboot %* flash partition:1 %~dp0images\gpt_both1.bin || @echo "flash partition:1 error" && exit /B 1
fastboot %* flash partition:2 %~dp0images\gpt_both2.bin || @echo "flash partition:2 error" && exit /B 1
fastboot %* flash partition:3 %~dp0images\gpt_both3.bin || @echo "flash partition:3 error" && exit /B 1
fastboot %* flash partition:4 %~dp0images\gpt_both4.bin || @echo "flash partition:4 error" && exit /B 1
fastboot %* flash partition:5 %~dp0images\gpt_both5.bin || @echo "flash partition:5 error" && exit /B 1