yashsingh1/xdaforums huggingface dataset:
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] sd_shadow:
You can try the update option in LMSA

Rescue and Smart Assistant (LMSA)(Motorola/Lenovo Only)

Rescue and Smart Assistant LMSA: Lenovo's Motorola Smart Assistant (PC) For Lenovo and Motorola Devices Only Rescue and Smart Assistant (LMSA) is an official tool installs on PC. Can help to manage smart device (include all Lenovo android phone...

xdaforums.com

You will need to pull the boot.img from LMSA update folder and patch it with Magisk, but you will not lose data.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] maybeme2:
Thank you sd shadow. I will read up on it. Thanks for the link.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] dallas6672:
What are the steps required to be able to restore a TWRP backup? Also, which partitions are required?

I've tried backing up Boot, Data and System and restoring them when I have no lock configured (Just swipe to unlock) before and after the backup and restore. This always sends me to a bootloop into recovery. To fix the bootloop, I have to reflash the ROM and then do a factory restore from the new Recovery that is flashed by the ROM. Wiping from TWRP before flashing the ROM still causes a bootloop.

If I create a PIN lock and then do a backup and restore from TWRP I no longer get a bootloop, but instead get stuck at a "Android is starting" screen. Is this normal? I've tried waiting at least 15-20 minutes, but it never gets past it. Or is this the correct way and I just need to wait even longer?

LOS 18.1 and twrp-3.5.2_10-0-river
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] matti157:
are the instructions here the final and valid ones? https://twrp.me/motorola/motorolamotog7.html
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] fgshfcds:
Any chance that there will be a new version of twrp for the G7?

I'd love to recover my data, but `twrp decrypt ...` fails with `Failed to decrypt data.`. I don't know which android version is on that device, but it's very possible that it's android 12 or later. Support for that was added in twrp 3.7
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] wilderson:
another vote for updated TWRP
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] wilderson:
It seem that there are official builds from TWRP aren't they working for you?
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] Candiety:
what is the latest version of android that twrp 3.7 works with?

I'm on E/OS with android 13, and also have TWRP backups. As such, I'd very much love a new working TWRP.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] clcombs262:
No. That's a separate device, different requirements. This may be a good start on that device but it won't work on it
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] peajul:
Issues when doing TWRP backup on Moto G7--any experiences / ideas?

All,

I installed the TWRP per the OP's instructions, and I got the following error when attempting a TWRP backup to my external SD card: "TWRP createTarFork() error 255 when backing up data". In doing some research, it seems this can be related to a corrupt file, but I'm unclear on how to resolve. Has anyone seen this yet on the Moto G7 and, if so, any ideas on how to resolve? Much appreciated.

---------- Post added at 08:48 AM ---------- Previous post was at 08:14 AM ----------

Answering my own question--seems that backing up to internal storage works whereas it doesn't work properly to external SD.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] elicoth:
I had the same problem [createTarFork()] when backing to external memory. However what I did was to try again and this second time the backup process finished with no errors (again to external memory). [Note: the second time I didn't try to backup 'data']

It looks like an intermittent failure.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] Nighthawk31:
Bricked maybe

I think ive bricked my device creating a backup, i was trying to create a backup and flash to slot B, maybe i was in slot B when i created the backup, im not sure. all i know is that my device only reads as follows on my laptop

Qualcomm HS-USB QDLoader 9008 (COM12), i need help. someone, the screen is black, and wont boot at all. Happened while making a backup
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] Lupask:
I'm hoping it comes to the 7+ too :)
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] Oshmar:
I still do not see any reason to unlock the bootloader and install twrp on this device, when and if developers start working on roms, kernels and mods for it, it will make more sense, so the enthusiast user is raining in the wet now. I hope that many roms will emerge in the future.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] zik27:
im gettin a black screen
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] elicoth:
Can TWRP 'install' be used to flash a ROM Update? It would be more convenient than issuing a lot of fatsboot flash commands.

If so, would it be flashed to the current slot or the alternate slot?
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] Alberto97:
TWRP 3.3.1 is out!

TWRP 3.3.1 is out and it is available in the AFH folder in the OP.

I want to apologize to everyone that bricked their device by switching slots. I'm so sorry about that, I did not know the inactive bootloader slot came empty from the factory when I posted this :( I hope moto will install it on both of them at some point.

There is a brief explaination about how this could happen in the OP and how to prevent it. Unluckily I'm not aware about any procedure to fix that without a blankflash. It seems that sending the device to a Motorola Service Center is the only option right now.

Once I have more time I'll try to figure out what's going wrong with backups on the SD.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] maybeme2:
Deleted. Sorry.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] blitz535:
When shall we have a stable twrp?
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] maybeme2:
First, thank you for your efforts to bring twrp to the Moto G7. You guys are just wonderful. Thank you!

For us, non techie users, what is the current status of the development? What works now and what still needs work?

Assuming the bootloader is unlocked,

—can this twrp recovery now be installed using fastboot on a Moto G7 without running into bootloops or major problems?

—once this twrp is installed can it flash Magisk safely? (I ask because the latest Magisk (19.3) does not modify the Moto G7 boot.img correctly resulting in bootloops).

—does flashing twrp recovery create a rooted phone or do you still need to install Magisk?

Thank you.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] millede74:
Do i swap partitions or not

just wondering if i need to swap partition or leave it alone? or do i do the backup?

seems simple if just leave it alone
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] Dudu0101:
working treble?
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] Alberto97:
Only backup to the external sd seems broken

Not sure what you mean with "installing using fastboot". You can't flash TWRP directly with fastboot, you have to boot it first and then install the ramdisk to the current boot image as explained in the OP.

I never got a bootloop. Again I'm not sure what you mean with major problems. If you are talking about bricking the device, just make sure the bootloader is installed on both the slots and you're fine. Procedure in the OP.

Of course I did it countless times during the development of TWRP. Just make sure to flash Magisk's zip AFTER installing twrp.

You still need to install Magisk
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] GamingHero:
Waiting For The Reign Of Custom Roms Turn To Moto G7 (River)
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] maybeme2:
Me too.

Has anybody tried lineageos on the Moto G7?

---------- Post added at 12:28 AM ---------- Previous post was at 12:03 AM ----------

Will it make a nandroid backup to anywhere else?
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] GamingHero:
Moto G7 is very new, apparently many will wait for the Warranty to finish or the official updates stop
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] maybeme2:
Need some help.

I followed your instructions to install TWRP first as a ram disk and then permanently. All went well!!! After installing twrp I rebooted the system to make sure it worked, and it did.

Thank you!

I get a notification to update the twrp app from google play. Should I do so or will that mess up the modifications you made for twrp to work on the Moto G7?

I did not backup/restore the slots. I did download the "copy-partitions-AB zip. Do I now just flash it in twrp? Will it know to copy the correct working slot to the other and not vice versa?

Twrp backup to phone fails if data is included.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] GamingHero:
since it is an unofficial version and does not yet have an Official TWRP Recovery better not install the application, I already did this on a device and in the end gave bootloop
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] maybeme2:
That's what I thought. Thanks for the headsup.

Have you made a successful backup with this twrp? When I try it runs till it gets to data at which point it fails saying something about there being no files in data.

Also, asking for a pattern password before starting is a new 'feature' for me. It shows me a pattern but won't let me enter anything. So I just skip it. Still I'm grateful for this twrp which allowed me to boot the phone easily.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] Bluemgt06:
The pattern thing is for it decrypting your data, if you don't do that it cannot backup the data. It's typically the same as your lock screen code/pattern.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] maybeme2:
That is what I thought, but for some reason no pattern I enter shows up on the screen or has any reaction. The screen works because if I click on the 3x3 or 4x4 the pattern changes but there is no effect when I try to enter any pattern.

Same thing if I click on Mount / decrypt and try to enter the pattern there. Not sure what else to do.

Is it safe to flash the twrp zip file again?

EDIT SOLVED

My unlock pattern begins at the middle dot of the right line. Starting from there (as I must) the screen is unresponsive. But, if I start a pattern from the bottom right the pattern lines are visible and twrp tells me to try again. This time I can enter the correct pattern and it is accepted. I finally have a nandroid backup!

Thank you Alberto 97 !
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] maybeme2:
Did you ever find out?

After unlocking the bootloader it is no longer possible to get ota system updates on the Moto G7. Can the updated roms be downloaded and flashed in twrp?
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] GamingHero:
no, I'm still with the unlocked bootloader I'll be waiting for the Warranty to finish

I will also wait for the Custom ROMs that are stable

---------- Post added at 09:31 PM ---------- Previous post was at 09:30 PM ----------

Download Firmware and

update via fastboot
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] maybeme2:
The entire Firmware or just the ota?

Won't that remove all my settings and installed apps?
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] GamingHero:
nope
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] elicoth:
No. I couldn't get any answer about this so , to avoid risks, I flashed the updated ROM (entire firmware) using fastboot commands (I made a .bat file including all the fastboot commands)

The ROM was ugpgraded without problems, no settings or installed apps were lost.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] maybeme2:
Thank you for answering.

I'm not an expert at this, would you be so kind as to tell me (or point me) to the correct fastboot commands to do this?

I'm particularly worried because the G7 has 2 slots which can be confusing.

Thanks again.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] elicoth:
To manually upgrade ROM see HERE.

Don't worry about the slots. Theoretically fastboot commands write to the active slot, so after flashing you will reboot to your -same- upgraded active slot.

In practice however my active slot was 'B' and after flashing I found out that the active slot had been changed to 'A', my new ROM had been flashed to 'A' but it has been working perfectly since then.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] maybeme2:
But it says you lose root. So did you need to reflash Magisk in twrp?
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] elicoth:
Yes, after all the fastboot commands you will have to re-install TWRP and then re-flash Magisk with TWRP. It takes just a few more minutes.

The reason is that TWRP and Magisk are in the boot partition. When the fastboot flash bootloader ... command is sent, both are overwritten.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] clcombs262:
No Moto uses sparsechunk format and images have Moto headers, TWRP can't work with them

Can only be flashed with Moto fastboot/drivers
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] fix-this!:
your gonna be waiting a long time bro. there probably won't be any development for the G7.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] clcombs262:
G6 now has two custom ROMs so maybe....
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] skarloey28:
I bricked my phone installing TWRP. I have been rooting phones for 8 years and never bricked a phone before. I can not get the phone to boot into bootloader or anything, just a black screen. If I plug into a computer I get the USB malfunction error.

I rooted with Magisk, temp booted into TWRP, pushed the img file to /data/, installed from ramdisk. I got a couple errors which I didn't write down of course, I restarted the phone and it just has a black screen.

I read the warning message and thought I was fine as long as I didn't change slots. I am a little baffled because I never selected to change.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] clcombs262:
Well atm we have no blankflash

If you can get to 9008 mode I think I have a debrick.img that can get you running from an SD card
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] Twinklepie:
me too

Any ideas? - I'm on a European power model
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] clcombs262:
Probably something to do with the fact that this isn't for the power model
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] Nicolbol:
Brand new G7, just unlocked, fastbooted, installed exactly as told in first post, and it failed.

Rebooted into recovery to check : phone shut down, and is now unresponsive to any action. Won't even boot from the power button or be detected on the USB bus.

What could I do ?

Edit : well, looks like I have the same issue that [MENTION=4532415]skarloey28[/MENTION] and [MENTION=10032151]Twinklepie[/MENTION] encountered. May I suggest OP to edit the first post as to warn the procedure bricks devices ?
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] clcombs262:
Do you actually have the Moto g7? Not power or play? That's been everyone else's problem
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] Nicolbol:
The model name is "XT1962-5 moto g7", as written on the packaging. The system information said "river" as device codename.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] clcombs262:
I was just checking. Many other people who had problem didn't have this exact model

BTW, you didn't switch slots at any point did you? Because I'm able to flash and use TWRP no problem
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] Nicolbol:
I didn't switch slots. Didn't even flash a ROM on it, I just attempted the recovery installation.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] clcombs262:
If you did nothing else it should still be able to get to bootloader. TWRP doesn't touch that when flashing recovery ramdisk only boot img. I'm not calling you stupid or anything, but remember it's usually a user error not a device error; especially as 3/thousands of users have the issues ?

For now I'll see if I can get you a blankflash or debrick img
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] messymatthew:
idk if anyone needs the info but I had soft bricked my g7 1962-1 it would bootloop to bootloader and say that there was no bootable A/B slot I got it fixed if anyone else needs the info or has a similar problem just ask and ill tell you how I did it
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] Darlenix:
Wait, why wouldn't there be custom ROM development for this model?
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] Cronoss:
I haven't bricked my device but if you can tell us what you did for future reference that would be awesome.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] Darlenix:
What's the difference between an unofficial and an official version?
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] rybshik:
Backup/restore data partition when temporarily booting TWRP

When temporarily booting TWRP with

fastboot boot twrp-version-build-river.img

will I be able to back up and restore data partition?

Will I be able to completely erase/delete data partition and then restore it from backup?

All that without braking OTA updates, Google Pay, etc.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] SyberHexen:
Any specific reason?

I've just picked up this device on Wednesday and been building twrp trying to figure out why the bootable is not decrypting for the last few days.

From my assumption it's because we don't yet have the official kernel source which there may be missing upstream patches regarding qseecom or the device specific DTS/drivers may not be complete on oceans kernel release.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] foxbeard:
I ran into the same problem as [MENTION=4532415]skarloey28[/MENTION], [MENTION=10032151]Twinklepie[/MENTION], and [MENTION=9506190]clcombs262[/MENTION].

Mine is definitely a g7, not power/play/plus.

I was trying for a permanent installation and checked the backup box. It made 2 backups of boot, so is it possible that the backup switches to slot b and doesn't switch back?

I'm going to try to send mine in for warranty repair or replacement. I've heard anecdotally that Motorola will honor the warranty even after unlocking the bootloader. Does anyone know if there's any truth to that?
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] Alberto97:
Something does not get properly initialized at bootloader level. I can't say more, I don't really know the closed source internals nor how to get logs from them. Anyway it's not a kernel problem since you can build, flash and use ocean kernel and decryption works just fine.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] HACK3DANDR0ID:
Just an FYI : Sandisk type c Flash Drive works great on your TWRP build!
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] HACK3DANDR0ID:
When trying to install permanently, my data is Encrypted and i am unable to complete " Tap Advanced -> Install Recovery Ramdisk -> Navigate to /data or /external_sd and select TWRP -> Swipe to Install"

Anyone have any suggestions?
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] HACK3DANDR0ID:
Not exactly sure what the deal is but if I root with Magisk (tried both v19.3 and Cannary) and I keep getting a message DTBO patched and its requesting a REBOOT, and even after I reboot, I'm still getting this message.

So i tried ROOTing via the Patch_Boot.img method and i am yet to get the message.

Any idears?
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] SyberHexen:
This is something with the kernel validation on dtbo partition. Magisk was successfully installed on my stock boot but any updated Kernels magisk causes kernel problems
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] HACK3DANDR0ID:
Are backups working on Permanent TWRP? I have a LOS build to test and want to backup before i start the process
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] maybeme2:
Thank you for all your work developing this twrp.

You once wrote that the only thing still broken was 'backup to external sd'. But I wanted to report that on my rooted Moto G7, backup with permanent twrp seems to have worked to all of

—the main phone sd

—the added-on second slot sd

—an external flashdrive connected via usb

I have not tried to restore these backups but they all seem fine. So thank you Alberto97. Your twrp is better than you thought.

What is keeping it from becoming the 'official' twrp for the Moto G7?

BTW, do the twrp backups also backup the efs imei partition or is that a separate backup?

Than you again for your excellent work. Can I donate my appreciation? How?

---------- Post added at 07:22 PM ---------- Previous post was at 07:17 PM ----------

See my message below yours. Caveat is that I haven't restored any of the backups. Scared to...

I too am waiting for Los.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] HACK3DANDR0ID:
I just booted LOS. gapps were force closing so i went back to stock.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] maybeme2:
At least you got back. Did you restore from a twrp backup?

If memory serves me right, I think los needs MicroG as a replacement for Google Play Services for Gapps to work.

Is someone working on making Los for the Moto G7?
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] HACK3DANDR0ID:
No i didnt restored, just reflashed the stock build.

Yea, someone is working on the build and someone else is building a new kernel
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] maybeme2:
Good to know. The G7 seems to have little development.

Is there a thread I can follow?

Where did you get the stock build from? Lolinet mirrors? Are they legit? I'm new to Moto phones.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] HACK3DANDR0ID:
Yea just make sure you pick your Retail Channel
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] xdaGerry:
Hel with OTA Updates Failed

I have (had) my Moto g7 rooted with Magisk. TWRP was installed.

When a OTA update was available I used Magisk Manager → Uninstall → Restore Images

The result was this message "Moto g 7 OTA Update Unsuccessful

Sorry, there was a problem updating your moto g7. No changes were made."

I have now loss both root and TWRP.

I can re-flash TWRP and the stock rom, however I would like to get an understanding of what

caused this to happen and more importantly how to handle OTA updates in the future.

Once I flash TWRP and I flash the stock rom to Slot A,

How do I prep Slot B for OTA updates, before I root the g7 again?

I have installed the copy ab partition.zip to install the bootloader on the Slot B partition.

Should TWRP be flashed to Slot B as well as Slot A?

Will flashing TWRP prevent OTA update, because the partition is modified?

If I flash the stock rom to Slot A, can I then just do a backup of Slot A and then do a restore to Slot B?

I know that Slot B has be the stock rom for OTA updates to work.

I would appreciate any help on how OTA update should be handled in the future.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] HACK3DANDR0ID:
check out the Telegram Group in my signature

---------- Post added at 12:00 PM ---------- Previous post was at 11:56 AM ----------

I flash the stock firmware manually via a script : https://xdaforums.com/moto-g7/how-to/manually-update-g7-using-fastboot-t3917381

---------- Post added at 12:01 PM ---------- Previous post was at 12:00 PM ----------

I did end up getting OpenGapps to work properly

and check out the signature below
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] xdaGerry:
The purpose of the A/B Slot is to handle OTA updates seamlessly. Manually flashing is not seamless solution.

I can re-flash TWRP and then do a restore from my backup, and then do a manual flash, but that is not a seamless

solution for future OTA Updates.

The key is to figure out how to have the Slot B handle OTA Updates correctly.