yashsingh1/xdaforums huggingface dataset:
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] PoochyX:
The issue is the vendor just needs encryption so it can be able to boot it's a custom job many different flags being set and not set

([emoji88]Omni Rom[emoji88])
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] Viva La Android R.I.P.:
Thanks for clarifying. I mistakenly assumed the issue regarded decryption of /userdata. I understand now. So, notwithstanding the lack of vendor encryption, does unofficial TWRP and Lineage recovery function smoothly?
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] PoochyX:
Yeah as long data is decrypted a backup will be functional, adb threw twrp works and the file manager is able to read - write

([emoji88]Omni Rom[emoji88])
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] bobbyp1086:
Omg dude so check it. I tried the universal script to make my moto one 5g ace rw, phone wouldn't get passed the moto screen right after bl unlocked warning. Booted to twrp and chose reboot to slot a, not only did that save the data on phone, but I have rw access to all but like 3 partitions that I believe are boot related and this, man this is gold. I think tho that verity can be disabled as well as fec not kicking in, cause that's what I'm looking at. Fec couldn't restore it because the whole system went down and I flashed vbmeta with disable verification and verity. It's all good on the phone as well
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] murasxz:
this is working?
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] jasonmerc:
idk ive never had a g7 play, i think i whipped it up for someone else to test,, and this was many years ago
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] jwreidmoto:
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
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] Viva La Android R.I.P.:
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, [MENTION=7718083]Spaceminer[/MENTION], 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. [MENTION=7718083]Spaceminer[/MENTION] 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.
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] jwreidmoto:
Cool!
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] Spaceminer:
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 [MENTION=3445372]scritch007[/MENTION] for those images. If you guys have any problems with twrp, tell me what they are and I'll try to fix them.
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] jwreidmoto:
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
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] Spaceminer:
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!
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] jwreidmoto:
Understood

Thanks. I understand what you are saying. I will get to work and let you know how it goes. I think root is not far away.
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] jwreidmoto:
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
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] Spaceminer:
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.
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] jwreidmoto:
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
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] Spaceminer:
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.
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] jwreidmoto:
I get it.

Thanks
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] jwreidmoto:
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
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] Spaceminer:
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.
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] jwreidmoto:
Didn't Work

Nothing worked. Thanks for all your trouble. How do I send you my boot.img?

Thanks
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] Spaceminer:
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.
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] jwreidmoto:
Files

Here are my files.

Thanks
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] jwreidmoto:
Files Update

Here now are my files.

Thanks for your help.
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] jwreidmoto:
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
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] Viva La Android R.I.P.:
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 [MENTION=7718083]Spaceminer[/MENTION] and [MENTION=7843264]ninjakira[/MENTION]. 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 [MENTION=3445372]scritch007[/MENTION]!!
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] Spaceminer:
I highly recommend trying it. Be sure to read through the few posts after the instructions. Some critical steps for A/B get covered. You might boot loop like the other guy, but it'd be worth it to find out. You folks might use different drivers between device models so, it might still work for you.
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] Viva La Android R.I.P.:
I'll definitely give this a go in the morning, when I can sit down and follow the steps without interruption. By the way, I sent you a PM. Thanks again.
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] Spaceminer:
So, if I'm reading this correctly, you have twrp installed, you aren't boot looping, but you can't mount /data?

If this is all correct, hit wipe > then select format > type the word "yes" > then hit the check mark on the keyboard. After that, back up to the main menu and select reboot > recovery. You should be able to check the box for /data after this. If this doesn't work, tell me where it fails. This looks like progress!
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] Viva La Android R.I.P.:
I haven't been able yet to give this a try. Forgot my laptop at home so I'm planning on this evening. This looks very promising. In theory, and by the proof of concept, this should definitely work for installing Magisk systemless root on the Moto G7 Play. Moreover, it's so nice to see a functional TWRP recovery for the CHANNEL device.
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] jwreidmoto:
Info Pic

I did that and still cannot check the data box. I attached a pic of what it looks like when I format data.

Thanks
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] Spaceminer:
Go into fastboot and try running fastboot erase userdata and fastboot erase DDR, then use your volume key to scroll down to recovery and hit the power key. It should boot into twrp. It should show you a password decrypt screen, hit cancel, then swipe to allow modifications. Then see if /data can mount. If it does, flash the disabler and magisk.

If not, try wipe > format > "yes" again. If it formats successfully, then reboot into recovery from twrp's menus. /data should be able to mount after that. Then flash the disabler and magisk.

If all this fails then I probably just need to make a small edit in twrp's fstab which won't take long at all. Root looks imminent at this point.
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] ninjakira:
Hell yes ? this is what I love seeing lol me or Spaceminer will be getting the device soon so hopefully that should make life easier, unless we figure it out before we need the device which would be cool lol. I to haven't been ona Ina couple days lol
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] jwreidmoto:
Still cannot checkmark data. Wow, so close too! Just so you know after I erase userdata and DDR and boot into recovery there is no password decrypt thing. It displays the main menu right away.

Thanks
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] Spaceminer:
There's one last thing that I can think of. Boot twrp, select mount, then look at the bottom. There's a separate box that says "mount system partition read-only", if it's checked, then uncheck it and try the "yes" format again. Either that box is the problem, or twrp isn't seeing your /data footer, which I can fix. I'll go ahead and pull apart twrp in the mean time.
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] jwreidmoto:
No, still nothing and the "mount system partition read-only" was never checked.

Thanks
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] Spaceminer:
I just pulled apart twrp and there's definitely some flags missing for the data partition. The A/B flags are a little different than what I'm used to seeing, so this may take a few tries to get it right. I do think this will be an easy fix though.

Any tests should be really easy to carry out from this point forward. You'll just put the new twrp on your sdcard, use the "ramdisk install" option on it, reboot to recovery, try to format with "yes", and try mounting /data. If at any point twrp succeeds in formatting /data, be sure to reboot into recovery through twrp's menu, then try mounting /data.

Before I make some tests I need some info from your /vendor partition. In twrp mount /vendor. Then from the main menu, select Advanced > terminal then type the following and hit enter.

cat /vendor/etc/fstab.qcom I need the output of that. Alternatively, you can mount /vendor then use twrp's file manager to navigate to, and copy that file to your external sdcard so you can upload it.
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] Spaceminer:
TWRP (test #1)

[MENTION=10059830]Viva La Android[/MENTION]

[MENTION=9918609]jwreidmoto[/MENTION]

I believe this is it! I ran strings on the vendor image and it gave me just what I needed. This one should be able to mount /data.

Link: twrp.img
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] Fdraco10:
Thanks for this magnific work..

Thanks for bring TWRP our device
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] ninjakira:
[MENTION=7720154]Fdraco10[/MENTION] are you saying you managed to flash that twrp and decrypt and root?
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] jwreidmoto:
Sorry, but even though the new twrp.img fixed the bootloop, I still cannot get that data box to check.

Thanks
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] Spaceminer:
Did you try the format "yes" option?

Edit: You can also try going to, wipe > advanced > select /data > repair > change file system to ext2, then do it again but this time change it to f2fs. If it can change the file system it should mount. We're very close to making this work.
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] Viva La Android R.I.P.:
I've been stuck doing overtime and have not yet been able to try this. I can't wait. This looks very promising. If, by chance TWRP will not format /data, is it possible to format /data with fastboot or RSD-Lite?
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] Spaceminer:
Yep, fastboot could do it. It might be having a problem because of ICE encryption. I'm not exactly sure yet. We should still be able to disable encryption then mount /data anyways if that's the case. Twrp has /vendor mount working, so all we'd have to do is push a modified fstab, then erase userdata in fastboot.
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] jwreidmoto:
Yes, I was able to change to ext2 and then I could check data as well. I then checked vendor and system then proceeded to flash the disabler and magisk. Both were successful. Unfortunately, the phone is stuck on the moto screen which is the first screen you see when it boots.

Thanks
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] Spaceminer:
You have to change /data back to f2fs in order to boot and you should be decrypted. You'll need to flash magisk again after that.
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] jwreidmoto:
When I try to change file system for 'data'. I Wipe/advanced wipe/select 'data'/repair or change file system/

Then I have 3 choices Resize ,Repair or Change. I select Change and it only gives me these choices

EXT2

FAT

EXT3

exFAT

EXT4

Thanks
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] Spaceminer:
Okay. I think I can fix that in a few minutes. Try erasing userdata with fastboot. That will probably get you back to normal.
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] jwreidmoto:
Yes, it did.

Thanks
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] Spaceminer:
I've think I've nailed this one down. It looks like the twrp is missing the files needed to format as f2fs. I have these on hand. The ones from my recovery should work. I should have a fix up shortly. Any luck with root?

---------- Post added at 04:44 PM ---------- Previous post was at 04:30 PM ----------

@jwreidmoto

This "should" fix the f2fs problem. Install ramdisk, reboot recovery, then check and see if you have the option to change data to f2fs. If it's in there, then I think we're good to go.

twrp2.img
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] jwreidmoto:
I click on 'advanced' to install twrp2.img I have lost the option to install ramdisk, the menu is different. I am trying to upload a screenshot but upload screen goes blank. It shows- copy log, fix contents, file manager, terminal, reload theme and ABD sideload.

Thanks
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] Spaceminer:
No need to, I know what's going on. Sit tight, I have another one coming.

Edit: twrp3.img

You'll need to do the following to get out of your current predicament. Fastboot boot twrp3.img first, then you should have the ramdisk install option back, use it to install twrp3.img, then reboot into recovery.
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] jwreidmoto:
Sorry, won't boot into recovery after install ramdisk, boots the phone when I boot into recovery.

Thanks
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] Spaceminer:
I know it doesn't have the option for formatting to f2fs, but I'd go back to test #1's twrp for the time being. Use the fastboot boot/ramdisk install method on it. Once you have test #1 reinstalled, check if /data mounts. We know it's f2fs currently since your phone can boot up. If it mounts, try to install Magisk. If you already have it installed, please also let us know! I'm sure plenty of people are dying to see this get rooted. I'll have to take a closer look at this. I probably just need some files from /system/bin in your phone. I don't think it'll be hard to get this working correctly.
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] jwreidmoto:
Great thanks for your help.
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] Spaceminer:
Twrp (Test #4)

[MENTION=9918609]jwreidmoto[/MENTION]

I'm hoping this is the last one. I added the binaries needed for f2fs from your stock firmware.

f2fs test fix

twrp4.img
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] Linuxassassin:
Is this for RETUS
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] Spaceminer:
Technically Sprint but it should work for you. If it doesn't then I'll make it work.
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] Linuxassassin:
I have the carrier unlocked version of the phone but I'll test it out
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] Viva La Android R.I.P.:
Man it's so close now I can taste it. :svetius:
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] Fdraco10:
Twrp + root + custom rom (lite stock rom) and viper4android + dolby ..... Will be amazing..
[Moto G7 Play ROMs, Kernels, Recoveries, & Other De] jwreidmoto:
This one worked without a hitch but when I rebooted magisk was not installed. My phone stopped recognizing sim card too. Is there a way to uninstall twrp to see if I get my sim card back?