[Recovery][UNOFFICIAL] TWRP Dirty Port For G7 Play

jwreidmoto

Senior Member
May 9, 2019
65
8
0
TWRP

To me, TWRP means a recovery which there isn't for this phone yet. If there was TWRP I would just install SuperSU and my phone would be rooted. So far there hasn't been a recovery like on my 2 phones before this. There was a TWRP for them so I could root and format etc. I just want to be able to boot into TWRP so I can root. I hope I have answered your question. Maybe TWRP and recovery are 2 different things.
Thanks
 
  • Like
Reactions: Viva La Android

Viva La Android

Senior Member
Jul 31, 2019
408
156
53
Corbin, KY
To me, TWRP means a recovery which there isn't for this phone yet. If there was TWRP I would just install SuperSU and my phone would be rooted. So far there hasn't been a recovery like on my 2 phones before this. There was a TWRP for them so I could root and format etc. I just want to be able to boot into TWRP so I can root. I hope I have answered your question. Maybe TWRP and recovery are 2 different things.
Thanks
SuperSU wouldn't root this phone, TWRP or not. In fact, it's a safe bet that SuperSU would either brick your device or render a boot loop at minimum. SuperSU has been a deprecated project for some time now and, as such, does not support the current parameters for A/B partitioned devices. I know of only one root interface that does support the latest A/B partition tables -- Magisk. The issue with rooting this device isn't necessarily a lack of a stable TWRP. Magisk can root a device running on stock recovery, without TWRP, so long as fastboot mode can be accessed. There are developers now working on a root solution for the Moto G7 Play (@ninjakira, @Spaceminer, and others), and it appears that the solution will involve more than just a patched boot image, perhaps even the /dtbo partition.
In any event, I have been guilty of much off-topic posting in this thread, and I apologize to the OP for that. I mean no disrespect. @Spaceminer had mentioned starting an official rooting thread once a solution has been ironed out. Once development for this device breaks ground, it will be easier to compartmentalize the various topics.
 
Last edited:

Spaceminer

Senior Member
Sep 9, 2016
1,159
547
123
Olympus Mons
To me, TWRP means a recovery which there isn't for this phone yet. If there was TWRP I would just install SuperSU and my phone would be rooted. So far there hasn't been a recovery like on my 2 phones before this. There was a TWRP for them so I could root and format etc. I just want to be able to boot into TWRP so I can root. I hope I have answered your question. Maybe TWRP and recovery are 2 different things.
Thanks
SuperSU wouldn't root this phone, TWRP or not. In fact, it's a safe bet that SuperSU would either brick your device or render a boot loop at minimum. SuperSU has been a deprecated project for some time now and, as such, does not support the current parameters for A/B partitioned devices. I know of only one root interface that does support the latest A/B partition tables -- Magisk. The issue with rooting this device isn't necessarily a lack of a stable TWRP. Magisk can root a device running on stock recovery, without TWRP, so long as fastboot mode can be accessed. There are developers now working on a root solution for the Moto G7 Play (@ninjakira, @Spaceminer, and others), and it appears that the solution will involve more than just a patched boot image, perhaps even the /dtbo partition.
In any event, I have been guilty of much off-topic posting in this thread, and I apologize to the OP for that. I mean no disrespect. @Spaceminer had mentioned starting an official rooting thread once a solution has been ironed out. Once development for this device breaks ground, it will be easier to compartmentalize the various topics.
It looks like you guys have twrp and it's fully functional. You just need to install it first. Twrp can't modify all parts of the system if it isn't installed. Therefore, magisk can't root your phone, if twrp isn't installed.

1. Flash your stock firmware to slot B or better yet, take an OTA update so both slots are guaranteed to have an OS. OTA is the safer option. Failure to do so will result in a brick. Slot B can't be empty!

2. Using fastboot; <--- (Use the files from the links, not from your firmware.)

fastboot flash dtbo dtbo.img
fastboot boot recovery.img

3. When twrp boots up...

A. Hit cancel at the password decrypt screen, and swipe to allow modifications.

B. Select Advanced > install recovery ramdisk

C. Back up once more to the main menu, select reboot > recovery Twrp should now be permanent.

4. Once twrp boots up again, select wipe > format > type "yes" then back up to the main menu, and reboot to recovery again. It's necessary to mount /data.

5. From the main menu of twrp select mount > check the boxes for vendor, data, system. Then flash the universal encryption disabler, and flash Magisk right after. Reboot, and you should be rooted.

Links:
The Twrp & dtbo images can be found in the google drive link, under "binaries", in this post.

The Universal encryption disabler can found in this thread.

Magisk can be found here.

None of this is my work, so be sure to thank @scritch007 for those images. If you guys have any problems with twrp, tell me what they are and I'll try to fix them.
 
Last edited:

jwreidmoto

Senior Member
May 9, 2019
65
8
0
More Info

Awesome I can boot into recovery. So the rest of the instructions should go fine. I get all the rest of the instructions except for the first.
"Flash your stock firmware to slot B or better yet, take an OTA update so both slots are guaranteed to have an OS. OTA is the safer option"

Could you explain how to do that? Please include the fastboot commands. I am a junior member and some things I am still learning. I am assuming I flash my own stock dtbo.img but how to do that to slot b, I am not sure. I am very eager to root my phone so any help would be greatly appreciated.
Thanks
 
Last edited:

Spaceminer

Senior Member
Sep 9, 2016
1,159
547
123
Olympus Mons
Awesome I can boot into recovery. So the rest of the instructions should go fine. I get all the rest of the instructions except for the first.
"Flash your stock firmware to slot B or better yet, take an OTA update so both slots are guaranteed to have an OS. OTA is the safer option"

Could you explain how to do that? Please include the fastboot commands. I am a junior member and some things I am still learning. I am assuming I flash my own stock dtbo.img but how to do that to slot b, I am not sure. I am very eager to root my phone so any help would be greatly appreciated.
Thanks
Inside your firmware there's a file named flashfile.xml, open that up. The longer set of sparse chunks that it says to flash to "system", flash them all to system_b. The shorter set of sparse chunks that it says to flash to system_b, skip those entirely. I've broken it up below to help visualize it. Just make sure to read your flash file, because the number of sparse chunks in a firmware can change from one release to the next.

In a nutshell, it's going to look like this in fastboot.
fastboot flash system_b system.img_sparsechunk.0
fastboot flash system_b system.img_sparsechunk.1
fastboot flash system_b system.img_sparsechunk.2
Etc...

Visual Reference:



<step MD5="27533ed08e8bd1f002882eac880d2ec8" filename="system.img_sparsechunk.0" operation="flash" partition="system"/>
<step MD5="07bf4514b20965a39e55b023715f37b2" filename="system.img_sparsechunk.1" operation="flash" partition="system"/>
<step MD5="e856fc09cd4dac7ead54ec97ebc0e143" filename="system.img_sparsechunk.2" operation="flash" partition="system"/>
<step MD5="217857df38225f0ca4cf5f834bd5e3cb" filename="system.img_sparsechunk.3" operation="flash" partition="system"/>
<step MD5="c356bd9845845a05b6032af8a27e491e" filename="system.img_sparsechunk.4" operation="flash" partition="system"/>
<step MD5="a168b1389a044e5ed56d2a4a6dcfa96f" filename="system.img_sparsechunk.5" operation="flash" partition="system"/>
<step MD5="fbc6669a31cc8f8b098f5d260915fae9" filename="system.img_sparsechunk.6" operation="flash" partition="system"/>
<step MD5="2c757650843740dd6ad4ae333a2ee0f7" filename="system.img_sparsechunk.7" operation="flash" partition="system"/>

All of this gets flashed to "system_b" instead of "system".

All of this gets skipped.


<step MD5="db47ec98a25ae42c3e8d167f24d20490" filename="system_b.img_sparsechunk.0" operation="flash" partition="system_b"/>
<step MD5="5e3b9b937b421f3ae42124b62b5bf9e9" filename="system_b.img_sparsechunk.1" operation="flash" partition="system_b"/>
<step MD5="b9d404c81209e6ac87ec01ae0496ea57" filename="system_b.img_sparsechunk.2" operation="flash" partition="system_b"/>


Edit: The dtbo.img that you need to flash before booting and installing twrp is in the google drive link. Just install everything in your firmware except what I told you not to. So flash your firmware dtbo first, then flash the dtbo from google drive afterwards, once you get to the steps to install twrp. I hope this helps. I was once a noob too, and compared to plenty of other devs on here, I still am. Hell, I dont even have a recognized contributor tag yet!
 
Last edited:

jwreidmoto

Senior Member
May 9, 2019
65
8
0
Intructions Issue

I am a little confused right here. For B. Select Advanced > install-recovery ramdisk should I do something there, because there are a bunch of folders when I do that. If I am just going there and then backing up to the main menu it seems nothing gets accomplished in B. When I go back and reboot recovery I just get the "no command" android icon. Any help would be great.

A. Hit cancel at the password decrypt screen, and swipe to allow modifications.

B. Select Advanced > install recovery ramdisk

C. Back up once more to the main menu, select reboot > recovery Twrp should now be permanent.

Thanks
 

Spaceminer

Senior Member
Sep 9, 2016
1,159
547
123
Olympus Mons
I am a little confused right here. For B. Select Advanced > install-recovery ramdisk should I do something there, because there are a bunch of folders when I do that. If I am just going there and then backing up to the main menu it seems nothing gets accomplished in B. When I go back and reboot recovery I just get the "no command" android icon. Any help would be great.

A. Hit cancel at the password decrypt screen, and swipe to allow modifications.

B. Select Advanced > install recovery ramdisk

C. Back up once more to the main menu, select reboot > recovery Twrp should now be permanent.

Thanks

I've never seen the install ramdisk screen myself, since I don't own an A/B device. It should look like this image I've attached though. If it's like anything else in twrp, you just select it and swipe to install. If it has an option to install to slot A & B, you should do both.
 

Attachments

Last edited:

jwreidmoto

Senior Member
May 9, 2019
65
8
0
Pic

When I click on install recovery ramdisk it brings me to a page with a bunch of empty folders. There is no option to swipe or install anything.
Thanks
 
Last edited:

Spaceminer

Senior Member
Sep 9, 2016
1,159
547
123
Olympus Mons
When I click on install recovery ramdisk it brings me to a page with a bunch of empty folders. There is no option to swipe or install anything.
Thanks
Okay, well that sounds like it might be a problem. Can you grab a picture of what you're seeing? When twrp has that screen up, you should be able to hold (Vol ↓ + power) and take a screenshot. It would help if I could see what you're seeing. Do any of the folders have names? It might be showing you partitions.

Edit: Never mind all that. I know whats going on. Before installing the ramdisk, copy twrp (the recovery.img) that you downloaded, onto the root of your sd card, then do the ramdisk thing and select the recovery.img file. You should be able to copy files from your pc to your phone while twrp is running.
 
Last edited:

jwreidmoto

Senior Member
May 9, 2019
65
8
0
Ok I installed the recovery.ing and rebooted into recovery. Unfortunately, I get the teamwin screen stuck in a bootloop. The screen flashes 3 times and then the teamwin screen comes on for a second and then repeats. I tried reinstalling it but same result.
Thanks
 

Spaceminer

Senior Member
Sep 9, 2016
1,159
547
123
Olympus Mons
Ok I installed the recovery.ing and rebooted into recovery. Unfortunately, I get the teamwin screen stuck in a bootloop. The screen flashes 3 times and then the teamwin screen comes on for a second and then repeats. I tried reinstalling it but same result.
Thanks
There's a few things you can check/try. Make sure you installed the dtbo.img before booting/flashing twrp. You can also try these commands in fastboot.

fastboot erase userdata
fastboot erase DDR


You could also try flashing your stock dtbo.img after installing twrp. That might fix it.

If none of that works, send me your stock boot.img and I'll see what I can do.
 

Spaceminer

Senior Member
Sep 9, 2016
1,159
547
123
Olympus Mons
Nothing worked. Thanks for all your trouble. How do I send you my boot.img?
Thanks
Thank you for trying, that rules some things out. I'll need to do some research. The weird thing is that it works when it's just booted, but loops once installed. Usually if it'll boot, then it's good to go. I think that gives me something to go on though.

How to attach the boot.img...

Start making a new post, hit the paper clip and it'll open a new tab. Then select any of the 4 bars, and select the boot.img. (you'll have to zip it first) Then hit upload files, followed by close window, and make your post. You should include your stock dtbo.img too, I'll probably need both. If any of this is too much of a pain in the ass, you can just tell me your country channel (RETUS, RETAIL, RETEU, RETCA...), build number, and model number (xt1952-?), and I can grab it.
 

jwreidmoto

Senior Member
May 9, 2019
65
8
0
Fixed

I erased user data again and DDR after I flashed my own dtbo.img and it fixed it.
Thanks, I will continue with the instructions.

---------- Post added at 12:55 AM ---------- Previous post was at 12:41 AM ----------

5. From the main menu of twrp select mount > check the boxes for vendor, data, system.
I can only checkmark vendor and system.
Thanks
 
  • Like
Reactions: Spaceminer

Viva La Android

Senior Member
Jul 31, 2019
408
156
53
Corbin, KY
It looks like you guys have twrp and it's fully functional. You just need to install it first. Twrp can't modify all parts of the system if it isn't installed. Therefore, magisk can't root your phone, if twrp isn't installed.

1. Flash your stock firmware to slot B or better yet, take an OTA update so both slots are guaranteed to have an OS. OTA is the safer option. Failure to do so will result in a brick. Slot B can't be empty!

2. Using fastboot; <--- (Use the files from the links, not from your firmware.)

fastboot flash dtbo dtbo.img
fastboot boot recovery.img

3. When twrp boots up...

A. Hit cancel at the password decrypt screen, and swipe to allow modifications.

B. Select Advanced > install recovery ramdisk

C. Back up once more to the main menu, select reboot > recovery Twrp should now be permanent.

4. Once twrp boots up again, select wipe > format > type "yes" then back up to the main menu, and reboot to recovery again. It's necessary to mount /data.

5. From the main menu of twrp select mount > check the boxes for vendor, data, system. Then flash the universal encryption disabler, and flash Magisk right after. Reboot, and you should be rooted.

Links:
The Twrp & dtbo images can be found in the google drive link, under "binaries", in this post.

The Universal encryption disabler can found in this thread.

Magisk can be found here.

None of this is my work, so be sure to thank @scritch007 for those images. If you guys have any problems with twrp, tell me what they are and I'll try to fix them.
I've not been on xda in a couple days but it looks like you've been fruitful in your endeavors on behalf of the G7 Play users. Thanks for your work @Spaceminer and @ninjakira. I see exactly what you are saying on the system_a and system_b issues on root. I can't wait to put this to the test. Thanks @scritch007!!
 
Last edited:
  • Like
Reactions: Spaceminer