yashsingh1/xdaforums huggingface dataset:
[Moto G7 Guides, News, & Discussion] mingkee:
If you want to regain root after OTA (16-5), you should patch RETAIL instead of RETUS because you need to lookup build number.

It's recommended to full flash ROM using RSDlite. You can use fastboot command but you have to be careful because system has two partitions. You may want to read flashfile.xml before doing any action.
[Moto G7 Guides, News, & Discussion] Omegapsy:
How do I get RSDLite to detect the device in download mode?
[Moto G7 Guides, News, & Discussion] Omegapsy:
Reporting back in after updating using fastboot. It takes a second but the device takes the update with no issue from the RETAIL channel here. Flawlessly rooted afterwards too. Thanks for the info guys!
[Moto G7 Guides, News, & Discussion] Jorgy11:
I finally had a chance to retry this knowing I had a few hours to fix it if I bootloop again.

After knowing I had flashed the "RETUS" to get back working I knew I had the right patched_boot.img. It was surprisingly easy and very pain free. Unlocking was more difficult (and cleared all data) time consuming.

After flashing it I was happy to see it reboot up. Checked root and nothing :(

Then I remembered I never reinstalled Magisk after bootloop fix. Installed that and all is good.

Hopefully this will help someone. I wish I knew how to better describe how to match the right patch.... but now the info is there if you have taken the OTA I would have known to flash RETAIL instead of RETUS.

Thanks everyone who added to this.

I really just wanted a few apps back like adaway and all my tasker stuff.

---------- Post added at 08:28 AM ---------- Previous post was at 07:31 AM ----------

After knowing I had flashed the "RETUS" to get back working I knew I had the right patched_boot.img. It was surprisingly easy and very pain free. Unlocking was more difficult (and cleared all data) time consuming.

After flashing it I was happy to see it reboot up. Checked root and nothing :(

Then I remembered I never reinstalled Magisk after bootloop fix. Installed that and all is good.

Hopefully this will help someone. I wish I knew how to better describe how to match the right patch.... but now the info is there if you have taken the OTA I would have known to flash RETAIL instead of RETUS.

Thanks everyone who added to this.

I really just wanted a few apps back like adaway and all my tasker stuff.
[Moto G7 Guides, News, & Discussion] clcombs262:
Since recovery is merged into boot, won't we lose that?
[Moto G7 Guides, News, & Discussion] Omegapsy:
I'm "assuming" no since you wouldn't wipe the boot partition. Flashing the patched image doesn't change the rest of the boot partition.
[Moto G7 Guides, News, & Discussion] smokinu:
Is anyone else getting the following error when trying to fastboot flash boot the patched boot image or even the stock unmodified one?

"(bootloader) Invalid partition name bootb"

On PPO29.114-16-5 and tried the RETAIL and RETUS roms after reading this thread.

Software Channel is "US Retail"

Thoughts?
[Moto G7 Guides, News, & Discussion] DeQ_:
I also get this error when I try to flash the patched_boot.img. My software channel is reteu2.
[Moto G7 Guides, News, & Discussion] smokinu:
Can't explain why, but this error occurred for me when using fastboot in ubuntu. When i tried the latest version of fastboot 1.4.3 in windows, it worked just fine! I also downloaded the latest Motorola drivers at the same time. Hope this helps.

Rooted and working great now.

---------- Post added at 06:03 PM ---------- Previous post was at 06:01 PM ----------

Can anyone verify that the RETAIL firmware image is correctly signed, and after a full flash they can go back to stock and relock the bootloader?
[Moto G7 Guides, News, & Discussion] DeQ_:
After I installed fastboot version 1.4.3 it worked perfectly fine for me. Thanks for the advice!
[Moto G7 Guides, News, & Discussion] smokinu:
Can anyone verify that the RETAIL or RETUS firmware image is correctly signed, and after a full flash they can go back to stock and relock the bootloader?
[Moto G7 Guides, News, & Discussion] ptn107:
On PPO29.114-16-5 I verified the boot.img is correctly signed in the firmware but I'm not sure if any other .img has to be or not. I want to stay rooted otherwise I would have tried to relock.
[Moto G7 Guides, News, & Discussion] mingkee:
I have made a thread to manually update G7. I have successfully updated to 114-16-5 and regained root on both. You may get annoying dtbo notification. You can safely ignore it by turning Magisk notification off
[Moto G7 Guides, News, & Discussion] smokinu:
Confirmed. Was able to reflash the stock boot.img and relock the bootloader. Went back to root, but wanted to know I can make it back to a factory state.

Now all we need is the latest signed PPO29.114.16.7 build. :)
[Moto G7 Guides, News, & Discussion] clcombs262:
How do I root on ppo29.114.16-5? I don't have a boot img to patch, the latest firmware I can find is 29.114.16. I'm on retus.

Anyone successfully rooted on that version?

I found the firmware linked, but it is not for RETUS but retail and I don't feel like bricking a device I don't have stock firmware for.

Bonsu points if you can answer:

How do I backup my stock boot img? Since we don't have TWRP
[Moto G7 Guides, News, & Discussion] clcombs262:
I have, but see no firmware either. Guess we have to wait.
[Moto G7 Guides, News, & Discussion] smokinu:
The RETAIL 16-5 boot.img will work. Successfully rooted and then unrooted and relocked bootloader just to be sure I can get back to factory.

Now just waiting on a way to get boot.img from 16-7.
[Moto G7 Guides, News, & Discussion] sd86:
I have the boot image file from the "RIVER_AMZ_PPO29.114_16_7_cid50_subsidy_DEFAULT_regulatory_DEFAULT_CFC.xml" firmware file if that would help. You can obtain the same file with LMSA tool for whatever model of the G7 you have.
[Moto G7 Guides, News, & Discussion] smokinu:
Wow...I've had quite a few motos, and I've never heard of this tool! Thanks for the heads up! Am I correct in understanding that this can allow you to download (download only, and not necessarily install) the latest factory image? I'll get the LMSA tool and play with it when I get in front of a PC tonight. Thanks again!!
[Moto G7 Guides, News, & Discussion] sd86:
No problem you found the one here: https://support.lenovo.com/us/en/downloads/ds101291 right? And yeah, people don't always know about LMSA, they usually end up getting directed to the Verizon Software Assistant and left confused.

Edit: Yeah, you can use it just to download the firmware, when it downloads it doesn't automatically start the operation. I had a hard time finding the firmware until I found this tool. I spent quite a few hours learning about this device.
[Moto G7 Guides, News, & Discussion] Omegapsy:
Answered my own question.
[Moto G7 Guides, News, & Discussion] sd86:
Just don't click the rescue button after download, the downloaded files if you keep the tools default install path is C:\ProgramData\LMSA\Download\RomFiles

Edit:

May have derped, I lack sleep, LOL. But this info might be helpful to someone browsing this thread anyhow.
[Moto G7 Guides, News, & Discussion] smokinu:
This is an incredibly helpful last few posts. Thanks guys!!!
[Moto G7 Guides, News, & Discussion] Omegapsy:
Useful none the less. I figured it out as SOON as I made that post. Also, FWIW once LMSA has the download started you can proceed to resume using your phone. It does not require the phone to remain connected to download.
[Moto G7 Guides, News, & Discussion] sd86:
Also useful to know, thank you for sharing.
[Moto G7 Guides, News, & Discussion] моксель:
I have a motorola G7 Power, and the channel is reteu2 (europe), what kind of firmware should I download?

thanks
[Moto G7 Guides, News, & Discussion] Omegapsy:
Best to use the LMSA utility that was linked here
[Moto G7 Guides, News, & Discussion] моксель:
No, according to the instructions in the first post, I mean it.

mirrors.lolinet.com/firmware/moto/river/official/

I don't want return to stock, I want to make a root.
[Moto G7 Guides, News, & Discussion] Omegapsy:
Yes the zip files available on that site are sourced from utilities like this. LMSA will always download the latest available update for your device in flashable format, boot img and all.
[Moto G7 Guides, News, & Discussion] smokinu:
The LMSA tool worked great and was able to get 16-7. I didnt have any luck in getting the tool to flash the phone, though. Tried twice. Had to manually flash the firmware obtained from LMSA using fastboot.

Rooted on 16-7 and running great.
[Moto G7 Guides, News, & Discussion] sd86:
I had to use RSD on a win7 machine cause neither worked for me initially. But after the one time in RSD, the other tools work now for some reason. I'm not going to question why too hard cause I'm just glad it worked and I got a free phone out of it. If someone can explain to me why what happened happened I'm down to hear lmao.
[Moto G7 Guides, News, & Discussion] моксель:
omg, what i'm doing wrong?

I connected phone to the computer, run the lmsa, and then?

How to download a Firmware image to a PC via LMSA?
[Moto G7 Guides, News, & Discussion] Omegapsy:
Reboot the device into fastboot mode. If you have USB debugging enabled and know how to use ADB then just

adb reboot bootloader

otherwise just boot the phone with the hardware combo (Vol- + PWR)

Plug the device into your computer and load LMSA. The program will detect the device in bootloader mode. Go to the "Rescue" tab of the program and it will auto detect the device variant and then give you the option do download the firmware for the device. Once the download has started you can remove your phone from fastboot mode and use it normally. LMSA will continue to download the firmware.

Make sure to set the download path if you don't want to have to go looking through your appdata folder to find the default download location.
[Moto G7 Guides, News, & Discussion] моксель:
Coool, it works!

I mean downloading the file successfully. Y need to add this in the 1st post, as information for dummies

:)

I will say later, if my device will be rooted.

thanks

------------------

YES, my Moto G7 rooted successfully! :good:

thanks to all :fingers-crossed:
[Moto G7 Guides, News, & Discussion] AZGeek:
Google Fi

Following the OP, I am unable to find the ROM on the download site. My G7 device was purchased directly from Google Fi, and was able to unlock the bootloader.

Software channel: Google Fi

Baseband version: M632_12.52.01.86R RIVER_NA_CUST

Kernel version: 4.9.112-perf

Build number: PP029.114-116-5
[Moto G7 Guides, News, & Discussion] mingkee:
Try RETAIL
[Moto G7 Guides, News, & Discussion] umbrisle:
Could I also root a g7 play phone, with the procedures described in this thread?
[Moto G7 Guides, News, & Discussion] KN4LZZ:
"N/A" error

I've followed this (along with other guides in the Ocean/G7 Power threads), but the result I'm getting is an error of "N/A" from the bootloader on reboot.

Using the boot.img file for my model (XT1955-5, US) (I'm using RETUS), I've patched it with Magisk v19.1 (in Magisk Manager v7.1.2) and then pushed the patched boot image file to the phone via adb/fastboot. When flashing at command line, the bootloader gives a message that the written file is unsigned or corrupt. It yields "N/A" error on reboot. I've observed that the patched boot file is 18110KB vs. the ~32MB size of the stock boot.img file.

I can push the unpatched boot.img to the phone and it boots fine (with the expected "bad key" message).

I've researched the error and can't find a cause in forums/searches. I've also tried patching in Magisk Manager using different advanced settings (disabling "preserve force encryption" and "preserve AVB 2.0/dm-verity"), with the same result.

I've downloaded the RETAIL rom file as well, to see if there is an improvement by using its boot.img file, but it fails to boot (sits at "BAD KEY" indefinitely). So, I'm confident it isn't an issue with the RETUS boot.img file.

[MENTION=303482]mingkee[/MENTION] have you any insight into the cause?
[Moto G7 Guides, News, & Discussion] mingkee:
The size shrinked because recovery is removed during patching process.

I did patching with Magisk 18.1
[Moto G7 Guides, News, & Discussion] KN4LZZ:
Re: patching with Magisk 18.1

Thank you for the response, [MENTION=303482]mingkee[/MENTION]

I've been searching for a couple hours on this, so I apologize if this is basic... I'm trying to redo the patch using 18.1. I've downloaded it to the same directory Manager uses to store the 19.1 version it pulls from the stable channel. I can't figure out how to force it to patch using a specified zip (i.e. 18.1). I assume even if I install an older version of the manager, it will just pull the latest release from the same stable or beta channels.

Is there a url for the custom channel I need to provide it, in order for it to pull 18.1? I was able to use the following url to patch with v18.0. The patched boot.img worked.

Custom: https://raw.githubusercontent.com/topjohnwu/magisk_files/5cc0b88d76f4fc7cd1145789b8ae639e42db685e/stable.json

Or, do I need to perform the patch outside of Magisk Manager? I've also been searching on this with little results.
[Moto G7 Guides, News, & Discussion] LoboOMaioral:
Hey guys, i did it all the steps, but now my g7 play is stuck on start, and the touch is locked, i cant do anything. Any thoughts on what i have to do?

Ps: I have downloaded the stock rom from Lolinet, channel/retbr and flashed all. I'm desperated, i've buyed this device yesterday!!!

Update 1: I managed to recover my device. My lucky was that my wife has the same smartphone model, so i connected her device on pc, opened Lenovo Moto Smart Assistant and made the app to recognize her phone, downloading the firmware for this model. After that i disconnected the phone and connected my phone, flashing it after downloading the firmware. Buuuut, always the but, i tried root again, this time using boot.img from the image downloaded by LMSA, patched with Magisk and flashed with adb, and nothing, Magisk still acuses it's non rooted. Now, i will wait until the community releases a custom recovery to try rooting my phone. At least i expect i can help who is in the same way i was.

Ps 2: Sorry for the bad english LMAO.
[Moto G7 Guides, News, & Discussion] quelqun700:
Hello to all and to all!!!

I come here to ask for help with my Motorola motorcycle G7 play (xt1952-1) running under the rom reteu2 on CHANNEL_PPY29.68-28_cid50

I tried to rotate the phone with the help of magisk who doesn't seem too determined with my smartphone. (I took the boot.img put in the phone, then recompiled it with magisk and flashed the parched_boot.img from the computer. {My smartphone has the bootloader unlocked }), so I did this maneuver several times. But each time magisk restarts, it tells me that it is not rooted and when I run the "su" command from the Android terminal it appears a "not found". I would like to know if someone who has the same device as me would have managed to rotate it and if it would be possible to share this famous file "patched_boot.img".
[Moto G7 Guides, News, & Discussion] clcombs262:
Have you tried flashing the zip in TWRP?
[Moto G7 Guides, News, & Discussion] quelqun700:
Yes via the "fastboot boot twrp_river.3.3.3.0.img" command

But the smartphone tries to boot on it for 10 seconds (in black screen) then starts again in normal start so it is impossible for me to boot on the twrp
[Moto G7 Guides, News, & Discussion] LoboOMaioral:
Hey man, this tutorial is for Moto G7 standard (XT1962), your is the G7 Play (XT1952), it's a different phone, they won't work here. G7 model is river, G7 Play model is channel. I know because i have the same model of yours and almost bricked it doing this. We have to wait for our version of TWRP. I recommend you to reinstall your OS using Lenovo Moto Smart Assistant to avoid problems.
[Moto G7 Guides, News, & Discussion] maybeme2:
Sorry. Error.
[Moto G7 Guides, News, & Discussion] skuppej:
I just want to make a mention that there really is no point in downloading firmware, patching the bootloader, etc.

Just update to the latest OTA and then flash magisk.zip in TWRP people!

Save yourself the grief.
[Moto G7 Guides, News, & Discussion] shl1980:
Phone stuck, please help

I tried to follow the instructions on my moto g7 power.

now it is stuck, there is written "bad key" in the corner. does not boot.

the software channel was RETEU.

many thanks.
[Moto G7 Guides, News, & Discussion] maybeme2:
I'm no expert but I believe this thread is for the Moto G7, not the moto g7 power! They're different phones.
[Moto G7 Guides, News, & Discussion] shl1980:
Phone stuck, please help

problem solved using instructions from here https://xdaforums.com/g7-power/how-to/guide-moto-g7-power-supra-flash-to-t3927138
[Moto G7 Guides, News, & Discussion] clcombs262:
Wow, you're smart

It explicitly states in the original message that this is for moto g7 ONLY! And you used it on a g7 power

Your only hope is to grab the firmware from LMSA or lolinet and reflash from fastboot. If you can't get to fastboot you're probably screwed as there's no blank flash file currently available
[Moto G7 Guides, News, & Discussion] clcombs262:
Ok that was kinda mean

Sorry guys for the outburst
[Moto G7 Guides, News, & Discussion] skuppej:
Good on you for apologizing. Best of shl1980..definitely try LMSA as suggested..

Honestly, I would have thought you can unlock/TWRP/magisk zip flash on the power as well........
[Moto G7 Guides, News, & Discussion] clcombs262:
You probably can on the unlocked variant

I think there's an XDA thread for it, you might search around a little

Just remember that if it doesn't say "works on another device besides the specific one mentioned" it probably doesn't or you'll end up bricked :)
[Moto G7 Guides, News, & Discussion] Dry Hollow:
I have a stupid question, can you extract the firmware from the phone itself before you start?
[Moto G7 Guides, News, & Discussion] skuppej:
Don't do it. Just flash the magisk.zip in TWRP.
[Moto G7 Guides, News, & Discussion] AZGeek:
Your post is taken as intended, which is a great suggestion. If users are new to the mod process then TWRP is the simplest method.

There are also good reasons for going through the grief. For me I learn nothing other than what is easy if I do not understand the process. If I do only what is easy then I do not appreciate the amount of effort another user made to make it that way. When a recognized contributor makes a suggestion, I want to trust that person's suggestion as being valuable. And since I am a social creature I do appreciate recognition when something I contribute is helpful to others.

I am not trying to call anyone out, rather encourage users to contribute in hopes that we all make our devices the best experience possible.

---------- Post added at 11:29 PM ---------- Previous post was at 11:08 PM ----------

I finally found the ROM on the download site in folder river/FI

Never occurred to me that the folder would be simply named FI.

I did not help that I incorrectly referred to my software channel, it is actually Project Fi. Which is the original name, which likely will be renamed to Google Fi for future devices.

Anyway tonight I was rereading entire thread in order to proceed with root. I was holding out hoping that there may be other users on the Project Fi channel who would participate. But alas Google's record of customer service may be the nail in their network coffin.

After reading the post exchanges between [MENTION=9837029]sd86[/MENTION] and [MENTION=4137469]Omegapsy[/MENTION] on page 6 regarding post root updates and the RETAIL ROM, I began to wonder if the same would be true if I flashed RETAIL. My concern is the modem might be different than the FI version and I would loose features specific to the G7 made for Google Fi. These are; automatic network switching between TMobile/Sprint/US Cellular/WiFi, and the Google VPN.

If I go RETAIL - Is it just the boot.img from RETAIL that I patch and flash or would I need to flash the entire ROM, in order to get OTA after root?

I'm not done reading the remainder of the thread. If there are any Fi users or rooted users of non-RETAIL that have OTA please speak up.
[Moto G7 Guides, News, & Discussion] cou94114:
I am a Fi user with the g7. I have been using the retail firmware images. I'm currently on version PPO29.114-134. My phone is rooted with Magisk and I have TWRP installed. I don't take OTA updates.

I have issues with auto-switching between T-Mobile and Sprint but if I delete cache and data on the Carrier services app, everything works okay. Google VPN launches on reboots and runs correctly when using wi-fi. I haven't seen Fi firmware updates except for the one image on the lolinet site. The Retail image works okay. I flash all the files from the image zip, not just boot.
[Moto G7 Guides, News, & Discussion] army11c:
Hey my advice for this Best Buy G7- successful root

(my device) PPOS29.114-16-5-2 Build # Retail US (I think I did one OWA update) so instead of using the RETUS folder I went up one directory and in the

Retail folder : (matched it exactly)

RIVER_RETAIL_9.0_PPOS29.114-16-5-2_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml

2019-05-29 01:082.1

(16-5-2 matched my ver exact) so, I downloaded it the 2 gb OS and saved it to us if I ever need it.

The then followed this guide, worked like a charm

-- how-root-google-pixel-2 --- Google it, I'm a new user so can't link the guide...

Followed from "step1 Extract the factory image downloaded earlier" of above (guide I told you to Google)

So I would assume that really, retail people needs to just choose their correct version to the T.

Hope this helps someone...

Yes verify root works fine, remember to have manager installed, also tested root on 5 or so APKs

Basically you are just grabbing the boot.img from that zip file OS you downloaded, uploading it to your phone, and patching it with Magisk , then putting it back on your PC in your adb folder. And follow that guide...

FYI, the patch size is almost half the original size , you will see , I was scared at first, but it worked...

Good luck
[Moto G7 Guides, News, & Discussion] HACK3DANDR0ID:
DELETE
[Moto G7 Guides, News, & Discussion] elliot2112:
Delete
[Moto G7 Guides, News, & Discussion] No_sense_at_all:
Doesn't work

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash boot magisk_patched.img

target reported max download size of 536870912 bytes

sending 'boot_a' (19628 KB)...

OKAY [ 0.437s]

writing 'boot_a'...

(bootloader) Image boot failed validation

(bootloader) Preflash validation failed

FAILED (remote failure)

finished. total time: 0.447s

C:\Program Files (x86)\Minimal ADB and Fastboot>

Failfail. Phone not rooted. What's wrong?
[Moto G7 Guides, News, & Discussion] HueyT:
New to G7, but owned numerous android phones (Nexus 6, Pixel XL, Pixel 2 XL, Essential PH-1, Moto G6, LG G6, LG US998 V30, etc). Can't I just flash Magisk 20.1 zip in TWRP to root?
[Moto G7 Guides, News, & Discussion] HueyT:
Yes, I can :laugh::good:
[Moto G7 Guides, News, & Discussion] skuppej:
You can. It's way easier. I don't know why people follow this guide at all!
[Moto G7 Guides, News, & Discussion] HueyT:
Probably due to the fact that 3/2019, stable TWRP did not exist?
[Moto G7 Guides, News, & Discussion] chikiko:
How do you patch boot.img? The initial post only said to patch boot.img with magisk but it didn't explain how to do so. can someone explain how to do this?
[Moto G7 Guides, News, & Discussion] mingkee:
Unzip the ROM and copy boot.img to /sdcard/Download folder

Open Magisk Manager and patch the boot.img, and copy to host computer and flash in fastboot
[Moto G7 Guides, News, & Discussion] CCaseXX:
Is this possible for the Verizon model from AMZ?:confused:
[Moto G7 Guides, News, & Discussion] mingkee:
Requirement: bootloader must be unlocked
[Moto G7 Guides, News, & Discussion] CCaseXX:
When trying to unlock the bootloader I'm getting a PUID error. I guess I'm asking if anyone else has had success rooting the G7 play (on Verizon)?
[Moto G7 Guides, News, & Discussion] B__B:
You have to turn on oem unlock in developer settings and get an unlock code from motorola