FORUMS
Remove All Ads from XDA

[F31xx][F32xx][Guide][MM] How to root your Xperia XA (as noob friendly as possible)

668 posts
Thanks Meter: 594
 
By rrvuhpg, Senior Member on 1st August 2016, 01:28 AM
Post Reply Email Thread
Hi all,

I'm happy to share with you an updated guide on how to root the Xperia XA and Ultra, big thanks to @luis1981 for the update.

This guide is Only for Marshmallow (Android 6.0), for Nougat (Android 7.0) it's here: https://forum.xda-developers.com/xpe...-noob-t3638727

## How to root the Sony Xperia XA

The Sony Xperia XA is a midrange smartphone with a bezeless design. It has adequate specs and run Android aptly. These aspects make this phone a great daily driver, however the Sony stock Android is plagued with trashware and all the hurdles Android itself has several privacy problems.

By rooting the phone one can circumvent these limitations. You will be able to install the Xposed framework, improve sound with Viper4Android, block hosts, install dns-crypt and improve overall customability. In the follwing sections I will present the steps to root your phone.

But before proceeding a word of caution (or why you wouldn't like to root your phone):

1. Unlocking your BootLoader will void your warranty, break your device DRM and lose X-Reality and image optimisation on low light when taking pictures, I found a workaround here: http://forum.xda-developers.com/cros...s-drm-t2930672, use zip for Z3+ devices.
2. You can save your DRM keys (TA backup) by following this guide: http://forum.xda-developers.com/cros...ackup-t3514236. You have to do it BEFORE unlocking the bootloader, for now you can't restore your backup.
3. You can re-lock your phone but it will not restore DRM
4. Unlocking your bootloader will wipe the device (factory reset)
5. If you have confidential files in your phone don't unlock your bootloader, as long as your phone is locked your data are officially secured.


## Method

1. Find out whether if you bootloader is unlocked, which is needed to proceed. Type: *#*#7378423#*#* then choose Service info ---> Configuration ---> Check for "Bootloader unlock allowed: Yes". At this point if the phone has No or any other answer at the screen you shouldn't porceed as rooting will be impossible.

2. Download XA ADB and Fastboot drivers: https://developer.sonymobile.com/downloads/drivers/

3. Download FLASHTOOL with integrated Xperifirm 0.9.22.3 for Windows, note that you can also use it to unlock your bootloader(http://www.flashtool.net/downloads_windows.php)

4. Follow the official Sony instructions for getting the unlock code from [here](https://developer.sonymobile.com/unlockbootloader/). Further paste the code in BLU menu of Flashtool. You can also find video instructions [here](https://www.youtube.com/watch?v=6lKWd5LlUoA).

5. Root Your Stock Rom with TWRP and in order to do that you will need the proper files for your phone version:

SuperSu zip package for all XA: http://www.supersu.com/download

For XA single sim = F3111, F3113, F3115

TWRP recovery: https://forum.xda-developers.com/xpe...ry-xa-t3606488

Boot: https://forum.xda-developers.com/xpe...built-t3573119

For XA dual sim = F3112,F3116

TWRP recovery: https://forum.xda-developers.com/xpe...l-sim-t3606232

Boot: https://forum.xda-developers.com/xpe...urces-t3526496

6. Copy SuperSu zip package on your MicroSD.

7. Enter the phone in Fastboot mode (when power off, hold Vol+ and plug the phone). The led should be blue.

8. Flash recovery and boot with "fastboot flash boot boot.img" and "fastboot flash recovery recovery.img" commands (rename downloaded boot/recovery image if needed). The simplest way is to use fastboot from Flashtool in x10flasher folder, copy recovery and boot in it, open command prompt, flash them and then delete them.

9. Unplug the phone, hold "Vol-" and "Power" buttons. Release all buttons after phone vibrate.

10. You are in TWRP recovery, on password prompt press "Cancel"

11. On next screen press "Swipe to allow".

12. Go to "Install", "Select Storage", click "Micro SDCard". Optionally, you can format "userdata" partition now and remove internal encrytion for restoring TWRP backups/acces of /data partition, go to "wipe" and tap "format data".


13. Go to your SuperSu zip directory and click on it to install. Optionally, If you want to flash Xposed, DRM fix or any flashable zip, repeat the previous step for each zip. You can mount your SD to PC in TWRP for easy access.

14. Reboot the phone, during init the phone will reboot one more time.

15. Your phone is rooted

You can optionally switch from SuperSu to Magisk by following this guide:
https://forum.xda-developers.com/xpe...ia-xa-t3555911

## Conclusion

After these steps your phone should be rooted and you will be able to have root access to the system. This tutorial comes with no garanties that it will work and the author does not take any responsibility for you bricking your device. Also, installing third party files are a security liability, you should be aware of that. Despite these issues, rooting the Xperia XA has been confirmed to work in all models.

Note that this the guide is the same for XA Ultra, the only differences are the boot/recovery files. You can find files for XA Ultra in their respective forums.

## Old guide with video

Hi all

As requested I make a "how to" video to be more noob friendly, the video is probably not perfect and my English too but I do my best to be understandable to all


PLEASE READ
I'm not a dev and I have no responsability if you flash my files.
As said in the video you must wipe "userdata" partition when flashing IF your phone memory IS crypted or if you don't know the uncrypt password, someone on the web speak of "default password" but what is it ?? If cryped (with no password) you can't backup /data and can't mount internal memory in TWRP. You can manually enable encryption and be able to set YOUR OWN password, but you can't revert back. And in theory you can make full nandroid backup and mount /data partition when in TWRP but can't mount inernal memory.
Regarding mounting /system rw in TWRP, seen on other tuto, you must never "swipe to allow modification" when prompted, after installing root package /system is mounted rw with no problem (look at "mount" menu). EDIT: tested on my device without issues but be careful.
IF YOU UPDATE OR FLASH STOCK BOOT and power on the device to Android, it will encrypt again the internal memory and if you shutdown the device before the end (xperia screen for hours) it will corrupt your data, not the SD card).
For futur, if you want to update, ask me and will release modified boot. I don't know what it does if you update stock after setting password encryption :/

Why I changed that by replacing "FORCENCRYPT" by "ENCRYPTABLE" in fstab Boot:
http://arstechnica.com/gadgets/2015/...r-new-devices/
and
http://www.androidcentral.com/inside...ptable-storage

Before continue, you must understand that unlocking your BootLoader will void your warranty, break your device DRM and lose X-Reality and image optimisation on low light when taking pictures (seen some workaround but not for XA).
You can't re-lock your phone and it will not restore DRM.
If you have confidentials files in your phone don't unlock your bootloader, as long as your phone is locked your data are officially secured.
This will be repeated when following Sony step by step guide. YOU ARE AWARE !

To verify bootloader lock state after unlock, on phone dialer:
*#*#7378423#*#* ---> Service info ---> Configuration ---> Check for "Bootloader unlocked: Yes" IT MUST BE YES !!!

By rooting your phone you will be able to install/uninstall system apps, install Xposed framework (Gravity Box, Dark Pokemon Go,...) or Viper4Android for an awesome sound! You can tweak and mod your phone deeper (battery,CPU,...), build and flash custom ROMs and many other things
If you have problems or want to unroot you can flash stock firmware like in the video with Flashtool, no need to wipe userdata.

Please watch my video one time before begin, to understand what you have to do.
Free to you to distribute or modify my files but please link this thread as source.

BY FOLLOWING THIS GUIDE YOUR PHONE WILL PERFORM A FACTORY RESET WHEN UNLOCKING BL ( it will not format SD card) , MAKE BACKUPS !


Edit 3/08/2016: Found a workaround for Sony DRM function restoration for UB devices based on Z line and working on XA Please read the thread, download package zip for Xperia Z3+ and install it with TWRP, that's all! I recommend you to install it just after SuperSU zip package (working too if not doing this). Thanks to @jimRnor
http://forum.xda-developers.com/cros...s-drm-t2930672

EDIT 13/08/2016: TWRP is 99% working (can't wipe /cache), you can do all as you want, as long as no encrypted partition is present or locked.
Let's begin!

YOU NEED:

My first video guide : http://www.youtube.com/watch?v=nnOoLo31ka0
MP4 offline video download: https://mega.nz/#!RlwVSAKC!6lTBZxVnL...UWIq8lEUfSp4Zw

Download XA ADB drivers, all models for Windows
http://dl-developer.sonymobile.com/d..._XA_driver.zip

Download XA Fastboot drivers, all models for Windows (if needed, installation is same as ADB drivers in video)
http://developer.sonymobile.com/down...stboot-driver/

Download FLASHTOOL with integrated Xperifirm 0.9.22.3 for Windows
http://www.flashtool.net/downloads_windows.php
(if needed you can unlock bootloader with it, I unlocked my device with it)
Just follow official way and when you get the unlock code, paste it in BLU menu of Flashtool. (faster way)



The step by step guide to unlock BootLoader by official way:
http://developer.sonymobile.com/unlo...urboot-loader/
Video (not mine): https://www.youtube.com/watch?v=6lKWd5LlUoA
(Just select Xperia XA when asked)

Now depending the firmware you want to root ( the one you downloaded with Xperifirm) choose your rootpack:

For XA single sim (33.2.A.x.xx) = F3111, F3113, F3115

33.2.A.x.x: https://mega.nz/#!ZsQhwbTC!rvw437H0Z...yPmSRjyfZlMFiU

For XA dual sim (33.2.B.x.xx) = F3112,F3116

33.2.B.x.x: https://mega.nz/#!xgoXxBTa!DKAwKELVs...CgG73RswzMPUi0


EDIT 29/11:
I see some users who ask without searching (a very little) before, PM messages inclued, some others who spam threads not related to their problem or create new thread for nothing and who do not know what politeness is at all . Until now I was nice and answered them but now I will change that, NO MORE HELP FOR THAT KIND OF USER !!!
Now if you have no answer from me you will know why.


Good luck
The Following 48 Users Say Thank You to rrvuhpg For This Useful Post: [ View ] Gift rrvuhpg Ad-Free
 
 
1st August 2016, 09:32 AM |#2  
hp6830s's Avatar
Member
Thanks Meter: 3
 
More
Many thanks for the effort mate. Will try it.

Btw, what is the bug with google store and user data, right after root.

edit
01/039/2016 11:39:08 - ERROR - Processing of boot.sin finished with errors. As u said data wipe is needed when unlocking the bl, but i have my BL unlocked earlier without data wiped...so i started the flash method ,on my old version of flashtool.Now i have the newest version, so got to try it...or i should skip the flash and go to root step...

edit2
01/006/2016 13:06:39 - INFO - Ending flash session
01/006/2016 13:06:39 - INFO - Flashing finished.

For this phone use the newest version of flashtool.

Edit3: I need to enter some kind of password on boot menu.Now what ?
The Following User Says Thank You to hp6830s For This Useful Post: [ View ] Gift hp6830s Ad-Free
1st August 2016, 11:07 AM |#3  
tthmatt's Avatar
Senior Member
Flag Singapore
Thanks Meter: 59
 
Donate to Me
More
Quote:
Originally Posted by rrvuhpg

Hi all

As requested I make a "how to" video to be more noob friendly, the video is probably not perfect and my English too but I do my best to be understandable to all


PLEASE READ
I'm not a dev and I have no responsability if you flash my files.
As said in the video you must wipe "userdata" partition when flashing IF your phone memory IS crypted or if you don't know the uncrypt password, someone on the web speak of "default password" but what is it ?? If cryped (with no password) you can't backup /data and can't mount internal memory in TWRP. You can manually enable encryption and be able to set YOUR OWN password, but you can't revert back. And in theory you can make full nandroid backup and mount /data partition when in TWRP but can't mount inernal memory.
Regarding mounting /system rw in TWRP, seen on other tuto, you must never "swipe to allow modification" when prompted, after installing root package /system is mounted rw with no problem (look at "mount" menu).
IF YOU UPDATE OR FLASH STOCK BOOT and power on the device to Android, it will encrypt again the internal memory and if you shutdown the device before the end (xperia screen for hours) it will corrupt your data, not the SD card).
For futur, if you want to update, ask me and will release modified boot. I don't know what it does if you update stock after setting password encryption :/

Why I changed that by replacing "FORCENCRYPT" by "ENCRYPTABLE" in fstab Boot:
http://arstechnica.com/gadgets/2015/...r-new-devices/
and
http://www.androidcentral.com/inside...ptable-storage

Before continue, you must understand that unlocking your BootLoader will void your warranty, break your device DRM and lose X-Reality and image optimisation on low light when taking pictures (seen some workaround but not for XA).
You can't re-lock your phone and it will not restore DRM.
If you have confidentials files in your phone don't unlock your bootloader, as long as your phone is locked your data are officially secured.
This will be repeated when following Sony step by step guide. YOU ARE AWARE !

To verify bootloader lock state after unlock, on phone dialer:
*#*#7378423#*#* ---> Service info ---> Configuration ---> Check for "Bootloader unlocked: Yes" IT MUST BE YES !!!

By rooting your phone you will be able to install/uninstall system apps, install Xposed framework (Gravity Box, Dark Pokemon Go,...) or Viper4Android for an awesome sound! You can tweak and mod your phone deeper (battery,CPU,...), build and flash custom ROMs and many other things
If you have problems or want to unroot you can flash stock firmware like in the video with Flashtool, no need to wipe userdata.

Please watch my video one time before begin, to understand what you have to do.
Free to you to distribute or modify my files but please link this thread as source.

BY FOLLOWING THIS GUIDE YOUR PHONE WILL PERFORM A FACTORY RESET WHEN UNLOCKING BL ( it will not format SD card) , MAKE BACKUPS !

Tested on my device F3112 and reported as working on F3116, other models may work as well if you do ALL steps. Will confirm after positive feedbacks.

Let's begin!

YOU NEED:

My first video guide (will be on youtube after validation) : https://mega.nz/#!RlwVSAKC!6lTBZxVnL...UWIq8lEUfSp4Zw

Download XA ADB drivers, all models for Windows
http://dl-developer.sonymobile.com/d..._XA_driver.zip

Download XA Fastboot drivers, all models for Windows (if needed, installation is same as ADB drivers in video)
http://developer.sonymobile.com/down...stboot-driver/

Download FLASHTOOL with integrated Xperifirm 0.9.22.3 for Windows
http://www.flashtool.net/downloads_windows.php
(if needed you can unlock bootloader with it, I unlocked my device with it)
Just follow official way and when you get the unlock code, paste it in UB menu of Flashtool. (faster way)



The step by step guide to unlock BootLoader by official way:
http://developer.sonymobile.com/unlo...urboot-loader/
Video (not mine): https://www.youtube.com/watch?v=6lKWd5LlUoA
(Just select Xperia XA when asked)

Now depending the firmware you want to root ( the one you downloaded with Xperifirm) choose your rootpack:

For XA single sim (33.2.A.2.xx) = F3111, F3113, F3115

33.2.A.2.73: https://mega.nz/#!ZsQhwbTC!rvw437H0Z...yPmSRjyfZlMFiU (NOT TESTED)

For XA dual sim (33.2.B.2.xx) = F3112,F3116

33.2.B.2.35: https://mega.nz/#!5lZFhapC!SrYt1HmOI...L-Pd1f0Bpkireg
33.2.B.2.73: https://mega.nz/#!xgoXxBTa!DKAwKELVs...CgG73RswzMPUi0


Good luck

Will this work with F3116 running 33.2.B.2.66 firmware?
1st August 2016, 12:22 PM |#4  
OP Senior Member
Thanks Meter: 594
 
Donate to Me
More
@hp6830s you talk about bugs seen in video? If I remember, error in TWRP is about wiping /cache but no a real problem and in video got 2 force close of Play service because I'm updated from .35 without wiping userdata (not crypted /data) and I think update wasn't fully finished. Never FC again after that and no problems. But if YOU have errors about /data in TWRP it's because of encrypted phone memory. During tests I got 1 bootloop in TWRP but can't repeat the problem again after wiped userdata on first root. That's why I recommend wipe. And that's strange if your phone not wiped when unlocked, for me no choice...
@tthmatt It works but really not recommended (for boot.img), as ramdisk and kernel are from an other firmware. For recovery it's less problematic. You can try and feedback us
The Following 3 Users Say Thank You to rrvuhpg For This Useful Post: [ View ] Gift rrvuhpg Ad-Free
1st August 2016, 12:51 PM |#5  
hp6830s's Avatar
Member
Thanks Meter: 3
 
More
Ok ,how to remove phone encyption on boot menu ,so i can install custom user ?
1st August 2016, 01:46 PM |#6  
OP Senior Member
Thanks Meter: 594
 
Donate to Me
More
Quote:
Originally Posted by hp6830s

Many thanks for the effort mate. Will try it.

Btw, what is the bug with google store and user data, right after root.

edit
01/039/2016 11:39:08 - ERROR - Processing of boot.sin finished with errors. As u said data wipe is needed when unlocking the bl, but i have my BL unlocked earlier without data wiped...so i started the flash method ,on my old version of flashtool.Now i have the newest version, so got to try it...or i should skip the flash and go to root step...

edit2
01/006/2016 13:06:39 - INFO - Ending flash session
01/006/2016 13:06:39 - INFO - Flashing finished.

For this phone use the newest version of flashtool.

Edit3: I need to enter some kind of password on boot menu.Now what ?

I don't know the password to enter, seem to be randomly generated on first init by phone or a unknown default password is set. That's why you have to wipe userdata and after if you want you can recrypt phone in security menu and set your own password to use in TWRP. Have you seen a password in my video?? As said before I'm not a dev and my help is limited, my step by step guide is working, confirmed on F3116 and tested many times on my device. But if you want to not follow all steps you can but you will probably have problems. I said to use 0.9.22.3 Flashtool since first days, you use an older one and have problem. I said to flash and root and you want to root directly. I said to wipe and you don't do it... and finally problem again. Please follow ALL steps as described and at end if you have problems I will help you. If you want to continue with experimental way, just click Cancel on password prompt, on next screen don't swipe to allow modification, press "keep read only". At end if you have a recovery bootloop or corrupted userdata, don't ask why I don't want to say that my way is the only one but for now it's the working one (if you follow it carefully)
The Following 2 Users Say Thank You to rrvuhpg For This Useful Post: [ View ] Gift rrvuhpg Ad-Free
1st August 2016, 02:36 PM |#7  
hp6830s's Avatar
Member
Thanks Meter: 3
 
More
I didnt said - not following your guide. I did every step, as soon i discovered error on flashing (from the older version). But i did wipe everything, now my phone is empty. Yet it asks for password in order to install superUser, do i need to perform factory reset from recovery menu ?

edit: Wipe/ Factory - OK. FORMAT - YES...and password should be gone.

edit2: phone is rooted, and installing apps.
1st August 2016, 03:16 PM |#8  
OP Senior Member
Thanks Meter: 594
 
Donate to Me
More
Quote:
Originally Posted by hp6830s

I didnt said - not following your guide. I did every step, as soon i discovered error on flashing (from the older version). But i did wipe everything, now my phone is empty. Yet it asks for password in order to install superUser, do i need to perform factory reset from recovery menu ?


Flash full stock firmware with Flashtool and check "userdata" in "wipe" column as in the video (don't wipe/factory reset from Android) , JUST AFTER flash boot.img and recovery.img with Fastboot (don't boot android before that) . Boot to Android to verify and set up your phone, when finished reboot to TWRP to install UpdateSuperSU.zip No passwords needed if followed that, if you defined pin/password for lockscreen or to start phone, try it. Or don't set any password before the end of root process. I don't understand why it ask for a password
The Following User Says Thank You to rrvuhpg For This Useful Post: [ View ] Gift rrvuhpg Ad-Free
2nd August 2016, 08:31 AM |#9  
hp6830s's Avatar
Member
Thanks Meter: 3
 
More
Its all set.Battery seem more stable now...but cant find some of diagnostics tools in About Phone, like battery optimization (but i use greenify now) and move apps to SD card wizzard.
Do i need to create backup from flashtool / boot ?
2nd August 2016, 11:04 AM |#10  
OP Senior Member
Thanks Meter: 594
 
Donate to Me
More
Quote:
Originally Posted by hp6830s

Its all set.Battery seem more stable now...but cant find some of diagnostics tools in About Phone, like battery optimization (but i use greenify now) and move apps to SD card wizzard.
Do i need to create backup from flashtool / boot ?

You finally successfully rooted your phone

You can find battery optimization in "settings " --> "battery". You can't move apps on external SD since a looong time (or with workaround) , just pictures, videos, music ????
For that go "settings" --> "storage and memory".
Android 6 have a new feature "Adoptable Storage" to integrate external SD as phone memory like "ARCHOS Storage Fusion" (but it encrypt SD and is no more readable on PC with USB readers, disable acces to internal memory, not good if you break your phone) but seem to not be present in our firmwares. Next challenge is to enable feature and make encryption as a choice for user.
And for your last question I recommend you make full backup with TWRP, by this way you can backup all partitions. Not sure if it works for XA with Flashtool.
The Following 3 Users Say Thank You to rrvuhpg For This Useful Post: [ View ] Gift rrvuhpg Ad-Free
2nd August 2016, 01:24 PM |#11  
hp6830s's Avatar
Member
Thanks Meter: 3
 
More
Quote:
Originally Posted by rrvuhpg

You finally successfully rooted your phone

And for your last question I recommend you make full backup with TWRP, by this way you can backup all partitions. Not sure if it works for XA with Flashtool.

thx ,but i cant backup, my m card is less than 8 gb (8.2 gb backup img) so i have to wait till my 16 gb card arrives.i

btw what is Xposed framework , Viper4Android. And how to tweek my battery settings more deeper...or greenify hibernate its fine.
Post Reply Subscribe to Thread

Tags
#root #xperia #xa #guide #tuto

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes