yashsingh1/xdaforums huggingface dataset:
[Sony Xperia X Compact Guides, News, & Discussion] SebS23:
,)

Yeah it will work. Simply downgrade to Android 6, backup your TA, and flash the latest ROM.

It's all explained a few posts earlier... ;)
[Sony Xperia X Compact Guides, News, & Discussion] ja_android:
Hi

I need help I am stuck in bootloop.

First I installed rom .206 with FlashTool.

Not booted and install kernel, twrp with fastboot then rebooted in twrp and installed superuser.zip.

There was no errors during install of twrp and superuser.zip.

Then I rebooted from twrp an d now I am stuck in bootloop.

I can see only Sony logo.

Tutorial say be patient, let it finish. For how long ? What is yours experience.

What can I do now ?

Any advice
[Sony Xperia X Compact Guides, News, & Discussion] qvmuhuuxz:
I am very happy with my setup and I recommend it.

My setup:

Genesis kernel 1.05 (latest) (drmfix) - https://xdaforums.com/x-compact/development/kernel-xc-genesis-kernel-v1-01-t3525060

TWRP 3.1.1 (supports nougat's encryption) - https://xdaforums.com/x-compact/development/recovery-twrp-3-1-1-xperia-x-compact-t3640914

Magisk 13.3 - https://xdaforums.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445

I have a backup of my TA area but I do not use it, genesis kernel's drm fix is perfect for me.

Magisk doesn't work properly when I patched my TA keys to my kernel, so that I why I use the drmfix kernel.

You say you have a bootloop, to fix I would try:

Flashing again, and wiping the user data partition in flashtool.

Next, boot normally, your system should turn on ok...!

Then reboot to fastboot, install TWRP, boot up recovery and flash magisk :)

Turn on the phone, turn on magisk hide, I have android pay working, safety net is OK :)

Please tell me your progress.
[Sony Xperia X Compact Guides, News, & Discussion] ja_android:
I am back :)

I did just that " Flashing again, and wiping the user data partition in flashtool."

Thank you on your advice.

I will try to do setup like you did.

To be continued...
[Sony Xperia X Compact Guides, News, & Discussion] chanti548:
Can anyone please tell me how to downgrade to marshmallow to backup my drm keys, i found only nougat firmware on the xperiafirm tool
[Sony Xperia X Compact Guides, News, & Discussion] ja_android:
I see Central Europe and UK firmware 34.1.A.1.198. I downloaded EU version yesterday ...

UK is third from the bottom.
[Sony Xperia X Compact Guides, News, & Discussion] chanti548:
The third one from the bottom is commercial and journalists version and the customized version of uk is 34.3.A.0.206/R2D VERSION. I didn't find any marshmallow ftf file, Can i flash Central europe version on my phone, if i flash it does it brick the phone?
[Sony Xperia X Compact Guides, News, & Discussion] ja_android:
You can flash any image in F5321 and you wont brick the phone. You can flash again as I did in the bootloop. You just have to get version .198. Click on Latest Firmware box title and you will get sorted firmware by version.
[Sony Xperia X Compact Guides, News, & Discussion] chanti548:
I've tried to flash customized europe version, but after flashing the mobile isn't turning on, it keeps restarting at the xperia logo
[Sony Xperia X Compact Guides, News, & Discussion] ja_android:
Any errors during ftf build and flashing ?

Flash it again.

Did you check all boxes in Wipe ?
[Sony Xperia X Compact Guides, News, & Discussion] ja_android:
I made install same way as you suggested.

If some one is interested I`m using Linux Debian.

Everything went smooth.

From TWRP I flashed kernel and magisk in one go. Then deleted dalvik/cache that TWRP offerd.

Rebooted and that was it.

On boot I get "device can`t be trusted". I wish I could change that, maybe locking back bootloader ?

I have backup of my TA... Can I play with kernel`s without effecting my ROM ?

In >Security drm status is OK, but FIDO_KEYS are not provisoned.

I uninstalled bloatware from sony and others.

Magisk is something new to me and I have to explore it.

Best Android setup I ever had.

Many thanks to all good people that make this possible !
[Sony Xperia X Compact Guides, News, & Discussion] qvmuhuuxz:
Thanks for following my advice (and posting back!), I'm happy it worked out for you :)

Yes the drmfix is not 100% perfect, but unless we use it we cannot use the latest magisk. Drmfix fixes 99% of sony drm, so camera and playstation apps work perfectly.

You can change the kernel no problem, your rom will be ok. :)
[Sony Xperia X Compact Guides, News, & Discussion] kullino:
Hello,

i have a question. Will this works, my XC have the actual fw:

-Have downloaded 34.1.A.3.49_Costumized europe.

-Flash it

-Backup TA

-Use dirtycows to get root

-flash actual costumized europe fw.

Is it possible that i now have root and ota too?
[Sony Xperia X Compact Guides, News, & Discussion] TheCrap:
Sorry, i was on holidays.

There will always be a password because the systempartion is encrypted during first boot. After the first boot you will not be able to install e.g. SU

I had the same issue with superuser so i used supersu

your root will be gone after every flash. the right order is

1. downgrade

2. backup TA

3. install newest firmware

4. do not reboot and install SU

5. reflash TA
[Sony Xperia X Compact Guides, News, & Discussion] kullino:
[MENTION=8410083]TheCrap[/MENTION],

thanks. I will do it. :)

So, only flash install SU (by flashtool) will enable root?!

Is Magisk Manager also possible?

Greetings Kullino
[Sony Xperia X Compact Guides, News, & Discussion] TheCrap:
I installed Supersu directly after the flashing from recovery because after the first boot it will no longer be possible. by flashtool could work but its easier to do it in TWRP.

Flashing Magisk in TWRP should also work. The manager will start to work when Magisk is already installed
[Sony Xperia X Compact Guides, News, & Discussion] kullino:
A ok, i understand. Then i will flash twrp for the Xc too, i already use it with my i9195.
[Sony Xperia X Compact Guides, News, & Discussion] camaro322hp:
Thanks for this post - I'm using all the same components along with the .206 firmware. Works great.
[Sony Xperia X Compact Guides, News, & Discussion] kullino:
Hello,

sorry for my stupid questions;

Now i have downgrade to mm.

Backup TA partition. all Ok.

But now, before i do the wrong things. my questions:

If i want only want a stock rom with root:

Is it nessesary to unlock the bootloader?

Then, if i have to unlock the bootloader, is this the right way:

-unlock bootloader

-flash stock nougat fw with flashtool

-dont reboot after flash

-enter fastmode

-fastboot flash recovery twrp

-boot into twrp recovery and then install superuser from SD-card

-now reboot and have root accsess?!

And then, how to get back the TA partition to have fast camera?

Greetings Kullino
[Sony Xperia X Compact Guides, News, & Discussion] TheCrap:
you don't need the sd but yes, you can do so. But i would recommend to follow my guide(https://xdaforums.com/showpost.php?p=73017571&postcount=62) and "modifiy" the stock kernel. otherwise you will have some problems
[Sony Xperia X Compact Guides, News, & Discussion] kullino:
[MENTION=600147]THE[/MENTION] Crap,

thanks. I understand your guide better than the first of this side. (ok, my english isnt the best in technical conbversations)
[Sony Xperia X Compact Guides, News, & Discussion] :
Hi Tuten,

Thanks for this amazing thread.

Since I have to revert to stock to send it to distributor for warranty.

Can you give us a detailed instruction how to revert to a fully stock state?

Thank you so much sir !

Kind Regards
[Sony Xperia X Compact Guides, News, & Discussion] mains75:
Instead of modifying the stock kernel isn't easier flashing Genesis Kernel with drm fix?
[Sony Xperia X Compact Guides, News, & Discussion] supermassiveblack:
I am trying to unlock the bootloader (and than root it) but i stopped during installation of the usb drivers https://developer.sonymobile.com/downloads/drivers/xperia-x-compact/

I installed drivers manually. Following the instructions it seems quite easy but my drivers doesn't seems working :( i've got the yellow tringle on it :(

In fact, when i try to use Minimal ADB and Fastboot, it says "waiting for device" :(

What can i do? Is there a way to have drivers with automatic installation??

Please help, i can't live without root :(
[Sony Xperia X Compact Guides, News, & Discussion] Joeyzo:
First of all, thanks a lot for your inputs and help to develop the tutorial for this awesome device! I never done this before, so this is all kinda new to me, but I'm really excited to root my phone and try the diffrent roms. The only thing is; at the moment I am kind of stuck in the tutorial since I can't seem to find what code there is needed to complete the unlocking of the fastboot. In the tutorial it says:

-

check if fastboot is working:

Code:

fastboot devices

should show something

use fastboot command from sony:

Code:

fastboot -i 0x0fce oem unlock 0xyyyy

(replace yyyy with whatever code you got)

-

I have completed the tutorial succesfully until here, I backed up the TA, but I really don't know what code I would need for the fastboot to proceed. Is there anyone who could do a quick summary? Would really appreciate this since I'm stuck for quite some time now. Kind regards and thanks in advance!

Joeyzo
[Sony Xperia X Compact Guides, News, & Discussion] SXUsr:
Had you completed the tutorial successfully you would know what code you need. Links are there for a purpose.
[Sony Xperia X Compact Guides, News, & Discussion] dnnz:
wait wait you can't relock the bootloader with this method:

- Flashtool > BLU button

- Turn off your device and when Flashtool shows pop up window, connect phone to PC with holding volume down button

- Just click on relock button and your bootloader is locked again
[Sony Xperia X Compact Guides, News, & Discussion] piruzinho:
Hey folks, does anyone know how to update the phone with security patch updates, once I've done all this? I currently have 34.3.A.206 and want 34.3.A.0.228. Thank you!
[Sony Xperia X Compact Guides, News, & Discussion] 9h0s7:
follow the guide and just flash that instead of the version mentioned after you've downgraded and backed up your TA keys.
[Sony Xperia X Compact Guides, News, & Discussion] piruzinho:
Thanks! Just to confirm - I've *already* done the guide, kept my keys, etc, a cpl months ago. Everything is working perfectly, rooted, with previous version. If I want to update I have to do the WHOLE thing again, including the kernel, keys, etc, or can I skip to a specific step (or just, plainly, flash the newest)?

Thank you in advance.
[Sony Xperia X Compact Guides, News, & Discussion] SXUsr:
I had a look at this at the last update as these monthly updates are a real pita if you've got an unlocked BL because we have to go through the whole, start from scratch process. The updates appear to be encrypted .pkg files and is past my skill set to create a flashable file for the updates only.
[Sony Xperia X Compact Guides, News, & Discussion] 9h0s7:
What I did just a couple days ago was

flashtool updated rom .228

flash twrp 3.1.1 via ADB

flash the kernel you patched originally via TWRP

At this point you can install SuperSu or Magisk, I opted Magisk 14 and can confirm it works well

boot
[Sony Xperia X Compact Guides, News, & Discussion] piruzinho:
Thank you for your help! Does this wipe everything and I need to reinstall all apps, configure, etc? Also, where did you get the right Magisk apk to "adb install"?
[Sony Xperia X Compact Guides, News, & Discussion] 9h0s7:
yes this wipes everything, I installed magisk 14 (zip not apk) via TWRP you flash the root option after the kernel
[Sony Xperia X Compact Guides, News, & Discussion] piruzinho:
So you wipe each time and painstainkingly redo your desktop, apps, etc? Seems like so much work :(
[Sony Xperia X Compact Guides, News, & Discussion] Le_Poilu:
Hi.

AFAIK, you can flash with flashtools only the system parts without wiping the user datas.

I've done it with my previous phone, a Z3 compact for upgrading to a newer rom version.

But of course if you flash everything with a wipe data you're starting fresh.
[Sony Xperia X Compact Guides, News, & Discussion] TheCrap:
You can try if FlashFire supports the XCompact
[Sony Xperia X Compact Guides, News, & Discussion] pauliusval99:
Hey, sorry for noob question, but what is TA and what am I supposed to do with those DRM keys? If my bootloader is unlocked, my warranty is already void... I doubt DRM keys would help me save the warranty... Is there another reason to keep them?
[Sony Xperia X Compact Guides, News, & Discussion] POMF2K:
Dammit. Now how do we back up the DRM keys with nougat? I've had this phone for way too long and all I want to do is at least root it since I can't get LTE where I am.

The chance that sony would care about you unlocking bootloader is slim. That said... here I am worried about back up my DRM.

---------- Post added at 11:58 AM ---------- Previous post was at 11:51 AM ----------

Also, If you save your DRM keys... how will they know it was unlocked?

That's the problem I'm running into, how to save the DRM keys on nougat. XperiFirm doesn't appear to host older firmware versions.
[Sony Xperia X Compact Guides, News, & Discussion] pauliusval99:
Heh. Don't ask me about it. In most phones it's enough to just boot into fastboot/bootloader/whatever and it says "UNLOCKED" OR "RELOCKED" at the top line. So, are you trying to say that restoring DRM keys will change that and all other possible tripwires back to normal?
[Sony Xperia X Compact Guides, News, & Discussion] skwal83:
Hey

i follwoed the guide until her.

I can boot to twrp

But my phine stucks at the sony screen

When i try to flash again i get the FLASH TOOL ERROR: no loader in the bundle. searching for one

What can i do?

Thank you

Edit: I flashed Omni which is booting.

But when i try to flash stock i get the FLASH TOOL ERROR: no loader in the bundle. searching for one

What i am doing wrong?
[Sony Xperia X Compact Guides, News, & Discussion] kekistaneerefugee:
You're using the wrong version of flashtool. You will need different versions to do different things. 9.22.3 should do just about everything but the latest firmwares.
[Sony Xperia X Compact Guides, News, & Discussion] skwal83:
not, i used te right version of flashtool

the problem is that the firmware loaded by the flashtoll over xperifrim are not ok

i downlaoded it from another source and everything worked, but none of the many i downlaoded over flashtool

but my mobile is wokring now, rooted, so thanks for the help and the guide
[Sony Xperia X Compact Guides, News, & Discussion] ondrejvaroscak:
Flashing your original TA partition back into your phone relocks the bootloader, leaving no trace it was unlocked.

Just relocking your bootloader without flashing back your TA (and thus DRM keys) will leave your phone without Sony exclusive functions, like X-Reality engine and most probably with lower quality pictures from your camera. So if you plan to unlock your bootloader and later return to Stock LOCKED, backup of your TA partition is absolute MUST.

Older firmware (MM) is still available on XperiFirm, look for Service Exchange Unit or Journalists customizations.
[Sony Xperia X Compact Guides, News, & Discussion] POMF2K:
I'm seeing Service exchange unit 34.1.A.1.198/R1B. Any idea if that is Marshmallow?
[Sony Xperia X Compact Guides, News, & Discussion] ondrejvaroscak:
Central Europe 5 or Service Exchange Unit are firwares 34.1.A.1.198 that is Android 6.0.1 which you can use to backup your TA partition.
[Sony Xperia X Compact Guides, News, & Discussion] POMF2K:
Thank you so much. I'll try it.

Any idea why it won't extract and become visible in flashtool? I forgot how I fixed this issue last time.

Or any idea how to move the file so that it shows up in flashtool?
[Sony Xperia X Compact Guides, News, & Discussion] ondrejvaroscak:
the FTF file put in ".flashtool/Firmwares" under your user profile
[Sony Xperia X Compact Guides, News, & Discussion] Nauju:
another source?

You said u downloaded firmware from another source, can you give me the link to download the firmware? if you can just pm me..

Thanks in advance:)
[Sony Xperia X Compact Guides, News, & Discussion] POMF2K:
For whatever reason it doesn't extract an FTF file... but a whole folder. Also the folder doesn't show up in downloads with my other firmwares I've downloaded.

Trying it now with the device plugged in to see if it helps. Can't remember how I solved this before.

I think i have to change the path that xperifirm downloads to.

I must have to have a device plugged in for the FTF to extract.
[Sony Xperia X Compact Guides, News, & Discussion] Nauju:
Issue while flashing Service Exchange Unit firmware..

20/051/2017 23:51:14 - INFO - Please connect your device into flashmode.

20/052/2017 23:52:12 - INFO - Device connected in flash mode

20/052/2017 23:52:12 - INFO - Opening device for R/W

20/052/2017 23:52:13 - INFO - Start Flashing

20/052/2017 23:52:13 - INFO - No loader in the bundle. Searching for one

20/052/2017 23:52:15 - INFO - No matching loader found

20/052/2017 23:52:15 - WARN - No loader found or set manually. Skipping loader

20/052/2017 23:52:15 - INFO - Ending flash session

20/052/2017 23:52:15 - ERROR - null

20/052/2017 23:52:15 - ERROR - Error flashing. Aborted

20/052/2017 23:52:15 - INFO - Device connected in flash mode

20/052/2017 23:52:36 - INFO - Device disconnected

What could be the possible issues??

Thanks in advance..
[Sony Xperia X Compact Guides, News, & Discussion] POMF2K:
So I had to revert back to android 6 to backup my DRM. Flashtool did not work, luckily I had not updated xperia companion recently so i was able to flash 6.

Out of curiosity though... after unlocking the bootloader (assuming I stick with a stock rom), should I update to android 7 before rooting? Will I be able to update after root?

Thanks in advance. Just trying to save some time.
[Sony Xperia X Compact Guides, News, & Discussion] ondrejvaroscak:
You can root any version you want. I would simply flash latest available version, I run 3.4.3.A.0.238. Rooting is done by flashing SuperSU or MagiskSu or other SU of your liking. Updating firmware over OTA or using Companion of course doesn't work. you need to update manualy by dirty flashing..

---------- Post added at 23:25 ---------- Previous post was at 23:24 ----------

You may need to try older version of Flashtool because not every version of flashtool is compatible with every firmware.
[Sony Xperia X Compact Guides, News, & Discussion] Nauju:
Thanks will try with older flashtool version..
[Sony Xperia X Compact Guides, News, & Discussion] Mister_Diamond:
Xperia X Compact - Android 7.1.1 – 34.3.A.0.238 (all is up to date)

What I aim to achieve, is to just enable root on my phone: I don’t wanna install a different kernel or a different ROM/firmware (and I’d wish avoid to downgrade the phone to Marshmallow).

For now I didn’t rooted my phone due to the fact that I don’t wanna loose camera’s DRM keys.

I wanna only root my phone by keeping Nougat (with my settings and applications) as is.

Is possible? Can I backup and restore DRM keys by keep the current stock rom? Obviously, to flash SuperSU, I need TWRP, and so I need to unlock the bootloader; I'd like to know if there is a way to just root the phone by keeping the current and updated ROM (and so backup and restore DRM keys) without loosing anything.

Thanks.
[Sony Xperia X Compact Guides, News, & Discussion] ondrejvaroscak:
Simply said: NO

Now the real deal. There is no root without unlocking bootloader. There is no unlocking bootloader without loosing DRM keys. And there is no DRM keys backup unless you downgrade to MM.

But what is the deal? Flash MM firmware and do the DRM backup. Flash the latest Nougat, extract and patch the Stock kernel with TA_POC, unlock bootloader, flash TWRP, flash your patched kernel and SU.

Then you have latest rooted Nougat with DRM. Only thing you will loose is ability to automatically update firmware. For every update you need to dirty flash without overwriting your Data partition and reflash new patched kernel and SU. no big deal, done in 10 minutes.
[Sony Xperia X Compact Guides, News, & Discussion] haxanraza:
Stuck at PoC

boot.img and TA.img are is same PoC Folder

hash:0x470E18A3 calc_hash:0x470E18A3
hash:0x9BE9BD66 calc_hash:0x9BE9BD66
hash:0xD8713EC0 calc_hash:0xD8713EC0
device: F5321
serial number: QV706EEG0B
drm key: 0001046B 0010 A6 EC E1 B5 B0 13 43 AF C5 BF F2 97 65 46 2D 8B
Trim area dump is a valid.
Locked bootloader.
Deleting old folder ramdisk if exist...
command ret: 0.
New directory ramdisk created.
Created ouput folder "out"
opening C:\Users\Hassan Raza\Desktop\ta_poc\boot.img
C:\Users\Hassan Raza\Desktop\ta_poc\boot.img is Android image format.
Dumping to out...
BOARD_KERNEL_CMDLINE
BOARD_KERNEL_BASE 80000000
BOARD_NAME
BOARD_PAGE_SIZE 2048
BOARD_KERNEL_OFFSET 00008000
BOARD_RAMDISK_OFFSET 04000000
BOARD_TAGS_OFFSET 00000100
Done.
No file exist out/boot.img.elf .
Gunziping...
setting up infflate...
infflating...
infflate returned: 0
gzpipe: ok.
unziped: ok.
Extracting ramdisk.cpio...
Runing user script...

Making ramdisk/stufs folder... done

Removing ramdisk/.backup folder... done

Found android version less than Marshmallow.

Making ramdisk/init.ta.sh script... done

Error! Didn't found any file which contain string: service tad_static!
command ret: 1.
Your script didn't returned 0, please check your script!

Press any key to continue . . .
[Sony Xperia X Compact Guides, News, & Discussion] ug1082:
Genesis 1.06 Rom .238

Hello,

is Genesis 1.06 working with the .238 rom?

Greetings Uli
[Sony Xperia X Compact Guides, News, & Discussion] 9h0s7:
In the Genesis thread it states

" For Android 7.1.1+ (34.3.A.0.xxx) "

Meaning it will boot, but it also states

" Merged up to 34.3.A.0.217 of Sony upstream"

Meaning it isn't exactly built for the version you're asking about. It's built for the version before it, technically.

But, I run .238 with Genesis 1.06 and it works for me. No excessive heating or random reboots. Ever. YMMV.
[Sony Xperia X Compact Guides, News, & Discussion] piruzinho:
Interesting - that would do everything for me, if it worked, right? Where would I get JUST the OTA update?

Also, has one does this successfully with the X Compact?
[Sony Xperia X Compact Guides, News, & Discussion] ondrejvaroscak:
You can not flash OTA as OTA is delivered as delta of bitmaps. But you can flash only system, modem and so on without compromising userdata. this way you can update to latest firmware without loosing your data and apps.
[Sony Xperia X Compact Guides, News, & Discussion] piruzinho:
Thanks, that makes sense! Are you referring to the FlashTool (and if so, have you used with X Compact) or the general process?
[Sony Xperia X Compact Guides, News, & Discussion] ondrejvaroscak:
Yes, I am using FlashTool with XCompact, just upgrading to version .244 of firmware. Have version .238 now, the procedure is to flash everything without wiping Data (userdata) and afterwards just wipe Cache and Dalvik_cache in TWRP just for sure...
[Sony Xperia X Compact Guides, News, & Discussion] piruzinho:
And just doing that kept root and everything, or did you have to merge kernels and such?
[Sony Xperia X Compact Guides, News, & Discussion] ondrejvaroscak:
I made new kernel from Stock kernel .244, TA_POC and Stock kerne Repack tool. You can most probably keep kernel from .238 too but I do always fresh...

EDIT: No, kernel from .238 makes firmware .244 unbootable. You need to repack kernel from .244 with TA_POC from [MENTION=4120742]munjeni[/MENTION] and Kernel Repack tools [MENTION=357342]tobias.waldvogel[/MENTION]
[Sony Xperia X Compact Guides, News, & Discussion] piruzinho:
Can't find thread with kernel .244 - you have a link?
[Sony Xperia X Compact Guides, News, & Discussion] ondrejvaroscak:
You need to extract kernel from downloaded ftf file (kernel.sin) and process that kernel with TA_POC and Kernel Repack tool. There are no "ready made" stock kernels, everybody should do at least something on his own....