[Flash ROM.bat][Android 9] Flash Stock ROM of your MOTO G7 PLUS!!!

Search This thread

aron.sjoberg

Member
Dec 25, 2009
27
2

I'm getting nagged to death by the OTA update (that can't install because I have unlocked my phone)! What is the latest FW? Under "About phone" my phone says:

Model & hardware: Model: moto g7 plus (XT1965-3)
Software channel: reteu
Build number: PPWS29.98-66-2

Should I download xt1965-9? Is that the latest FW for my model?

Then unpack all files to the adb-folder, download the batch-file and run it with the phone connected to the computer?
 

Fluergenfahr

New member
Apr 24, 2017
4
0
yorihey.com
I'm getting nagged to death by the OTA update (that can't install because I have unlocked my phone)! What is the latest FW? Under "About phone" my phone says:

Model & hardware: Model: moto g7 plus (XT1965-3)
Software channel: reteu
Build number: PPWS29.98-66-2

Should I download xt1965-9? Is that the latest FW for my model?

Then unpack all files to the adb-folder, download the batch-file and run it with the phone connected to the computer?


It looks like you have the latest on this list already.

To disable the OTA nag screens, delete the 'Motorola Update Services' using file manager or an app like 'System App Safe Remover'. I'm assuming you've rooted already. If not, you'll need to do so. Just be sure to use Magisk and not Supersu. I was used to the latter and used it, but since it hasn't been updated, I soft-bricked the phone and had to do a factory re-flash.


Still waiting to hear from anyone if I can go from RETLA to RETEU without any issues. Paranoid about bricking. :eek:
 

Lupask

Senior Member
Aug 19, 2016
59
10
flash bootloader permission denied

Hello everyone. I am trying to relock the bootloader on my 7+ lake. I would also like to update to the newest software patch on the way because I had rooted before and as we know there is not yet a way to patch with OTA's with unlocked bootloaders.

I downloaded all required files (FastBootAddOnFiles.zip and the newest system img from lolinet) and tried to run the following from the command line at the mfastboot.exe: (i deleted the full path because it was very long)

Code:
mfastboot oem lock begin
...
(bootloader) ***************************************
(bootloader) WARNING: This command erases user data!
(bootloader) Please re-run this command to confirm.
(bootloader) ***************************************
OKAY [  0.010s]
finished. total time: 0.011s

mfastboot oem lock begin
...
(bootloader) Bootloader is now locked
OKAY [  0.166s]
finished. total time: 0.169s

flashfile.bat
mfastboot getvar max-sparse-size
max-sparse-size: 268435456
finished. total time: 0.001s

mfastboot oem fb_mode_set
...
OKAY [  0.002s]
finished. total time: 0.003s

mfastboot flash partition gpt.bin
target max-sparse-size: 256MB
sending 'partition' (37 KB)...
OKAY [  0.002s]
writing 'partition'...
(bootloader) Validating 'gpt.default.xml'
(bootloader) Committing 'gpt.default.xml'
(bootloader) - flashing 'gpt_main0.bin' to 'partition:0'
OKAY [  0.133s]
finished. total time: 0.137s

mfastboot flash bootloader bootloader.img
target max-sparse-size: 256MB
sending 'bootloader' (9520 KB)...
OKAY [  0.218s]
writing 'bootloader'...
(bootloader) Validating 'bootloader.default.xml'
(bootloader) flash permission denied
(bootloader) flash permission denied
!  repeated many times
(bootloader) flash permission denied
(bootloader) Cancelling 'bootloader.default.xml'
FAILED (remote failure)
finished. total time: 0.271s

mfastboot flash modem NON-HLOS.bin
target max-sparse-size: 256MB
sending 'modem' (76456 KB)...
OKAY [  1.630s]
writing 'modem'...
(bootloader) flash permission denied
FAILED (remote failure)
finished. total time: 1.637s

_regulatory-DEFAULT_CFC.xml>mfastboot getvar max-sparse-size
max-sparse-size: 268435456
finished. total time: 0.001s

mfastboot oem fb_mode_set
...
OKAY [  0.002s]
finished. total time: 0.003s

mfastboot flash partition gpt.bin
target max-sparse-size: 256MB
sending 'partition' (37 KB)...
OKAY [  0.002s]
writing 'partition'...
(bootloader) Validating 'gpt.default.xml'
(bootloader) Committing 'gpt.default.xml'
(bootloader) - flashing 'gpt_main0.bin' to 'partition:0'
OKAY [  0.133s]
finished. total time: 0.137s

mfastboot flash bootloader bootloader.img
target max-sparse-size: 256MB
sending 'bootloader' (9520 KB)...
OKAY [  0.218s]
writing 'bootloader'...
(bootloader) Validating 'bootloader.default.xml'
(bootloader) flash permission denied
(bootloader) flash permission denied
!  repeated many times
(bootloader) flash permission denied
(bootloader) Cancelling 'bootloader.default.xml'
FAILED (remote failure)
finished. total time: 0.271s

mfastboot flash modem NON-HLOS.bin
target max-sparse-size: 256MB
sending 'modem' (76456 KB)...
OKAY [  1.630s]
writing 'modem'...
(bootloader) flash permission denied
FAILED (remote failure)
finished. total time: 1.637s

I am cutting the remaining error messages they're all the same in each step 

mfastboot flash system system.img_sparsechunk.0
target max-sparse-size: 256MB
^CTerminate batch job (Y/N)? y

and I stopped it here because it was pointles to wait to load the installer and get errors

Does anyone have an idea how to proceed? The system otherwise boots normally But I succeded in erasing userdata during some of the previous attempts :D. So thankfully no bricking so far (fingers crossed) In dev settings the option 'oem unlocking' is greyed out (says I should contact the carrier)
Also, if possible, I would like to get rid of the unlocked bootloader warning at boot and the verity disabled message during boot.
I thought of just erasing everything with TWRP and trying to flash the system anew but I don;t really know it that would help and I dont want to brick it. When I tried twrp backup it failed with createtarfork process error 255 and only proceeded when I excluded userdata so I'm not sure that's enough

Thank you for any suggestions
 
Last edited:
Sep 12, 2019
5
1
FOR MOTO G7 PLUS ONLY!!!

Hello, everyone.

I created a .bat file "executable " For those who want to flash the stock rom on your Moto G7 Plus.

Just put it in the stock Rom folder along with the fastboot files and run the file.

For those who want the file, just download it by the following link or download the file that is on the thread.

http://www.mediafire.com/file/q836uaerr17pn0f/Flash_ROM_G7%252B.zip/file

Can someone explain the difference between what this thread is offering and this one: https://www.getdroidtips.com/moto-g7-plus-stock-firmware/#Moto_G7_Plus_Software_Update?
 

Fointard

New member
Apr 16, 2019
3
5
Lyon
www.fointard.com
the .bat script contains :
fastboot flash system_b system_b.img_sparsechunk.0
fastboot flash system_b system_b.img_sparsechunk.0

BUT stock ROM from lolinet contains system_b.img_sparsechunk.0 AND system_b.img_sparsechunk.1 files.

shouldn't the bat script contain
fastboot flash system_b system_b.img_sparsechunk.0
fastboot flash system_b system_b.img_sparsechunk.1

instead ?
 

moses_dx

Senior Member
Aug 23, 2014
568
49
will this work on a softbricked device? my phone is not starting, it's going straight to fastboot
 

SvenHee

Senior Member
Sep 11, 2014
183
18
Ede
Hi Guys,
I have tried to download an OTA update by finding the url in a bugreport.

I did find a url in the bugreport but the file that I downloaded through it is nowhere as big as the files mentioned in this thread, 107 MB instead of something like 2 gb.

There were no obvious other download url's in the log.

The biggest file in the downloaded zip is "payload.bin"

Any thoughts?
 

Zojak

Senior Member
Aug 27, 2011
62
14
So I used this method on my unlocked XT1965-2 (Brazil BR) using LAKE_RETAIL_9.0_PPWS29.98-111-5_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip. Execution went smoothly.
I had removed the fastboot erase userdata line. But on first boot a error screen came up saying the device wouldn't start, with the only option to either retry or factory reset. After retrying I selected factory reset and the device booted up. So removing the line didn't help.

I've reinstalled TWRP and flashed Magisk and TitaniumBackup. Now I'm restoring apps. Things appear to be working. Thanks @luiz_neto!
 

arachniac1

Member
May 23, 2016
33
2
Tampa, Fl
I'm in quite a pickle..been working to fix this since 6pm yesterday, nothing worked. I have the moto g7 plus with twrp installed (but frozen, boots up but none of the bottons do anything and its bootlooping. My stupid mistake for not making a nandroid bu before flashing a custom rom. how can I flash the firmware through adb/fastboot to get an OS back on this thing? Keep getting invalid partitions in relation to doing nything with bootloader (Which is unlocked). have a oneplus 3t so sort of spoiled in how easy that thing is to unbrick!!!!! HELP!!!!!!
 

Zojak

Senior Member
Aug 27, 2011
62
14
I'm in quite a pickle..been working to fix this since 6pm yesterday, nothing worked. I have the moto g7 plus with twrp installed (but frozen, boots up but none of the bottons do anything and its bootlooping. My stupid mistake for not making a nandroid bu before flashing a custom rom. how can I flash the firmware through adb/fastboot to get an OS back on this thing? Keep getting invalid partitions in relation to doing nything with bootloader (Which is unlocked). have a oneplus 3t so sort of spoiled in how easy that thing is to unbrick!!!!! HELP!!!!!!

Maybe this will help.
https://forum.xda-developers.com/general/rooting-roms/motorola-usb-drivers-rsd-lite-firmware-t3042687/post59139832
 

arachniac1

Member
May 23, 2016
33
2
Tampa, Fl
RSD not recogonizing device

tried RSD and it won't recognize my device in fastboot/bootloader mode (only mode i can get it in). how do I flash a .bat file? Explain to me like i'm a newbie moron)? I also tried extracting the firmware and typing in the commands one by one, no luck as several files failes, particulartly recovery.img :no valid partation).
Am I totally SOL here? thanks
 
the .bat script contains :


BUT stock ROM from lolinet contains system_b.img_sparsechunk.0 AND system_b.img_sparsechunk.1 files.

shouldn't the bat script contain


instead ?

I noticed that too. Before I return my dad's phone to stock firmware, I'd like to know if we indeed need to alter the batch file. It seems that it's just a simple typo, because the way the batch is now it flashes the same thing twice and that seems pointless.

So can anyone confirm that:

fastboot flash system_b system_b.img_sparsechunk.0
fastboot flash system_b system_b.img_sparsechunk.0

Should actually read:

fastboot flash system_b system_b.img_sparsechunk.0
fastboot flash system_b system_b.img_sparsechunk.1

-- UPDATE: I made the change and the batch file restored the phone to stock condition, it appears everything is working as it should.
---

Before anyone asks, I'm returning the phone to stock because two apps just won't run under LineageOS, not even using Magisk with Magisk Hide. They're both Dutch apps so I doubt anyone knows them (Rabo Wallet and VGZ).
 
Last edited:

Jairsantana

Senior Member
Jan 5, 2013
319
189
hey guy how are you does anybody know if a can change the device´s career firmware like this i have the XT1965-2 ATTMX (at&t mexico) and would like to ochange it to XT1965-2 RETLA (retail) could that be possible?
 

darkherman

Senior Member
 

Attachments

  • Flash_ROM_Revvlry.zip
    661 bytes · Views: 95
Last edited:
  • Like
Reactions: guitardoc64

DooGy000

New member
Jun 16, 2020
3
0
i have a XT1965-2 and return my device with this thread method, but wifi and data internet don't work can help me please
 

rymafet

New member
Dec 23, 2015
3
0
I have a few questions:

1) how do I select the correct firmware? I tried a few different, but they all kind of the same

2) when I try to flash bootloader.img I always get the same error:

$ fastboot flash bootloader bootloader.img
(bootloader) is-logical:bootloader: not found
Sending 'bootloader' (9520 KB) OKAY [ 0.250s]
Writing 'bootloader' (bootloader) Validating 'bootloader.default.xml'
(bootloader) Preflash validation failed
(bootloader) Cancelling 'bootloader.default.xml'
FAILED (remote: '')
fastboot: error: Command failed

does that mean that I'm using the incorrect firmware?

3) the script doesn't work for me, but if I go through the process step by step it seems to be working (except the bootloader.img), but I get a warning on each step - is-logical:%s: not found

$ fastboot flash bluetooth BTFM.bin
(bootloader) is-logical:bluetooth_a: not found
Sending 'bluetooth_a' (400 KB) OKAY [ 0.010s]
Writing 'bluetooth_a' OKAY [ 0.013s]
Finished. Total time: 0.024s

is it normal?

4) also WiFi and mobile internet are not working, not sure what would be the "latest firmware", because I tried both Android 9 and 10, tried multiple regions, result is always the same
 

rymafet

New member
Dec 23, 2015
3
0
Btw, after flashing this "original' ROM I can't flash LineageOS, I get bootloop

Can't flash TWRP on this "original" ROM too, same result - bootloop

Phone will only boot if I flash the "original" ROM without any addons, it makes the phone useless: no root, lots of Google crapware :(
 

bilabongsurf

Member
Mar 2, 2017
19
0
Does anyone know how to disable or configure the display time of this confirmation bubble? Whenever such a bubble appears on my screen after some action, it takes about 1 to 2 minutes to disappear, how do I disable these bubbles? Moto G7 plus, Rom stock Android 10, root magisk.
 

Attachments

  • Screenshot_20210502-214603.png
    Screenshot_20210502-214603.png
    43 KB · Views: 10
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    FOR MOTO G7 PLUS ONLY!!!

    Hello, everyone.

    I created a .bat file "executable " For those who want to flash the stock rom on your Moto G7 Plus.

    Just put it in the stock Rom folder along with the fastboot files and run the file.

    For those who want the file, just download it by the following link or download the file that is on the thread.

    http://www.mediafire.com/file/q836uaerr17pn0f/Flash_ROM_G7%252B.zip/file
    1
    Get rid of the message?

    Yes, you said: except for the message at the start "Your device has loaded a different operating system."

    After unlocking bootloader there is some message like this on starting device, keep in mind we all got these too and everything is fine but we like to cover it up with a different bootlogo, just looks better that is its only purpose. This message is because you also upgraded the firmware, meaning it's not really a different OS but only a different version of your correct OS.

    Does that also mean that OTAs will work? That banking apps will not complain about the integrity of the system?

    For G7 Plus we are not getting the OTAs properly after unlocking or rooting, I was originally rooted on PPW29.98-28 and repeatedly got the notifications of upgrading to 29.98-66-2 but it kept failing, the only way to stop it was freezing the Moto Update Process using Titanium Backup. So my only remaining option to upgrade was to fastboot flash the full firmware, as you just did, it wipes your data but gets you to the same place.

    With future updates we may be able to capture them and then a dev can make them into a TWRP flashable zip with no wiping of internal data. We had that on G5 Plus which was a nice thing and they are still doing that. But until that might happen the best we can do is the same for now - when your channel has an update just get it from lolinet (these are all official stock firmwares there) and fastboot flash after backing up your data.

    Usually it is more from the rooting (if you did that too) that may mess up your banking or other apps, but in Magisk there are settings that may work on that, you'll just have to try and see but there are mixed results. My choice is to not use banking apps on my devices anyway even if not unlocked or rooted, I just do it from home on a computer that I won't forget and leave out in public somewhere. :crying:
    1
    Yes, you said: except for the message at the start "Your device has loaded a different operating system."




    Hi,

    thank you very much for your elaborate answer!
    I will come back on it soon.

    Nes
    1
    Flashing the roms from lolinet, in my case RETEU is a complete reset of the phone, I assume.

    To flash, these steps should be right:
    Copying the firmware to sdcard.
    Boot in TWRP
    Flashing the lolinet firmware.
    Delete Dalvik Cache.

    Should TWRP and Magisk be reinstalled immedeately after this procedure? Or renew the developer mode, reinstall twrp and magisk?:confused:

    It won't work to flash full firmware in TWRP, so far the only way is using fastboot with phone connected to a computer in bootloader (unlocked) mode. Unzip firmware into your fastboot/ADB folder and also the batch file available in this thread, then run the batch file.

    Yes this will reset/wipe your phone (except for SD) so backup your data first, and it will be like when you first bought it. You can reinstall TWRP and then Magisk, but boot to system first and set things up including enabling USB debugging setting in developer options again.
    1
    Remove the line

    'fastboot erase userdata'

    from the flashROM.bat file and it won't factory reset. It will act like an upgrade.

    Sent from my Moto Z (2) using XDA Labs