TWRP for Moto G7 (river)

Search This thread

Alberto97

Recognized Developer
Feb 6, 2012
976
7,829
25
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.

Warning:
  • Do NOT switch slots unless you have installed copy-partitions-AB.zip 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 copy-partitions-AB.zip at least once.

Note:
  • Decryption only works when TWRP is permanently installed.

Installation
To temporarily boot this recovery:
Code:
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:
    Code:
    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.

Download
AndroidFileHost

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

Contributors
Alberto97
Source Code: https://github.com/TeamWin


Version Information
Status: Beta

Created 2019-04-14
Last Updated 2019-07-02
 

sd86

Member
Apr 3, 2019
28
23
31
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.
 
Last edited:

clcombs262

Senior Member
Oct 16, 2018
256
150
Monticello
Hello

Very happy to see we now have TWRP. In the interest of avoiding bootloops though, I'll wait to install until it's more stable

BTW, I don't know if you guys get this, but on a us retail Moto g7 (unlocked bl obv) every time I try to boot an unofficial image I get
Code:
Command failed: remote error ' '

Any idea on what is happening?
 

clcombs262

Senior Member
Oct 16, 2018
256
150
Monticello
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.
Does flashing work?

Sent from my moto g(7) using XDA Labs
 

lowwater

New member
Nov 9, 2011
3
1
Waterville
Google Pixel 6
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.

Decryption only works when TWRP is permanently installed.

Installation
To temporarily boot this recovery:
Code:
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:
    Code:
    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.

Download
AndroidFileHost

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

Contributors
Alberto97
Source Code: [url]https://github.com/TeamWin[/URL]


Version Information
Status: Beta

Created 2019-04-14
Last Updated 2019-04-14

I followed steps to unlock bootloader, then flashed stock AMZ river. Did a Google restore. Followed steps to install TWRP no issues. Follow steps exactly. Booted into system, no issues. Have not done a backup yet to test. Overall it went perfectly.
Thanks so Much!

Was able to install Magisk through manager. Again all went well and rooted. Successful backup ALSO made through TWRP.
 
Last edited:
  • Like
Reactions: JDBarlow

Alberto97

Recognized Developer
Feb 6, 2012
976
7,829
25
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').
 
  • Like
Reactions: ReaperXL2 and sd86

warBeard_actual

Senior Member
Mar 27, 2016
363
1,131
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.

This can be done with ADB interface as well....

Code:
adb disable-verity
 
  • Like
Reactions: sd86

sd86

Member
Apr 3, 2019
28
23
31
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?


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').
Internal and thank you very much for the information.

Sent from my moto g(7) using Tapatalk
 

Alberto97

Recognized Developer
Feb 6, 2012
976
7,829
25
Do I just flash the standard Magisk zip after installing TWRP? The install process seems to have broken Magisk within Android and it is no longer detected.
Yes, install Magisk after TWRP and yes, Magisk might no longer work after installing TWRP. This happens because of some patching Magisk does to the kernel that gets reverted when you tap on "Fix recovery bootloop".
 

flintman

Inactive Recognized Developer
Feb 25, 2011
1,292
4,343
MASS
I haven't had any time to play with my G7 but is there recovery Treble enabled? I'm assuming yes. Has anyone try any of the GSI's for PIe out there? or even the Q beta GSI?
 

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.

    Warning:
    • Do NOT switch slots unless you have installed copy-partitions-AB.zip 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 copy-partitions-AB.zip at least once.

    Note:
    • Decryption only works when TWRP is permanently installed.

    Installation
    To temporarily boot this recovery:
    Code:
    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:
      Code:
      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.

    Download
    AndroidFileHost

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

    Contributors
    Alberto97
    Source Code: https://github.com/TeamWin


    Version Information
    Status: Beta

    Created 2019-04-14
    Last Updated 2019-07-02
    10
    I went insane to figure out decryption was not possible by just fastboot booting the image. I hope the hard work paid off :)
    4
    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.
    2
    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
    2
    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').