yashsingh1/xdaforums huggingface dataset:
[Sony Xperia X Compact Guides, News, & Discussion] metalkid75:
Yes,when I try to install drivers from flashtool folder at end I have some errors,I read on the web that is often caused by Windows driver signature enforcement,I installated the different adb drivers you said,now I have this:

https://ibb.co/K7yTd6L, anyway when I try again to reinstall the drivers from the flashtool folder I still have the same error,but now when I put the phone on fastboot mode no more Yellow marks ..Tomorrow I will try again to flash the boot.img and recovery..thanks again
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
OK. Might as well disable driver sig enforcement anyway - I doubt it will hurt anything..
[Sony Xperia X Compact Guides, News, & Discussion] metalkid75:
I installated the boot.img and the the last trwp and magisk 18.1 I tried also the other version of Magisk but the phone goes in bootloop,any solution?
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
OK, just try this - flash the firmware 118, don't turn the phone on, unplug it, reconnect in fastboot, and flash the boot IMG. Then turn it on, and let me know if it boots.

- First boot might take up to 10 minutes

- Your bootloader is unlocked, right?
[Sony Xperia X Compact Guides, News, & Discussion] metalkid75:
ok, flash only the boot.img? Of course my bootloader is unlocked
[Sony Xperia X Compact Guides, News, & Discussion] metalkid75:
Hi I flashed only my own boot.img created using the rootkernel tool,waited for more than 10 minutes but the phone stops on Sony logo that means is an issue of the boot.img? But when I flash the stock firmware all boxes must remain unchecked right?https://ibb.co/6NjTVvt

And If I try to use the boot.img you posted on the first page of this topic? Or I have to use the boot.img from italian firmware?
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
Best to check 'userdata' in Wipe box, (you'll lose whatever is in internal storage, so backup if you want). If you made a boot IMG with Rootkernel, it should be good, or use the one in op.
[Sony Xperia X Compact Guides, News, & Discussion] metalkid75:
But the phone doesn't boot because I didn't check userdata in wipe box? Is it sure? Because I read that many many people here are having the same problem,are u sure that this method works at 100%?
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
For one, it definitely could be the problem - it's always recommend that you wipe userdata to install a new rom, (aka 'clean install'). For two, it won't hurt anything, so why not, (you could have already tried it by the time you read this).

Nothing is guaranteed, when it comes to rooting / flashing, etc. It's all in your hands. This method is tested by many and works fine. If your bootloader is unlocked, and you tried everything else that everyone else has done, but you never started with a full wipe, than it's a pretty good chance that that's the problem.
[Sony Xperia X Compact Guides, News, & Discussion] metalkid75:
I will try for sure,I just want to say that on the first page of this topic is written to flash the stock firmware ,it's not mentioned with userdata wipe; in the past I rooted Samsung and Motorola without any problem,with this one I'm having a lot of issues:crying:,anyway I have to check ONLY userdata WIPE?
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
Should be OK. Can't hurt to wipe appslog also...
[Sony Xperia X Compact Guides, News, & Discussion] metalkid75:
When I unlocked by bootloader I didn't do any TA backup so when I created my own boot.img I replied yes to all questions,also about drm fix,is it ok?
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
Yes, it's ok, but, if you want drm fix, you need to also flash drm-fix zip from serajr, (in rootkernel thread). I don't know if it would also have an effect on the phone booting or not, if you don't do that, but maybe...
[Sony Xperia X Compact Guides, News, & Discussion] metalkid75:
Hi,I was trying to root when suddenly Flashtool is giving a problem,doesn't recognize my x compact,in the list devices :confused:why ?

https://ibb.co/tXVkbf9
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
Link to your picture goes nowhere. I think it doesn't matter, just select f5321 from the list, (double click)...
[Sony Xperia X Compact Guides, News, & Discussion] metalkid75:
I already did what you Said, but nothing happens, this problem came after I formatted my pc and reinstallated Windows again, The strange thing is that now my bootloader seems again locked because when I rebooted my Phone the message this device can't be trusted doesn't appear anymore??
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
Sounds like you probably need to reinstall some things and unlock bl again. If you used Flashtool to unlock it, it stores the unlock code so you can do it again with one click... (but might be wiped now if you reinstalled OS)
[Sony Xperia X Compact Guides, News, & Discussion] metalkid75:
Flashtool says bootloader unlocked,I used the code sent ny sony, not used flashtool to unlock the bootloader...the problem now is that flashtool doesn't recognize the firmware (ftf) in the download folder...
[Sony Xperia X Compact Guides, News, & Discussion] metalkid75:
Now it says again "your device has been unlocked and can't be trusted " by the way Flashtool seems not works ,it doesn't recognize the ftf firmware,all this happended when I reinstallated my W10

https://postimg.cc/S29gHpgc
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
If you have the ftf on your computer, you need to just navigate to it. After y click flash, and select flash mode, the options screen pops up. Click on 3-dot menu and navigate to ftf file. If you don't have it, you need to use XperiFirm, (XF logo on top of Flashtool screen), and download.

.
[Sony Xperia X Compact Guides, News, & Discussion] metalkid75:
the ftf file is the download folder but it seems that flashtool doesn't recognize it ,even tough,I can see the GB of the ftf file in the folder,I think this issue is because flashtool doesn't recognize my x compact in the list of devices..

https://postimg.cc/FfwZbsj0
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
Flashtool will show firmware even if no device connected. Check with your file explorer, either there's no ftf in that directory, or it's not showing it because you selected 'f51xx' as your device, but Xc is f5321. Might be your problem...
[Sony Xperia X Compact Guides, News, & Discussion] metalkid75:
no,it doesn't show me any ftf also with no device connected ,I cannot select my x compact because there's no in list od devices:confused:

I downloaded an old version of Flashtool (18.6) and this one recognize my ftf file but the flash fails..what the hell happens???

https://postimg.cc/dLvmyt3T

https://postimg.cc/fk11ndHQ
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
that's strange, because on the log in your previous picture it says, "selected device from user input", so it thinks that you chose it. Usually what happens is it says 'can't recognize device' message, then a list pops up that you choose from

Using an old version of Flashtool to flash a new fw on a phone that's identified as a different phone, is very unlikely to work. I've never seen Flashtool not recognize it's own firmware in a folder. Was the firmware downloaded with XperiFirm, and the files prepared after download by Flashtool, (it's usually done automatically)? If so, maybe check in Flashtool main thread, see if anyone there has any insight...
[Sony Xperia X Compact Guides, News, & Discussion] metalkid75:
Hi, I did a deep clean of Windows registry ,deleted all folders about Flashtool ,downloaded again the ftf with XperiFirm and now Flashtool works again good,I can see the firmware in the download folder:good:
[Sony Xperia X Compact Guides, News, & Discussion] Marcaccio:
From stock 7.1.1 with Magisk to stock 8.0 with Magisk

Hello, I have stock 7.1.1 (september 2017 security update) and root with Magisk. Since it's more than a year that I don't update my phone I would like to install Oreo.

My questions:

- can I simply install Oreo via OTA?

- after I've installed it can I just reflash Magisk and I'm ok (with all drm fix etc... like the first time I rooted my phone) OR do I need to follow again all the steps in the first post of this thread?

Thanks in advance
[Sony Xperia X Compact Guides, News, & Discussion] metalkid75:
If you install a new firmware you must do again the same procedure step by step as you did for Android 7.1.1
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
You can probably get away with replacing your modded boot img with the stock one, relock bl, reboot, ota update, then flash modded O boot img, and reinstall Magisk. Seems like the least painful way to keep your data, (if that's your goal - if not, just start from scratch). Ota update won't work with unlocked bl.
[Sony Xperia X Compact Guides, News, & Discussion] Marcaccio:
Thanks for the quick answer levone!

Are you saying that if I try to OTA update my phone it will not work even if I have the pop up notification for a firmware update?

---------- Post added at 05:01 PM ---------- Previous post was at 04:52 PM ----------

It seems I can't reply to you via priv message..anyway I will post it here:

"Ciao sì sono italiano..guarda non saprei come aiutarti per Oreo ora come ora perchè sto cercando di capirci qualcosa su come passare nel modo meno invasivo da nougat già rootato. In ogni caso hai seguito passo passo questa guida e non va? C'è qualche passaggio che hai seguito che non ti è chiaro al 100%? Fammi sapere e provo ad aiutarti cercando di ricordarmi quello che avevo fatto io"
[Sony Xperia X Compact Guides, News, & Discussion] Wxfdswxc:
I know about this TWRP version, I tried it but didn't decrypt.

I tried with a Russia generic TFT image, but I didn't wait 10 minutes. It can really be that long? I never experienced that.
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
If ftf came from Xperifirm and flashed without error, and boot img flashed without error, there should be no problem. Probably just have to wait a little longer...
[Sony Xperia X Compact Guides, News, & Discussion] Wxfdswxc:
No the tft came from a web download, and I never managed to get Xperifirm to work on Mac.

No problems, I'll wait for some more noob friendly ways. Thanks anyway.
[Sony Xperia X Compact Guides, News, & Discussion] itandy:
[MENTION=6283426]levone1[/MENTION], have you tried the latest Magisk 16? I plan to upgrade to Oreo soon. I'm currently using Marshmallow but can only use Magisk up to version 1530. Any later versions (1531/1540) didn't work with Xposed. Just wanna see if this situation improves with Oreo.
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
Just fine...
[Sony Xperia X Compact Guides, News, & Discussion] ffoucault:
I tried with two FR versions, I created my own boot.img but it always stucks on sony logo. If I flash back the firmware without fastboot the boot.img the device boots correctly. There is no fastboot or rootkernel errors, what could be wrong?
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
Hard to say. It seems like it's been pretty solid for others. My first thoughts would be

- Full wipe when flash ftf, (data wipe)?

- Post logs from fastboot and rootkernel.

- Test with boot img in op, see if it still hangs at Sony
[Sony Xperia X Compact Guides, News, & Discussion] guitarfreedom:
Hi, sorry I've a problem creating my own boot.img: "syntax error: unexpected word...". I've tested many solutions but nothing. I'm on windows 8 and I'm using rootkernel v5.23. I've downloaded oreo DE with xperifirm. Can you help me? Thanks
[Sony Xperia X Compact Guides, News, & Discussion] morvay:
if I am creating my own boot.img with my TA.img, do I still answer all questions "yes" and then the last question "no" ?
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
Of course it's up to you, but the questions are :

- Disable dm-verity: if you say 'no' then you won't be able to make any modification to /system.

- Disable force-encrypt: if you say 'no' then your phone data will be automatically encrypted, and there's currently no TWRP for Xc that can decrypt...
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
Can you post exactly what command you're typing... Or even the whole rootkernel log
[Sony Xperia X Compact Guides, News, & Discussion] ffoucault:
- Yes full wipe, checked all cases except .TA

- Flash img in op results in bootloop

- here's the logs

Rootkernel V5.23 (UNOFFICIAL 2.5)

- Unpacking kernel
Found elf boot image
Kernel version: 3.10.84-perf-g78dc059
Found appended DTB
- Detected vendor: somc (Sony), device: kugo (Xperia X Compact), variant:

row
- Unpacking initramfs
- Detected platform: 64-bit
- Detected Android version: 8.0.0
- Found fstab.qcom (no additional files required)!
- dm-verity is enabled. Disable? (Say yes if you modify /system) [Y/n] Y
Patching fstab in dtb to disable dm-verity
- Sony RIC is enabled. Disable? [Y/n] Y
Disabling Sony RIC
- force-encrypt is enabled. Disable? (Say yes if you decrypt /data) [Y/n] Y
Disabling force-encrypt
- Install DRM fix? [Y/n] Y
1. DRM fix preload line added successfully!
2. DRM libraries still need to be flashed manually on TWRP recovery before 1st boot!!
System mode, flash: DRM-fix_System_Mode.zip
- All done! Continue? [Y/n] Y
- Creating new initramfs
- Creating boot image
- Cleaning up
Done

C:\Users\xxxx\rootkernel>fastboot flash boot boot.img
target reported max download size of 536870912 bytes
sending 'boot' (17272 KB)...
OKAY [ 0.562s]
writing 'boot'...
OKAY [ 0.125s]
finished. total time: 0.686s

I was wondering 0.562 seconds to write 17Mb, it seems too fast to me.

Maybe fastboot isn't working as it should?

When start flashing firmware i got this message:

Those data are not in the FSC script and will be skipped:

RESET-KERNEL-CMD-DEBUG

Do you want to continue?

I click yes and the flash always results in a bootable device so I think it's something related to the modified boot.img .

I have ADB version 1.0.32 installed from here https://xdaforums.com/showthread.php?t=2588979
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
If you want to choose 'yes' to Drm fix, you still need to flash that Drm fix zip in serajr's thread. And, if that's the case, you can just use the boot img from op of this thread, since it's the same as what you're trying to build. Only bother building your own if you want to attach your original ta, 8n which case you would choose 'no' for Drm fix, and instead, place your ta in rootkernel folder, renamed to 'TA.img'.
[Sony Xperia X Compact Guides, News, & Discussion] guitarfreedom:
Hi, Thanks. I give this command: rootkernel kernel.elf boot.img

ADB ok, firewall disabled, windows driver signature disabled, rootkernel folder is in C:\
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
Check this post - https://xdaforums.com/showpost.php?p=71703603&postcount=2400

Might need to use a different directory.
[Sony Xperia X Compact Guides, News, & Discussion] guitarfreedom:
Thanks, but I've read that post, in fact my rootkernel folder is in C:\. I'll post a log.
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
Maybe post in rootkernel thread. Seems like some have issue with Linux, and some have issues with certain versions of rootkernel, (which shouldn't be a problem here since only one version has been released to support Xc). Make sure you're using the right version, and post with details In rootkernel thread.
[Sony Xperia X Compact Guides, News, & Discussion] Kianush:
Hey man, Update 34.4.A.2.19 is out so I wanted to ask you if there is a way to dirty flash it without losing root and also without losing the already installed apps and data because the new update has some fixes and also security patch against some recent malewares.

If there is, please tell me how.

Thank you!
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
Typically dirty flash with Flashtool works fine, but you'll still have to reflash boot img, and any system/boot mods, (Magisk, Xposed, etc). I also got update notification, but haven't tried anything yet.

I would guess that there would be updated fw in Xperifirm. If so,

- make a backup

- flash ftf without wiping anything

- flash rooted boot img, Magisk, etc..
[Sony Xperia X Compact Guides, News, & Discussion] itandy:
I just did flashed the 34.4.A.2.19 with Flashtool with no wipe. Everything works. After that I re-flashed the new boot.img (prepared using rootkernel using new kernel from new version) and then Magisk. No problem at all.

Before that, I tried to run OTA but it didn't go through, probably because of the modded kernel.
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
If you select to update, it will begin the process and reboot, but when it boots you will get a message that update failed.
[Sony Xperia X Compact Guides, News, & Discussion] zokkii:
I have the same problem,my sim card dont work and drm keys is not active.
[Sony Xperia X Compact Guides, News, & Discussion] jazzdglass:
i have latest Oreo, can you point me out direction to root,twrp ? All i see are confusing kernels posts ..
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
There is no root for O apart from modifying kernel. Must go here - https://xdaforums.com/x-compact/how-to/stock-8-0-root-recovery-t3747479
[Sony Xperia X Compact Guides, News, & Discussion] tapirtapir:
I'm stuck at the Sony logo.

EDIT: worked in 3rd try
[Sony Xperia X Compact Guides, News, & Discussion] zokkii:
try with drm-fix
[Sony Xperia X Compact Guides, News, & Discussion] UJohnLAue:
This 34.4.A.2.118 modiefied boot.img is not working. İ mean i flashed ftf, modiefied boot and the twrp but song logo not passing. But i erase everything and just a flashed ftf file and it's working my phone is opened. Bot not with modified boot118 why is that can anyone help me. Thank you
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
Just to make sure - you flashed stock ftf, and did not turn the ohone on after flash, and then flashed modified boot, and it wouldn't boot? if so,

- maybe try to make your own modified boot with rootkernel, using kernel elf from op

- did you also flash Serajr's drm fix? Modified boot in op is made with rootkernel, having selected 'use drm fix', so you should also flash the drm fix if you're using it.
[Sony Xperia X Compact Guides, News, & Discussion] UJohnLAue:
Sir. Thank u. now i have a root access with magisk. But i will ask one more question should i flash some rom or the stock sony is better ? what u prefer ?
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
eXistenZ is best... https://xdaforums.com/x-compact/themes/existenz-xc-t3867917
[Sony Xperia X Compact Guides, News, & Discussion] Wxfdswxc:
Hello, not sure where to ask this, but since I'm doing those updates (well, until 34.4.A.2.118, of course), I lost the "secure startup" option, where the phone requires your unlock pattern or pin before loading the system (something like this), and before doing anything in TWRP.

Is there a way to enable this option?

Or did I miss something in the TWRP options?

Thanks.
[Sony Xperia X Compact Guides, News, & Discussion] yasinaslan:
Heyy can you help me root my Xperia X Compact? I'm not a tech guy and English is not my native language it's pretty hard to do.I tried it and failed multiple times i'm afraid of bricking my phone.(I don't care about warranty or anything else i already search it i just couldn't find any rooting method in my native language)Thankss
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
Can you flash stock rom ok?
[Sony Xperia X Compact Guides, News, & Discussion] yasinaslan:
Uhm i downloaded the flash tool thing but i didn't want to do anything before learning enough.Can you contact me via Instagram WhatsApp or something?
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
It's very unlikely you will ruin your phone trying to flash stoxk. I'd say that's the best starting place... You have Emma, Flashtool, and Newflasher. Get familiar with flashing stock, and go from there.
[Sony Xperia X Compact Guides, News, & Discussion] yasinaslan:
Don't get it wrong but i already downloaded them i just need a little help with running these things like what's the first thing i should do and how can i do that:( I'm gonna be on vacation soon without a PC that's why i'm rushing
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
open Flashtool folder and find 'drivers' folder, and run drvers.exe. check boxes for flash, fastboot, and loire and install. Then open Xperifirm, and find latest fw for XC, and download. After downloaded, close Xperifirm and Flashtool will process all of the files. Then you will be ready to flash...
[Sony Xperia X Compact Guides, News, & Discussion] chemicalbuz:
Hi guys i'd love some help with the procedure: i've unlocked the bootloader and installed last version firmware (.118) with flashtool and xperifirm, so far so good, but i get bootloops when i try to install the recovery. This is what i'm doing, can you spot where i get it wrong?

1) Flash firmaware .118 with flashtool in flash mode

2) Reboot into fastboot mode without booting into system

3) Flash " Modded boot img for 34.4.A.2.118 - me ga.nz/#!14VkzCCB!GK-KEv0A-...5ZWOLm1DRt31tA "

4) Flash " twrp-3.2.2-20180704-kugo.img "

5) Reboot

Here it goes into bootloop till i flash the firmware again. If i flash the recovery without boot.img i can access it on first boot, but if i reboot i get stuck.

Any clue?
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
What are your specific commands in step 3 and 4?
[Sony Xperia X Compact Guides, News, & Discussion] chemicalbuz:
Fastboot flash boot (boot.img path)

Fastboot flash recovery (recovery.img path)

Both flashing give no errors.

Am I right flashing that modded .118 boot.img or did I misunderstood?
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
Yes. It's been a while, so I'm a bit foggy, but I think the modded boot img in op has 'drm fix' option set to "yes", so you would need to flash serajr's drm fix zip also. If you want to be sure, just use the kernel.elf in op, and root with rootkernel, and you can select options you want. It should be as easy as:

- flash stock (full wipe recommended)

- flash boot img (and drm fix, if wanted)

- flash recovery
[Sony Xperia X Compact Guides, News, & Discussion] chemicalbuz:
Thanks for the hint. I'm only interested in rooting the phone, I don't really need a recovery cause I'll keep the stock firmware anyway. Is it possible to root via rootkernel even without recovery? Do I have to extract the kernel from the firmware? I have a backup of my drm key if necessary.

Edit: although on second thought, I believe I'll need to root via recovery and magisk, otherwise with rootkernel some apps won't work because of root, like the bank ones. Am I right?
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
You might need Xposed or Magisk for certain apps with root, but not sure - I've read different results from different people. Try it out...

You can have root without recovery, but I don't know why you wouldn't want recovery - it only adds benefits.

Using rootkernel is easy. Just follow the links in op. There is a stock kernel elf file for 118 attached, and if you have your ta backup, you can use it when creating rootkernel, so no need for drm fix...
[Sony Xperia X Compact Guides, News, & Discussion] chemicalbuz:
Just looking for the easiest way honestly since I've already spent quite a bit of time trying to flash the recovery. I don't even care to restore my drm.

So, just to make sure:

1 flash firmware

2 flash modded boot.img

3 flash modded kernel elf (which fastboot command do I have to use?)

4 flash recovery

Should this be right?
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
All you need for root is:

Flash firmware

Flash boot img

Install root, (Magisk, etc)

The question is where you get the boot img from. I posted one in op, which was built with rootkernel, with "drm fix: yes" option, so needs drm fix zip flashed along with it. If you want to make your own, and choose your own options, then use the kernel elf file to use rootkernel yourself.