yashsingh1/xdaforums huggingface dataset:
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] jasonmerc:
I just want to post this here, because this is hilarious to me

Download TWRP Recovery for Motorola Moto E6 | Root Using It

On this page, we will guide you to install the TWRP Recovery on Motorola Moto E6 (surfna). This guide contains both the written instruction

www.getdroidtips.com

None of my recoveries have worked for the E6, but I'm being linked as a developer for a working TWRP recovery. if you came from this link, DO NOT use MY builds. Someone else got OrangeFox working I believe. Use that one instead.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] jasonmerc:
If you can actually get one for free and would be willing to donate it to "science", I'd be interested. I don't have visible mobile myself and I've got a pretty good phone now I wouldn't want to trade in. I don't want you spending any actual money though, especially since I can't guarantee anything, but if anyone was willing to donate anything (if I understood your message correctly) I'd be down to take it in and see what I could do with it

Sorry about the lack of responses, been busy this past month with schooling. Lacked energy and motivation to get back on XDA and see how things were turning out.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] koyo:
The only reason I was hanging on to my E6 was in the hopes that someone (maybe you) would make TWRP. But since you have no intention of getting it, I have no intention of holding onto it. Been trying to flash a ROM via ADB for a while now (with failure), if it doesn't work out, I may just donate mine to you. Keep in mind, I dont know if this is important, but I am pretty sure my E6 has a bad ESN, if that matters with development. Thanks for your work.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] jasonmerc:
I don't think ESNs have to do with development or flashing things, that shouldn't make a difference as far as I'm aware. If it's got a bad ESN that could mean multiple things, I think it would be better off if you just kept it. Thank you for the offer though
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] koyo:
Unfortunate
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] Spaceminer:
I figured I'd try my hand at helping you folks out. If anyone wants to test this use, fastboot boot twrp.img and let me know what happens. If it doesn't boot then try flashing this modified dtbo.img, then try booting twrp immediately after. Also try the same thing using your stock dtbo.img. This was made against RETUS using my twrp for the G6 Play as a donor.

Links: twrp.img dtbo.img
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] koyo:
I appreciate the attempt but it did not work. With stock dtbo or the modified one you included.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] Spaceminer:
Did it send you straight to fastboot or did it boot the OS?
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] koyo:
Neither. It tried to boot to OS but it then asked me to factory reset data because it failed to load.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] Spaceminer:
That's a actually not a bad sign. I think it's just the fstabs. I'll take a look and rewrite them either tonight, or in the morning. I don't have much experience with system as root devices, but I think that I can get it working.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] koyo:
You are one of God's many gifts to Earth. We all appreciate it, even those who are lurking with no account.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] kwiksi1ver:
I am trying to get it to compile from source but it errors out every time. I can give you my twrp.fstab if you'd like. Or you can DM me and maybe we can work on it.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] :
A little tardy to the party, but has there been any progress? I've tried all three images. The first one doesn't work, and the other two will get stuck at the splash screen and then reboot, which promptly restores the factory recovery because of dm-verity. I'd love to see a working TWRP image, and I have an E6 that I use for experiments of sorts that I'm willing to test stuff with.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] VegasArkansas:
You can get it past the twrp splash screen if that's where you're stuck by doing "fastboot -w" then "fastboot flash recovery twrp.img" then boot into recovery. Unfortunately, even once TWRP opens up it leaves you with no touchscreen. Need an OTG cable and mouse but was able to get TWRP functioning. Hope this helps everyone.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] koyo:
What image where you able to get past the splash screen?
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] Spaceminer:
Did you ever figure this out? I'd like to know as well. I actually have this device now, so I'm sure I could get the touchscreen working. I already figured how to do it for the Moto G7 Play a few weeks ago.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] koyo:
Unfortunately I did not.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] Spaceminer:
I'll test them all and try fixing it anyways.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] :
Personally, images 2 and 3 got me into the splash screen, and I have verified that fastboot -w can get you past it, with the exception of a dysfunctional touch screen. Unfortunately, fastboot -w basically factory resets the phone, which means that you'd have to wipe it via adb every time you want to boot into TWRP. Maybe fixing the touch screen would also fix that issue? Idk. Just lmk if I can help in any way.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] Spaceminer:
I can fix the touchscreen. I just need to find the display panel name and insmod the driver. Check back in like ~30min or so. I appreciate the info!
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] :
Will do, thanks!
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] Spaceminer:
Can you run this command and give me the result? You need root for this.

cat /sys/devices/virtual/touchscreen/ft5446/vendor
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] :
I don't have root on my phone, but I'll plug it in and run it in adb.

EDIT: It just says "Permission Denied."
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] Spaceminer:
It's no use, I already tried it. It'll take me a little longer than expected because I'll have to grab the latest firmware to get root. Expect some tests soon. My WiFi is fast so it shouldn't take very long to grab it.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] :
Okay. Just reply if you need to test/do anything.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] koyo:
I have root. How would I go about using root to run this command?
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] Spaceminer:
Termux or adb shell

Edit:

From termux it's just su, then the command.

From adb it's...

adb root
adb shell
su
cat /sys/devices/virtual/touchscreen/ft5446/vendor
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] koyo:
I haven't got a message back but I went from being in /data/data/com.termux to being in focaltech:/data/data/com.termux
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] Spaceminer:
Just rerun only the cat command. Termux just switched to root mode is all.

---------- Post added at 04:23 PM ---------- Previous post was at 04:18 PM ----------

Okay, I see what happened. It's not giving you the full name. Try this instead. It'll give you a list. Just post what it says.

ls /vendor/lib/modules
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] koyo:
I've just acquired a screenshot I'm going to send to you in a bit.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] :
How'd you get root without flashing magisk/supersu?
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] Spaceminer:
You can pipe it to a text file like so if it's easier for you.

ls /vendor/lib/modules > /sdcard/modules.txt
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] koyo:
Screenshot: https://i.imgur.com/e7TNAN1.png

---------- Post added at 04:36 PM ---------- Previous post was at 04:34 PM ----------

https://xdaforums.com/moto-e6/how-to/rooting-e6-surfna-t3965659
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] :
Tried that multiple times before and it didn't work.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] koyo:
At what part did it not work
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] :
I flash the magisk_patched.img file and it shows a string of characters when I boot (which I assume is what the image was signed with) so I check for root after I flash and it says it just isn't at all.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] koyo:
Where did you check for root? Was it in the Magisk app or third party root checker? When you boot, did you boot into recovery or normal boot?
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] :
Wait, I think that was the issue! I needed to boot into recovery first. Thank you, I'm gonna try that.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] Spaceminer:
You always have to reboot into recovery or you'll lose root.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] koyo:
Remember: To maintain root, you can no longer normal boot, you most only boot by recovery for now on. It becomes tricky but I just use the Magisk app to boot to recovery whenever I want to restart my phone.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] Spaceminer:
[MENTION=7072887]koyo[/MENTION] & [MENTION=10519503]EnokiPPT[/MENTION]

What build version are you guys on?
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] :
I'm missing on a security update right now, so I'm currently on PCBS29.73-109-1
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] koyo:
SURFNA_RETAIL_9.0_PPB29.73-123_cid50
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] :
Maybe I need to get Magisk Manager 7.5.1 and not the other one, because I think I did something.

Here's the logs in adb:

(bootloader) is-logical:recovery: not found
Sending 'recovery' (15683 KB) OKAY [ 0.771s]
Writing 'recovery' (bootloader) Image not signed or corrupt
OKAY [ 0.261s]
Finished. Total time: 1.083s

Booting into recovery, I get a "Signature missing or corrupted" error, and then I get sent into the bootloader logs that say it failed to start. I'm gonna play around with the options it gives me to see if I can make it work.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] koyo:
The Signature Missing thing is intentional, and it is to be expected. Rebooting to bootloader logs is not. Try flashing the stock recovery from a firmware zip, using magisk manager to patch that recovery img, then flash that recovery img.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] :
What do you mean by "from a firmware zip"?
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] koyo:
https://mirrors.lolinet.com/firmware/moto/surfna/official/

This has a list of all of the latest updates for the Moto E6. You can download the latest firmware zip, extract it, and flash it using some program (I use Minimal ADB Tools). You only need the recovery img from the zip file, everything else is useless for rooting purposes.

Now, as long as you still have a stock recovery img lying around somewhere, you dont need to download one of those firmwares. But you will need to go back to stock recovery some way
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] :
So I just need to flash stock recovery first, and then the magisk_patched one? I have a stock rom downloaded already, so I can just grab it from that.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] koyo:
Yeah you sure can.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] :
Still the same outcome. I'm going to completely reflash the OS, rerun the stock image through magisk, flash stock recovery again, and then flash magisk patched one.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] koyo:
Go for it. Also, if you haven't, just for good measure make sure you update the Magisk Manager if you haven't.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] :
Reflashed the entire OS with adb, Sped through setup process, Downloaded magisk, patched the image, flashed it, and still the same outcome.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] koyo:
Well I'm at a loss then. Sorry. I will leave the suggestion of flashing the bootloader img, boot img, vendor sparsechunks, and then patching the recovery img of the latest update from the mirror link I gave. That would be all I have left, and I urge you to exercise caution if you do take me up on that offer.

Other than that, I'm not sure.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] :
Thanks, I'll try it.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] Spaceminer:
Send me your recovery.img, I'll patch it.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] :
Not sure if you wanted stock or magisk patched, so here's both.

Stock:

https://drive.google.com/open?id=1ex3I3AThF-C0Ehlr-oNBu2Yf03PVECUu

Magisk patched:

https://drive.google.com/open?id=14G0OmsQxDb08DP8yyCfnkW9r_xEB-Jj6
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] Spaceminer:
Surfna TWRP Test #1

You'll have to format data, that's a guarantee. The E6 I have available belongs to my wife so I can't test beyond this point.

If you boot it, it'll hang on the moto splash. If you install it, it'll loop but you'll see twrp's splash screen instead. So someone is going to have to try formatting and booting it, and also formatting then installing it.

You definitely will not get bricked from either of these actions. Just make sure you have your stock recovery on hand. If formatting data stops the loops, or gets passed the splash screen, then poke around and see if things work.

twrp.img

Dev Note:

Panel supplier = wistron

Panel driver = focaltech_mmi.ko
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] :
Flashed this to recovery, now there's an unused space in the top of the screen, and the touch screen still isn't working.

EDIT: So after flashing and removing the battery to turn off, the power button does not work. However, booting into fastboot mode and then booting using that works and does not boot loop. I'll flash stock and then try booting instead of flashing and will update this post with my results.

EDIT 2: Tried booting the image instead of flashing and it just shows the boot logo, then says that Android failed to boot. After selecting "Try Again", it will boot normally, so no boot loops here.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] Spaceminer:
Try this. After you flash it, use the volume keys in the fastboot menu to reboot into recovery.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] Spaceminer:
What's your model number xt2005-?
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] :
MetroPCS xt2005-3

---------- Post added at 01:31 AM ---------- Previous post was at 01:26 AM ----------

I flashed it and booted into recovery, Signature missing or corrupted message, then boots into android, but there isn't any root once I boot into it.

---------- Post added at 01:36 AM ---------- Previous post was at 01:31 AM ----------

Snip, accidental double post

the bad gateway error returns
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] Spaceminer:
No worries. I'll rebuild it tomorrow. I think you just need a different recovery dtbo. The dtbo in this one is from the xt2005-5 so that might be the issue.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] :
Alright. I have Carliv, later I'll unpack the twrp and replace the dtbo with the one for my model, if it's okay with you.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] :
Actually, how do I replace the dtbo? I'm not very good at this ;-;
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] koyo:
fastboot flash dtbo dtbo.img
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] :
I flashed twrp and then the stock dtbo immediately after. Still the same outcome, so I can confirm that the dtbo.img isn't the issue.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] Spaceminer:
You have 2 dtbo images. One is appended to the recovery image, and the other has it's own partition. They are not the same. That's why I said that I need to rebuild it.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] :
Oh! Thank you for clarifying that. I'm not very experienced with this type of stuff, but I am trying to learn.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] Spaceminer:
Carliv is a bad choice, you're asking for trouble. Use Android image kitchen or magiskboot binary via command line. Unpack the stock recovery image. Pull the recovery dtbo from the split image folder. Then unpack TWRP, and place that in it's split image folder. Make sure it's named properly. Repack. Test. If it doesn't work, try adding the kernel from the stock recovery to the split image folder.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] :
I'll try it tommorow, since it's getting late for me. One more thing, though. Is the split image folder the folder with all the unpacked stuff from the image?
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] Spaceminer:
The ramdisk has the most things in it. The split image folder will usually have a kernel, dtbo, a compressed version of the ramdisk, and some text files that add info to the image when it's repacked. The text files usually have things like verity signature info, build version, image compression type, kernel command line instructions, etc.

The ramdisk is populated with init.rc files, some partition mount info in /etc and a few device specific binaries in /sbin. It's all responsible for device bring up. They make files and folders, set permissions, and start drivers and stuff to boot the system. This is true no matter what kind of booting it is. Recovery, fastboot, normal booting. EDL booting is another story though. Hope that helps.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] :
What exactly is the split image folder though? The folder you get after unpacking?
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] Spaceminer:
It's all the parts of the image split up.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] :
Okay, so here's what I did.

I downloaded Android Image Kitchen and unpacked the file, went into the split_image folder, then added it to the folder and renamed it to "twrp.img-recoverydtbo" to replace the file that was there. After that, I repacked the image and flashed it via adb. The only difference is that adb now recognizes my phone when in twrp, but I can't sideload without going into the menus and enabling them.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] Spaceminer:
That's a very good start. Nice work! That's 1 step closer to Frankensteining a working TWRP together. Any touch capability? And can you see any menus?
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] :
Still no touch capability, and I can't see any menus because the Swipe to Allow Modifications option is in the way.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] Spaceminer:
That's not a bad thing. I think that I can help you get around that. I got to this point with the G7 Play right before I was able to get everything working right.

Try running

adb root
adb shell
mount -o rw,remount /system

If that doesn't work try this instead.

mount -o rw,remount /
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] :
While in TWRP? Because when I ran adb root, it says that it can't be run in production builds. adb shell gives this error: error: exec '/system/bin/sh' failed: No such file or directory
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] Spaceminer:
I should know how to fix that, and the touchscreen too. Send me what you have, and I'll make some edits and send it back. TWRP needs to load more drivers for touch. I'm fairly certain I know which ones they are too.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] :
Alright.

https://drive.google.com/open?id=1ziOHxHXlf9lV4CRuxHJzHbn_GxY_2OQ2
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] Spaceminer:
Try this. It's going to make all modules in vendor load. This should also force the touchscreen to work. Then we just need to narrow down the specifics from there. Shouldn't be too hard. TWRP will probably show some linker errors. It should be safe to ignore. Adb should be forced on by default now.

twrp-edited.img
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] :
Still no touch screen.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] Spaceminer:
Let me make sure I don't have a typo, we might need to add the kernel from the stock recovery to the split image folder. Try those adb mount commands from my previous post and see if they work.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] :
I think it's gotten a step further, but now I have this error:

error: device unauthorized.

This adb server's $ADB_VENDOR_KEYS is not set

Try 'adb kill-server' if that seems wrong.

Otherwise check for a confirmation dialog on your device.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] Spaceminer:
I do have a typo in the scripts that load the touchscreen. One moment and I'll fix that. Try running

adb kill-server
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] :
I did try that, but I still got the same error.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] Spaceminer:
Okay, I'll see what I can do about the adb problem. This should at least fix the touch screen. I checked more than once after editing it.

twrp-fixed.img
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] :
This one isn't working either. Still no touch screen.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] Spaceminer:
Try replacing the kernel in the TWRP split image folder with the one from your stock recovery.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] :
The twrp-fixed.img-kerneloff? Because it's the only thing in that folder that says kernel
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] Spaceminer:
It's actually named recovery.img-zImage in aik. I forgot that happens. If magisk unpacks it it'll name it kernel. I think I discovered the touch issue. The scripts were setup to look for a vendor slot, which you guys don't have since you're not a/b. I got another test incoming. This might fix it.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] :
I replaced the kerneloff file with stock one and still no touch screen.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] Spaceminer:
Try this.

twrp-test3.img
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] Spaceminer:
Try the kernel thing with this one too.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] koyo:
I want to thank you for the hard work you're doing man. Many lurkers are watching this thread and hoping you get to the bottom of this. God speed kind stranger
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] :
Found the ZImage thing lurking at the bottom and replaced it along with the dtbo, but still nothing.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] Spaceminer:
I'm going to try to find another device with the same soc and TWRP, and rebuilding from that. We're close to fixing this. I'll need to do some thinking though.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] :
Not entirely sure, but the Aquaris U2 might work. It has a Snapdragon 435 and is officially supported by TWRP.

https://twrp.me/bq/bqaquarisu2.html
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] Spaceminer:
That's a good lead. We can also try the Moto E5 Plus. (Hannah) So we've got 2 matches. The image needs to be arm32. I'll check them out.
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] koyo:
Am I insane or are we taking a TWRP made for a Snapdragon 435 device when we're using a Snapdragon 430? You are the developer guy here so you might know better than me
[Moto E6 ROMs, Kernels, Recoveries, & Other Develop] :
I did a dirty port of the Aquaris U2 image.

What works:

It boots past the splash screen (even without wiping userdata, from my tests), and now the entire screen is used, as compared to a portion of the screen at the top not being used with the one in the past few pages.

What doesn't:

Touch screen, and I'm not sure how to fix it. Can't test anything else because of that.

https://drive.google.com/open?id=1qTT7pZPHcN5J5bTP8y5s6afods_l3ZOk