[Sony Xperia X Guides, News, & Discussion] YasuHamed:
if the BOOTUNLOCK is allowed on your PROTOTYPE DEVICE then

short answer is : YES

dial *#*#7378423#*#* goto SERVICE INFO >> CONFIGURATIONS

HERE you will see alot of info, search for BOOTLOADER UNLOCK ALLOWED text and see what shows ,,, if NO then sorry! this device is locked by SONY and only they can unlock it

if BOOTLOADER UNLOCK ALLOWED has YES then MAGIC CAN BE DONE ;)

IF YOU ARE NEW TO SONY WORLD then you must save XPERIA X DRM KEYS

since you are already on ANDROID 6 (YAY)

just enable USB DEBUGGING from DEVELOPER OPTIONS

and

download the UNIVERSAL (DIRTYCOW-BASED) TABACKUP SCRIPT ( DOWNLOAD FROM HERE ( REFERECE MASTER POST BY RAYMAN

uzip the script on desktop and RUN the .BAT file, it will ask permission on your mobile screen, ALLOW it and after few seconds, the SCRIPT will EXTRACT TA-xxx-xxxx-xxxx-date+timeStamp.IMG file (2mb in size) IN THE SAME FOLDER

you can run .bat mulitiple times! each time it will extact the same TA.img file with different file name , i ran it thrice ;)

now you have your DRM KEYS FILE (SOME USERS SAYS ITS NOT NECESSARY BUT TRUST ME! IT IS! ) KEEP THIS TA.img file SAVED on cloud!

------------------------

UNLOCKING BOOTLOADER

SONY official handout unlocking keys for FREE at

https://developer.sony.com/develop/open-devices/get-started/unlock-bootloader/

follow the steps! select your device model from list, provide them your email, they will send you one time link , to generate BOOT UNLOCK KEY AGAINS YOUR "IMEI" NUMBER ( dial *#06# on your F5121 to obtain IMEI number) (its even given on configuration page, where you checked the bootulock status ;) )

- flashtool (www.flashtool.net) can ALSO unlock xperia Bootloader! (install flashtool and then install drivers also ( c:\flashtool\drivers)

- clicking BLU while device is CONNECTED IN FASTBOOT MODE ( it will prompt you) and giving SONY's generated KEY will UNLOCK your F5121's bootloader! device will JERK, ANDROID BOT WILL APPEAR and ALL PARTITIONS (accpt system) will be FORMATED and you will loose all your data, accounts, details , DRM KEYS ... (make sure you take backup of your photos/videos/music)

--------------------------------------------------

NOW IF YOU WANA STAY ON 34.0.A1.264 and DONT wana UPGRADE to ANY OTHER BUILD came after this then

you need to do this

0. put magisk16.0.zip in sdcard (if you don't have sd card then UTG drive, flashdrive, etc)

1. unlock bootloader

2. flash TWRP (via fasboot

3. FLASH modified kernel ( the MASTER TOOL of SONY WORLD www.flashtool.net) (installing Xperia COMPANION + Google Minimal ADB & Fastboot.zip is M - U - S -T )

4. BOOT in to twrp, flash MAGISK16.0 from sdcard

and reboot device

the device will boot ROOTED 34.0.A.1.264

NOW IF YOU WANT TO UPGRADE TO NOUGAT FROM 34.0.A1.264 and ROOT IT THEN

-the recommended NOUGAT Stockrom version is 34.3.A.0.252 (releasedin dec2017)

1. download the .252 ftf file from xda post

https://xdaforums.com/xperia-x/how-to/sonyx-f5121-downgrade-8-0-0-to-7-1-1-to-t3754986

2. flash it via flashtool / you need to see solid tutorial for that! please do research , flashing xperia is TRICKY

3. flash twrp

4. flash modified kernel

5 boot into twrp and flash MAGISK and REBOOT.

NOW IF YOU WANT TO UPGRADE TO OREO FROM 34.0.A1.264 and ROOT IT THEN

-for OREO the RECOMMENDED STOCKROM version is 34.4.A.2.97 (released in JULY2018)

1. you must download the latest stockrom

2. flash it

3 flash modified Kernel

4. boot in to twrp and

(a) flash the DRMFIX.zip

(b) Magisk16.0.zip

5. reboot

ALL KERNELS BY YEARS/BUILD WITH DRMFIX FILES ETC ARE GIVEN IN MY POST

https://xdaforums.com/xperia-x/how-to/root-xperia-x-f5122-android-n-34-2-2-47-t3594502

PLEASE READ THOROUGHLY !

I have tested all these kernels my self since I have F5122 however if anything goes wrong please note that XDA or any member is NOT responsible :)

try it on your own risk :cowboy: