[Sony Xperia X Compact Guides, News, & Discussion] TheCrap:
Hit there,

this tutorial was very usefull but i was stuck at some points and took me 3 evenings to finish rooting my wifes new X Compact. Here are the steps what i did:

1. adb/fastboot was already installed

2. you will need Flashtools in TWO versions. 0.9.23.2 as OP said and 0.9.22.3. Both can be installed at the same time in different directorys and share the downloaded files

2.1 I think i did not install the drivers from the directory but from inside Flashtools but cannot find the menu entry, maybe because the drivers are installed

3. Can't remember if i installed the sony driver somehow. Installing them gave me "not supported platform" on Win 7 x64

4.

I did not use a memory card at all, i may safe some steps but it's not nessecary.

5. I wanted to use the stockkernel so and i ran into many problems to get Supersu or superuser and TWRP to run

What helped me a lot was https://xdaforums.com/xperia-z5/development/root-automatic-repack-stock-kernel-dm-t3301605

5.1 Open your .firmTool folder, and open the ftf with winrar, 7zip etc and extract the kernel.sin in the same folder

5.2 In Flashtools, click on tools --> SIN Editor, choose your kernel.sin and click on "extract". It will create a kernel.elf

5.3 Download and extract	rootkernel_v5.23_Windows_Linux.zip from the thread above and copy the kernel.elf into the folder

5.4 Copy your FIDO backup made with backupTA to that folder to (TA.....img)

5.5 For me Superuser was not working and resulted in a bootloop so i tried Supersu 2.8.2(Xperia version) https://xdaforums.com/apps/supersu/stable-2016-09-01supersu-v2-78-release-t3452703. Copy that zip into the folder too

5.6 Bring up a console, navigate to rootkernel folder and start

rootkernel kernel.elf boot.img

You have to make some choices, i would suggest:

- dm-verity is enabled. Disable? [B]Yes[/B]
- Sony RIC is enabled. Disable? [B]Yes[/B]
- There is no TWRP template for kugo. Install anyway? [B]No, we will get our own[/B]
- Found SuperSU-v2.82-20170528234214-TEST-1.zip. Install? [B]Yes. You can say NO here but than you can do some mistakes[/B]
- DRM fix is unsuppported/untested for model kugo. Install anyway? [B]Yes[/B]
- Install busybox? [B]No[/B]

5.7 next is to get a flashable TA file. This was hard to find how to do this

flash_dk <ta backup image> DK.ftf

Copy the DK.ftf into your .firmTool/firmware/ folder

Now let's flash

Such a small sentence and so many lost hours. NEVER EVER LET THE PHONE START. First i tried to install SU like it is said in the tutorial but did not get how important it is not to start. On the first start, the /system partition will be encrypted and for now there is no way to encrypt it(at least that is what i found), so you will be unable to install SU in TWRP!

6. to make sure your phone will not start, just plug out the USB cable. It will turn off

6.1 press Vol+ and plug in USB, you will be again in fastmode

6.2 I used the TWRP from this thread because it has 3.1.0 but not 3.0.2-3 https://xdaforums.com/x-compact/development/recovery-twrp-recovery-3-1-0-t3601577

Do NOT unplug USB now

6.3 Flash your modified stock kernel

fastboot flash boot boot.img

6.4 Now you can plug out the usb. You will not need to enter recovery i think, because SU should already been installed but i did just to be sure

7.1 In Flashtools click on flash, this time you choose "DeviceKey" instead of the full firmware and will get an error that a script is missing.......

7.2 Close Flashtools 0.9.23.2 and start 0.9.22.3 and do it again, the flash will be successful

7.3 Now reboot your phone and check the DRM status. I should say "provided"

SU was in the kernel and the app should already be installed.

Now uninstall what you want and enjoy your rooted X Compact.

If something was unclear, feel free to ask.