[RECOVERY] Official TWRP 3.3.1 for Moto G7 Plus [lake]

Jleeblanch

Senior Member
Feb 6, 2012
1,993
5,690
153
Colchester, VT
Magisk supports OTA. I'd like to have that possibility (although I didn't have an update by now, so it is untested for me for A/B-device), therefore I usually only boot twrp via fastboot. Is it possible to install TWRP after Magisk and keep that workflow? If I understand correctly, Magisk restores its backup of the boot partition. But this would only be possible on the slot where Magisk is installed, right? Would it be possible to install TWRP only on slots where Magisk is installed and has a valid backup of the original boot partition?
Nothing is impossible, but I've yet to see someone on any Moto device successfully OTA update with only Magisk installed. Yes, Magisk does support OTA updates, but it's been attempted on this device and the update usually fails near the end if it even makes it that far at all.

I think one thing a lot of users don't realize, you can actually update to a newer firmware by dirty flashing it. Data doesn't need to be wiped unless you encounter issues after the update.

The best solution, which is usually what we do, is create TWRP flashable firmwares so that users can simply update using twrp. Being an A/B device, the process of creating those zips is quite different and I've tried to make them but have yet to be successful, although I haven't spent much time on it.
 
  • Like
Reactions: tag68

tag68

Senior Member
Nov 25, 2014
984
351
0
Before a/b devices the way to go was uninstall Magisk (in case of problems restore backup of boot partition) and then update OTA. This worked fine for Moto G2 and Moto X Play. On Moto Z Play I had some problems, but they changed something at boot stage which needed to install a modified boot partition and I'm not sure what was wrong, maybe some app that shouldn't have done it mounted system RW against my approach. Nowadays therefore usually no app gets root rights by Magisk on my device.

This is why I don't flash twrp since a long time. Wouldn't like to have recovery modified. It would be convenient to always have access to twrp. That's why I asked if it would be feasible to add a checkbox "only install twrp if Magisk is installed and has an unmodified backup of the boot partition", because I wouldn't like to install it on a and b if only one of them is modified by Magisk with a valid backup of boot. But I could backup it myself, twrp is only installed in boot nowadays (since a/b), right?

From what I read you never tried yourself to install an OTA. It is easy to accidentally press "mount system RW"-button in Total Commander. Or install some app like AdAway and accidentally miss to activate systemless hosts in time in Magisk. So I believe your statement that there could be some problems on current Moto devices, but would like to test it myself after an update is available. You didn't tell what the recovery log said which partition failed the check when it has been attempted, or if another message occurred.

I'm aware that dirty flashing is always possible. I'd prefer OTA. One never knows if that firmware really is ok and not modified against what Motorola did.
 

Jleeblanch

Senior Member
Feb 6, 2012
1,993
5,690
153
Colchester, VT
Before a/b devices the way to go was uninstall Magisk (in case of problems restore backup of boot partition) and then update OTA. This worked fine for Moto G2 and Moto X Play. On Moto Z Play I had some problems, but they changed something at boot stage which needed to install a modified boot partition and I'm not sure what was wrong, maybe some app that shouldn't have done it mounted system RW against my approach. Nowadays therefore usually no app gets root rights by Magisk on my device.



This is why I don't flash twrp since a long time. Wouldn't like to have recovery modified. It would be convenient to always have access to twrp. That's why I asked if it would be feasible to add a checkbox "only install twrp if Magisk is installed and has an unmodified backup of the boot partition", because I wouldn't like to install it on a and b if only one of them is modified by Magisk with a valid backup of boot. But I could backup it myself, twrp is only installed in boot nowadays (since a/b), right?



From what I read you never tried yourself to install an OTA. It is easy to accidentally press "mount system RW"-button in Total Commander. Or install some app like AdAway and accidentally miss to activate systemless hosts in time in Magisk. So I believe your statement that there could be some problems on current Moto devices, but would like to test it myself after an update is available. You didn't tell what the recovery log said which partition failed the check when it has been attempted, or if another message occurred.



I'm aware that dirty flashing is always possible. I'd prefer OTA. One never knows if that firmware really is ok and not modified against what Motorola did.
On A/B devices, the recovery ramdisk (twrp) is actually inside the boot.img itself, and can be easily overwritten by flashing the stock boot.img or restoring a boot partition backup in TWRP.

On this device, I haven't attempted an OTA update while having Magisk and/or TWRP installed, but users in our Telegram group have attempted with Magisk installed, with uninstalling Magisk first, and even uninstalling Magisk. I think the only successful way was after uninstalling Magisk, they had to also restore (and/or flash the stock boot.img) to get an OTA to install. I wouldn't quote me on that, as I don't remember if restoring the boot.img had been enough or if they had to do more.

The point is, TWRP lives inside the boot.img, so taking a backup of the boot.img before installing TWRP and Magisk may be one step that is needed before installing an OTA update. Of course you would also need to uninstall Magisk first, then reboot to recovery and restore the stock boot.img as which point TWRP would be overwritten and you could then reboot back into the System and install the OTA update.
 
  • Like
Reactions: tag68

Jleeblanch

Senior Member
Feb 6, 2012
1,993
5,690
153
Colchester, VT
On another note, I've upload a new version. This will possibly be the last version before an official release!

Changes include:
• device tree clean-up (minor)
• updated README with device info and compiling instructions
• added more partitions for backup and/or wiping
• added the ability to backup/restore and flash boot logos

The OP has been updated with new links.
NOTE: if you're already running TWRP and have Magisk installed, the easiest method to update TWRP is to flash the twrp-installer in Magisk Manager [emoji106]
 

washoq

Senior Member
May 25, 2016
139
74
28
On another note, I've upload a new version. This will possibly be the last version before an official release!

Changes include:
• device tree clean-up (minor)
• updated README with device info and compiling instructions
• added more partitions for backup and/or wiping
• added the ability to backup/restore and flash boot logos

The OP has been updated with new links.
NOTE: if you're already running TWRP and have Magisk installed, the easiest method to update TWRP is to flash the twrp-installer in Magisk Manager [emoji106]
Hi, Jleeblanch. Unfortunately I ended up bricked after trying to update TWRP to newest version. During flashing via Magisk, Magisk Manager got stuck with black screen. I had to force close it and restart. After that I tried again and script ended up successfully so I restarted to recovery from Magisk as I did with previous TWRP version. Device didn't boot up with message "No bootable A/B slot". Did anyone experienced such issue? Any hope to revive my phone?
 

Jleeblanch

Senior Member
Feb 6, 2012
1,993
5,690
153
Colchester, VT
Hi, Jleeblanch. Unfortunately I ended up bricked after trying to update TWRP to newest version. During flashing via Magisk, Magisk Manager got stuck with black screen. I had to force close it and restart. After that I tried again and script ended up successfully so I restarted to recovery from Magisk as I did with previous TWRP version. Device didn't boot up with message "No bootable A/B slot". Did anyone experienced such issue? Any hope to revive my phone?
I'm gonna need more info as to exactly what you did because myself and just about everyone else on Telegram has had NO issues updating to any version, especially the latest version without any issues whatsoever.

Send me a PM and I'll send you a link to the Telegram group. There we have options to get you un-bricked and maybe we can get a better understanding of what happened
 

washoq

Senior Member
May 25, 2016
139
74
28
I'm gonna need more info as to exactly what you did because myself and just about everyone else on Telegram has had NO issues updating to any version, especially the latest version without any issues whatsoever.

Send me a PM and I'll send you a link to the Telegram group. There we have options to get you un-bricked and maybe we can get a better understanding of what happened
Thanks for quick answer. I already managed to unbrick my device using Lenovo Assistant. I have also successfully installed latest TWRP and Magisk. I don't know what caused the brick, maybe some Magisk issue. I went through the procedure like before, nothing has changed. Nevertheless it's rather not important now. I have my phone up and running, simply lost some of my data, but nothing important. Oh, and I am on Telegram group, just coudn't ask on in because my phone was dead ;)
 
  • Like
Reactions: Jleeblanch

Jleeblanch

Senior Member
Feb 6, 2012
1,993
5,690
153
Colchester, VT
Thanks for quick answer. I already managed to unbrick my device using Lenovo Assistant. I have also successfully installed latest TWRP and Magisk. I don't know what caused the brick, maybe some Magisk issue. I went through the procedure like before, nothing has changed. Nevertheless it's rather not important now. I have my phone up and running, simply lost some of my data, but nothing important. Oh, and I am on Telegram group, just coudn't ask on in because my phone was dead ;)
Ok, good to hear! Glad you're back up and running and all is good again [emoji106]

Whatever did happen, at least Smart Assistant was able to save you without too much trouble

Also, in case you didn't know, there is a desktop app for Telegram for Windows, Linux and I would assume also Mac too.
 

zfk110

Senior Member
Jan 11, 2014
925
192
73
Atlanta
It does not, no. This is ONLY for the G7 Plus (lake).

However, if you use Telegram, there is an unofficial (beta) version in the G7 Power (ocean) group.
I saw someone mentioned Telegram but I couldn't find the actual link/forum I don't know if its possible for you to PM me their link?
 

DJBhardwaj

Recognized Contributor
Apr 23, 2011
5,003
2,649
253
27
Delhi
Couldn't we just use the 'Install Recovery Ramdisk' option in 'Advanced' to permanently install TWRP? Instead of flashing the installer zip?
 

Druadach

Member
Mar 25, 2017
17
1
0
Couldn't we just use the 'Install Recovery Ramdisk' option in 'Advanced' to permanently install TWRP? Instead of flashing the installer zip?
Yes you can...

This thread contains known working root and custom recovery, along with any other verified working mods for this device

Thanks to anyone who is willing to help out in advance. You are awesome



THIS REQUIRES AN UNLOCKED BOOTLOADER!!! DO NOT ATTEMPT ON A LOCKED BOOTLOADER. YOU ALSO NEED APPROPRIATE DRIVERS AND ADB TOOLS. THIS GUIDE IS ONLY FOR THE MOTO G7 SERIES, DO NOT ATTEMPT ON ANY OTHER DEVICE

Also check under developer options USB debugging and OEM unlock is checked. Tap build number 7x under settings -> about phone to enable developer options. Please note that some carrier locked variants do not permit OEM unlocking and as such currently have no method to unlock the bootloader

Follow the instructions here to unlock your bootloader

Confirmed Magisk working with boot image, patched through Magisk app.
TWRP needs some work but basic functionality is up

Magisk

Download the appropriate firmware from here, making sure to match build number and variant, found under Settings -> System -> About Phone. Even if you use boot images given to you, I recommend you do this just in case something messed up
Extract the boot.img file
Copy it to the internal storage of your device
Install magisk manager app, found here and open it.
Make sure under advance setting both keep dm-verity and keep force encryption are checked, otherwise you may get stuck in a bootloop
Tap install beside "Magisk is not installed" on the first card
Tap patch boot image
Select your boot image
Once magisk creates the image, copy it to the folder that contains the adb tools
The output can be flashed via fastboot on an unlocked bootloader via
After initial setup/first boot, reboot your device again. Magisk Manager stub should now show up under apps. If you have previously installed it, you'll still need to reboot after the initial boot with magisk for the app to recognize you have it
The stub will download the actual app (if necessary). Once that's installed, open it and tap yes when it asks you to set up environment. If that failed, just close the app and reopen, tapping yes on the prompt. Do that until it says setup done

We now have twrp so theoretically the magisk zip can be flashed. I personally have experienced a lot of problems with this method so I'd recommend against it, but if you want to here's how:
See below instructions to flash twrp if you haven't already
Download the latest magisk zip here and save it to your SD card if you have one
Reboot to TWRP via volume down + power, which will get you to bootloader. In bootloader, use the volume keys to scroll to recovery mode, then press power to select. I personally prefer adb via
Type in you screen lock if prompted, then hit the check mark on keyboard when done
Tap install
Navigate to where you saved the zip and select it
Swipe to install
Follow the last two steps of the other method


TWRP

A beta version of TWRP is now available here. Credit to @Alberto97

Download the file and copy to your adb tools folder
Reboot to bootloader
Boot it with
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:
Tap Advanced -> Install Recovery Ramdisk -> Navigate to /data or /external_sd and select TWRP -> Swipe to Install
Select Fix Recovery Bootloop from Advanced tab, and swipe to fix


In case of emergency (eg, soft brick), follow these instructions to get back to stock before reattempting. They may say for updating, but they work to get back to stock

Taken from the G7 thread. My G7 is stock rooted with magisk and Riru Edxposed with TWRP flashed to Ramdisk. Works flawlessly.

No reason why this shouldn't work for the Plus variant as long as the TWRP is compatible. I had issues if using anything but the beta TWRP image tweaked for river G7. So get version for lake and no problems.
 
Last edited:
  • Like
Reactions: DJBhardwaj

Jleeblanch

Senior Member
Feb 6, 2012
1,993
5,690
153
Colchester, VT
Yes you can...




Taken from the G7 thread. My G7 is stock rooted with magisk and Riru Edxposed with TWRP flashed to Ramdisk. Works flawlessly.

No reason why this shouldn't work for the Plus variant as long as the TWRP is compatible. I had issues if using anything but the beta TWRP image tweaked for river G7. So get version for lake and no problems.
Yes, you're absolutely right, I have included the repack tools which adds the Install Recovery Ramdisk option. The added benefit to the twrp-installer is that it can be directly flashed in Magisk Manager as a module. So, you guys can update twrp without actually having to reboot to recovery to do it.
 

jc56au

Member
Feb 26, 2011
16
2
0
Zip signature verificaion failed!
Error installing zip file 'twrp-installer-3.3.1-v5.1-lake-jlb.zip'


Unlocked bootloader,
fastboot boot twrp-3.3.1-0-lake.img
then try and install. Same result downloading from a couple of mirrors and the md5 matches

Any ideas?
 

DeividXDA

New member
Dec 11, 2016
1
0
1
black screen of death

Hello friend, I have done the tutorial correctly, when I got into the recovery, I switched from slot a to slot b (not for anything special, I was just curious), when I reboot it, the screen was turned off, and it never came back to turn on, power + volume does not work, the pc does not recognize it, I already have all the drivers / drivers of android adb / sdk and those of motorola, my phone was totally dead just for having made a switch, do you know how I could fix it ??
 

bricking Frank

New member
Sep 6, 2019
2
0
0
Hi there,

maybe you could help me with the following problem:

what I did:
- temporarily booted TWRP.img out off bootloader
- installed TWRP.zip out off temporarily booted TWRP from external_sd
- restarted into recovery

what happens:
- TWRP is coming up
- Touchscreen not working
- when I try to temporarily boot out off bootloader again I fail with the following error message:
"Sending 'boot.img' (28464 KB) OKAY [ 0.663s]
Booting (bootloader) Failed to load/authenticate boot image: Not Found
FAILED (remote: '')
fastboot: error: Command failed"

goal:
- want to temporarily boot TWRP out off bootloader again
- get TWRP runnig with touch working

any advise?
Thx a lot!
 
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone