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

Viva La Android

Senior Member
Jul 31, 2019
408
156
53
Corbin, KY
Does anyone know if TWRP will be getting an official p7ort on this device? I tried earlier and wasn't able to use the dirty port, as the touch-screen wouldn't work for me (even after flashing the dtbo first). Also, is there a way to backup the system and install a new ROM without TWRP, am I stuck for now until I can get it to work? Thanks.
TWRP will be getting an official build from the folks over at TeamWin. Currently, all other Moto G7 variants have official TWRP builds -- the RIVER, LAKE & OCEAN. Our beloved body of water -- the CHANNEL -- will be along momentarily. I'm not certain as to the timeframe or the present progress on the G7 Play. I can only confirm that our official TWRP is in the works. I want to give a huge thanks to Mr. @Spaceminer for his amazing work porting our current working TWRP. He's definitely laid the groundwork for an official build.
 
Last edited:
  • Like
Reactions: SmallGiant

Spaceminer

Senior Member
Sep 9, 2016
1,159
547
123
Olympus Mons
Does anyone know if TWRP will be getting an official port on this device? I tried earlier and wasn't able to use the dirty port, as the touch-screen wouldn't work for me (even after flashing the dtbo first). Also, is there a way to backup the system and install a new ROM without TWRP, am I stuck for now until I can get it to work? Thanks.
Send me your stock recovery and dtbo images and I'll see what I can do. I planned on doing a bunch of recovery work this week anyways.
 

SmallGiant

Member
Jan 12, 2016
43
2
0
TWRP will be getting an official build from the folks over at TeamWin. Currently, all other Moto G7 variants have official TWRP builds -- the RIVER, LAKE & OCEAN. Our beloved body of water -- the CHANNEL -- will be along momentarily. I'm not certain as to the timeframe or the present progress on the G7 Play. I can only confirm that our official TWRP is in the works. I want to give a huge thanks to Mr. @Spaceminer for his amazing work porting our current working TWRP. He's definitely laid the groundwork for an official build.
That's great news, glad to hear it's coming. Hope it's not too much work for TeamWin to to do this one.

Send me your stock recovery and dtbo images and I'll see what I can do. I planned on doing a bunch of recovery work this week anyways.
I'd like to send the recovery images, though I'm having some trouble. I'm running adb as root (which I can do when booting into the current TWRP image). Using parted as mentioned in this guide, I get 64 partitions, none of which are clearly labelled recovery. Would you know if the G7 Play just has a differently labelled recovery partition? Just so I don't send you the wrong image.

Thanks very much for the work you're doing.
 

Viva La Android

Senior Member
Jul 31, 2019
408
156
53
Corbin, KY
@Spaceminer, my device is the Boost Mobile xt1952-4 variant. Here is a link for the boot.img and dtb.img from my latest firmware build (PCYS29.105-144-3) with an October 1st security patch level. Will this suffice, or will you need me to pull any particular images directly from my device? Anyway, thank you very much for this, and please let me know if you need anything in addition to these images.

boot.img & dtb.img: https://mega.nz/#F!MUczTIDL!N234hsbajuBxazeSYMm-KA
 
  • Like
Reactions: Spaceminer

Spaceminer

Senior Member
Sep 9, 2016
1,159
547
123
Olympus Mons
That's great news, glad to hear it's coming. Hope it's not too much work for TeamWin to to do this one.



I'd like to send the recovery images, though I'm having some trouble. I'm running adb as root (which I can do when booting into the current TWRP image). Using parted as mentioned in this guide, I get 64 partitions, none of which are clearly labelled recovery. Would you know if the G7 Play just has a differently labelled recovery partition? Just so I don't send you the wrong image.

Thanks very much for the work you're doing.
I think running adb pull /dev/block/bootdevice/by-name/boot will work for you. If not just give me your model number and software channel and I'll pull it from your firmware. Slight correction, I said recovery, but I meant the boot.img. I keep forgetting that recovery lives inside of your boot.img.

---------- Post added at 12:48 PM ---------- Previous post was at 12:45 PM ----------

@Spaceminer, my device is the Boost Mobile xt1952-4 variant. Here is a link for the boot.img and dtb.img from my latest firmware build (PCYS29.105-144-3) with an October 1st security patch level. Will this suffice, or will you need me to pull any particular images directly from my device? Anyway, thank you very much for this, and please let me know if you need anything in addition to these images.

boot.img & dtb.img: https://mega.nz/#F!MUczTIDL!N234hsbajuBxazeSYMm-KA
I think that's everything that I need. Check back later tonight and I'll probably have something ready. I'm on eastern standard time by the way.
 

SmallGiant

Member
Jan 12, 2016
43
2
0
I think running adb pull /dev/block/bootdevice/by-name/boot will work for you. If not just give me your model number and software channel and I'll pull it from your firmware. Slight correction, I said recovery, but I meant the boot.img. I keep forgetting that recovery lives inside of your boot.img.

---------- Post added at 12:48 PM ---------- Previous post was at 12:45 PM ----------

So I wasn't able to run the command (for me, /dev/block/ has no subdirectories, only files named "8:##"). I am on an XT1952-2 model, and the software channel is "retla". Thanks again.
 

Spaceminer

Senior Member
Sep 9, 2016
1,159
547
123
Olympus Mons
Will do @Spaceminer. When I flash this image, do I need to reinstall TWRP or anything? Thanks
I doubt it. That should just disable verity and nothing more. I do have a twrp test though if you want to try that. If I did everything right, then I think touch will work and it'll start up without any hoops to jump through.

BST Twrp
 

Viva La Android

Senior Member
Jul 31, 2019
408
156
53
Corbin, KY
I doubt it. That should just disable verity and nothing more. I do have a twrp test though if you want to try that. If I did everything right, then I think touch will work and it'll start up without any hoops to jump through.

BST Twrp
Wow. Thanks a million @Spaceminer. I can't wait to try this. I'm on the road for a few days with my job, so it'll be end of the week before I can test, but I'm certainly looking forward to it.
 

SmallGiant

Member
Jan 12, 2016
43
2
0
@SmallGiant

RETLA Twrp: twrp.img

Patched dtbo: dtbo.img
Wow, that was really quick. So I can flash the dtbo image, though it seems the new TWRP doesn't boot. I get the following from the terminal.
Code:
fastboot flash dtbo dtbo.img 
(bootloader) is-logical:dtbo_a: not found
Sending 'dtbo_a' (1507 KB)                         OKAY [  0.209s]
Writing 'dtbo_a'                                   OKAY [  0.068s]
Finished. Total time: 0.279s

fastboot boot twrp.img
Sending 'boot.img' (22806 KB)                      OKAY [  0.610s]
Booting                                            FAILED (remote: '')
fastboot: error: Command failed
"(bootloader) is-logical:dtbo_a: not found" also happens when flashing the old dtbo.img, so I'm not sure how relevant that message is. About the dtbo.img however, it seems I can't boot at all with the new dtbo. I get stuck on the "bad key" message when trying to boot up the phone. I could still flash the old dtbo though so the phone still works for me.

Thanks again for working on this device.
 

Spaceminer

Senior Member
Sep 9, 2016
1,159
547
123
Olympus Mons
Wow, that was really quick. So I can flash the dtbo image, though it seems the new TWRP doesn't boot. I get the following from the terminal.
Code:
fastboot flash dtbo dtbo.img 
(bootloader) is-logical:dtbo_a: not found
Sending 'dtbo_a' (1507 KB)                         OKAY [  0.209s]
Writing 'dtbo_a'                                   OKAY [  0.068s]
Finished. Total time: 0.279s

fastboot boot twrp.img
Sending 'boot.img' (22806 KB)                      OKAY [  0.610s]
Booting                                            FAILED (remote: '')
fastboot: error: Command failed
"(bootloader) is-logical:dtbo_a: not found" also happens when flashing the old dtbo.img, so I'm not sure how relevant that message is. About the dtbo.img however, it seems I can't boot at all with the new dtbo. I get stuck on the "bad key" message when trying to boot up the phone. I could still flash the old dtbo though so the phone still works for me.

Thanks again for working on this device.
Try flashing your stock dtbo then booting twrp. That might work.
 
  • Like
Reactions: Gypsy

SmallGiant

Member
Jan 12, 2016
43
2
0
Try flashing your stock dtbo then booting twrp. That might work.
It seems that the new twrp image isn't working for me regardless of the dtbo. I used fastboot --set-active=b (as I hadn't yet flashed dtbo to the b slot), then booted twrp.img. However, I get a black screen for a bit, then the phone just boots the OS normally.

Additionally now, switching back to --set-active=a, I get a bootloop for a few times trying to start up the phone (shows the bad key screen, vibrates, black screen, repeat). Then I get a message that the system couldn't start, prompting me to either try booting again, or to perform a factory reset. Oddly enough, the flashing the old dtbo in a-slot again doesn't seem to fix it. Not sure what happened there, hopefully I don't screw anything up on the b slot, which still boots.
 
Last edited:

Spaceminer

Senior Member
Sep 9, 2016
1,159
547
123
Olympus Mons
It seems that the new twrp image isn't working for me regardless of the dtbo. I used fastboot --set-active=b (as I hadn't yet flashed dtbo to the b slot), then booted twrp.img. However, I get a black screen for a bit, then the phone just boots the OS normally.

Additionally now, switching back to --set-active=a, I get a bootloop for a few times trying to start up the phone (shows the bad key screen, vibrates, black screen, repeat). Then I get a message that the system couldn't start, prompting me to either try booting again, or to perform a factory reset. Oddly enough, the flashing the old dtbo in a-slot again doesn't seem to fix it. Not sure what happened there, hopefully I don't screw anything up on the b slot, which still boots.
Do you have an OS installed to both slots? If so, then it's a problem on my end and I think I know how to fix it. If not make sure your firmware is installed to A & B, then try again. You shouldn't need to set any slot as active, twrp should be handling that automagically when you try to boot it up.
 
  • Like
Reactions: Gypsy

SmallGiant

Member
Jan 12, 2016
43
2
0
Do you have an OS installed to both slots? If so, then it's a problem on my end and I think I know how to fix it. If not make sure your firmware is installed to A & B, then try again. You shouldn't need to set any slot as active, twrp should be handling that automagically when you try to boot it up.
I'm not sure if I have an OS in both slots, though I do have a system_a and system_b partition. I haven't installed any ROMS, or flashed to the recovery partition. I believe the only things I've done are switching slots in fastboot, flashing the dtbo_a partition and attempting to boot twrp. So I think my phone should be pretty close to stock, except for the flashed dtbo_a.
 

Viva La Android

Senior Member
Jul 31, 2019
408
156
53
Corbin, KY
Hey @Spaceminer, I've been off the map for a few days traveling and have not yet had an opportunity to try things out. I'll indulge in some catch-up reading on the thread and try to get up to speed.
Oh, I wanted to inform owners of the Boost Mobile xt1952-4 that our default MSL code appears to be 000000. For any members who want to access the programming menu, open your dialer and enter ##3282#. Select a field such as "APN Settings" and then choose "Edit." When prompted to enter your MSL code, enter 000000 and you should be in. It works on my Boost Moto G7 Play, and may possible even work on other variants. However, please employ ample caution with the programming menu. It will allow you to do things like change LTE band priority, disable and enable supported bands, change the default APN configuration, etc. Your cellular signal and service can be adversely affected or broken by altering the default fields in this menu. In the event you do have a mishap and lose service or data connectivity, dial ##72786# to prompt a full network configuration reset. Upon reboot you should be back to normal. You can likewise prompt a BRAND carrier reset by dialing ##27263# (which appears to do the same thing as ##72786#).
I apologize for the off-topic post. I recalled they there were a few Boost device owners on this thread and wanted to pass the info along.
 
Last edited:

nabilps5

New member
Oct 3, 2018
2
0
0
You don't patch recovery, you patch your boot.img

Download a copy of your stock firmware

Extract the boot.img from the zip file you downloaded

Copy the boot.img to your device.

Install magisk manager.

Under advanced options make sure recovery mode is checked. All 3 options need to be checked

Click install, then choose the "choose file to patch option" choose the boot.img file you just copied to your device

This will create magisk_patched.img copy this file to your computer.

Now you will want to fastboot flash the newly patched magisk_patched.img to your phone.

After you have flashed it do not boot up normally... Choose the reboot to recovery. Your phone should boot and magisk should be installed
I do not know how to thank you :good::good::good:
I have made my device root using your method :cowboy::cowboy:
Thank you Thank you Thank you Thank you Thank you Thank you
My phone
Moto G7 play XT1952-1 :cool: