yashsingh1/xdaforums huggingface dataset:
[Sony Xperia X Compact Guides, News, & Discussion] chemicalbuz:
I'm using the modded boot.img from OP, in this case I only need to flash serajr's drmfix right after flashing boot.img, is that right?
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
Yes. Then install root, (maybe good idea to boot first, after flashing boot/drm-fix, just to test in case there's issues later), through TWRP, (either 'fastboot flash recovery' to flash it to recovery partition, or 'fastboot boot' to just boot it once and flash Magisk)...
[Sony Xperia X Compact Guides, News, & Discussion] chemicalbuz:
How do i flash dmr-fix.zip before installing the recovery? via fastboot?
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
you'll need recovery. You can temorarily boot it if you want...
[Sony Xperia X Compact Guides, News, & Discussion] chemicalbuz:
Thanks mate, i finally got it rooted and working!
[Sony Xperia X Compact Guides, News, & Discussion] sheeplings:
does this drm patching work for 9.0 kernels too, or just stock 8.0?
[Sony Xperia X Compact Guides, News, & Discussion] Spaceoid:
I am used to rooting for some years now, but I did not understand that at first. Tried, like others, to just flash boot.img and recovery.img without afterwards flashing drm_fix.zip via TWRP, while still using your modded boot image. It might prevent some problems to mention this a little clearer in the opening post, for us idiots who do not understand it immediately. xD Thanks for all the material!!!
[Sony Xperia X Compact Guides, News, & Discussion] sabotage154:
im sorry if you have been askd this before. i just want to be sure im am doing this correctly. if you can help that would be awesome.

so i have my TA backup.

1. when i use the munjeni tool to preserver my TA image do i need to use the marshmallow kernel or use the latest .118 kernel when running that tool?

2. the munjein tool says to open DOUBLECLICKME.bat with text editor and change kernel name! does that mean i modify the .bat file where it says ("Chose your kernel!") and add my kernal file name there?

3. once i have output from munenin tool new_boot.img i then use the new_boot.img with the rootkernal tool along with the .118 kernel and my TA.img from when i ran the backupTA_v2 tool, is this correct?

sorry if you have received these questions before. any help would be appreciated. thanks!
[Sony Xperia X Compact Guides, News, & Discussion] sabotage154:
i just wanted to update this. i figured this out. the rootkernel tool does the TA PoC for you if you were able to backup your TA before you unlocked your BOOTLOADER and you have your TA.

I DID THE FOLLOWING FOR OREO :

1. if you have your TA then just use the Kernel elf file for your specific stock firmware here:

https://xdaforums.com/x-compact/how-to/stock-8-0-root-recovery-t3747479

and run it thru ROOTKERNEL patcher using the instructions here to get ROOT AND RECOVERY (start where it says "Rootkernel's procedure for Oreo kernel ONLY": if your device is X Compact):

https://xdaforums.com/showpost.php?p=74724162&postcount=2793

2. if you dont have your TA then just use the modified boot image file for your specific stock Firmware here (its already been patched with the DRM-fix):

https://xdaforums.com/x-compact/how-to/stock-8-0-root-recovery-t3747479

and do steps 1 thru 3 on that same page.

i beleive that is all correct. I personally did the step 1 because i had my TA backedup here. If you need to backup your TA before you unlock your bootloader you can do it following instructions here:

https://xdaforums.com/crossdevice-dev/sony/universal-dirtycow-based-ta-backup-t3514236

You must downgrade to Marshmallow (or lower i think) in order to be able to run the exploit and get access to the TA.
[Sony Xperia X Compact Guides, News, & Discussion] Basoriiiii:
Stuck in logo . X Compact 118
[Sony Xperia X Compact Guides, News, & Discussion] metalkid75:
I envy you!!!!! I tried everything with my Sony X compact but nothing worked! I created my boot.img using the root kernel tool,flashed it,flashed drm fix flashed twrp but my sony stucks on sony logo,I see that many users have different results,on some devices worked on other ones no..:crying:
[Sony Xperia X Compact Guides, News, & Discussion] bernard98:
X Compact UK Firmware - Even I Need Root Only

Hi levone1!, I know this is late & by now you must have moved to another device as well... But can you assist me this Once?

I am actually attempting the instruction in Pages 40-41. Lot of People have boot-loops after flashing twrp as I have seen in the whole discussion. I'm guessing temporary booting into twrp is the safe way to flash root as well as drm fix. As I need my phone functioning the next day, so I want to make sure I'm following the safest & most working method in this forum to prevent brick and get it right in 1st attempt. Could you please be generous and provide the download link for Magisk or SuperSU. It would be Great help because I can't find it anywhere on this discussion or in Serajr's post. I know it sounds Lazy but I just want to get it right in 1st attempt...:eek:

By Following the discussion Carefully, these are the following most safe steps to go ahead with - Please correct me if I'm wrong.

1) I'm already on v.118 so I'm going to factory reset(or should I flash ftf again?)

2) I had previously unlocked bootloader but relocked it(I don't remember y i did that) So will unlock it.

3) In Fastboot, Flash modded boot.img for v.118 provided in the OP. But don't reboot after that...

4) Temporary boot Twrp and flash serajr's drm fix.

5) Reboot to homescreen, then back to fastboot and temporary boot twrp again.

6) Flash Magisk(Cuz SuperSU has some problems as mentioned in Serajr's post) [please provide magisk download link]

7) Reboot to homescreen, then I'm good with root access and a functioning phone with v.118

Please correct me if the above steps are in-correct. Please share a link from where to get magisk or SuperSU...

Thankyou for you time and Patience, I really appreciate it... :o
[Sony Xperia X Compact Guides, News, & Discussion] bernard98:
I guess you can't help in this case anymore... I finally got it to work though! Thanks anyway!

Here's what I did --

1) I was already on Stock v.118 Oreo, So I backed up my Data on a computer[the old school way] and performed a Factory Reset.

2) Before anything I had copied Magisk.zip(Latest) and DRM-Fix.zip onto the SD card.

2) After Reboot, I enabled USB Debugging and booted to fastboot-mode[Vol-up+ConnectUSB] and unlocked bootloader...

3) In Fastboot, [fastboot flash boot "modded-boot.img"] replace what's in the quotes with the File Name or just drag & drop.

4) Then after that, [fastboot boot "twrp.img"] (this will temporarily boot twrp on your device)

5) In twrp, locate your drm-fix.zip on the sdcard and flash it[no need to wipe anything] and reboot to system[takes 10min or more].

6) Once rebooted to system, enable USB Debugging again and reboot to fastboot-mode and boot twrp from Step 4 above.

7) In twrp, locate Magisk.zip on the sdcard and flash it and reboot to system.

If you follow above steps exactly as written, your X Compact will be Rooted successfully. FYI- I was on UK firmware!

For Guidance on how to use Fastboot, watch this short video https://youtu.be/6DVYmeOf9RU [although adb sideload didn't work for me]

I used modded-boot.img from this OP for v.118. Thanks to levon1 for creating it! I picked up Latest magisk v.20 or something from official website. Got TWRP v.3.3.x Latest from official twrp website. I used serajr's drm-fix from his OP

BTW I got it right in 1st attempt... No Bootloops for me! Just follow this exactly as written...
[Sony Xperia X Compact Guides, News, & Discussion] metalkid75:
first of all thanks for your help

But a factory reset is very very necessary? I don't need to backup my drm cos' when I unlocked the bootloader I forgot the save drm,now it's almost a year I didn't try again to root my x compact but now I remember when I tried it I forgot to flash serajr's drm-fix,was this the problem of bootloop?
[Sony Xperia X Compact Guides, News, & Discussion] bernard98:
If you don't factory reset, flashing the modded-boot.img file may wipe all data as messing with boot.img usually wipes data.

If your bootloader is unlocked, you can skip the part where I said Bootloader.

The problem with most of the bootloops is with installing the twrp. You should boot into twrp using a command "fastboot boot twrp.img" instead of flashing it... That alone will prevent bootloop.
[Sony Xperia X Compact Guides, News, & Discussion] chemicalbuz:
I see you are italian, if you still need help you can join the sony xperia italia community on facebook, there are some guides and people who can help you through
[Sony Xperia X Compact Guides, News, & Discussion] SirElGee:
Hello! Was wondering what flashtool are you guys using? I tried the official Sony one called "Emma" but it didn't seem possible to use a custom ROM, could only select from a small list. I also tried the one at flashtool(dot)net, but the Xperia XC wasn't in the list of devices and my pc said it detected Trojan when installed...
[Sony Xperia X Compact Guides, News, & Discussion] metalkid75:
I use flashtool downloaded from here

http://www.flashtool.net/index.php
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
The use of flashtool is only to install stock firmware, so Emma is fine. Androxyde Flashtool, (dot net), allows for more options/functions, but is more advanced to use.

Installing custom roms is done by fastboot and recovery...
[Sony Xperia X Compact Guides, News, & Discussion] SirElGee:
Thanks for the info! I'm trying the Androxyde Flashtool but The F5321(X compact) isn't in the list of devices, only F5122 F5121 for X series, do you know how to add it? Does it need to be there?
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
What list? Firmware downloads?
[Sony Xperia X Compact Guides, News, & Discussion] SirElGee:
I downloaded my firmware from Xperifirm already and now I'm trying to bundle it using the flashtool. It's asking me to select my device from a list but my device is not there.
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
It's always there for me. Look for Xperia X Compact, or F5321, or Kugo. Also true double-click on different fields...

Also, you shouldn't have to bundle it yourself. Recent versions of FT have the whole process integrated, and usually does it automatically. After you get successful download message from Xperifirm, close it and you should get popup in FT with creating bundle message.
[Sony Xperia X Compact Guides, News, & Discussion] fsof2:
I have stock and unlocked bl. Wondering that what if just flash this modded boot img via twrp and magisk?
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
Been a while, so I can't remember all details, but seems like it should be fine. I know I wrote the instructions that way for a reason, but not sure why. I think you might have to wipe userdata or something...
[Sony Xperia X Compact Guides, News, & Discussion] SirElGee:
Can ask where you got your version of flashtool? I got mine here: http://www.flashtool.net/downloads.php And I checked in the tool and I have the latest version (0.9.28.0) but for some reason It doesn't ask me to flash the ROM automatically after the firmware is finished downloading. I close xperifirm and nothing happens. I have no idea what I might be doing wrong here.
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
That's the right one... My usual experience is that I open Xperifirm, click on device and firmware to download, then a download window with a progress bar shows up, and, when it is downloaded, it shows a check mark and a message "download complete". Then I close that window, then close Xperifirm, and it goes back to main Flashtool terminal, and begins to create the bundle, showing a running list of messages in the terminal, and a progress bar on the bottom. When it's all done, there's an ftf and a torrent file created in firmware folder, and all of the downloaded files that the bundle was made from are in the download folder. The whole thing takes about 15 minutes. Then I can click ⚡ and navigate to firmware folder, click "select", and the firmware shows up, ready to flash.

That's typical in recent builds, (since the last 2 years or so). However, if that didn't happen, but you did successfully download the files, you can still create the flash file manually. Here's one guide - https://www.google.com/amp/s/www.xp...es-using-xperifirm-and-flashtool-guide/?amp=1
[Sony Xperia X Compact Guides, News, & Discussion] SirElGee:
Yeah I had seen that you could bundle it yourself but that brings me back to my initial problem where I don't have my device listed in the list of devices(it asks for it in the bundling process). And this is the process that I had followed as well. Do you turn off any anti-virus/windows defender when running the flashtool? Because every time I run it, windows defender finds a file it deems "trojan virus" and deletes it. Could this be causing my problems? Thanks!
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
I think you enter the device info during that part. Post a screen shot...

It wouldn't hurt to disable a/v, but if it opens and runs, it's good...
[Sony Xperia X Compact Guides, News, & Discussion] SirElGee:
Sounds good, it opens and runs. Here's the screenshot:

https://imgur.com/DwbQ5NP
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
You downloaded firmware for X, not X Compact.
[Sony Xperia X Compact Guides, News, & Discussion] SirElGee:
Those are the only option there for X, if you look at the path behind the the top page you'll see it's 'F5321' which is the model number for x compact. So I do think I downloaded the right one, F5321 is just not available in the list of devices :(
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
Those 2 options are variants of X. Not sure why it's showing that, for XC firmware. I would say to start again with Xperifirm. Which selection did you make in Xperifirm, (region, etc)?
[Sony Xperia X Compact Guides, News, & Discussion] SirElGee:
Alright so turns out it was windows defender messing everything up, turned it off and everything's working now. So I guess I only have one question left and then I should be good. What options do I select when choosing the firmware to flash as far as: Wipe, Exclude, Sin and Misc TA? Thanks!
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
Depends on what you want. I can't remember it all at the moment, but I remember that sometimes I would have to check 'userdata' in wipe, if I was coming from certain ROMs, because it wouldn't boot otherwise. Sometimes, if I had messed up something, I would check everything in exclude, except whatever I messed up, (like system). If you just want full, fresh stock, just leave it as is, and wipe userdata to be sure, but back up whatever you want to keep, since it will wipe everything in internal storage.
[Sony Xperia X Compact Guides, News, & Discussion] SkatinRatchet:
Hi,

Sorry my Ensligh is not perfect. I don't understand what "Stock O ftf " means. Is this a software ? Where can I download it safely ? Do you know a tutorial that explains this kind of things more slowly for newbies like me please ?

Thank you
[Sony Xperia X Compact Guides, News, & Discussion] Kaminari_3DS:
deleted
[Sony Xperia X Compact Guides, News, & Discussion] winson2769:
is this title topic here is only work for unlock bootloader:yes ?

can someone tell me that if i flash another firmware x compact to my xcompact phone, will my bootloader can be unlock?

thanks
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
it just means the latest update crom Sony. You can search for how to update your phone if it's not the latest. If it is, jist do factory reset, and follow the steps.
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
Bootloader must be unlocked. If you have 'bootloader unlock allowed: no', then there's probably no way...
[Sony Xperia X Compact Guides, News, & Discussion] sabotage154:
whenever i flash modified boot.img from OP and drm fix or patched boot.img and TA , my gps no longer works. if i go back to stock boot.img gps works again. anybody have any ideas why?
[Sony Xperia X Compact Guides, News, & Discussion] Tlamaki:
guys, I know this is an old thread, but I hope you can help me out, if I uninstall Magisk and unroot the phone do I have to flash stock rom again? I just wanted to get rid of bloatware and im done. tyvm.
[Sony Xperia X Compact Guides, News, & Discussion] sabotage154:
i believe when you install magisk it makes a backup of your old boot.img. when you uninstall magisk it should revert back to the old boot image. you can make a backup of your current setup via twrp and uninstall magisk and if it doesnt go the way you planned then just restore from your backup.
[Sony Xperia X Compact Guides, News, & Discussion] Tlamaki:
alright thanks, gonna try that :)
[Sony Xperia X Compact Guides, News, & Discussion] sabotage154:
i found stock 34.4.A.2.19 and im going flash it so i can use xposed on my device. i tried .118 xposed fix but always have problems. i see Kernel elf file to use with rootkernel on the OP for versions .85, .107, .118 but dont see any kernel file for .19. is there a specific reason for that? i have my own backedup TA. thanks
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
I think you can extract ftf normally with 7zip...
[Sony Xperia X Compact Guides, News, & Discussion] LBsys:
Hi Levone, I have set up a new XC with Lineage 14.1, but I can't boot into TWRP from the phone, only via PC (Lnux) and fastboot boot twrp:

https://xdaforums.com/t/cannot-boot...-pc-using-fastboot-boot.4224477/post-84372737

Someone directed me to your post - do you see any chance that I flash a modified boot.img to make it work? Without having to go back to a stockrom etc.etc. ???

TIA, L.
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
If you successfully booted LOS, then there shouldn't be any problem with boot img... Did you already try fastboot flash boot...?
[Sony Xperia X Compact Guides, News, & Discussion] LBsys:
Wow, thank you, that gives me some hope.... No, I didn't try that - you mean, one can temporarily boot with a boot image, just like with a TWRP image? And if it works, flash it permanently to the boot partition?

If so: which one would I have to use, since there are so many different ones in you post and I first updatet to stock 7.1.1, then unlocked the bootloader, then installed LOS with the help of TWRP temporarily booted via fastboot.... TIA Lorenz

Edit: tried "boot118.img" from the first post (Modded boot img for 34.4.A.2.118) with fastboot boot boot118.img - it downloaded and loaded, but didn't boot then, went blank, but was not off. Had to kill it with Vol- and ON pressed 10 s ....
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
Sorry - I mis-typed by habit... You don't want to flash a boot image. You want to "fastboot flash recovery (twrp file).

You should be able to easily restore your phone by flashing the boot img from your LOS with the same command you used to flash the other one.
[Sony Xperia X Compact Guides, News, & Discussion] LBsys:
:-) - I did so many times: 3.3.1 manually just as you said, 3.4.0 the same, I even installed the 3.4.0 zip file, and it seems, as it's been put where it belongs, when the settings are saved when I have to boot from fastboot boot twrp.img next time again. There's just no jump into recovery as usual, i.e. from the reboot menu or manually holdung down Vol+ while booting. Teh violet light appears, the goes off and normal boot commences...

I never checked if the original OS had a stocjk recovery which could be reached bei the Vol+ trick, but now there is no vector pointig to TWRP, whcih certainly is flashed to the Fota kernel now...
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
Interesting... I wonder if, since you're using a 7.1 rom, you need an older version. Maybe try this - https://xdaforums.com/t/recovery-ub-twrp-recovery-3-1-0.3601577/

Or - https://xdaforums.com/t/recovery-xc-twrp.3522249/

I've never had trouble with recovery on XC, but it's been a while, and I mostly used stock O or eXistenZ. I'm mostly using XZ2c with Sailfish these days...
[Sony Xperia X Compact Guides, News, & Discussion] LBsys:
Why thank you, I'll try these :)

Well, from the first link I could download the recovey image and fastboot it - but it didn't work, blank screen. The 2nd produced an 404 at the download link.... seems I have to give up, and set up the 2nd XC I own in the right way, thus do not update the stockrom, but unlock it first and have the TWRP flashed...

EDIT: Finally :-)))

Just by chance and b/c I was sort of off-minded I pressed Vol- (!) and ON - and TWRP booted :-))

It doesn't from Restart Menu (=> recovery), it doesn't when whilst booting the violet light lits up, but with Vol- and ON and then let go both it works ... arrrrgh ;-)
[Sony Xperia X Compact Guides, News, & Discussion] USBLeonel:
I ran all over the internet, but I didn't find a solution.

I bought an xperia x compact SO-02J on aliexpress, and the SO-02J ntt docomo came, entering the service menu, I am graced with the line written "Bootloader unlock alowed: no".

so far I haven't found any solution, I read all possible forums, and at some point, someone always said that there is no way to change this line and enable the bottloader unlock.

Is it possible to change the firmware for an F5321 model? I'm getting hopeless, but I'll keep trying...
[Sony Xperia X Compact Guides, News, & Discussion] Kianush:
So I dont need to uninstall apps lile exposed etc right?

And also did you flash new boot.img right after flashing new rom or did you flash it after booting up once?!
[Sony Xperia X Compact Guides, News, & Discussion] itandy:
No need to uninstall anything because flashing the FTF will do so for you.

I booted once after flashing to make sure it works. Then flashed the modded kernel and Magisk.
[Sony Xperia X Compact Guides, News, & Discussion] morvay:
Ok, I see. Thx for explanation.
[Sony Xperia X Compact Guides, News, & Discussion] Ikzy:
The modded bootimg in OP doesn't work with 2.19.. could someone post a modified boot img (for DRM-FIX).. rootkernel unfortunately doesn't run on a MAC
[Sony Xperia X Compact Guides, News, & Discussion] levone1:
Added to op. Thanks for mentioning...
[Sony Xperia X Compact Guides, News, & Discussion] Ikzy:
wow, thats quick! thanks! I think it's a good idea to add the Firmware version to the downloadlink, so we know for what firmware the boot img is..

that said, you're quicker than a Ninja.. i'm back with DRM and root! :D
[Sony Xperia X Compact Guides, News, & Discussion] dhchris:
Hey there,

I tried to flash many times with the op-post-manual.

But everytime I get a bootloop or stuck on Sony-Logo.

Now I tried to flash my device without the modded boot.img.

It works!

Can you tell me, what did I wrong or what problems can I get if I don´t flash this modded boot.img?

Kind regards,

Chris
[Sony Xperia X Compact Guides, News, & Discussion] jiangjun413:
Yes, it works for me. Thank you for your work!
[Sony Xperia X Compact Guides, News, & Discussion] ffoucault:
I had the same problem, I tried different Oreo firmwares with different boot.img compiled with rootkernel, nothing helped.

I still wondering why. I eventually flashed back Nougat and repeated the boot.img rootkernel process and it worked right away.

You could run Oreo without modded boot but you'll will have no rooted phone.
[Sony Xperia X Compact Guides, News, & Discussion] frankk555:
Absolute same story for my X Compact

Flashed the brandnew 34.4.A.2.19 allone -> works

actual boot.img -> bootloop

twrp-3.2.1.img -> bootloop

boot.img and twrp-3.2.1.img -> bootloop