TWRP for Moto G7 (river)

Search This thread


Senior Member
Aug 13, 2011
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
Last edited:
  • Like
Reactions: jt74808

Top Liked Posts

  • There are no posts matching your filters.
  • 23
    Team Win Recovery Project 3.x, or twrp3 for short, is a custom recovery built with ease of use and customization in mind. Its a fully touch driven user interface no more volume rocker or power buttons to mash. The GUI is also fully XML driven and completely theme-able. You can change just about every aspect of the look and feel.

    Unlocked bootloader is required.

    This device has 2 "slots" for ROMs / firmware. TWRP will detect whichever slot is currently active and use that slot for backup AND restore.
    There are buttons on the reboot page and under backup -> options to change slots. Changing the active slot will cause TWRP to switch which slot that TWRP is backing up or restoring.
    You can make a backup of slot A, switch to B, then restore the backup which will restore the backup of A to slot B.
    Changing the slot in TWRP also tells the bootloader to boot that slot.

    • Do NOT switch slots unless you have installed or manually flashed the bootloader on both the slots:
      This device comes out of the box with the bootloader installed only on the active slot (eg: bootloader_a).
      Once you manually switch slots, your device will use the other bootloader partition (eg: bootloader_b) which is empty because of this factory setup therefore the device won't be able to boot in any way.
      For this reason you should install the bootloader on your own on both the slots with fastboot or copy the currently installed one to the inactive slot by flashing at least once.

    • Decryption only works when TWRP is permanently installed.

    To temporarily boot this recovery:
    fastboot boot twrp-[B]version[/B]-[B]build[/B]-river.img

    To permanently install it:
    • Temporarily boot TWRP
    • Put the TWRP image in your external SD Card or, in case you don't have one, push it to /data with adb this way:
      adb push twrp-[B]version[/B]-[B]build[/B]-river.img /data/
    • Tap Advanced -> Install Recovery Ramdisk -> Navigate to /data or /external_sd and select TWRP -> Swipe to Install
    • If you previously installed Magisk: Select Fix Recovery Bootloop from Advanced to fix/avoid recovery bootloops
    • Done! Optionally you can delete TWRP from /data or from your external SD Card now.


    XDA:DevDB Information
    TWRP for Moto G7, Tool/Utility for the Moto G7

    Source Code:

    Version Information
    Status: Beta

    Created 2019-04-14
    Last Updated 2019-07-02
    I went insane to figure out decryption was not possible by just fastboot booting the image. I hope the hard work paid off :)
    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.
    this is a blessing, i was working on twrp as well but hdd fail and it was music to my ears when it was mentioned this post went up in the tele group. so thanks bro
    So here's my experience so far.
    Backup, works just fine, afaik.
    Restore, System,etc results in bootloop. Data restore, gets "extractTarFork() process ended with ERROR: 255"

    Not sure if this is already known but figured id share what ive experienced. also feel free to tell me if im doing stuff wrong, it's been a while since i messed with android more than just using it.

    Edit: This is with it perm installed.
    Did you restore "system" or "system image"? In the first case It's normal you get a bootloop, you changed the content of the system partition and that triggers verity. You can use "system image" that makes a bit per bit copy of the partition to avoid problems. Obviously that does not work if you manually changed even just a file.
    TLDR: Just disable verity, you should be able to do that easily with Magisk.
    About the extractTarFork() error instead it's something that I've seen on every device I used TWRP. I never figured out what means, I guess data was not backed up properly but I would not worry about that, it rarely happens. Just to know, did you backup on an external sd or internal storage?

    Is this for all moto g7 versions
    It is for all G7 variants. G7 Play/Power/Plus are different devices and require different builds.
    I hope that answered your questione somehow (I'm not sure what you meant with 'versions').