yashsingh1/xdaforums huggingface dataset:
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] qvmuhuuxz:
eagleeyetom, thank you for not giving up on getting encryption to work!

thanks androplus and greyleshy too.

I have the X Compact/kugo, it is a loire device too.

I see your suzu repository just has 1 extra commit from the omnirom repo ('suzu: use prebuilt kernel')

I assume if someone adds that 1 commit to the omnirom kugo repo - https://github.com/omnirom/android_device_sony_kugo

and uses your 'fixed' android_device_sony_loire-common repo, we should have a TWRP with working decryption for X Compact?

Or would more need to be working on?

Any advice is appreciated!

I have no idea how to build it all together, but it seems like the pieces are done and just need to be put together by someone who is knowledgeable.

Thank you.
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] eagleeyetom:
Adapting the source to the X Compact should be fairly easy. I've added suzu specific files to loire-common because it was easier to maintain. You need to use the kernel from the latest OmniROM/stock/whatever and possibly extract the qseecomd from stock ROM and apply the sed patch. I can help you out with porting or even build a TWRP image to test if you want.
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] qvmuhuuxz:
If you could build a image I would be more than happy to test!

I am running 7.1, patched stock kernel (so dm-verity + sony ric is disabled)

So you need my qseecomd? I can upload if it's needed.

I really appreciate this, thank you.
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] eagleeyetom:
Would be great :) I will download the latest nightly of OmniROM and try to build something in the evening.
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] eagleeyetom:
Can you try this image? Decrypt might not work, as I used kugo's qseecomd. Just extract and flash.
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] qvmuhuuxz:
As soon as my battery hits 80% I can start encrypting, then I'll boot it and test - I will be sure to let you know! Thanks

---

[MENTION=3544509]eagleeyetom[/MENTION] - perfect!

I encrypted, the old twrp couldn't access my data after I entered my password.

I flashed your build, and just like magic... it works :) :good:

Thank you very much. I'm very happy with it and I am sure others will be too.

Do you want to post a thread over at the X Compact area?
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] coconutxyz:
sorry but did you get the recovery to work on stock rom and kernel? after flashing recovery 3..1.1 im stuck at sony logo
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] tanago:
I'm using my stock rom and my custom kernel made with rootkernel from Z5 development thread with ric off, dm-verity off & drm-fix
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] coconutxyz:
ah i see, thanks a lot
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] eagleeyetom:
I can try ;)
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] mase76:
Which version shall I use now? I have a bootloop with omnirom. I flashed twrp 3.1.1.
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] rec0re:
The latest Version 2017.7.16 working fine with OMNI, for instructions read the first...
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] mase76:
Thx! Works now after I repeated a wipe and reflashed omnirom again.
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] mase76:
Does this TWRP have the logd battery drain problem? My battery does not last very long.

I have Omnirom without gapps, but installed microg.

I will try the renaming of logd to see, if it is better then. But I will have to do this after

every ROM update.

I wanted to try the service menu way to disable logd, but i found no working USSD code.
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] tanago:
stopped decrypting with the latest fw .217
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] eagleeyetom:
I tried today and the decryption worked just fine. I'm using YasuHamed's clean kernel. Can you provide the log?
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] tanago:
my bad, I was flashing the 09.07 one, sorry
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] kreatik:
Tested with the 34.3.A.0.217 (customized FR) but not working, Sony logo loop and TWRP ask for a password (encrypted partition) :(

Any idea?
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] slothdabski:
Format data partition and flash SuperSU or magisk to keep device from encrypting again
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] Moal Dibejaan:
I do restoring using this TWRP, but why fail ?. Can you explain how to backup so that nothing happens anymore when trying to restore my system.

thanks.
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] eagleeyetom:
It looks like an issue of TWRP. I will rebuild the recovery and post a test image.
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] Moal Dibejaan:
Thank you, I will wait for your repair for this problem.
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] eagleeyetom:
Please take a look.

https://github.com/omnirom/android_bootable_recovery/issues/133

You can also try to make uncompressed backup. It will work. However I'm building the image now.
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] Moal Dibejaan:
Thank you very much.
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] eagleeyetom:
Try this image.

https://www.androidfilehost.com/?fid=673368273298979797

Edit: I needed to change the link, as I compiled on the wrong device tree.

Please note that you most likely would have to create a backup again. I'm not sure whether this works or not with an existing backup.
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] Anton2365:
Hello guys :)

Sorry to be a noob, but is it possible to flash this version over the one provided in ParanoidAndroid? And if it is, how can I do so?

Greetz
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] JoeWan:
Yes, you can simply flash this and then install paranoid
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] Moal Dibejaan:
Thank you, you are so great. Recovery.img it goes perfectly for backup and restore. Thank you very much, thank you very much, and thank you very much.
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] eagleeyetom:
Is it working with compressed images?
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] Moal Dibejaan:
Work on both.

X Dual F5122 :):):)

https://drive.google.com/open?id=0BzSvKAuDHQkAQjhWZ1hVZGd4cEk
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] eagleeyetom:
Thanks for testing!
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] eagleeyetom:
Ok, folks. A new version of TWRP is uploaded. It should fix the restore problem.

Happy flashing!
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] Giammarcoperiphery:
Unluckly i had that problem..
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] shahmiez14:
Guys, i need help. .

After flash recovery.img , i reboot my phone and my phone boot normally. But, when i enter to twrp recovery mode. .

My phone stuck on SONY logo after "reboot system" in twrp recovery. .

What should i do ??
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] eagleeyetom:
Try using DRM-fixed kernel. This might help.
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] mbc07:
Um, does this recovery employs any kind of thermal management? AFAICT, TWRP is basically a custom kernel compiled from sources (in this case, OmniROM sources) from where it runs, right?

I'm asking because I recently took a compressed dd backup of the data partition to a flash drive attached through USB (ran dd if=/path/to/userdata/block/partition | gzip -c > /path/to/usb-otg/img.gz from TWRP's terminal). I didn't encounter any issues, but the phone got extremely hot during the process, I barely could touch it with my bare hands (the CPU reading inside TWRP topped at around 75° C while the command was running). Since I was curious, I re-ran exactly the same command from Termux (running on stock rooted ROM), the process also finished without issues and took roughly the same time, but the CPU temperature never got past 45° C.

I never saw any phone get that hot (not even my mother's Xperia Z3+/Z4 with the infamous Snapdragon 810 get such high temperatures) and it concerned me a bit. Could anything be done to address this?
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] mase76:
When using Sailfish X, TWRP does not see any partitions. So I am not able to backup

SFOS.
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] Flaschengeist:
Paul.knospe98@gmail.com
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] xperiam123:
I flashed the trwp and now my phone is going straight to the recovery instead of booting into the system. What do i do please help.
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] chutch002:
Good work but lost touchscreen!

Hello,

Great work porting this to the X!

I installed it and managed to flash Paranoid Android from this thread: https://xdaforums.com/xperia-x/development/rom-paranoid-android-v7-2-1-t3640440

It worked fine for one boot, then I went back to recovery.

Touchscreen had stopped working. Tried to go back to PA, touch has also stopped working on the ROM!

Not sure what caused this but seems strange it happened after I booted back to recovery?
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] fusk:
Well, 8.22 worked one time. No matter how many times i try reflashing it, it continues to ask for password and i can't mount anything.
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] Pouya Rezaei:
You must wipe data and reboot
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] babelus:
I have TWRP 3.1.1 with unlocked bootloader and stock firmware (7.1.1) with custom kernel (dm_verity and sony ric disabled). If I wipe /data and boot to TWRP I can decrypt system. After I boot the system I will no longer be able to decrypt system from TWRP. Is this by design or is there a way to mount system after booting Android, which I assume encrypts the partition.
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] eagleeyetom:
Try using the latest version of the recovery.
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] fusk:
Thanks, i think that did the trick.
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] Pouya Rezaei:
this is because the kernel is encrypting the data.
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] babelus:
It worked, thanks. I didn't notice there are 3 binaries in the download link - all seem to have the same version number, but behave differently. Would be nice to call that out in the first post.
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] eagleeyetom:
Nobody complained so far ;)
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] MichaBit:
Will there be a TWRP v 3.2.1 ? :confused: :angel:
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] eagleeyetom:
Hopefully yes ;) I'm waiting for Oreo to drop to tackle on encryption.
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] MichaBit:
Thats very good news, Sir! :good: :highfive:

This minute ill call Uncle Oreo and tell him to drop the Stuff. ;)
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] Glassed Silver:
Not sure if I really want to complain, but what I will do is say that some folks show up in these threads after they went through a lengthy process getting other stuff to work on their device. Since not all Androids are created equal this is my third "learning curve" experience and I'm infinitely thankful for everything that is straight-forward and simple at this point.

Minor gripe, because right now I'm still trying to figure out how the hell I'm supposed to create a valid FTF with Androxyde's flasher.........

Any tutorials I can find that are about the Xperia X are many many months old or the process isn't replicable on my end with success. (system.sin fails to flash properly...)

I wasted my Saturday and now my Sunday as well... Rest in peperonis, weekend. Was nice passing by. :D
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] eagleeyetom:
As far as I remember, you need to download an OTA via Xperia Companion and then convert it to FTF.

Below is a how-to video.

[YOUTUBE]xgqw8uSpyd8[/YOUTUBE]

What is the problem, exactly? What error code? Perhaps you need to update Flashtool to the newest version.

Let us know about your progress :) Good luck!
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] Glassed Silver:
Hmm, that video doesn't load for me. :confused:

And yes, I used a current version of Flashtool. What's funny is that I was able to flash an FTF with it, it just didn't bundle the one I want and got through XperiFirm. That one always failed. Another one as well (another story...)

My bootloader is unlocked, how do I now download the desired OTA via Xperia Companion? Especially because it will only download the current CDA (Nordic) and what I do want is a clean slate with my actual region. (German)

Even EMMA only lists Nordic images... which is of little help...

There isn't a funny way to have it use what I downloaded with XperiFirm myself, is there?

Also, I'm noticing that ADB devices doesn't list my device... Not sure how to fix it, uninstalled and re-installed the drivers several times.

Please don't ask me which ones, I'd love to know myself at this point, but they were suggested somewhere...

I have WAY too many tabs open and my download list is filled to the brim. As is my mind lol.

So much for my previous assumption Sony provides actual flashable images in the format that you need.... No it's all just hacked together and EMMA insists on the same messed up CDA marriage as Xperia Companion. Derp...

So... EMMA only exists because Xperia Companion hatest unlocked bootloaders right? Jolly Lord... I must be missing something! :confused:

They create a tool to fix a role that they specifically designed their primary tool not to support for... which reason?
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] eagleeyetom:
I'm using German firmware right now. I can upload it for you if you want. As for ADB, try using this if an official SDK doesn't work. EMMA is quite useful if you break your boot and can't access recovery. It helped me a few times. Also, you can use it to flash the newest radio for suzu. Also I made a typo in the link. Video should work now.
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] Glassed Silver:
Flashing the newest radio? :confused:

And I got ADB working now it seems... I fumbled with device manager a little more... Curious if it will work now...

My current plan is to install TWRP, root with magisk and then change the build.prop to reflect another CDA and then restore using EMMA to my desired firmware.

I just want to source as much as I can from official Sony servers... I't not like I'm NOT trusting you you know, but I'm coming from iOS and whilst it's a golden cage I have always enjoyed the high level of security and I'm trying to make my Android experience as secure as I can.

Currently charging my phone a bit, because it had been rather low and I want to start my bazillionth try with a nice full charge of juice. Added bonus to calm down a bit and refresh my own patience. :laugh:
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] eagleeyetom:
Yes, radio, baseband and bootloader.

Let me know if you change your mind ;)
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] Glassed Silver:
Just flashed TWRP and it's WORKING BABY.

Now on to installing magisk! Whew, super glad something finally worked again. :silly:

Now with Xperia X... do I allow the system to be written by TWRP if all I want is stock firmware with Magisk Root and OTAs working?

I also want to try some magisk modules if there are any that fix the horrendously low volume issue...

I assume I'm picking write right? Damn, I'm sure I know the answer, but my mind is just garbage right now and I want to finally see the finish line and play some Overwatch. :D
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] eagleeyetom:
Good job! If you want to flash OTA, you need to flash stock recovery and boot image. The fastest and hassle-free way is applying an FTF via Flashtool. There should be a module to fix that. Just browse through the repo.
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] Glassed Silver:
Same old story again... Just tried the Flashtool again, because there is nothing in the build.prop that seems to store the CDA unless it's encrypted in there which I really doubt.

This error is returned in Flashtool:

Booting the Xperia I get this:

notice about the unlocked BL

white screen

You know what, I'd gladly take the FTF now. I mean, once my device identifies as German Generic ROM EMMA will gladly reflash it anyways.

As for TWRP/Magisk: Could I install Magisk with ADB/Fastboot and not install TWRP, hence getting systemless root AND being able to OTA update?

I assume I'd need to re-root the same after an OTA update though, right?

Really all I want is vanilla, OTA, systemless root and passing safety net. And obviously keeping ALL functions like X-Reality, DRM, etc...
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] eagleeyetom:
I'm uploading an FTF now. This will take a while since I have only 20 Mbps upload. Magisk won't work via ADB/Fastboot. You need to flash TWRP, root your phone and flash an update via FTF. You can also flash /system, /boot and fotakernel which contains the recovery and try to OTA. Sony devices are not the most friendly when it comes to updating without using any cables and a PC. I hope that you have a backup of your TA partition. It's needed to have fully functional level 1 DRM.
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] quickgiant:
Hey, looks like sources are out for the new firmware: https://developer.sony.com/file/download/open-source-archive-for-34-4-a-0-364/
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] eagleeyetom:
Yes, I noticed. Hopefully, we will crack it soon.
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] MichaBit:
You can do that! :victory: //who needs sleep.. ;)
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] YasuHamed:
sir can you help on Oreo ? after flashing latest build .364 (Oreo) (Suzu / F5121 / F5122) the TWRP cannot read internal partition. give password error
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] eagleeyetom:
It doesn't work on Oreo yet. That freaking decryption is a headache. I and few other devs are working on it. Stay tuned. It will be released when it's done.
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] YasuHamed:
Thank you sir for prompt response
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] mbc07:
For the next release, could you guys add "apps_log", "diag", "persist", "ssd" and "TA" partitions to the list of backup-able partitions of TWRP? I'm not totally sure of what's stored in them, but it's something that should be persistent as just like TA and Qnovo, they never get wiped when updating the firmware through Xperia Companion...
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] YasuHamed:
sir plz check this

https://xdaforums.com/x-compact/development/twrp-3-2-1-decryption-t3751998

i flashed it on X

it boots, but screensize is half and touch doesnt work....
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] cecchy00:
when it comes out twrp for oreo that not ask for the password?
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] Glassed Silver:
Whew, I really need a new release. Apparently updating Oreo subversions whilst keeping your root and all that jazz is causing more trouble than is worth unless you're stoked about wiping /data which I am not given the lack of proper backup solutions, especially not involving the cloud. (which disgusts me)

A new release would really save the day, although I must admit I've learnt my lesson and hope to know what to check for in future when shopping a new Android device. ****'s getting more intense than OG iOS jailbreak days. :eek:

Either way thank you so much for your work, if it wasn't for you my experience'd be a real burning train wreck. Love you man! :good:
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] d_mouse81:
What do you need to backup that something like Titanium Backup isn't enough?
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] mbc07:
Just FYI, as long as your /data partition isn't encrypted, the current TWRP 3.1.1 build works perfectly fine in Oreo. The only issue I noticed is that adb sideload won't work, but other than that, everything works fine...
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] Glassed Silver:
Titanium is made for app-based backups, it's not made to create backups of things like system settings to name one example.

I would like an all-encompassing backup solution.

What's more, Titanium has already failed me once. There is a game I tried to transfer from an old Amazon Fire 7 tablet (custom ROM including Play Store that is) which downloaded additional assets on the first launch way back when you could still get it. It has since been pulled from the Store, possibly a rights issue, at least that's what the dev claims iirc.

When I tried to install the apk on my Xperia it tried to download these assets on first launch and it failed. Well, lucky me that I have Titanium Backup, right! I will just copy it's installed state and paste it on my Xperia...

Well, that didn't work. Maybe it's specifically this game, but it does leave a bad aftertaste. And either way, it's app backups only, no home screen layout, no launcher settings, no WiFi networks, etc...

Well, it is and apparently once it is removing the encryption isn't as easy as hitting a toggle or I'm missing something. :confused:
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] 1f5:
Does it work with Sailfish OS?
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] sgrunt:
Hello !

I'm trying to put this recovery in my phone, but I've this error message:

➜ fastboot devices
BH900FML5L	fastboot

➜ fastboot flash recovery twrp-3.1.1-suzu-2017.08.22.img
Password:
target reported max download size of 536870912 bytes
sending 'recovery' (19832 KB)...
OKAY [ 0.626s]
writing 'recovery'...
FAILED (remote: Command not allowed)
finished. total time: 0.629s

But I've unlocked my bootloader as you can see:

Following the guide here: https://developer.sony.com/develop/open-devices/get-started/unlock-bootloader/

Everything is stock on my phone.

Do you have an idea of what could cause this issue ?
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] mase76:
Try enabling adb over usb.
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] mbc07:
Did you run "fastboot oem unlock 0x<you device unlock key>" command? Remember that all user data will be wiped and that your DRM Keys will be permanently wiped after you run this command. It's strongly recommended to downgrade to Marshmallow firmware to make a TA Backup with DirtyCow BEFORE unlocking the bootloader...
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] sgrunt:
Thanks for your answer!

Between my first message and your answer I did all the unlock process again with flashtool, and it worked. So TWRP is flashed now :good:

I know that my system and data will be wiped, but I didn't know the TA Backup and DRM things... I didn't do this backup :(

Is it very bad ? What did I lost ?

BTW I've my OmniRom now, so thank you very much for all the work you've done!
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] PherChe:
Thank you for share your work =) I appreciate to have this tool.
[Sony Xperia X ROMs, Kernels, Recoveries, & Other D] mfranzl:
Worked for me, thanks for your efforts!
[Huawei P9 Lite Questions & Answers] wimsjohn:
If anyone else has also found this issue... I think it's caused because of the "Hotplug" by of the Kirins... When i apply a base load like an app monitoring in the background everything is fluid and the CPU usage of insta doesn't go over 10%. So... has anyone found a Kernel which might fix this?