├── README.md └── converter.bat /README.md: -------------------------------------------------------------------------------- 1 | # FlashFile2Bat 2 | -------- 3 | 4 | Place flashfile.xml in this directory and run converter.bat 5 | -------------------------------------------------------------------------------- /converter.bat: -------------------------------------------------------------------------------- 1 | echo off 2 | echo [*] Welcome to Motorola flashfile.xml to batch converter for windows 3 | echo ------------------------------------------------------------------------------ 4 | pause 5 | echo echo off > flashfile.bat 6 | echo fastboot getvar max-sparse-size >> flashfile.bat 7 | echo fastboot oem fb_mode_set >> flashfile.bat 8 | findstr "\" flashfile.xml > filename.txt 9 | findstr "\" flashfile.xml > erase.txt 10 | findstr "\" flashfile.xml > mbn.txt 11 | findstr "\" flashfile.xml > BTFM.txt 12 | for /F delims^=^"^ Tokens^=4^,6^,8^* %%G in (filename.txt) DO @echo fastboot %%H %%I %%G >> flashfile.bat 13 | for /F delims^=^"^ Tokens^=2^,4^,6^* %%G in (erase.txt) DO @echo fastboot %%G %%H >> flashfile.bat 14 | for /F delims^=^"^ Tokens^=4^,6^,8^* %%G in (mbn.txt) DO @echo fastboot %%H %%I %%G >> flashfile.bat 15 | for /F delims^=^"^ Tokens^=4^,6^,8^* %%G in (BTFM.txt) DO @echo fastboot %%H %%I %%G >> flashfile.bat 16 | echo fastboot oem fb_mode_clear >> flashfile.bat 17 | echo echo ------------------------------------------------------------------------- >> flashfile.bat 18 | echo echo please scroll up and check your flash for any errors >> flashfile.bat 19 | echo echo ------------------------------------------------------------------------- >> flashfile.bat 20 | echo pause >> flashfile.bat 21 | echo fastboot reboot >> flashfile.bat 22 | echo exit >> flashfile.bat 23 | echo [*] The flashfile.xml has been converted to a flashfile.bat 24 | echo [*] press any key to exit then double click the flashfile.bat 25 | echo [*] to start your firmware restore on your motorola device. 26 | echo [*] make sure your device is in fastboot mode first before you start 27 | echo ------------------------------------------------------------------------------ 28 | pause 29 | exit 30 | --------------------------------------------------------------------------------