yashsingh1/xdaforums huggingface dataset:
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] darkdaemon32:
It seems that the encryption issue is moot, the OS says encrypted but twrp seems to be working fine and i can read everything in /data. Everything from the OP seems to work as expected.

I am trying to find the root cause of being unable to flash xposed because i need it for the hide mock locations. Im just having trouble flashing magisk modules or using flashfire, I have tried from magisk manager, twrp and flashfire application, all of which fail with errors, what logs would i need to check? The only error i get is "install failed error1"

I need to use systemless xposed and magisk root to maintain my safetynet status for the apps i need, my problem is that xposed systemless will not install at all no matter how i try.

Edit: I just said screw it and installed regular xposed and using rootswitch to disable temporarily when necessary. Still unable to install ANY magisk modules even from bootable twrp
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] darkdaemon32:
Log for trying to install app systemizer terminal and Xposed systemless attached as well as trying to update magisk framework. Same error no matter what packages I try to install with magisk manager. Twrp errors out as well
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] mightysween:
Not much in the logs... both failing on an some kind of adb mount, it looks like?

You may have better luck in the Xposed/Magisk forum. A quick search and there are others with the same error.

There doesn't seem to be a problem with TWRP itself... it is likely failing for the same reason.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] darkdaemon32:
I resolved my issue by just going back to 7.1.1 with SuperSU and su hide instead of magisk. All I needed was safety net bypass and this config fits my needs. A shame I can't use Oreo because I quite liked the new features. My issue seems to be two fold, the new flashfire is broken for my device as well as magisk having issues with Oreo. Thank you for your help.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] IVANWB:
Is it necessary to unlock the bootloader on the motorola website to carry out the process?

I did not understand the part "From bootloader, fasboot BOOT TWRP",

how will I execute flash?
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] darkdaemon32:
The method your referring to in the OP is about BOOTING from twrp with a usable recovery and the ability to access the filesystem. You need to edit the fstab file and wipe data from within the BOOTABLE twrp in order for this to work. Then from there you can flash the FLASHABLE twrp. Obviously to flash a custom recovery from fastboot you need to unlock your bootloader. The first part is only for people who need recovery temporarily and have access to a PC. Since Everytime you wanted to get into twrp you would need to use "fastboot BOOT bootabletwrp.img"
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] JaviLerma:
Hi guys, can i use "fastboot boot nametwrp.img" command only for backup boot.img? I need boot.img for patch with Magisk. Thz
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] cuvtixo:
formatting

I was about to use extreme google-fu skills to find the "Formatti" app to unencrypt my X4. Obviously it was made by an obscure Italian developer. ;)

I used to resent "spelling nazis," on forums, but on an international forum, working with Chinese manufactured devices with unfortunate Chinglish documentation; a missing "g" can make a big difference.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] mightysween:
Hahahahaha. This is great.

I will add the "g". And the "n".

:)

It is remarkable that the complaints here are about spelling and grammar, even when there are step by step instructions that explain how to go about "formatti" your device. ;)
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] Giocarro:
Apologize for asking here but on the root thread I had no answer in two days: I have issues getting fastboot work on my Windows 10 laptop, as the X4 is recognized but no drivers are found.

Could someone please direct me to a drivers and ADB package able to get fastboot up and running?

I just want to root the device to use Substratum themes, nothing too difficult once got root.

Thanks in advance!
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] kkjb:
https://developer.android.com/studio/run/win-usb.html

Trying to use a prebuilt single solution can have troubles.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] Rohitsri:
FBE Mode for Nougat

Thanks for your awesome work Mightysween on this device.

I have TWRP running on my Google Fi Moto X4.

-- I had never upgraded from the original Nougat build in a hope to re-install custom OS some day. Is there a way I can force FDE on Nougat so I can hopefully use the SD card as internal storage? I don't know where the fstab is located to change it.

-- If I upgrade to Oreo now, do I need to worry about re-installing TWRP ? Can upgrade to Oreo help with forcing FDE.

If I can use my sdcard freely and management-less, there will be lots of folks who will do this!

Thank you again!!
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] erfanoabdi:
Hi guys i built new TWRP, oreo and N with encryption

img : https://androidfilehost.com/?fid=962187416754469184

installer zip : https://androidfilehost.com/?fid=746010030569962775

please try if everything worked i'll go for official

****** Don't swap slots if you don't have firmware on your slot B, this will brick the device and you have to use blankflash to unbrick

Tree : https://github.com/erfanoabdi/android_device_motorola_payton
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] toddnez:
Amazing. Thank you very much. Do you flash in same manner as OP, or flash TWRP the traditional way?
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] erfanoabdi:
follow this Installation method:

https://twrp.me/motorola/motorolamotoz2force.html

no need to edit fstab or decrypt phone
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] Mesonic_Interference:
I was able to get this to boot, and things seemed to work well. However, in both the bootable and installed TWRP instances, I can't mount my external SD or any USB OTG devices. Is that by design, or should I check again that I haven't done something wrong in my installation?

Thanks again for helping make this possible!
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] kkjb:
Since this is a experimental thread... Nothing tested, Magisk has a module that does what you want. MAYBE... I am waiting for others to try. For now this phone is a daily driver. Magisk with twrp works for most devices. Caution though if you root and remove AND don't follow instructions. I bricked my Pixel 2 that way. A lot more people are on that phone so careful.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] erfanoabdi:
yeah my bad

try new version twrp 3.2.1-1

img : https://www.androidfilehost.com/?fid=890129502657592097

zip : https://www.androidfilehost.com/?fid=746010030569962913
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] kraatus90:
on previous build, it doesn't accept my password.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] erfanoabdi:
are you in feb security patch?

it's twrp bug :p

remove security password/pin/pattern and try again
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] kraatus90:
December actually. and with custom kernel.

trying again :D

Edit ; works (password accepted in new build). flashed my kernel zip too. but root is gone. i guess gotta flash magisk again ?

Edit2; got root back again with magiskzip. custom kernel still there, and no freezing issues. backup working. restore didn't tried yet. also i can boot to recovery/system/bootloader from app. i think everything works. will try restoring the backup tomorrow morning.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] steveeJ:
Thanks for this! I can confirm that the following works

data decryption using a pattern

flash from internal/external storage

flash via adb sideload
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] romhippo.com:
Wow, this is great news. We have been waiting for this. Thanks!
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] anonyo:
Wonderful, great work. Thanks
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] :
Moto X4 twrp now official but still this thread says unofficial.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] romhippo.com:
The TWRP in this thread is a different version (which was only partially successful). The OP should probaby update the first post ...

The official TWRP is located at https://twrp.me/motorola/motorolamotox4.html

Maybe the OP could also tell us what was the missing piece :)
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] igna.98:
Amazing! Now that we have fully working TWRP, next step is custom ROMs ?
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] bamaredwingsfan:
This is for the Android one project fi version correct?
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] mightysween:
Just catching up on the last few weeks of posts. Haven't looked at the source tree, but I assume it was getting qseecomd in the right location and getting /vendor copied from/to the right location.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] mightysween:
Also, OP updated to reflect official TWRP.

I haven't worked on it in months anyway, but will no longer be active on this thread. The bootable TWRP may still come in handy, though... unless official also is bootable (I haven't checked).

After 6 months, glad to finally see a couple more devs jumping in here. Perhaps we will see some progress on custom firmware soon.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] dracopast:
Is anybody able to backup / restore the phone with android one on encrypted file system??, im using the official twrp, but restoring backups just cause the phone to bootloop
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] romhippo.com:
Thanks for the update!
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] brandontowey:
Thanks for all your work on twrp, much appreciated.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] screwyou00:
I can restore encrypted file system backups, but only if I am restoring a backup where the backup's file system matches the current file system. If I make a backup of a clean install, add root via magisk, and then try to restore the clean install w/out root it fails with either bootloops or TWRP failing to finish restoring; kind of makes TWRP useless.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] LionLorena:
This encryption removal means that we can actually use Adoptable Storage?
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] mightysween:
No idea.

I would guess it would require additional work on boot/kernel unless it was left enabled by Moto... not something I have ever looked into.

FWIW, this thread is pretty well dead, plus is a recovery thread. You should post in general or Q/A.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] munchy_cool:
when you get a chance , can you please look into this bug.

https://github.com/TeamWin/Team-Win-Recovery-Project/issues/1234

let me know if you need anything from my end.

paging [MENTION=6298645]erfanoabdi[/MENTION]
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] Flak:
Does booting to recovery no longer work without unlocking the bootloader? I tried fastboot boot recovery.img and get the following (tried with the bootable twrp from this thread and the official twrp):

downloading 'boot.img'...

OKAY [ 0.516s]

booting...

(bootloader) permission denied!

FAILED (remote failure)

finished. total time: 0.521s
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] munchy_cool:
on which device did it work without unlocking the bl?
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] lucasbitencourt:
New version available, I think when the update come to X4 we can install the 28.2 OTA zip!
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] MotoX4:
TWRP 3.2.2-0 was released as an img file but the zip has yet to be released.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] flamand:
solved

I'm getting "no command" when I try to boot to recovery. I've just done a fresh June update, got to recovery via fastboot, installed the zip and then I get that error. Is there any fix?

Before the update I never could get to recovery if I had a password set. The only way I could do twrp backups was booting from fastboot.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] sjgieson:
Backups/Restore

I know there can be issues with encrypted file systems but I am unable to do a backup/restore of a lineage based OS.

I would love to be able to restore my stock rom as well, is there a procedure that is verified to work with backup/restore on the X4? I could not find one documented.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] anonyo:
Latest official TWRP 3.2.3.1 released as an .img (Sept 10th), but no zips files after 3.2.1.1 (June 10th). Does anyone know what this is all about? Why no zip files?
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] abrfilho:
It's because TWRP don't have official support yet, but you can download it here:

https://androidfilehost.com/?w=files&flid=282132

Have some bugs, but you can flash any ROM without a problem, if your password is not accepted, just remove the password from your system.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] anonyo:
Thanks, but 3.2.3.1 zip released on Sept 11th on official twrp site, https://dl.twrp.me/payton/
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] murrty:
Ever since installing the latest TWRP (3.2.3-1), I've had issues with GApps, and it never happened before flashing TWRP (which I thought would be just a quick flash to upgrade). Now, whenever I try to flash GApps it either doesn't install Play Store, Services, and Framework, or it installs the Play Store and Services, which whenever trying to open the Play Store causes the Services app to crash repeatedly. Am I missing something?

Edit: I restored back to 3.2.1-1 and it works with flashing. I'm just going to stick with that until more official ROMs come out to work with.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] JDBarlow:
When I do a backup I get an error every time and it won't restore as well.

I'm using 3.2.3-1

Is there something I'm missing??
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] Somairotevoli:
Make sure you turn off device security, screen lock
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] JDBarlow:
:highfive:

That did it!! Appreciate that man Merry Christmas!!
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] JustACuteWolf:
how do i enable / disable dm-verity?
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] creeve4:
Is there a method for decrypting and preventing forced encryption on pie? The fstab manual editing method in the OP is not working for HavocOS.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] nemocura:
Hi is this moto x4 twrp suitable for all payton models ...... mine is payton xt-1900-5
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] St.Noigel:
Yep)) Just use official TWRP with unlocked bootloader
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] nemocura:
twrp moto x4

Hi thanks for your response when you say use official twrp the one listed on this thread say unofficial so is it this one or do i need to source from eleswhere thanks
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] primaputra:
the link (twrp website) in the first post is official. it will provide the download link and way to flash twrp
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] Neffy27:
Use official.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] jhedfors:
Is there a place we can track any official or unofficial development? Just curious if there is any work on getting TWRP to work with our device with encryption turned on?
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] gee one:
I don't know of any one place for twrp development.

There is an unofficial version that has MTP enabled (built by [MENTION=7887589]SyberHexen[/MENTION]) that can decrypt on LOS 16. It's odd the 3.2.3-1 version worked fine on 15.1, but suddenly stopped on LOS 16.

The unofficial MTP version is 3.2.3-0 and works on LOS 16. I think it does not work on LOS15.1, but I don't recall specifically. I was able to restore a backup from one to the other when I upgraded from 15.1 to 16, so I think it is strictly a decryption issue.

It looks like the MTP version was built with OmniRom trees if that makes a difference. As far as an installer goes, that might be a trickier issue. I suspect that this is why the decryption is failing- the verified boot uses the verity key as a part of the decryption key. If the verity key changes, then the decryption key won't be correct. This is another way that your data are protected with encryption. A bad actor can't change your boot.img and kernel to steal your data without knowing the private verity key. The phone will bootloop into recovery if the decryption key is incorrect. If verity is enforced, the phone will refuse to boot and you will get the dreaded red warning if the bootloader is locked.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] jhedfors:
Thanks for the info - this is very helpful.

Are you able to direct me to where I can find this modified TWRP version? I have been unable to find it so far.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] gee one:
It's in the telegram developers thread- you can search for MTP to find it. I'm traveling now but I'll be in front of a computer soon.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] jhedfors:
Thanks. Not sure of the correct thread to search in telegram, as it is not in the OP.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] xeropressence:
Yea, running into the same issue, decryption failing on pie roms. Theres a open github issue https://github.com/TeamWin/Team-Win-Recovery-Project/issues/1387 but no one has commented on what would actually need to be done to get it to work like the previous versions.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] xeropressence:
[MENTION=2091002]jhedfors[/MENTION] were you able to find the telegram? [MENTION=2790198]gee one[/MENTION] could you post a link?
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] joecool1029:
Found the telegram: MOD EDIT: LINK REMOVED

I uploaded the custom using Firefox Send. Link will expire in a week, but for all non-telegram users that want to host elsewhere: MY EDIT: GO FIND IT YOURSELVES SINCE EVERYONE WANTS TO COMPLAIN
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] the Doctor:
Using XDA to direct members to other social media platforms is not allowed.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] joecool1029:
Ah, good to know since I found the link using XDA's search function. :rolleyes:
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] SyberHexen:
You should credit the dev who built that twrp.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] joecool1029:
Hey man, I'm just trying to help people out since nobody else could locate it. By no means am I trying to swipe your credit, put your name on the filename or something. I pulled the link down since it appears I'm just going to hear crap from mods, devs, and now probably users that want it back up somewhere.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] SyberHexen:
Yea I'm not sure where right release would be for that to be honest.

Not mad just pointing out credit should be linked when sharing files n links.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] xeropressence:
Do you have the source for this up somewhere? If it has features that the offical builds don't have we should try and get them merged.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] d4rk3:
Enjoy :)
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] xeropressence:
That is not the source code....
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] d4rk3:
Ahhh yes, next time I will use my eyes to read lol...my bad.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] Quantumstate:
Wow. He's given up on TWRP Payton. This means we are trapped if we have a comprehensive phone install.

Update Lineage and no more TWRP unless I reflash that and SU. But it can't decrypt so TWRP is of no use in this case anyway. Can't write anywhere in /.

What's going on isn't magick. I suspect there's a G**gle thread run by some service which is responsible for 'reappearing' rogue apps we delete like calendar/contacts sync and fiddling with permissions. I doubt it's just SELinux alone as that wouldn't physically make changes, just deny access.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] dougo007:
I'm confused.

Why are ppl exclaiming that TWRP is no longer being supported when it says so otherwise here?

https://twrp.me/motorola/motorolamotox4.html

There are no new versions that were made yet as noted here.

https://twrp.me/

So am I missing anything or is there a file transfer, MTP, or decryption issue?

If there is a decryption issue, would removing the phone lock (pin/pattern/password) fix it?

If there is a MTP issue, then I'd suggest just moving the files over before before booting to recovery; I've done that before. Although, I usually just ADB push stuff over.

On a related note, would booting to but not installing TWRP cause a decryption issue as I will probably not install it in this device since there is no dedicated recovery partition and I don't feel the need to always have it on hand?
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] xeropressence:
Decryption has been broken since pie came out. Mtp since before then. The version posted a few posts back is not an official release, some were saying it has mtp, unsure about working decryption. Waiting on source, bootable version before I try it.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] d4rk3:
twrp-3.2.1-1-payton.img is my go-to...simply because MTP is 100% functional.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] jesslegentil:
I just tried the custom one and decryption works. With is AWESOME!!! So thank you to whoever made it. I don't understand how someone can get it to work unofficially but the official guys can't.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] SyberHexen:
My source is on a closed PR which is visable on the official twrp github for this device.

That's what makes mtp work.

Decryption was pure accident which I can't reproduce

I believe it was where I downloaded repo / branch for device/qcom/common which contains the crypto bits
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] xeropressence:
Dang, don't have the same build environment that was used to create that?
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] SyberHexen:
I deleted the original omnirom source.

When I built again in the future decryption wasn't working.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] dougo007:
Is decryption an issue if there is no pin/pattern/password for the device?

Also, how can a custom ROM be installed if the system can't be written to in the first place?
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] jhedfors:
From my experience, decryption wasn't an issue after removing PIN, etc .

Only data is encrypted so it should not affect the system being written over with new ROM.

Edit: Been using [MENTION=7887589]SyberHexen[/MENTION]'s custom build for s few months, and it has been working great. It has been nice having MTP working as well.

I wonder if boot slot changing will work again? ( I keep a backed-up older version in case I need it).