I flashed stock firmware onto my phone (the last file on https://firmware.center/firmware/Motorola/Moto Z2 Force/Stock/XT1789-04/) to unbrick my phone using this batch file:
echo off
fastboot getvar max-sparse-size
fastboot oem fb_mode_set
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot flash modem NON-HLOS.bin
fastboot flash fsg fsg.mbn
fastboot erase modemst1
fastboot erase modemst2
fastboot flash bluetooth BTFM.bin
fastboot flash dsp adspso.bin
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash system_b system_b.img_sparsechunk.0
fastboot flash system_b system_b.img_sparsechunk.1
fastboot flash oem oem.img
fastboot erase carrier
fastboot erase ddr
fastboot oem fb_mode_clear
pause
fastboot reboot
exit
I was able to successfully boot up the phone but the wifi and mobile data does not work. I cannot turn on the wifi and it does not give me the option to turn on mobile data even when my sim card is inserted. Any ideas on how to fix this would help.
Additional info: It was previously bricked because I deleted app_process32 from system/bin. It worked fine until I also uninstalled systemless xposed. I tried to flash Lineage OS but that just removed TWRP and still put me in a bootloop so then I did what I described above.
echo off
fastboot getvar max-sparse-size
fastboot oem fb_mode_set
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot flash modem NON-HLOS.bin
fastboot flash fsg fsg.mbn
fastboot erase modemst1
fastboot erase modemst2
fastboot flash bluetooth BTFM.bin
fastboot flash dsp adspso.bin
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash system_b system_b.img_sparsechunk.0
fastboot flash system_b system_b.img_sparsechunk.1
fastboot flash oem oem.img
fastboot erase carrier
fastboot erase ddr
fastboot oem fb_mode_clear
pause
fastboot reboot
exit
I was able to successfully boot up the phone but the wifi and mobile data does not work. I cannot turn on the wifi and it does not give me the option to turn on mobile data even when my sim card is inserted. Any ideas on how to fix this would help.
Additional info: It was previously bricked because I deleted app_process32 from system/bin. It worked fine until I also uninstalled systemless xposed. I tried to flash Lineage OS but that just removed TWRP and still put me in a bootloop so then I did what I described above.
Last edited: