Related
I installed NUT's dualboot TWRP/Philz thing. I want to do the following:
1) Preserve my ability to go back to stock Sony - backup DRM keys, Bravia engine, whatever else. It may be too late for this.
2) Install CM11 or other roms.
I have rooted a few phones before, but it seems I do this once a year and forget half of what I learned. I currently have root, can boot into TWRP (assume Philz though haven't tried it yet) and have downloaded the latest CM11 nightly and gapps for the device. But I keep reading that I need an unlocked bootloader first (I thought I had one with the TWRP/Philz thing), could lose my DRM keys (if I haven't already), etc. In the past with whatever device I had, all I had to do was get it into TWRP and then could basically flash whatever I wanted. I figured I would stop her and ask if I need to do anything else or if I can just try flashing these zips.
NexusLush said:
I installed NUT's dualboot TWRP/Philz thing. I want to do the following:
1) Preserve my ability to go back to stock Sony - backup DRM keys, Bravia engine, whatever else. It may be too late for this.
2) Install CM11 or other roms.
I have rooted a few phones before, but it seems I do this once a year and forget half of what I learned. I currently have root, can boot into TWRP (assume Philz though haven't tried it yet) and have downloaded the latest CM11 nightly and gapps for the device. But I keep reading that I need an unlocked bootloader first (I thought I had one with the TWRP/Philz thing), could lose my DRM keys (if I haven't already), etc. In the past with whatever device I had, all I had to do was get it into TWRP and then could basically flash whatever I wanted. I figured I would stop her and ask if I need to do anything else or if I can just try flashing these zips.
Click to expand...
Click to collapse
Wrong place to ask questions but, 1) backup you TA with this: http://forum.xda-developers.com/showthread.php?p=41763438
2) You don´t have to unlock your bootloader to install stock base roms. For CM11 and other roms which are not stock base you need unlocked bootloader. XZDualrecovery don´t unlock your bootloader you have to do it official way or with Flashtool.
But... why?
Well, many people like and buy the Xperia line of devices currently on the market who previously owned a Samsung, LG or HTC. There are many differences in hardware, but most certainly in how Sony perceives the Android ecosystem and how it differs from the other major brands. This (noob) guide is meant to help people on the path to the Sony side I'm sure it contains lots of info which is even useful for the old timers
Things which differ a LOT from the other brands:
First and foremost: no recovery partition;
Second but not least: no download mode.
Sony has replaced the Android recovery partition with the FOTA kernel, which is meant to aid the device in rolling out OTA updates, which allow kernel updates without the risk of bricking the device. I hear you scream: "But wait, what about the recovery partition announcement by Sony themselves!?", well the answer is simple: that is meant for unlocked bootloader devices ONLY, as a part of their "Open Devices" program.
What is Flashmode, Flashtool and what are these FTF and SIN files I am reading about?
I'm going to quote @Androxyde here (it's a straight copy of his index page), as he is the maintainer of the tool:
Flashtool is a S1 flashing software that works for all Sony phones from X10 to Xperia Z Ultra. They all use the S1 protocol for flashing firmwares.
This program was originally made to flash sin files downloaded by SEUS/SUS or PC Companion.
Based on a command line tool written by @Bin4ry (Andreas Makris), I brought a user interface to sin files flashing.
We worked together to add more features to the tool such as rooting methods implementation or TA backup / restore.
Then I took the lead and got some advice and help from him occasionally on some features like rom cleaner or bootloader unlocking.
From time to time, sin files have been bundled into what is now well known FTF (Flash Tool Firmwares) and more features have been implemented.
But flashing firmwares is still the core of Flashtool (that is updated at least to follow Sony improvements around sin files) and the reason of its name.
Flashtool can also easily unlock the bootloader of the phone using the BLU icon as far as the bootloader of your phone is unlockable
The flashing feature as well as bootloader unlock feature are available whatever the phone is recognized or not by the application. What is only mandatory for flashing is to own the FTF file according to the device you want to flash it on.
Why should I use Flashtool?
Once bootloader unlocked, official sony tools do not work anymore.
Using official sony tools, you can only upgrade. No downgrade possible.
Using flashtool, you can choose what to flash and what not to flash. This said, many rooting scenarios are available implying kernel only downgrade to retrieve a patched rooting exploit and then flash back the right kernel.
You said unlocking bootloader?
This process gives you the opportunity to flash custom roms such as CyanogenMod ROMs.
I invite you to visit the FXP Project that brings CM and AOSP to xperia devices.
Click to expand...
Click to collapse
To complete this explanation, Sony devices know 2 bootloader based flash modes:
Flashmode (This is the S1 flash protocol @Androxyde wrote about)
Fastboot (This is the original, unmodified fastboot mode from Google)
In the past there was the Sony-Ericsson Update Software/Service (SEUS, later named SUS because Ericsson got removed from the name) which could update your device to the latest software or recover it from an inoperable state. PC Companion was less of a tool for updating and more of making backups, installing applications and managing the device storage. Sometime the past 3-4 years Sony merged the 2 programs, so if people on XDA or anywhere on the web talk about using PC Companion to restore their device, they are not wrong, they are simply using the latest version
Sony recently released their own package called 'flash tool' (to add to the confusion of noobs in the community), which deep down is a little easier to use and stripped down version of EMMA, which is a tool we mere mortals will probably never use as EMMA is the flash tool for Sony's repair shops and tech support. It's primary function is to allow owners of an unlocked bootloader device (or, 'open device' as Sony named it) to still use Sony firmwares and update their device, because as soon as you unlock the bootloader, the OTA updates will stop.
Things to remember on the files used by these tools:
An FTF file is basically not more then a ZIP archive containing multiple SIN files, you can open the FTF using 7z/WinZip/WinRar and look inside it.
A SIN file is a disk/partition image, which is encrypted by Sony. S1 (the bootloader) will check this encryption to make sure the image was not tampered with before it accepts it for flashing.
Fastboot flashing will always fail when the device is still in a locked bootloader state. For some models it is even disabled entirely or non-functional until you unlock the bootloader.
I am reading about the TA, what is it, why should I make a backup?
The TA partition (Trim Area) is a signed partition which holds various things which are unique to your device, like the device's IMEI, DRM keys and bootloader settings and configuration options. This partition can not be exchanged between devices, because it really is unique. If you would flash the TA backup from someone else it will cause a hard-brick rendering your device only useful as a paperweight...
When you unlock your bootloader you will lose all the DRM features on your device, this makes it valuable to have a backup of the unmodified version stowed away somewhere safe. You will need root level access to create that backup before unlocking. There is a tool called Backup TA which is widely used to create and restore backups of the TA partition. TWRP in XZDualRecovery can do the same.
When you restore the backup TA partition you made before unlocking the bootloader you will essentially re-lock the bootloader and restores the DRM keys. This process is (as far as we know up to now) undetectable by Sony's support staff, which makes it easy to restore the phone to stock for warranty driven support issues as unlocking your bootloader will void your warranty on the device (it is subject to local law though). That is why, for a lot of owners of a Sony device at least, it is considered to be the "Holy Grail" and is usually the reason for a lot of users to wait for a root exploit to be found before unlocking their bootloader.
Okay, I get it now. I would like to unlock my bootloader, how to proceed?
I'm not here to rewrite everything other people or Sony themselves can write just as well or even better, so I have a link for you:
http://developer.sonymobile.com/unlockbootloader/
Read it, it will teach you just about everything you need to know.
Once your bootloader is unlocked, your device will be much like a Nexus device when it comes to rooting, excluding the recovery partition, so that's why we flash or hotboot a custom kernel with a recovery, by using fastboot. If you are afraid of a terminal and typing commands, you can use a tool like QuickIMG or Flashtool to make your life easier.
Right, now I want root!
Well, if you have an 'open device', this is a lot easier then you think. Just remember that using root exploit kits is unnecessary and in some cases even risky as some packages do funky things or jeopardize your privacy.
Try to find a 'stock based' custom kernel. These are custom kernels built by the community to add features to the kernel but are meant to work with Sony's stock firmwares. I'm the maintainer of XZDualRecovery myself and created the Kernel Builder for the supported devices.
These custom kernels will NOT root your device (unless otherwise stated by the creator), but introduce a recovery to the boot process and with that you will be able to flash SuperSU to root your ROM.
But you just said Sony devices don't have a recovery partition, please... UN-confuse me!!
Yes, I did, and I'm right: there have been bright minds in the community who included a recovery in the boot image (the kernel partition) in the past and that way included a recovery on our Sony devices.
With the current 'open devices' policy from Sony, we now have:
Recovery stored inside the system partition, which is meant for locked bootloader devices (closed devices) because they can not run custom kernels;
Recovery stored in the boot image (for open devices);
Recovery stored on the FOTA partition, but with a trigger from the regular boot image at boot (also for open devices);
Recovery stored on the FOTA partition -renamed to recovery- together with an updated bootloader (for open devices, of course).
Hmm, okay... it's still confusing, but OK. My service menu says I'm rooted, but none of the root apps work properly, what gives?!
If you open the phone dialer app and on the keys see the letters below the digits, you can spell the word SERVICE. Type *#*#SERVICE#*#* and a service menu will pop up. Tap 'Service Info' and then 'Configuration'. Then you will see one of these lines there almost on the bottom of the list:
"Rooting status: unknown": it's probably unlocked, but it was unable to verify that;
"Rooting status: rooted": you have unlocked the bootloader;
"Unlock bootloader allowed: YES/NO": this tells you if the bootloader is (vendor-) locked or not, if it says NO, you're out of luck.
The rooting status there is not telling your system is rooted, it tells you your bootloader is and will allow custom rom/kernel flashing. Don't confuse these two.
I'm not allowed to unlock my bootloader But I still want root, can I?
In some cases you can. It depends on the bugs found in specific firmware versions which allow a root exploit to be developed.
From the 2015 range of Xperia devices Sony started using dm-verity, which causes a bootloop once the system partition is modified. This modification of the system partition will be required to include a SU binary in the system to obtain root, so until a dm-verity defeating option is found, locked bootloader root or recovery will not be possible.
For older models, check the device forums and the cross device development forums to check out the community rootkits available. Usually it will tell you what ROM version it is intended for. Be careful with rootkits/roottools though, some are also found to be introducing malware to your device or sending privacy sensitive data to the creators. Use common sense, if you have no valid use for the root user level, keep it off your phone. If you already have recovery, you can use that to modify or clean your device instead.
I have rooted my phone, but whenever I try to modify something on it it spontaneously reboots or I get a message 'Permission denied" when trying to remount the system partition R/W! Why is that?
Like all manufacturers, Sony tries to make it difficult (or downright impossible) to modify the Android base system they created. Because if you can, anyone or anything which obtains root access can. This is a serious security risk, because if it's malware which puts itself on the system partition and locks up your phone, the only way around this is to wipe your entire device and restore a stock ROM using PC Companion or Flashtool. Of course, they have their own proprietary software to protect as well, but security is the main objective here. The really sensitive bits are stored in the TA partition as I explained earlier.
Sony (-Ericsson) had a service called RIC, which in time moved partially in to a kernel feature. What it does is monitor if system is remounted writeable. This usually is a situation you want to avoid at all costs so RIC will deny you permission, cause a kernel panic OR simply reboots your device to get out of that state.
"Remount-Reboot fix", RICKiller, RICDefeat, and XZDualRecovery all (attempt to) disable this service or stop the kernel from acting on a remount of system.
Hard-bricks, Soft-bricks, bootloops??
They are simple to understand, really:
Hard-brick, TYPICALLY NOT RECOVERABLE: The bootloader stopped functioning, this can be caused by a bad flash/update or by restoring the wrong TA backup.
Soft-Brick, ALWAYS RECOVERABLE: the system partition is corrupted or just simply empty, this causes the device to stall at boot. A soft-brick can also make the screen remain off, because of a bad or missing kernel image.
Bootloops, ALWAYS RECOVERABLE: If the system gets powered up and then reboots during the start. This can be at the kernel splash screen or during the boot animation.
In case of a Soft-brick or Bootloop:
Use the installed recovery (if it still works), PC Companion, QuickIMG or Flashtool to restore your device to working order.
In case of a Hard-brick:
You can never recover from that state without physically opening your device and do some heavy duty engineering (JTagging) on it to flash back the correct bootloader/TA (read that link to see what it would take!). This is way too difficult for 98% of the community, which means that hard-bricking your device is typically the creation of a very expensive paper weight.
Please, be extremely careful when dealing with the TA partition.
*********************************************
I will be updating the above text for sure, if you feel anything is missing, please write a post in this thread with the text you wish to include. I want this to be a community driven guide and I know a lot, but I can't know everything
*********************************************
Extended the text some more to include ideas from:
@Klaos3000
@Yenkazu
Thanks for the suggestions/additions guys! :highfive:
As it concern the recovery, i think you can create a partition with EMMA.
Sent from Greece
kos25k said:
As it concern the recovery, i think you can create a partition with EMMA.
Sent from Greece
Click to expand...
Click to collapse
Please, re-read the first part...
Can I root my iPhone 6 with this guide?
That was a bad joke.
Very useful guide. We should probably educate people around here about what an unlocked bootloader actually means and what it let us do. I'm shocked by the number of people using Kingroot and other risky closed-sourced tools, especially the ones with an unlocked bootloader.
People of earth, if your bootloader is unlocked, it means that your device will be much like a Nexus device when it comes to rooting, sans the recovery partition, so that's why we flash or hotboot a custom kernel with a recovery, by using fastboot. If you're afraid of a terminal and commands, then you can use a tool like QuickIMG. After that, you simply flash SuperSU. That's it!
You can add something about TA Partition and RIC server. :3
Good thread btw
Yenkazu said:
You can add something about TA Partition and RIC server. :3
Good thread btw
Click to expand...
Click to collapse
I'd say, give me a piece of text on the subject for the OP and I'll include it :good:
[NUT] said:
I'd say, give me a piece of text on the subject for the OP and I'll include it :good:
Click to expand...
Click to collapse
RIC, from your thread :3
http://forum.xda-developers.com/xpe...b-definitive-root-remount-reboot-fix-t2317432
But, it's kinda useless if people already use your DualRec, since it's already integrated xD
But more info didn't hurt (?)
TA Partition
http://forum.xda-developers.com/xperia-z/help/ta-partition-t2451186
Not really details, but user should know the impact of unlocking bootloader
Updated the OP to include info on the TA partition and RIC protection. Also included a part of the post by @Klaos3000, because it contained some useful info
Thanks guys :highfive:
Very usefull! :good: But for me 2-3 Weeks to late. I'm still quite new on Z3C and I collect all those info the old style
Without this thread you would need days to catch all dependencies - With this you would need approx. 10 min!
Very helpfull and good to link new user to...
And yes - I came form the Sammy side (of the moon ) and was a bit shocked what sony did with "open source android".
Not because of SystemUI ( I love it...) but because of all this "anti modding" stuff they build in.
Sticky? Sure - must be!
Updated the OP to include info on Hard-bricks, Soft-bricks and bootloops.
Please people, if you have anything to add to the OP, let me know!
As I said, I know a lot, but I can't know everything there is to know about Sony devices...
Good work (...as usual from your side) :good:
Very useful tutorial.
No need to write long explanations to Sony beginners anymore - just add a link from here.
Really Helpful
Brilliant.....Really it deserves place at (Sticky Threads).I think if you add minimum One Custom Kernel(for stock firmware)
of every devices..That would b very helpful to recover from Soft bricks.Then this thread will be an "ALL IN 1" thread.Its my Opinion after all...Brilliant work.
Need a little advice.
Hi,
I have a ZL with Locked bootloader and your ZL-lockeddualrecovery2.8.22 installed
I am on stock 5.0.2 now Rooted thanks to your awesome recovery.
Question is now I have your dual recovery would I be able to simply flash crDroid CM zip Thread Here and others like it or would I still need to unlock the bootloader Edit OP of ROM says it is required
So if I flashed the above would it replace your recovery with the boot.img in the zip
Sorry for the noob questions but I am new to Sony devices and still taking baby steps with this phone
I can unlock the bootloader no problem but I am more concerned about your recovery been replaced.
Thanks in advance :good:
bigrammy said:
Hi,
I have a ZL with Locked bootloader and your ZL-lockeddualrecovery2.8.22 installed
I am on stock 5.0.2 now Rooted thanks to your awesome recovery.
Question is now I have your dual recovery would I be able to simply flash crDroid CM zip Thread Here and others like it or would I still need to unlock the bootloader Edit OP of ROM says it is required
So if I flashed the above would it replace your recovery with the boot.img in the zip
Sorry for the noob questions but I am new to Sony devices and still taking baby steps with this phone
I can unlock the bootloader no problem but I am more concerned about your recovery been replaced.
Thanks in advance :good:
Click to expand...
Click to collapse
As long as your phone is locked, you only can flash stockroms and stock-kernels.
You also have to use recovery for stockrom, because you kernel is "untouchable" and recovery have to put in /data and /system partition and can't be put in kernel.
All other roms/kernels will end in errors while flashing.
If you have unlocked your BL, you can flash any rom and kernel you want, as long as your phone is supporting it.
Yes, by flashing a zip, your kernel will be replaced and in most cases they have a recovery in it.
By flashing a rom from another version or changing from stock-based roms to i.e. CM-roms or Omni and vice versa, you have to unpack the kernel (boot.img) by hand and flash (fastboot) this first, before you flash (after a reboot in recovery) the whole zip.
Otherwise it could end in bootloop.
Because of (i most cases) wiping /system, /data while installation, your stock-recovery will deleted too. This depends of the work of the installer in the zip file.
Btw... before unlocking your phone, backup your TA ( with FlashTool). This TA is unique and you may use it to lock your phone again later.
And... if your phone is unlocked - no fear of losing recovery. You always can flash another one with fastboot again.
Someone correct me, if i was wrong or forgot something.
@bigrammi, you can always try yo repack the CM kernel using my kernel builder, that way you will still have XZDualRecovery but then included in the boot image, so no risk of losing it...
akkufix said:
As long as your phone is locked, you only can flash stockroms and stock-kernels.
You also have to use recovery for stockrom, because you kernel is "untouchable" and recovery have to put in /data and /system partition and can't be put in kernel.
All other roms/kernels will end in errors while flashing.
If you have unlocked your BL, you can flash any rom and kernel you want, as long as your phone is supporting it.
Yes, by flashing a zip, your kernel will be replaced and in most cases they have a recovery in it.
By flashing a rom from another version or changing from stock-based roms to i.e. CM-roms or Omni and vice versa, you have to unpack the kernel (boot.img) by hand and flash (fastboot) this first, before you flash (after a reboot in recovery) the whole zip.
Otherwise it could end in bootloop.
Because of (i most cases) wiping /system, /data while installation, your stock-recovery will deleted too. This depends of the work of the installer in the zip file.
Btw... before unlocking your phone, backup your TA ( with FlashTool). This TA is unique and you may use it to lock your phone again later.
And... if your phone is unlocked - no fear of losing recovery. You always can flash another one with fastboot again.
Someone correct me, if i was wrong or forgot something.
Click to expand...
Click to collapse
Thanks yet again bro :highfive:
Wow these Sony Xperia's take some figuring out :laugh:
I think I have just about got my head around it all now
I have managed to get the TA backed up with TWRP and Flashtool so I should be safe now
I will have to unlock the bootloader just to stop it nagging me to upgrade :laugh:
@Nut Thanks bro I will take a look at your suggestion it's a little more complicated than what I am used to or should I say different.
bigrammy said:
[...]
@Nut Thanks bro I will take a look at your suggestion it's a little more complicated than what I am used to or should I say different.
Click to expand...
Click to collapse
Well, i saw HTC M7 in your signature. If you were able to unlocked, s-off-ed, re-flashed firmware and rooted this beast - you don't need to have any fear about a Sony device.
[NUT] said:
@bigrammymi, you can always try yo repack the CM kernel using my kernel builder, that way you will still have XZDualRecovery but then included in the boot image, so no risk of losing it...
Click to expand...
Click to collapse
Hi @Nut,
I thought I would take your advice and expected to download a tool to unpack everything and pick through the files and start editing init.rc etc etc :silly:
I had no idea this was a fully automated Online tool
I still can't quite believe it you're a genius!! :angel:
A BIG THANKS to All the Xperia dev's helpful community members and especially the tool creators XZDualRecovery, Flashtool, XperiFirm and PRFCreator etc you're all Awesome :highfive:
I fear I will become lazy with such great dev's :laugh:
bigrammy said:
Hi @Nut,
I thought I would take your advice and expected to download a tool to unpack everything and pick through the files and start editing init.rc etc etc :silly:
I had no idea this was a fully automated Online tool
I still can't quite believe it you're a genius!! :angel:
A BIG THANKS to All the Xperia dev's helpful community members and especially the tool creators XZDualRecovery, Flashtool, XperiFirm and PRFCreator etc you're all Awesome :highfive:
I fear I will become lazy with such great dev's :laugh:
Click to expand...
Click to collapse
Thanks, glad to have been of help to you
Well, I have investigated a way to root and backup the drm keys before unlock the bootloader, and i found this guide to root an impossible tablet SGP21 with a system of a z3 phone d6603 vulnerable firmware and kernel:
http://forum.xda-developers.com/z3-...t/root-root-locked-bootloader-sgp621-t3013534
So maybe we can adapt this guide to work with our device and root with giefroot or with kingroot, what do you think guys?
Cause i wanna try to flash the system of a z3 first and see if it boots but i don´t know if is possible to damage my phone or i can revert back without problem?
Thanks for reading my thoughts.....
Your idea is similar to this http://forum.xda-developers.com/xperia-z5/general/flash-z3-firmware-to-root-flash-z5-t3310611
The problem is, apart from the risk of bricking, that we don't have a rootable stock rom to flash for the Z5 line: Z4 has no locked bl root and Z3/Z3c have a completely different hardware and their firmware would probably not boot on a Z5.
I think that noone can tell you that you'll brick or not your phone, if you really wish, you have to try yourself. But, in my opinion, it's stupid to do so as it won't boot properly.
You are right , and how about this guide?
http://forum.xda-developers.com/att-galaxy-s6/general/root-5-1-1-qa-oj7-root-snag-t3334546
It looks like a tethered root is possible in a locked environment, it requires that each reboot you have to manually set selinux to permissive via adb in order to get your phone to boot, so may be we can implement in that way only to backup the DRM Keys and then unlock the bootloader and the phones with locked bootloader can achieve root with a tethered solution, is this possible in this phone? :fingers-crossed:
We need someone to help us
unfortunately this in not possible, because of dm-verity protection we have on Z5 devices, look here
http://www.xda-developers.com/a-look-at-marshmallow-root-verity-complications/
and my answer here:
http://forum.xda-developers.com/xperia-z5/general/root-using-vulnerabilities-snapdragon-t3338173
The only available option seems temporary root/system priviledges and backup of the TA partition, then unlock the bootloader
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/xperia-xa/how-to/f31xx-how-to-root-xperia-xa-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/crossdevice-dev/sony/xperia-z1-z2-z3-series-devices-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/crossdevice-dev/sony/universal-dirtycow-based-ta-backup-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/xperia-xa/development/f3111-f3113-f3115-twrp-recovery-xa-t3606488
Boot: https://forum.xda-developers.com/xp...3111-f3113-f3115-stock-kernels-built-t3573119
For XA dual sim = F3112,F3116
TWRP recovery: https://forum.xda-developers.com/xp...3112-f3116-twrp-recovery-xa-dual-sim-t3606232
Boot: https://forum.xda-developers.com/xp...12-f3116-stock-kernels-built-sources-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/xperia-xa/how-to/guide-how-to-install-magisk-xperia-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...-mandatory-device-encryption-for-new-devices/
and
http://www.androidcentral.com/inside-marshmallow-adoptable-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/crossdevice-dev/sony/xperia-z1-z2-z3-series-devices-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!6lTBZxVnLQ-Mxz8er0_dg1r36dCNnUWIq8lEUfSp4Zw
Download XA ADB drivers, all models for Windows
http://dl-developer.sonymobile.com/drivers/Xperia_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/downloads/drivers/fastboot-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/unlockbootloader/unlock-yourboot-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!rvw437H0ZujR5Ic02Rhlap6fQ4sLLyPmSRjyfZlMFiU
For XA dual sim (33.2.B.x.xx) = F3112,F3116
33.2.B.x.x: https://mega.nz/#!xgoXxBTa!DKAwKELVs0UvkZN0X53ZVM7I4U_XnCgG73RswzMPUi0
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
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 ?
rrvuhpg said:
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...-mandatory-device-encryption-for-new-devices/
and
http://www.androidcentral.com/inside-marshmallow-adoptable-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!6lTBZxVnLQ-Mxz8er0_dg1r36dCNnUWIq8lEUfSp4Zw
Download XA ADB drivers, all models for Windows
http://dl-developer.sonymobile.com/drivers/Xperia_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/downloads/drivers/fastboot-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/unlockbootloader/unlock-yourboot-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!rvw437H0ZujR5Ic02Rhlap6fQ4sLLyPmSRjyfZlMFiU (NOT TESTED)
For XA dual sim (33.2.B.2.xx) = F3112,F3116
33.2.B.2.35: https://mega.nz/#!5lZFhapC!SrYt1HmOICEyMh2Afl2EUn4nY0bRwL-Pd1f0Bpkireg
33.2.B.2.73: https://mega.nz/#!xgoXxBTa!DKAwKELVs0UvkZN0X53ZVM7I4U_XnCgG73RswzMPUi0
Good luck
Click to expand...
Click to collapse
Will this work with F3116 running 33.2.B.2.66 firmware?
@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
Ok ,how to remove phone encyption on boot menu ,so i can install custom user ?
hp6830s said:
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 ?
Click to expand...
Click to collapse
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)
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.
hp6830s said:
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 ?
Click to expand...
Click to collapse
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
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 ?
hp6830s said:
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 ?
Click to expand...
Click to collapse
You finally successfully rooted your phone :good:
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.
rrvuhpg said:
You finally successfully rooted your phone :good:
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.
Click to expand...
Click to collapse
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.
hp6830s said:
btw what is Xposed framework , Viper4Android. And how to tweek my battery settings more deeper...or greenify hibernate its fine.
Click to expand...
Click to collapse
Google is your friend ????
http://www.howtogeek.com/195476/7-t...ramework-on-a-rooted-android-phone-or-tablet/
http://forum.xda-developers.com/showthread.php?t=2191223
I will make a guide for installing Xposed and Viper4Android with all working packages for XA.
Yippee-ki-yay! DRM keys are back! Noice reduction and screen optimizations are working again. Used DRM fix found on XDA. Look screens of DRM keys state and the time stamps. Verified with comparative pictures/screenshots :fingers-crossed:
Link to the fix: http://forum.xda-developers.com/crossdevice-dev/sony/xperia-z1-z2-z3-series-devices-drm-t2930672
Use zip for Z3+
rrvuhpg said:
Yippee-ki-yay! DRM keys are back! Noice reduction and screen optimizations are working again. Used DRM fix found on XDA. Look screens of DRM keys state and the time stamps. Verified with comparative pictures/screenshots :fingers-crossed:
Link to the fix: http://forum.xda-developers.com/crossdevice-dev/sony/xperia-z1-z2-z3-series-devices-drm-t2930672
Use zip for Z3+
Click to expand...
Click to collapse
There not really back there still gone for good, know idea how he does it, but it fools/emulates the keys tricking the Sony software into reactivating the Bravia engine+x-reality+camera imaging/low light algorithms. Good to know that there are two ways to do it now though. If I can be bothered I need to try this ivyroot tool for backing up your drm keys before unlocking the Bootloader. Until I know I can back up the keys I won't be unlocking the Bootloader.
Sent from my Xperia XA using XDA Labs
aidy.lucas said:
There not really back there still gone for good, know idea how he does it, but it fools/emulates the keys tricking the Sony software into reactivating the Bravia engine+x-reality+camera imaging/low light algorithms. Good to know that there are two ways to do it now though. If I can be bothered I need to try this ivyroot tool for backing up your drm keys before unlocking the Bootloader. Until I know I can back up the keys I won't be unlocking the Bootloader.
Click to expand...
Click to collapse
iovyroot seem to use a security exploit in LP (kernels before Dec 2015) but patched in MM (or missed the news) and no LP firmware for XA to flash, next exploit for MM can take months or more to come... But I can understand your opinion, the choice is difficult, root or warranty. For me rooting my phones is not optional, when you used custom ROMs, Xposed, Viper4Android, Lucky Patcher and GameKiller one time you can't stay without them after and say f**k to the warranty . If we talk about Xperia X I'm fully OK with you as it cost $$$ and will try to preserve the warranty.
EDIT: The fix is really good, ALL is working again (backup with Xperia PC Compagnon too) and very interesting thing it can show my REAL warranty date in Xperia Care as before. That's strange ...
Looking forsome help
Umm I got the boot loader unlock code. From sony on there web sit, I am new to this. But do I have to flash the phone if my bootloader is unlocked?? I don't want to mess it up I just got it and payed full price i rooted my other phones easy I just am new to android 6
just check XFirmware and xxx.73 version is only available in Brazil
should I tried it?
my version is customizedVN :crying:
Willismetal said:
Umm I got the boot loader unlock code. From sony on there web sit, I am new to this. But do I have to flash the phone if my bootloader is unlocked?? I don't want to mess it up I just got it and payed full price i rooted my other phones easy I just am new to android 6
Click to expand...
Click to collapse
You can test, don't worry about phone brick as long as you don't play with preloader, in Flashtool stay in "normal" mode. I hard bricked XA many times during my private tests (no screen, no sound, only charging led) and always unbricked Mtk are strong for that.
@caosugai you can flash without problem but don't know if it's good for daily use. Tested .66 TW on .35 FR before . 73 out for France, but for test only.
Look here for more:
http://techbeasts.com/how-to-download-sony-xperia-official-firmware-and-create-ftf-file/
Think i lost access to my personal prediction settings, the one that pinpoints my email when entering on login screens over the apps /web ( for example on typing Us3r ,the texting app predicts my mail : [email protected] ,so i dont need typing the whole email over and over )
rrvuhpg said:
You can test, don't worry about phone brick as long as you don't play with preloader, in Flashtool stay in "normal" mode. I hard bricked XA many times during my private tests (no screen, no sound, only charging led) and always unbricked Mtk are strong for that.
@caosugai you can flash without problem but don't know if it's good for daily use. Tested .66 TW on .35 FR before . 73 out for France, but for test only.
Look here for more:
http://techbeasts.com/how-to-download-sony-xperia-official-firmware-and-create-ftf-file/
Click to expand...
Click to collapse
then it's a soft brick not a hard brick. A hard bricked Xperia is irreversible. Bootloop is always recoverable as is a device with only led response when connected to USB and if it does nothing on connection to USB and pc doesn't recognize the device it's a paperweight, that's what I learnt when I first got into rooting and modding my old m2 device.
Sent from my Xperia XA using XDA Labs
---------- Post added at 04:12 PM ---------- Previous post was at 04:05 PM ----------
hp6830s said:
Think i lost access to my personal prediction settings, the one that pinpoints my email when entering on login screens over the apps /web ( for example on typing Us3r ,the texting app predicts my mail : [email protected] ,so i dont need typing the whole email over and over )
Click to expand...
Click to collapse
Mines the same or at least it was earlier on not bringing up email address when logging on to pretty much anything, maybe it's something to do with this SwiftKey thing going off where it predicts someone else's email address and stored words. Maybe it's turned off at there end while sorting the issue out.
Sent from my Xperia XA using XDA Labs
This works for MediaTek SoC ONLY!! XA XA1 and variants of C4/5's, M5's, L1, L2 and Maybe even L3's
Update: A Bootless/System only Root is now reported as working again thanks to diplomatic.
Can XA1 users who have benefited from mtk-su and the System only Root please report back their experience here also so other XA1 users will know what to expect.
Thanks to dev @diplomatic All Sony Mediatek devices should now be able to obtain a /ta partition backup before unlocking their bootloader. :victory:
It works by getting temporary "root" with a easy to use method which will then allow you to grab a /ta backup via the dd cmd
I did some testing for diplomatic and I can confirm this works with my locked bootloader XA1 on Android 8.0 lesser versions should also work.
I also tested this on my other Mediatek devices with the same successful results upto and including Android 8.1
Please visit diplomatic's Thread HERE for instructions and details also remember to Hit his Thanks Button or the :good: Thumbs Up Button if your using a phone app.
How do I backup the /ta ???
See this here.
Use MTK-SU to get temp root then use my dd backup helper script
Thread is HERE for instructions and info
https://github.com/bigrammy/dd-backup-helper-script/blob/master/dd-backup.sh
I am new to Sony whats all this stuff mean???
The below will help anyone new to Sony Gain a little insight into the slight differences over stock Android.
So take time to read it
New to Sony then read the info HERE it will save you a lot of head scratching and google time and I created the thread for just such as you. :good:
As a Footnote for the over enthusiastic:
You only need dd backup what is specific to your device so everything that is NOT included in the FlashTool/Xperifirm firmwares. Like the /TA, /Protect_f, /Protect_s, to name a few for example.
Backing up stock boot or fotakernel is kinda pointless because these are contained in the XperiFirm/FlashTool firmwares and can be easily restored using FlashTool or xflasher to flash those Stock ROM parts.
This is all a little over my head, to be honest. But it looks like I won't be able to install TWRP unless I unlock my bootloader if I'm reading this right?
My phone's bootloader can't be unlocked so that'll be a real shame if that's so.
Ticklefish said:
This is all a little over my head, to be honest. But it looks like I won't be able to install TWRP unless I unlock my bootloader if I'm reading this right?
My phone's bootloader can't be unlocked so that'll be a real shame if that's so.
Click to expand...
Click to collapse
Sure. But you will be able to temp root phone.
Ticklefish said:
This is all a little over my head, to be honest. But it looks like I won't be able to install TWRP unless I unlock my bootloader if I'm reading this right?
My phone's bootloader can't be unlocked so that'll be a real shame if that's so.
Click to expand...
Click to collapse
Sorry for the super late reply but for some reason I don't get a notification when someone post's I guess I must have forgot to subscribe to my own thread. :silly:
Why cant you unlock your bootloader
bigrammy said:
Sorry for the super late reply but for some reason I don't get a notification when someone post's I guess I must have forgot to subscribe to my own thread. :silly:
Why cant you unlock your bootloader
Click to expand...
Click to collapse
I have the message "bootloader unlock allowed: no" so I'm stuck.
I was hoping to be able to install TWRP so I can start modding my system apps.
Sent from my Sony Xperia XA1 using XDA Labs
Ticklefish said:
I have the message "bootloader unlock allowed: no" so I'm stuck.
I was hoping to be able to install TWRP so I can start modding my system apps.
Sent from my Sony Xperia XA1 using XDA Labs
Click to expand...
Click to collapse
Hmm My XA1 is with a relative just now so can't check but we used to have this problem on the C4 and C5.
I just Ignored that and tried the unlock code anyway. It worked for me on the C4 and XA but but not tested it on the XA1 so no guarantee's.
The other option is to use xflasher which worked for me on my XA1 (BL Locked) and flash only the system, boot, recovery, oem and userdata of the earliest 7.0 you can get your hands on and see if it boots. :fingers-crossed: It may even work for the preloader lk etc but I did not want to risk bricking the XA1 so never tried to flash those sensitive area's
If it does let you flash a earlier version then just wait for the ota and install it. The OTA will flash the perloader and lk of the next 7.x update and hopefully that will allow you to unlock the BL unless your phone is locked to specific carrier then I am unsure about that.
Again this is the method used on the C4/5 for rolling back to 5.0 so we could unlock the bootloader.
bigrammy said:
Hmm My XA1 is with a relative just now so can't check but we used to have this problem on the C4 and C5.
I just Ignored that and tried the unlock code anyway. It worked for me on the C4 and XA but but not tested it on the XA1 so no guarantee's.
The other option is to use xflasher which worked for me on my XA1 (BL Locked) and flash only the system, boot, recovery, oem and userdata of the earliest 7.0 you can get your hands on and see if it boots. :fingers-crossed: It may even work for the preloader lk etc but I did not want to risk bricking the XA1 so never tried to flash those sensitive area's
If it does let you flash a earlier version then just wait for the ota and install it. The OTA will flash the perloader and lk of the next 7.x update and hopefully that will allow you to unlock the BL unless your phone is locked to specific carrier then I am unsure about that.
Again this is the method used on the C4/5 for rolling back to 5.0 so we could unlock the bootloader.
Click to expand...
Click to collapse
Interesting. I might try the unlock code just to see what it does. I think Vodafone may have locked my phone, which is understandable but annoying.
I can't afford a new handset and all my old ones are either broken or so underpowered that they're pretty useless, so I won't try flashing anything right now. Too risky.
Ticklefish said:
Interesting. I might try the unlock code just to see what it does. I think Vodafone may have locked my phone, which is understandable but annoying.
I can't afford a new handset and all my old ones are either broken or so underpowered that they're pretty useless, so I won't try flashing anything right now. Too risky.
Click to expand...
Click to collapse
Hmm I thought they could only really sim lock the device but maybe that's why your not been shown the Option to unlock the bootloader.
If you have the sim lock removed by fair or fowl means then the unlock option may become available to you. I have flashed full Vodafone Virgin O2 ROM's with FlashTool before now and none ever locked the bootloader I have only ever heard of people having problems who accidentally flash the sim.lock part of the firmware. :silly:
PS: I have used these before for sim unlocking and all was ok. HERE also cheaper than most.
New bootless/System Only Root
A Heads up for everyone!!!
Well @diplomatic has done it again with a New bootless Root for locked bootloaders it has been reported to be working on the XA1 which I am sure will be good news for many. :victory:
Remember to Hit the thanks button of diplomatic or better still buy him a Beer or Pizza for liberating your phone. :good:
https://forum.xda-developers.com/showpost.php?p=79626434&postcount=135
@Ticklefish
Bootless magisk root
Bootless magisk root working on XA1!!!
Updated tutorial: https://forum.xda-developers.com/showpost.php?p=79626434&postcount=135
Wow, cool! You mean I don't have to unlock my phone to get root? Can't wait to try it on my XA1...
---------------------
But seriously, this bootless root may be a bigger headline than the temp root shell itself.
diplomatic said:
Wow, cool! You mean I don't have to unlock my phone to get root? Can't wait to try it on my XA1...
---------------------
But seriously, this bootless root may be a bigger headline than the temp root shell itself.
Click to expand...
Click to collapse
Awesome work all round and yes you are correct it may even warrant a thread of its own since itś not limited to MTK devices.
On a side note.
Safestrap recovery would be the next logical thing for the XA1 then the locked bootloader circle should be complete.
It will be like running the Fire Phone again :laugh:
https://github.com/bigrammy/android_bootable_recovery-safestrap
Yeah, you're right, I'll make a new thread eventually. Just wanted to start slow and see where it goes...
Unfortunately, safestrap recovery will be problematic because this method doesn't let you write to /system or boot. It doesn't do anything about dm-verity and all that.
diplomatic said:
Yeah, you're right, I'll make a new thread eventually. Just wanted to start slow and see where it goes...
Unfortunately, safestrap recovery will be problematic because this method doesn't let you write to /system or boot. It doesn't do anything about dm-verity and all that.
Click to expand...
Click to collapse
I need to get around to unpacking the boot of the XA1 and look at the lk too. If they moved the fstab to system/vendor then there maybe a way.
My thoughts are as yet untested and based off vague memories but if I manage to put them all together I will let you know.
Real busy just now with Work and ongoing home improvements so not got much time for playing
Read this before thinking about bootless recovery:
https://source.android.com/security/verifiedboot/dm-verity
Any method to root with magisk that allows modifying / system?
leonardo.teseyra said:
Any method to root with magisk that allows modifying / system?
Click to expand...
Click to collapse
Yes for sure but you need to be officially bootloader unlocked for that.
You use the mtk-su to gain temp root then make a couple of dd backups of your /ta and any other partition you think maybe useful which is basically
anything not contained in a firmware package using FlashTool/Xperifirm
EG:
ta
nvram
nvdata
protect_f
protect_s
When you have what you need Unlock the bootloader officially.
Convert your boot.elf to boot.img have Magisk patch the new boot.img and flash it via fastboot.
If you need more detail please provide more such as your device etc it make helping easier. :good:
bigrammy said:
Yes for sure but you need to be officially bootloader unlocked for that.
You use the mtk-su to gain temp root then make a couple of dd backups of your /ta and any other partition you think maybe useful which is basically
anything not contained in a firmware package using FlashTool/Xperifirm
EG:
ta
nvram
nvdata
protect_f
protect_s
When you have what you need Unlock the bootloader officially.
Convert your boot.elf to boot.img have Magisk patch the new boot.img and flash it via fastboot.
If you need more detail please provide more such as your device etc it make helping easier. :good:
Click to expand...
Click to collapse
Thanks for the help, I have a Sony Xperia XA1 with android 8.0. Do you know of any tutorial I can follow? I need to root with magisk to be able to hide the root.
leonardo.teseyra said:
Thanks for the help, I have a Sony Xperia XA1 with android 8.0. Do you know of any tutorial I can follow? I need to root with magisk to be able to hide the root.
Click to expand...
Click to collapse
Backup your ta partition then unlock your bootloader using Sonys official method.
Flash the boot and recovery for your device which are located in this thread HERE
Format your data again with TWRP and flash magisk thats it your done.
To revert your devices back to 100% stock dd back your ta backup and reflash the 100% stock ROM using FlashTool or maybe Sonys official tool.
bigrammy said:
Backup your ta partition then unlock your bootloader using Sonys official method.
Flash the boot and recovery for your device which are located in this thread HERE
Format your data again with TWRP and flash magisk thats it your done.
To revert your devices back to 100% stock dd back your ta backup and reflash the 100% stock ROM using FlashTool or maybe Sonys official tool.
Click to expand...
Click to collapse
How can I backup my TA partition?. I have root access but I can't find /ta any where