Newbie guide for installing a Custom ROM in SGP312 Sony Xperia Tablet Z - Xperia Tablet Z General

The objective of this post is to explain how to currently install a custom ROM in our device. (for total newbies like me, you can also refer -among others- to my previous post). I give the general procedure which wipes everything in your device, but you can check various precious posts in xda that variate this procedure.
The codename for our device is "pollux_windy", which is the Wifi-only version. The LTE version (I should probably get the LTE!) is "pollux" and I suppose the general procedure (with the corresponding firmwares to your specific device) will work for any Xperia device. You can also get the general idea from this post.
As a general rule of thumb do not forget after/before every firmware flashing to:
Enable developer mode (explained here)
Enable the USB Debugging mode (explained here)
Trust installation from unknown sources (explained here)
Steps.
A. Unlock the bootloader.
You can refer here and then check that it is successfully unlocked with these steps (taken from here ):
Open the Contacts app.
Click the menu button.
Click Settings.
Long press (for about 5 seconds) somewhere in the empty space just above status bar, as indicated by the red frame in the screenshot below, and then release your finger. A button named Enter service code will then appear in the same area (this may take a few tries).
Click Enter service code. A dialler will appear.
Dial *#*#7378423#*#* . Then go to -> "Service Info" -> "Configuration". If there is:
Bootloader unlock allowed - Yes << this means that your Bootloader is Locked
Bootloader Unlocked - Yes << this means that your bootloader is unlocked
B. Flash a firmware in which you will root the device
Download/install FlashTool.
Download and place to the FlashTool's folder "firmwares" the firmware "SGP312_10.5.A.0.230_VMo UK_IE.ftf". More information here . In sort, download and extract http://d-h.st/MrI and http://d-h.st/ULc
Open FlashTool and connect the powered-off device (USB cable) in Flashmode, holding the Volume Down button while you plugin the usb cable. The FlashTool should say that it is connected in Flashmode. Then flash the 10.5.A.0.230 firmware in it.
C. Gain root to the new firmware
Open the device, complete the setup wizard and connect to a wireless network. You do not have to setup the Google Account since you can download every application googling the respective APK files, but Google Play is easier to use.
Get (click λ) the towelroot APK, install it and run it (click "make it rain"). You should have root, which you can check with a Root Cheker like this one.
Download/Install SuperSU APK (this is actively developed, while SuperUser is abandoned at the moment) as described here.
D. Install a Recovery to easily flash new ROMs
NUT has done excellent work with XZDualRecovery.Follow the instructions for installing it in his thread. In short:
Download the installer, run it and follow its instructions.
Select SuperSU and of course grant access to your computer from your tablet (watch the tablet screen).
E. Download a Custom ROM and Google Apps
I had problems with Cyanogenmod (versions 11 and 12) that I cannot explain. I had no GPS and no media sound from the speakers, but I did have "notifications" sound! I could listen to "media" sounds using headphones, though. So I tried the nightly OmniROM which seems very stable and fast at the moment, with no sound problems and also has a working GPS! You can get it directly from their site (the NIGHTLY I downloaded is omni-4.4.4-20150223-pollux_windy-NIGHTLY.zip which runs just fine). Somewhere I read that PacMan ROM - also works perfectly but I have not tested it yet.
I had device recognition problems from the Recoveries ("Status 7 Error") that I think dear NUT will solve promptly. What I did to solve them is
Upack the ROM zip.
Remove the first line (from assert(...); till the column) of META_INF/com/google/android/updater-script and save the file.
repack the ROM to a zip.
Then copy this zip to your external SD card. If you need google apps (you probably do, to use Google Play instead of other applications like Aptoide), you will also need to download and place to your external SD card the corresponding google apps from here - (I found it in this post - which also explains the different gapps versions)
F. Install the Custom ROM
So now that both the ROM and (optionally) gapps are in the device's SD card:
Enter the Recovery while repeatedly pressing Volume Up or Down while the device boots.
Wipe everything (except the external SD card, obviously --- if you delete the zip files by mistake you must begin again from step B. using the FlashTool to flash the *.230* ftf).
Reboot and setup/enjoy your new ROM.
It seemed that with OmniROM I had lost root access so I had to reinstall SuperSU. I did this by downloading the flashable/installable zip - and flashing/installing it through the recovery.
In the end a did a full backup with the TWRP recovery and one with Titanium backup

Magnus_E said:
The objective of this post is to explain how to currently install a custom ROM in our device. (for total newbies like me, you can also refer -among others- to my previous post). I give the general procedure which wipes everything in your device, but you can check various precious posts in xda that variate this procedure.
Click to expand...
Click to collapse
For installing customs (CM/AOSP/GPe based ROM's), you don't need to install .230 firmware, furthermore you don't need root (except for backup TA procedure), furthermore you don't need XZDualRecovery (cause it works only for Stock and Custom STOCK based rom's - see this post).
So you you only need to flash kernel via fastboot, and then enter recovery (integrated in kernel), and install .zip with custom, SuperSU and Gapps from there.

hello i was following this guide but im stuck on status 7 error, i tried deleting assert but the twrp recovery dont get any answer to "getprop ro.product.device" and it just doesnt proceed...
and Rootk1t i cant find any kernels flashable via fastboot or flashtool can you point one to me? all of the kernels i see are in '.zip's .... i want to have android 6.0 so i think i should have black kernel but how?

bluealef said:
hello i was following this guide but im stuck on status 7 error, i tried deleting assert but the twrp recovery dont get any answer to "getprop ro.product.device" and it just doesnt proceed...
and Rootk1t i cant find any kernels flashable via fastboot or flashtool can you point one to me? all of the kernels i see are in '.zip's .... i want to have android 6.0 so i think i should have black kernel but how?
Click to expand...
Click to collapse
.zips are installed through recovery, .ftf through flashtool.
6.0.1 ROM you can find here.

Related

[GUIDE][ROOT] How to Root 101 / 230 Firmware with Locked Bootloader

ROOT JB (101) AND KITKAT (230) FIRMWARE WITH LOCKED BOOTLOADER
This thread is now officially obsolete. There is a new, simple and efficient ROOT method created by @geohot, based on the asec exploit. This method is valid for all versions of android with kernel dates older(earlier) than 04 June. The method probably works on any phone / tablet device EXCEPT the HTC M8, Moto G & E, and devices with Intel chipsets. Go to this thread for details:
http://forum.xda-developers.com/showthread.php?t=2783863
The guide below is obsolete and remains only for info. Please do not follow?.
DISCLAIMER: The steps WILL INVOLVE OBTAINING BOOTLOADER UNLOCK CODE FROM SONY, However, after unlocking, you will be guided to re-lock bootloader so that the end result will be a phone with Marlin Keys, Bravia Engine2 and Bootloader INTACT (LOCKED).
Starting Assumptions:
1. You have a Sony Xperia Z (C66XX) L-39H (Duh! Obvious!)
2. You have some knowledge of Root, SUPERUSER and enabling developer options, enabling USB Debugging mode, switching off and connecting your phone to USB & Computer with vol Up / Down Pressed to enable Fastboot mode or Flash Mode. If not, then go slowly and patiently, read every screen that flashes in front of you on your PC/Laptop and choose dilligently.
3. The bootloader status of your phone is BOOTLOADER UNLOCK ALLOWED--YES. This is the general case if you are on a no-contract plan with your service provider, or you have brought the phone at a full premium price (No discounted price by your wireless service provider). US / Canadian users, please obtain your unlock codes before you proceed further, all your phone's bootloaders ARE LOCKED. If you have bought the phone second-hand or from a dubious source check the bootloader lock status by opening the dialler and entering *#*#7378423#*#* (star-hash-star-hash S E R V I C E hash-star-hash-star). You will see four options 1. Service Info, 2. Service Tests, 3. Calibrations and 4. Customisation Settings. To check the bootloader status tap on Service Info>(next page)>tap on configuration>(next page) the last item is your bootloader status. It must read bootloader unlock allowed-YES If it reads "bootloader unlock allowed-NO" then you need unlock codes from your wireless service provider. If it reads "bootloader-UNLOCKED", then you have lost your Marlin keys and bootloader (This also means you cannot flash Sony updates, but you have a wide open field to flash any ROM and kernel of your choice!).
4. Loads of Patience....
5. Some coffee / favourite non-alcoholic brew at hand for sustenance (alcoholic beverages can be for later, till you're done with the process / you are past the legal age. Until then go easy....)
6. It is assumed that you have a Windows PC / Laptop (Win32/64) with all necessary drivers loaded. If not just download and install PC Companion, it will install the necessary Sony drivers.
Step-1
Locked bootloader with 4.2.2 (67 or lower firmware) ROOT status idoesn't matter.
Locked Bootloader with 4.3 (.569 / Commercial & Journalist's firmware) rooted / unrooted.
If on 4.2 firmware, then ROOT your device using BINARY's Method or cubeundcube's method (DOOMLORD's method works below 67 firmware, but I may be wrong) Links:
Binary's Thread: http://forum.xda-developers.com/showthread.php?t=1886460
cubeundcube nethod: http://forum.xda-developers.com/showthread.php?t=2559009
DOOMLORD's thread: http://forum.xda-developers.com/showthread.php?t=2327472
If on 4.3 firmware and not rooted, then downgrade to 4.2.2 (67 firmware) by flashing a ftf file of your region. Links for flashtool thread is given below. Use thread search to find ftf file for your region and download it.
If you are already rooted on 4.3, 569 firmware AND have a locked bootloader, then start from this point.
Make a backup of your Trim Area (TA) by using the tool created by DevShaft at this thread: http://forum.xda-developers.com/showthread.php?t=2292598 This Step is VERY IMPORTANT!!!!!
Step-2
You now have a rooted phone on 4.2.2 (67 firmware) or 4.3 (569 firmware), AND you have made a backup of yourphone's TA.
Now, upgrade to 4.3 (101 firmware) by connecting your phone to the PC (USB cable) using PC Companion or by using SUS. Use the UPGRADE option and not the CLEAN INSTALL option to retain data. On the first boot after upgrade you will realize that you've lost ROOT and any recovery that you had earlier installed.
Make a FTF file of the upgraded ROM by following the instructions from this thread by deadmask (http://forum.xda-developers.com/xperia-u/general/guide-how-make-ftf-stock-firmware-sus-t2075736) or from Stage-3 of this thread by VipeR (http://forum.xda-developers.com/showthread.php?t=2188129)
Step-3
You now have a phone on the latest firmware (without root) AND you have a backup of TA from 4.2 firmware, AND ALSO have a FTF file for the latest firmware.
Obtain the unlock code for your bootloader from the Sony website. Link: http://unlockbootloader.sonymobile.com/
enter your phone's IMEI number and your email to recieve the unlock code. Legal eagles, obtaining an unlock code DOES NOT MEAN THAT you have actually used it!!! Open your e-mail inbox and check for mail from SONY containing your unlock code.
Custom Kernel Download First download a custom kernel by DOOMLORD (with CWM) recovery for use immediately after unlocking the bootloader from this thread by DOOMLORD: http://forum.xda-developers.com/showthread.php?t=2167381 . Download the custom kernel and place it on your computer's desktop/folder of your choice. Extract the contents of the zip file and we'll come back to it later.
ADB+Fastboot Tools Download a set of ADB and fastboot tools made by anonymous and hosted at the Dev-host site Download link : http://d-h.st/I8l
After the zip file has downloaded extract it to get a folder fastboot+ADB Now take out the boot.img file from the zip file containing DOOMLORD's kernel above, and copy it to the win32subfolder inside the fastboot+ADB folder. Make a note of the location (Drive/folder) where this folder has been saved. (preferred storage on the desktop)
CWM Flashable SuperSU Download Download the latest flashable Super SU by Chainfire from the OP of this thread: http://forum.xda-developers.com/showthread.php?t=1538053 . Download the latest cwm flashable superSU.zip and place it in your phone's external SD Card
Use Androxyde's Flashtool (thread link:http://forum.xda-developers.com/showthread.php?t=920746) to unlock your bootloader It is a painless one-click procedure using the BL button. follow the instructions in the flashtool and let the phone reboot (after unplugging USB) Now recheck if ADB debigging mode and Unknown sources are enabled in phone settings.
Now click START on your PC and enter 'cmd' in the search box. Right click on the command prompt / DOS box (cmd.exe) and choose "run as administrator". Enter the administrator password if prompted by the PC. In the command prompt window type the following commands:
cd\
cd users\(your login username)\desktop\fastboot+adb\win32\ (in case you stored the fastboot+adb file on your desktop) or navigate to the folder where you stored the extracted files....
fastboot flash boot boot.img (did you extract and store the boot.img file from doomlord's kernel to the win32 file of fastboot+adb?)
wait for the results to flash and then type fastboot reboot andWAIT before you hit ENTER
Click to expand...
Click to collapse
Hold the phone in your hand and do the reboot command. As soon as the blue light goes off and the SONY logo appears wait for the phone LED to turn violet. Press Vol UP button on seeing the violet LED and release-press-release-press two to three times for good measure (Sometimes a constant press also works) till the LED goes off and the phone boots into CWM. In the CWM menu use the Vol up/down to tab move between the options and use the power button to select. There is also a touch-swipe down/up to tab-move and swipe right to select or swipe left to go back, use this method only if you are confident/familiar with the touch-select method. Select flash a Zip from external SD card and navigate to the folder where you stored the update-superSU-1.93.zip and select it. confirm by moving down to select Yes, Flash update-supersu1.93.zip and let CWM finish flasing the SU. go back to the main page and reboot to system from CWM.
After the phone reboots check Super SU is loaded on your phone in /System/app/ and check full root access on your phone....
Step-4
You now have a rooted phone on the Latest 101 firmware, with unlocked bootloader, AND you have a backup of your phone's TA and also have a ftf file of the latest firmware.
Now you have one last step to go back to stock kernel for locking your bootloader. Start Flashtool and select the flash (lightning) button select flash mode. Now select the latest firmware, which you had converted to FTF and on the right side top, (wipe options) untick all wipe options. On the right bottom (exclude), tick mark to exclude everything EXCEPT kernel and fotakernel. See that the centre window (flash content) shows only kernel.sin, fotakernel.sin and loader.sin. (Check Screenshot for reference) Now hit the flash button and put the phone into flash mode.Unplug and Reboot
Step-5
Now you have a rooted phone with the latest firmware on stock kernel (no CWM) AND you have a backup of the TA from your phone.
Now's the time to flash the TA. Do you remember the steps of making backup/restoring TA. check DevShaft's thread again, and remember it is better to do a dry run for restoring TA, before the final restore. DO IT.
Finally, you have rooted the phone with the latest firmware, and relocked your bootloader, and all with a ROM/Kernel and customisation of your region/choice.
Future Steps:
Flash a recovery. [NUT]'s dual recovery for locked bootloader is the best. Thread link : http://forum.xda-developers.com/showthread.php?t=2261606
Acknowledgements:
All DEVs and OPs whose threads, posts, tools and files as mentioned in this post. I have only placed them in one order. You may thank each thread OP &/or Dev for their tools, files and guides.
Unlock bootloader?
And re-lock at the end.... You wanna?
Dead Cookies leave no trails...
In 67 you can root with Doomlord solution, no need to unlock the bootloader.
Then need to update with cwm method other than rom flash.
Simple and easy to follow I now have a rooted Xperia Z on Android 4.3
johan8 said:
In 67 you can root with Doomlord solution, no need to unlock the bootloader.
Then need to update with cwm method other than rom flash.
Click to expand...
Click to collapse
hi there, would you pls advise the step for Doomlord's solution? I follow this threat http://forum.xda-developers.com/showthread.php?t=2386405 but fail at step 2 flash older rootable version (tried XperiaZ_C660X_KernelOnly_10.3.A.0.423_Generic_NL.f tf - 7.12 MB and C6603_10.4.1.B.0.101_Stripped.ftf). phone boot loop.
That's why I didn't advise using doomlord's method in op. Read again. Root using bin4ry's method/cubeundcube method and proceed as per op. There's no need for striped and full ftf, just the ftf you create from your upgrade is enough.
Dead Cookies leave no trails...
If you're going to go back to 2.67 anyway its easier to just flash NUTs upgrade to 4.3.
You will also have root and no fiddling with bootloader required.
Managed it successful. Thanks for your detailed tutorial. Very nice, now let's look forward to KK!
Sent from my GT-I8160 using xda app-developers app
I got a question,Is there a way I can unlock my bootloader without losing all my data?
I posted this thread only after verifying the steps on my device. I was initially on 569 with locked bootloader and rooted. I did the exact steps and found that I had not lost any data, personal or on the internal sd card. Try... But Pls make a backup, just in case (I did it too).
Dead Cookies leave no trails...
Cookie Ninja said:
I posted this thread only after verifying the steps on my device. I was initially on 569 with locked bootloader and rooted. I did the exact steps and found that I had not lost any data, personal orion internal sd card. Try... But Pls make a backup, just in case (I did it too).
Dead Cookies leave no trails...
Click to expand...
Click to collapse
I have a nandroid backup of 4.2.2 so I guess I could just restore that If I happen to lose my stuff. Or maybe I have to downgrade and then restore?
Edit: But Honestly it's really risky. maybe I'll just wait till someone comes up with an exploit for 4.3.
May have to wait a long time till a roast duck flies into your open mouth.....
Dead Cookies leave no trails...
Cookie Ninja said:
May have to wait a long time till a roast duck flies into your open mouth.....
Dead Cookies leave no trails...
Click to expand...
Click to collapse
You don't have to be a **** about it
First thanks
If i had download 4.3 101 on my copmputer and flash it manual can i skip step 2
- And when i flash framework and electocity cut can damage my phone ??!!
Sent from my C6603 using XDA Premium 4 mobile app
Wow too BIG post for root 4.3 and also i didnt understand anything:silly:
Huh! With every new phone I bought,rooting is harder.Samsung phones was so easy to root.LG was a little bit harder,but this... :-S
Sent from my C6603 using Tapatalk
Guys, it is not sooo hard as it sounds. If you are familiar with the usage of the flashtool and have a little bit trust in yourself, then THIS is definitive the right thread to get root access and a relocked bootloader on your .101 firmware. Follow exactly the steps and don't - please don't - listen to some smart heads who suggest to flash a prerooted fw. Take the hard way and you'll be definitive successfull. I did so with this tut, and my Z is totally ok. Thanks to Cookie Ninja again.
Sent from my rooted C6603 using xda app-developers app
hi all
ive got xperia z 6603 with 101 firmware..i try to flash 569 stripped file and then when i check back it doest even change anything at about phone..it still on 101..please someone..please provide more detailed instructions..im on LB..
Great tutorial. I've been linking people to it fairly regularly.
Just some input; you're advising people to get unlock codes from their network provider when it states 'Bootloader unlock allowed : No' in the service menu.
I'm fairly (almost completely) certain that there is no way for people in that situation to get the status changed at all, including by their network provider or Sony. Network/sim unlocking the device does not affect the bootloader unlock status.
Also, Flashtool has a fastboot mode that allows flashing of the boot.img, which may be easier for some that aren't confident working with the command line.
Anyway, they're small issues in what is a thorough tutorial.
Sent from my C6603 using Tapatalk

[STOCK ROM] [Root] [FTF] 4.4.2 Kitkat Xperia Tablet Z SGP311 10.5.A.0.230 VMo UK IE

** DISCLAIMER: I AM NOT A DEVELOPER. I DO THIS AS A HOBBY AND SHARE MY FINDINGS IN CASE SOMEONE ELSE FINDS THEM USEFUL. **
** THIS WORKED ON MY DEVICE BUT IT MAY NOT WORK ON YOURS. APPLY AT YOUR OWN RISK **​
Requirements:
Flashtool 0.9.15.0
Rooted SGP311 (on any other previous Android version) with custom recovery installed.
If you do not meet these conditions, for example, if you are on an unrooted 4.3 system, here is a guide to get you on a rooted 4.1.2 with recovery:
http://forum.xda-developers.com/showpost.php?p=53063218&postcount=14
This works on locked or unlocked bootloaders. This also works on any customization. Mine was US Generic before applying this. I used the UK customization because at the time of this posting that is the only English customization available. I can post the US root files later if need be.
The procedure should work with any pre-rooted Android version but I started with 10.1.C.0.370 (4.1.2) which was rooted with DooMLoRD_Easy-Rooting-Toolkit_v17, patched with remountrebootfix, and equipped with XZDualRecovery.
Limitations:
There is a small chance that the process would delete the files on your internal SDcard so back them up. Also, you will have to reinstall all your apps, as they get erased too.
Note that Sony has admitted that this release has a battery drain problem and has issued a workaround that involves disabling Google services:
http://talk.sonymobile.com/t5/Xperi...-Drain-issue-Workaround-Fix/m-p/708273#M42303
Download link:
Mega
https://mega.co.nz/#F!oxdFQLSa!2su-BTlYfaANi26VuV7o4w
You only need the zip and ftf files. The txt file is just the checksum if you want to verify that your download is error-free. I strongly recommend that you do the checksum before flashing.
Instructions:
1- Backup before you start messing with your tablet!
2- Put system.flashable.zip in /sdcard of your tablet.
3- Keep SGP311_10.5.A.0.230_R1D_VMo_UK_IE_NoSystem.ftf on your PC.
4- Disconnect any USB cable that may be attached to your tablet.
5- Reboot to recovery. Preferably to TWRP, but you can make CWM work too.
6- Do not wipe anything.
7- Once in recovery, flash system.flashable.zip.
8- It is important to NOT REBOOT the tablet after this step.
9- Find and use the Power Off option in the recovery and turn your tablet off. In CWM based PhilZ Touch it is under "Power Options" -> "Power Off". In TWRP it is under "Reboot" -> "Power Off". If you see your tablet rebooting, force it to turn off by pushing the power and volume up keys simultaneously (or however else you can!)
10- Open Flashtool 0.9.15.0 and click on the flash icon. Choose flash mode.
11- Navigate to where you have saved SGP311_10.5.A.0.230_R1D_VMo_UK_IE_NoSystem.ftf and flash this ftf with your tablet in flash mode. To put your tablet in flash mode, hold the volume down button when it is off and connect with the USB cable to the PC.
12- Reboot and enjoy!
Credits:
I only put the files together. All the credit should go to XDA's [NUT] and DooMLoRD and many others...
Thank you!
Worked perfectly fine and is rooted!
:good:
Thanks. Worked fine :good:
download from gdrive always fails.. is there a mirror?
Riekr said:
download from gdrive always fails.. is there a mirror?
Click to expand...
Click to collapse
Sorry about that. If you know a reliable server I can try and upload it there.
Ok
Riekr said:
download from gdrive always fails.. is there a mirror?
Click to expand...
Click to collapse
I'm uploading on mega now. Will post the link as soon as it's ready. Check back in about an hour.
hi najoor
my situation has as follow: tab z 4.3 non rooted running last FW.
i understood i have to downgrade to 4.1.2 and flash the build 10.1.C.0.370(i found a us version hope is ok) with flashtool, only then i can root with the doomlord link method.
after that i can start following this guide. can you confirm me it is correct?
also i assume i can use the version of flashtool you are mentioning.
thanks in advance.
mame3876 said:
hi najoor
my situation has as follow: tab z 4.3 non rooted running last FW.
i understood i have to downgrade to 4.1.2 and flash the build 10.1.C.0.370(i found a us version hope is ok) with flashtool, only then i can root with the doomlord link method.
after that i can start following this guide. can you confirm me it is correct?
also i assume i can use the version of flashtool you are mentioning.
thanks in advance.
Click to expand...
Click to collapse
Hello,
Yes, if you flash 4.1.2 on your unrooted 4.3 them you can use doomlord's method to root it. Once your 4.1.2 is rooted make sure you apply the remountrebootfix patch to it. Then install the XZDualRecovery or other recovery of your choice, then start my guide.
The flashtool version I mentioned should work for every thing.
Finally, if you are flashing a 4.1.2 ftf that you found online, exclude the ta partition, if it exists in the ftf, when flashing.
Many thanks for your reply. 2 questions where i can find the patch you mention and how i can install it? The ftf 4.1.2 i found here in xda i took from the thread in development used now to flash the 312 and to flash 311 are addressing to the thread you opened. I'll see how to use the flashtool since I'm new to xperia modding as i only did with Samsung devices.
Inviato dal mio GT-N5110 utilizzando Tapatalk
mame3876 said:
Many thanks for your reply. 2 questions where i can find the patch you mention and how i can install it? The ftf 4.1.2 i found here in xda i took from the thread in development used now to flash the 312 and to flash 311 are addressing to the thread you opened. I'll see how to use the flashtool since I'm new to xperia modding as i only did with Samsung devices.
Inviato dal mio GT-N5110 utilizzando Tapatalk
Click to expand...
Click to collapse
Ok give me a couple of hours to get back to my computer. I'll gather the files and post a mini guide for you.
Worked a treat so thanks for taking the time to write the tutorial and host the files.
A couple of times I was scratching my head.
First was that no dual recovery on my rooted system. All my fault from the last upgrade.
Second was "Shut-down..Don't reboot. but the big button said REBOOT.... It wasn't until I eventually clicked the reboot button in TWRP that it came up with Shutdown.
All in all a pretty straight forward upgrade (once I'd made good on my mistakes)
Great work and thanks again.
zach
najoor said:
Ok give me a couple of hours to get back to my computer. I'll gather the files and post a mini guide for you.
Click to expand...
Click to collapse
no rush and most of all many many thanks
How to Install a 4.1.2 stock rom on SGP-311 with root and recovery
One of the requirements for upgrading to new releases of Sony's Android for Tablet Z with root is to start with a previous Android version that has been rooted. At the time of this writing, I do not know of any easy method to root a 4.3 installation. For 4.2.2, there is always Vroot but over time I have become very skeptical of it. It certainly does root the rom but at the same time it behaves more and more like malware or at least bloatware so I don't use it unless I have to. Which leaves us with 4.1.2, which is the initial factory release version of Tablet Z, which also happens to be easily rootable.
So if you are on an unrooted ROM and want to upgrade to Kitkat with root, the reasonable way is to downgrade to 4.1.2, root and patch it, install recovery on it, and then try the instructions at the beginning of this thread. So here is a mini guide to:
How to install a 4.1.2 stock rom on SGP-311, root it, and add custom recovery​
0- Always back up. Flashing an ftf likely erases your internal SDcard.
1- You need Flashtool by Androxyde (not attached to this posting) to put the rom on your tablet (Don't confuse it with Sony's official flash tool called Emma). I recommend Flashtool version 0.9.15.0.
2- You need an image of the 4.1.2 rom, which is an ftf file (not attached to this posting). You can get one from here: http://forum.xda-developers.com/wiki/Sony_Xperia_Tablet_Z_SGP311 The customization is not important so 10.1.C.0.370 USA version should do just fine.
3- Fire up the flashtool and flash the ftf file into your tablet. There is a ton of tutorials on line about how to do this. The only thing I should add to them is that if you get the ftf from a third party (i.e. you didn't build it with you own tablet) you should exclude the TA partition when flashing it. The reason is that, as I understand it, the TA partition has data that is unique to each individual tablet. So I never understood why people pack their TA partitions in the ftf that they publish. If you forget to exclude the TA partition when you flash you will end up overwriting your own unique TA partition with someone else's. While that is not gonna render your tablet unfunctional, you will lose your warranty and a few other things of less importance.
4- Once you get 4.1.2 on your tablet, go to settings and find Developer Options. Under that locate USB debugging and activate it.
5- Attach your tablet to the PC and make sure you have closed the flashtool on the PC.
6- Unzip DooMLoRD_Easy-Rooting-Toolkit_v17_perf-event-exploit (attached to this posting) on your PC and run runme_win.bat (I am assuming you are on Windows)
7- Let the code do its thing and if all goes well, your tablet will reboot by itself and you will see SuperSU added to your installed apps.
8- This particular rooting method must be patched immediately after so unzip remountrebootfix-windows (attached to this posting) on your PC and run install.bat. Pay close attention to your tablet display as you are going through the instructions because at some point you have to grant root rights to ADB on your tablet and come back to the PC and "press any key to continue". The patch will be applied and the tablet will reboot.
9- (Very optional) You can install joeykrim's Root Checker form Android Market to verify this process has indeed given you root privileges. You can also install something like Rhythm Software's File Manager HD (Explorer) from the Market, then go to settings, check "Root Explorer" and then check "Mount System Folders". Without the patch in step 8 the tablet crashes and reboots itself a few seconds after you perform this mounting.
10- You now need to add a recovery partition to your Tablet. XZDualRecovery is a great piece of work by none other than [NUT] of the xda. Unzip TabZ-lockeddualrecovery2.7.94-BETA.installer (attached to this posting) and run install.bat. Once it is installed, the Tablet will immediately reboot into the installed recovery. If all goes well, you will see the recovery menu. Click on reboot. In future, if you want to get to the recoveries that you just installed, reboot your tablet and wait for the LED next to the power button to turn green then press volume up for CWM Philz recovery or volume down for TWRP.
That is it folks. Now you have a 4.1.2, with root and recovery (in fact 3 recoveries) installed.
sd delete
Hi
Thank you very much for this ROM,and instructions,it's awsome.
I've got only one problem after installing it. I can't delete anything from my sd card.
What did I wrong? What can I do?
Thanks in advance
Tamás
many thanks, finally a clear guide!! great job.
@ Szata68, the proble you experience is a feature of kitkat unfortunately. but now that you are root you can easily getting rid of that restrictions implemented by google, don't rememebre the name but if you search on google restricion sd card kitktat, one of the first results shown is how to deal with that
@ Szata68
I've not tried with any stock file browsers but ES File Explorer deleted files on internal and external. I haven't given it root access yet either.
I've been testing this for a good few hours now and I've not experienced any of the problems other people are having (other releases) It all seems happy.
szata.68 said:
Hi
Thank you very much for this ROM,and instructions,it's awsome.
I've got only one problem after installing it. I can't delete anything from my sd card.
What did I wrong? What can I do?
Thanks in advance
Tamás
Click to expand...
Click to collapse
Tamas,
I don't suggest you change anything to fix this problem because there are tools that come standard in this rom that can delete files on the sdcard and move data between internal and external storage (file commander and Sony file transfer) but if you insist, here is how to fix it permanently:
http://technofaq.org/posts/2014/04/fixing-external-sd-card-write-issue-on-android-kitkat/
Thank you very much guys!
I normally use FX Explorer,and that can't delete,but from now I won't use that with this ROM.
Thanks again for everyone!
update also possible with cyanogenmod
will the update also work with cyanogenmod 4.3 installed?
As far as I can see it, it should work ( I have apps requesting root sometimes ).
Thanks!

How-to: root, keep and backup DRM keys, etc. [KitKat/Lollipops/Marshmallow/etc.]

By almost popular demand, making this a thread
This is a how-to root, install recovery, backup drm keys, etc. from scratch in a single thread since finding all threads can be daunting. That's basically all the things you generally want to do when you root the phone (WITHOUT UNLOCKING THE BOOTLOADER).
TL;DR - overview
If you know what you're doing, you really just need to read this part of the post. If you're unsure, read the step-by-step instead.
If you're running Android 6.0.1 MM with firmware .291 (and probably any other future firmware), want to root without unlocking the bootloader more quickly than the method below refer to this post: http://forum.xda-developers.com/z3-compact/general/recovery-root-mm-575-lb-t3418714 (get all 3 zips, rename the kernel zips to .ftf, flash kernel575.ftf with flashtool - reboot - enable dev mode, run bat script - reboot in recovery and flash supersu.zip - flash kernel291.ftf, reboot, done (for future versions you'll want to only flash the kernel from sony's ftf after rooting)
Downgrade the firmware, as the root exploit only works with older firmware such as 23.0.A.2.93.
Run the root exploit to get root
Backup the DRM keys
Upgrade the firmware to the latest version, while retaining root access (or by using a pre-rooted images that nice people made)
In the process, we'll install DualRecovery and SuperSu (having the custom recovery is what allows you to keep root as it let you flash a modified image that has SuperSU on it)
See the FAQ at the bottom in case you need additional help, about mounting /system read-write, fixing the sdcard issues, etc. These are not directly related to the rooting process, but you most likely want to perform these tasks anyway.
Step by step instructions
Read instructions carefully, there's many steps, making this slightly complex.
Ensure you backed up everything you need (files/apps/pictures/etc) first, these will be lost! - YOUR PHONE WILL BE WIPED.
-- FW DOWNGRADE AND INSTALL WITH FLASHTOOL --
Downgrade fw to 23.0.A.2.93 (Device D5803) or anything prior to 23.0.1.A.5.77 (december fw)
Global:https://mega.nz/#F!wdEG3aiD!Ej2S4hcMKGPgnmGudvAegg (look for 23.0.A.2.93) (or see http://forum.xda-developers.com/showpost.php?p=66275977&postcount=2030 for more links if this one no longer works)
Get and install Flashtool at http://www.flashtool.net/index.php
Move the fw into the C:/Flashtool/firmwares directory
Open Flashtool, click on the lightning symbol ("flash device"), select "Flashmode" and click on "OK"
Just select the name of the fw you downloaded and click on "Flash"
Wait for a window to pop up (it may take a few minutes, be patient)
Now everything is ready: turn off your phone
Push the volume DOWN button, connect the USB cable to your PC while still pushing the volume DOWN button
Once the flashing process has started, release the volume button
) Do not disconnect the USB cable, wait until flash completes (flashtool will indicate when you can unplug).
-- ROOTING W/ EXPLOIT --
Enable USB debugging on the phone (Settings => About phone => Click 7 times on Android Build to unlock developer options)
Allow mock locations (Settings => Developer Settings)
Ensure you have adb drivers installed (http://support.sonymobile.com/gb/tools/pc-companion/ don't use it to update
Download rooting tool (http://forum.xda-developers.com/devdb/project/dl/?id=10766&task=get) or latest from http://forum.xda-developers.com/crossdevice-dev/sony/giefroot-rooting-tool-cve-2014-4322-t3011598)
Unzip the rooting tool
Connect phone to your computer
Put phone in airplane mode
Run install.bat from the rooting tool (allow USB debugging when asked on the phone every time, also allow root prompt) and follow instructions from the tool
You should be rooted now, if you get an error "Device not rooted" trying running the tool once more
-- Backup DRM keys/TA Partition --
Get backup ta tool from https://github.com/DevShaft/Backup-TA/releases
Unzip it!
Ensure phone is still connected (or reconnect it)
Run Backup-TA.bat
Read the information and follow the instructions given by the tool.
-- Install latest firwmare with root, DRM keys, recovery --
Alternative 1: pre-made pre-rooted image (for fast internet, slow pc
Get a pre-rooted image:
For KitKat - fw 23.0.1.A.5.77 (android 4.4. dec 2014) at http://forum.xda-developers.com/z3-...ist-pre-rooted-firmwares-6-oct-2015-t32188206 then skip directly to step 33.
Or, for Lollipop - fw 23.1.A.0.690 (Android 5.0 March 2015) at http://forum.xda-developers.com/z3-compact/development/list-pre-rooted-firmwares-6-oct-2015-t3218820 then skip directly to step 33.
Or, for Marshmallow - fw 23.5.A.1.291 (Android 6.0 June 2016) at https://mega.nz/#!0JUA2DzR!5-5Tz1BRr3gkvrt_loqHzePsgfSeGKCD07xhQzugl4w or http://forum.xda-developers.com/z3-compact/development/list-pre-rooted-firmwares-6-oct-2015-t3218820 then skip directly to step 33.
Alternative 2, for newer fw for example - build your own pre-rooted image (fast pc, slower internet:
Get PRFC from http://forum.xda-developers.com/crossdevice-dev/sony/tool-prfcreator-easily-create-pre-t2859904
Get latest fw from http://forum.xda-developers.com/z3-compact/general/list-stock-firmwares-d5803-d5833-t2906706
Get latest SuperSU zip http://download.chainfire.eu/supersu
Get DualRecovery zip (the flashable zip, not the installer one) from http://nut.xperia-files.com/ you want Z3C-lockeddualrecoveryX.Y.Z-RELEASE.flashable.zip
Start PRFC and add the 3 zip (FTF file is the fw, SuperSU and Recovery)
Click "create" - this will take a while
Copy resulting "pre-rooted" fw to /sdcard0 on your phone (it means copy flashable.zip from the PRFC directory to the "internal storage" directory of the phone)
Get Dual Recovery installer this time, from http://nut.xperia-files.com/ you want Z3C-lockeddualrecoveryX.Y.Z-RELEASE.installer.zip notice how thats 'installer' this time, not the same file as in 30!
Unzip it
start install.bat and follow instructions (hit 1 (allow adb/root on the phone as needed)
You should be in recovery automatically now. (if not, reboot and when the LED change colors push volume UP repeatedly)
Flash the pre-rooted fw (flashable.zip) from the recovery (touch "install zip", select /storage/sdcard1/flashable.zip then confirm install) on the phone, then power off the phone (DO NOT REBOOT)
To power off, go into the "power options" and hit "power off" (dont do "reboot in flashmode" DO power off)
Unplug USB (yes this is required, DO IT)
Open Flashtool and select the non-pre-rooted fw (this is 23.5.A.1.291 for example), but DESELECT system: in "EXCLUDE" make sure you check the checkbox next to "SYSTEM", flash it.
press volume DOWN and plug USB cable while keeping volume DOWN pressed, when flashing starts, stop pressing the volume button
After flash is done and when flashtool tells you to, remove USB cable and start the phone
Congrats and enjoy, you made it to the end! you now have latest + recovery + root and backups of your DRM keys! (and of course all DRM functions enabled)
FAQ
- Some root apps don't work, because /system can't be remounted rw, what's up with that?
Sony has a special in kernel protection that disallow remounting /system read-write, even for root. Flash this in recovery (copy it to the sdcard and reboot in recovery with volume UP pressed, then install it): https://github.com/dosomder/SonyRICDefeat/raw/master/RICDefeat.zip
- I unlocked my boot loader, or lost my DRM keys some other way AFTER backing up as per above procedure. How to restore?
plug USB back in
re-enable usb debugging on the phone (Settings => About phone => Click 7 times on Android Build to unlock developer options)
Start backup TA again but this time hit restore
- I messed somewhere, phone doesn't boot or work properly, what to do!
unplug USB
if phone is on, long press the power button+volume UP until the phone turns off
go back to step 1 of the how to, follow the how to! Mainly - the howto makes you setup flashtool again, then boot the phone in flash mode with volume key and plugging in the USB cable.
- I forgot to backup DRM keys (backup ta program) but I never unlocked the bootloader, is it bad?
nope you're fine, just back them up now
- I really lost my DRM keys, can I recover them?
No you can't. But you can recover the features by using some modified software. Look for "DRM Fix" for example here.
- I don't want to wipe my phone!
Uncheck "data" before downgrading and then before upgrading in flashtool. You will get some errors when downgrading, which will go away when you revert back to .77 at the end of the process
This is at your own risk, data still risk being deleted if something goes wrong
Depending on the apps, etc. you have, there is a chance that some app would not work properly at the end of the process without a full wipe. If that's the case, you might need to go in settings>applications and "delete data" for that app.
- Some apps can't write to the sdcard!
install/run this https://play.google.com/store/apps/details?id=nextapp.sdfix&hl=en
- I don't have SuperSu on marshmallow+ ?!
It just didnt install properly into /system. That's ok. Just install it from the play store - you do have the su binary installed in /system so this will work
- Does this work on my SO-02G (Xperia Z3C Docomo NTT version) ?
@pngoc256 tested and yes, it works
- Does this work with lollipop (Android 5.0)?
- Does this work with Marshmallow (Android 6.0)?
- Will this work with Nougat (Android 7.0)?
- Will this always work?! (yes probably)
Yes.
If when doing the final reboot its stuck on the loading screen the first time, reboot again a last additional time with power + volume UP.
People who did the hard work/references thanks to them:
@istux (fw list, flashtool how to http://forum.xda-developers.com/z3-compact/general/list-stock-firmwares-d5803-d5833-t2906706)
@xzx0O0 (root exploit: http://forum.xda-developers.com/crossdevice-dev/sony/giefroot-rooting-tool-cve-2014-4322-t3011598)
@DevShaft (backup ta http://forum.xda-developers.com/showthread.php?t=2292598)
@serajr (install .77 fw http://forum.xda-developers.com/showpost.php?p=58395100&postcount=71)
dosomder (kmod for sony's RIC) https://github.com/dosomder/SonyRICDefeat
Everything worked. Thanks a ton!
Thanks for the detailed explanation with links, very thorough and helpful.
MODS PLEASE STICKY THIS THREAD, might just be the most important thread in the Z3 Compact forum.
If you're having trouble with step 34 opening a command prompt in the files folder, try pressing shift and right click on or in the "files" folder, you should see "Open command window here"
Unrelated: what's the purpose of steps 40-43 (reflashing non pre-rooted FW)?
Thanks for this manual, managed to get it work. Although if I start xposed, I get the error it can't mount the system partition. Titanium Backup works perfect. It seems the system partition is read only still? Any solution very welcome. Once again many thanks to the hard working people behind this exploit
wowz, it's finally here!!!
madlive said:
Thanks for this manual, managed to get it work. Although if I start xposed, I get the error it can't mount the system partition. Titanium Backup works perfect. It seems the system partition is read only still? Any solution very welcome. Once again many thanks to the hard working people behind this exploit
Click to expand...
Click to collapse
Follow this: http://forum.xda-developers.com/showpost.php?p=58400277&postcount=228
This is why I love this community, thanks mate, that completely fixed it
adamk7 said:
If you're having trouble with step 34 opening a command prompt in the files folder, try pressing shift and right click on or in the "files" folder, you should see "Open command window here"
Unrelated: what's the purpose of steps 40-43 (reflashing non pre-rooted FW)?
Click to expand...
Click to collapse
its here in case you need to restore DRM keys. for example if you unlocked your boot loader, or messed up something somewhere.
madlive said:
Thanks for this manual, managed to get it work. Although if I start xposed, I get the error it can't mount the system partition. Titanium Backup works perfect. It seems the system partition is read only still? Any solution very welcome. Once again many thanks to the hard working people behind this exploit
Click to expand...
Click to collapse
Fastest i found is to flash https://github.com/dosomder/SonyRICDefeat (the zip in there). its an extra protection on the sony kernel that makes /system non-remountable r/w, this module takes care of it. above post method would also work.
Hello,
Thanks a lot for this thread, but you made a typo in the step 37, in the command to remount /system: "mount -o remount,rw /system" instead of "mount -oremount,rw /system".
Had I known you were going to post such detailed instructions, I would have waited and saved tons of time!
Very helpful indeed, kudos for your work
steps 40-43
adamk7 said:
If you're having trouble with step 34 opening a command prompt in the files folder, try pressing shift and right click on or in the "files" folder, you should see "Open command window here"
Unrelated: what's the purpose of steps 40-43 (reflashing non pre-rooted FW)?
Click to expand...
Click to collapse
I think you are not suppose to open your phone until you flash the prerooted firmware since it says to turn off and not reboot. I dont know the purpose but still gonna follow.
---------- Post added at 04:58 AM ---------- Previous post was at 04:56 AM ----------
I just want to ask if its ok to flash a non-prerooted firmware that was not based on, or was not used to make the prerooted firmware that i will flash earlier in the step?
Any tips on backing up data before flashing .93?
bilboa1 said:
its here in case you need to restore DRM keys. for example if you unlocked your boot loader, or messed up something somewhere.
Fastest i found is to flash https://github.com/dosomder/SonyRICDefeat (the zip in there). its an extra protection on the sony kernel that makes /system non-remountable r/w, this module takes care of it. above post method would also work.
Click to expand...
Click to collapse
I flashed the zip in the recovery, but I still can't unintall the apps! I'm sure I have root because greenify and xposed works.
Since i have dual recovery now on my z3 compact, can i flash any zip including CM12 without unlocking the bootloader? I already backed up TA but still wondering?
I had a error when trying to flash CM12 without flashing the CM' boot.img (which asks to unlock the bootloader) because the phone codename is "aries" on Sony stock roms and CM12 want the codename "z3c". Flashing the boot.img contained in CM12 nightlies fixed the problem.
I have solve problem! Just need it to update the dual recovery by Nut with the 2.8.1 Now I can uninstall the system app (Finally)..
Thanks but TA
I make a TA backup in 23.0.A.1.93 in root.
And I changed the kernel to 23.0.A.5.77 with the root using PRFCreater.
and I unlocked my bootloader
and after that I need to re-lock the bootloader cause i need to go sony service center
i tryed the TA backup tool's restore option, but it saids that there is no TA-backup*.zip files
what should i do
reloadxero said:
Since i have dual recovery now on my z3 compact, can i flash any zip including CM12 without unlocking the bootloader? I already backed up TA but still wondering?
Click to expand...
Click to collapse
Any custom rom needs an unlocked bootloader.
Any custom kernel needs an unlocked bootloader.
Without unlocking, you can only install roms based on stock firmware with a stock kernel.
dshstudio said:
I make a TA backup in 23.0.A.1.93 in root.
And I changed the kernel to 23.0.A.5.77 with the root using PRFCreater.
and I unlocked my bootloader
and after that I need to re-lock the bootloader cause i need to go sony service center
i tryed the TA backup tool's restore option, but it saids that there is no TA-backup*.zip files
what should i do
Click to expand...
Click to collapse
Restoring the TA backup automatically relocks your bootloader.
Inside the folder where TA-backup.exe is located, you should find a sub-folder named "backup": do you see nothing within that?
Thank you so much for this thread, really easy this way. Only problem I had was in the last step when flashing version .98, which gave me a non-working wifi. Once reflashed with .77 this was resolved.

[ROOT] [STOCK] [TWRP] Root Stock Firmware of Any Modern Sony Device

At first I created a guide about rooting stock Marshmellow of Sony Xperia Z5 Premium. After some time I realized that it may be useful to users of virtually any recent Sony phone or tablet, so here is my Sony Cross-Device general rooting thread. I will mostly copy-paste bits from my previous guide, but using renewed screenshots and firmwares'/tools' versions.
Please write back in this thread which model of Sony phone you was able to root with the help of this guide.
This guide does not work for MediaTek devices.
INTRODUCTION
Sony historically provides own versions of Android OS, modified for Sony phones. These firmwares with added Sony apps are known as a stock firmware, contrary to vanilla Android developed by Google.
This guide will lead you through the process of rooting the stock firmware for your particular Sony phone. At the same time, your phone will be supercharged with TWRP recovery image, a useful tool for things such as an installation of system behavior altering apps to a whole device backup including all system partitions.
WHY ROOT?
Sony, just as any other smartphone vendor, ships its devices without the ability to alter inner system workings of Android OS. Technically speaking, default OS only allows use of non-administrator accounts, which have access only to their own user space.
Rooting is a process of allowing access to the administrator account, also known as root. This enables a possibility to alter/remove system parts of the OS: apps, settings, behaviors. For example, with root access you can block ads system-wide, from apps to browsers.
WHAT ARE CAVEATS
During the rooting procedure, the unique DRM keys will be removed from the phone. These keys are used to make some proprietary Sony features work, such as X-Reality for Mobile, camera denoise filter etc.
During the course of this guide a so called DRM fix will be apllied, which effectively emulates DRM keys, so many Sony features remain in working condition, even without actual keys. Some features, such as Widevine, will not work but majority of typical users won't even notice this. I think most of you even don't know what Widevine is.
However, in this guide I will present a way to backup your DRM keys, if you still think you need them. I will not deep dive though, since I never bothered with DRM keys export/import procedure myself and have no experience in doing this.
Some apps will refuse to work on rooted device, Pokemon Go and Android Pay are couple of notorious examples. Research your apps for rooted device compatibility. If you find such app and cannot live without it, don't root your phone.
ACCOLADES
The rooting of Sony stock firmware will not be possible without the work of these brilliant community developers:
@Androxyde — Flashtool
@IgorEisberg — XperiFirm (integrated into Flashtool)
@Dees_Troy et al. — TWRP
@Chainfire — SuperSU
@topjohnwu — Magisk
@tobias.waldvogel — Kernel repack script and DRM fix
@zxz0O0 — iovyroot
@rayman — TA Backup v2
STEPS
The whole process of rooting your stock firmware is divided into the following steps:
Getting your phone recognized by your computer (driver installation).
(optional) Backup your DRM keys.
Unlocking a bootloader.
Flashing stock firmware with Flashtool.
Repacking and flashing a kernel.
Installing SuperSU or Magisk.
(optional) Restore your DRM keys.
Optional tasks.
After the completion of this guide, your phone contents will be completely erased, so you may want to backup all what is important to you to some external locations. External microSD card will not be erased, so you may copy your stuff to it. If you are already use some rooted Android, you may want to use some specialized tools like Titanium Backup or like. TWRP also have a nice backup features, if you have one already installed.
Also, use Sony's own Backup & reset tool from the settings. You may backup your local contacts, messages and much of such stuff directly to your microSD card. After the rooting, same tool may be used to restore some (or all) of these things back.
I usually make a whole backup with TWRP, Titanium Backup for user apps and the Sony's Backup & reset for conversations and call logs.
The guide was developed using Windows 10 Pro 64-bit and Sony Xperia Z5 Premium Dual-SIM E6883 official model for the Russian market.
Let's go.
1. GETTING YOUR PHONE RECOGNIZED BY YOUR COMPUTER (DRIVER INSTALLATION)
During the course of this guide, your phone will comminicate with your computer in Fastboot and Flashmode connection modes. When connected in these modes, for the phone to be properly recognized by a computer, you have to provide special drivers. Thanks to Flashtool creators, it comes bundled with generic drivers compatible with all recent Windows operating systems, so at first you should install Flashtool. You can get installer from the official website.
Next, you should install Fastboot and Flashmode drivers for your phone.
One caveat here however, these drivers are not from a "recognized Windows developer", that is they are not Windows-certified, so to get them installed on Windows 8/10, you should reboot with the disabled driver signature enforcement. Use Google to know how to perform this.
Once booted in the aforementioned mode (or in a regular mode if you are still on Windows 7), proceed to the actual driver installation. The drivers are packed into the Flashtool\drivers\Flashtool-drivers.exe executable, but it didn't work on my system, perhaps because it is 64-bit (but feel free to try it yourself), so I simply unarchived it with 7-Zip (right-clicked it and chose 7-Zip > Extract to "Flashtool-drivers"). I got a Flashtool-drivers folder, which contained all the drivers from the executable.
Once drivers are unpacked, connect your phone in a Fastboot mode. Recent Sony devices can boot in Fastboot just like this: shutdown the phone, press and hold Volume Up rocker button and connect USB cable to the phone while the other end is connected to a running PC. The phone's LED will turn blue shortly. That's it, you are in a Fastboot mode. Open Device Manager (Win + X, Device Manager) and check if there is some unknown device (with the name S1Fastboot or something like this).
Double-click this unknown device in the Device Manager, click Update Driver..., then Browse my computer for driver software, and choose the Flashtool-drivers folder created earlier with 7-Zip (leave Include subfolders checked). Shortly you will get a red warning dialog window, which inform you that this driver doesn't have a proper signature:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Very scary. Just proceed with the install despite all the red flags, it's safe.
Once Fastboot driver is installed, plug out the USB cable off the phone and connect it in a FlashMode mode. This is done just like for Fastboot, but in this case you should press and hold Volume Down rocker button during the cable plugging in. The LED in this case will be green and not blue. The procedure to install the driver is exactly the same.
After the successful installation, try to reconnect the phone in these modes again couple more times to make sure all devices get properly recognized by Windows. If all seems good, proceed to the next step.
2. (OPTIONAL) BACKUP YOUR DRM KEYS
I encourage you to skip this step, but if you feel like you should do this anyway, here is some info.
There is a tool called iovyroot, with which you can backup your DRM keys from an unrooted phone, but at the time of the writing it doesn't support latest firmwares. It does support a lot of older firmwares so it may be useful to not upgrade your phone before checking up this tool.
If you're into this backup DRM thing, go to the original thread, download the latest version and check if it is working for you. For now I just skip this step. Basically, you want to download the zip, connect your phone in USB Debugging mode, run the tabackup.bat script and see the output.
Some people suggest to use the newer Universal (Dirtycow-based) TA Backup v2 tool instead of ageing iovyroot to backup you keys. Please check the official thread to get instructions (linked in the previous sentence).
I will not cover DRM keys extraction/restore in details, since I never did it, so I don't want to write about something I haven't myself performed. Please check corresponding threads.
Note that most proprietary Sony features will work even without DRM keys, such as X-Reality for Mobile, camera denoise filter and some others. DRM fix will be covered later in this guide. Some features will not work with DRM fix, Widevine for example. Most users will not even notice these.
3. UNLOCKING A BOOTLOADER
Sony does provide its own guide. It is a plain and simple and — good news! — if you have followed the previous steps, you just got all the prerequisites covered!
4. FLASHING STOCK FIRMWARE WITH FLASHTOOL
Now we will flash the latest available Sony firmware to the phone. In this step it will be untouched vanilla firmware, without root yet.
The Flashtool was installed on the completion of the first step, so let's start it. If you are on 64-bit Windows, start Flashtool64 (there is a shortcut in the Start menu). It does require administrator privileges.
Once you are in Flashtool, at first you need to obtain the most recent official stock firmware from Sony. Press the "XF" icon (the right-most one in the toolbar) to start XperiFirm. This is where it is:
The window will open, choose your phone from the left part of the window, then choose your particular model and after that choose your market and operator from the right part of the window. The entry will become highlighted and shortly there will be some info in the last column (Latest Firmware). This definition will be also in the right-most part of the window just under the phone thumbnail, click on it. Not a brilliant design decision, but that's it. Here is a screenshot for your reference:
If there are multiple firmwares available, pick the more recent (typically the top-most). The new window will pop up, press Download. The stock firmware will be downloaded to your computer and unpacked.
Once the download is completed, close all XperiFirm windows to return to the main Flashtool window. Flashtool will begin a creation of the .ftf file from the downloaded resources which will be used for a (subsequent) flashing. FTF-files are similar to ZIP-files, and may be opened with 7-Zip. For example, I've got E6883_32.3.A.0.376_1299-4828_R3D.ftf after the completion of this procedure. Flashtool places firmwares in the C:\Users\<Your Windows Username>\.flashTool\firmwares.
Now, once the stock firmware is downloaded, packed into .ftf and ready to be installed, let's do this.
Disconnect and switch off the phone for now, physically extract microSD card (if any) and press the left-most button on the Flashtool's toolbar (the "Lightning" one) and choose Flashmode. The Firmware Selector window will appear with a selected default folder and list of all firmware available for a flashing. I've got a single entry, the firmware I just downloaded. Before actual flashing, you can check some checkboxes from the Wipe section, I usually check all to start clean (all the data on the phone is erased). Once again, just to be safe, extract the microSD card from the phone at this moment. It is not needed for a flashing anyway. Here is how the window looked to me:
After all is set up, press Flash. The flashing process is not yet begun, since at first Flashtool just prepares firmware for a flashing.
After a while, a window will appear which will ask you to connect your phone in the Flashmode mode. With your phone off, hold the Volume Down button, connect the USB cable. Once Flashtool detects the phone in the Flashmode mode, it will start the actual flashing automatically. You may release the Volume Down button and go get some snack. The flashing will take some time.
After the completion of the flashing procedure, you'll get a stock Sony firmware installed, and now it is perfect time to proceed to the next step. You may leave your phone off at this moment, but if you are curious, start it up and check if the new Android is actually there. Note however that first start after the firmware installation takes a long time.
5. REPACKING AND FLASHING A KERNEL
Now it is a most interesting part: repacking and flashing a stock kernel. This procedure will allow the actual rooting.
To get the stock firmware rooted, you need a way to install SuperSU or Magisk. These are tools which enable root access to the Android system. To install them, you need TWRP. To run TWRP, you need a kernel, which supports both TWRP and your Android version.
Thankfully you can extract the kernel from the .ftf file, prepared by Flashtool earlier. Then you repack it, integrate TWRP (and DRM fix) into it, and finally flash it to your phone back modified. Sound like a complex task but it's definitely achievable. I did it multiple times mostly without any issues.
At first you should extract the actual kernel from the .ftf file. Reminder: it's in the C:\Users\<Your Windows Username>\.flashTool\firmwares folder and may be titled E6883_32.3.A.0.376_1299-4828_R3D.ftf or something like this. Open it as an archive (right-click on a file, 7-Zip > Open archive) and extract kernel.sin. It's your phone's packed kernel.
If it is packed, obviously you need to unpack it. Thankfully the almighty Flashtool can do this. Open Flashtool, navigate to the Tools > Sin Editor, select a kernel.sin you've just extracted and press Extract data. As a result, you'll get a kernel.elf file in the same directory where your packed kernel is residing. As you may have guessed, kernel.elf is an unpacked kernel. It can be modified, repacked and flashed back to the phone. Let's do this.
You will need a Stock kernel repack script from @tobias.waldvogel. Here is the original thread. Author of the script mentioned, that now it is hosted on GitHub, so let's just grab the latest version from there. Here is the link to the repository. In the upper-right corner there is a Clone or download button you may push it and choose Download ZIP from the menu. The script will be downloaded.
Once the contents of the zip-file with script are extracted to some directory, copy the kernel.elf there and summon command prompt in this directory (right-click in the empty space of this folder in File Explorer with the Shift button pressed and choose Open command window here).
In the command line type the following:
Code:
rootkernel.cmd kernel.elf boot.img
You'll get some questions about adding some features/tools to your kernel, feel free to answer "Yes" (type Y) to all of them. Screenshot for your reference:
If all went smoothly, you'll get a repacked kernel, boot.img in the script folder, supercharged with TWRP and DRM fix, and most importantly, which also supports rooting. Now it is time to flash it to your phone.
ATTENTION! Since the script is mostly unsupported, when new firmware get released, its kernel modules are not getting automagically added to the script package. You will get "Skipping TWRP recovery. No kernel modules for 3.10.84-perf-XXXXXXX available" error due to this. But don't worry, you can extract the required modules yourself from the firmware.
1. Open the FTF-file (firmware you downloaded) with 7-Zip, and extract system.sin file.
2. Open Flashtool, navigate to Tools > Sin Editor, choose this system.sin file, push Extract data. You'll get system.ext4 in the same directory.
3. Use the cool free Ext2Read tool to get into the ext4 filesystem in the system.ext4 (File > Open Image). Linux users can mount this filesystem as usual. Once you get into the filesystem, go to the lib/modules directory and grab the following files from there (Tools > Save):
core_ctl.ko
ecryptfs.ko
kscl.ko
mhl_sii8620_8061_drv.ko
texfat.ko
4. Once you get these files, create the 3.10.84-perf-XXXXXXX folder in the script's Android\twrp_common_kmodules directory. In my case I created 3.10.84-perf-g5e25a09 folder, just as was mentioned in the script's output in the console (when it complained about Skipping TWRP recovery). Copy these 5 files into this newly created folder.
5. Voilà! Re-run the script and see that now TWRP gets properly integrated! Thanks to @sceryavuz for his initial instructions. I just elaborated them a bit.
When all is clear, turn off your phone if it's on and connect it in a Fastboot mode: hold the Volume Up rocker button and connect USB cable. The LED on the phone will turn blue. Release the button.
Flashing images in this mode is typically done with a fastboot.exe from the Android SDK. Android SDK weighs many gigabytes but thankfully you don't need it. Fortunately Flashtool contains fastboot.exe from the SDK. It's in the Flashtool\x10flasher_lib folder. For the brevity of the following steps, I assume you have all necessary files there. To make it true, copy the newly generated boot.img to this folder.
Now Shift-right-click in the empty space of this folder window and choose Open command window here entry from the context menu. Windows console will appear.
At first try this command:
Code:
fastboot.exe devices
If all is good, there will be one device in the output of this command, just like this:
If not, perhaps there is some driver issue, so head back to the step #1 and make sure the drivers are installed correctly.
If your device is shown correctly, let's flash some files to the phone. Execute the following command to flash the modified kernel:
Code:
fastboot.exe flash boot boot.img
The proper output of this command will be like this:
If you get any errors, the first and more likely reason is that you still have a locked bootloader. Head to the step #3 to verify its state and unlock it if necessary.
If there were no errors — congratulations! — you now just flashed a stock kernel supercharged with TWRP recovery and DRM fix. You're almost done! You may plug out the cable from your phone. If you are attentive to the details, you'll notice that now, once your phone is started, its LED turns amber for 2-3 seconds. This is a special signal for those looking to boot into a recovery (TWRP). But you don't have to start your phone yet.
Although @tobias.waldvogel claims his script is able to also integrate SuperSU during the kernel repacking, I didn't managed to get this working, so the SuperSU (or Magisk) installation is a separate step in my guide. The next step.
6. INSTALLING SUPERSU OR MAGISK
Now when you have TWRP in place and latest Android installed, let's install SuperSU to it. SuperSU distributed in a TWRP-friendly .zip archives, so you should copy one to your microSD card. I used version 2.79 from here. Download TWRP / FlashFire installable ZIP, not the APK. At the time of your reading, there probably will be some newer versions available, feel free to install them them instead. Copy the downloaded ZIP-archive to your microSD. Don't bother to unpack the ZIP.
Once SuperSU zip-file is copied to your microSD card, place it into your phone and reboot to recovery (TWRP). To do this restart or power up your phone and look at the LED. Once it lights amber, press Volume Up rocker button and you'll get into recovery — TWRP. In my case it was TWRP v3.0.2-0.
To install SuperSU, press Install, go to the /external_sd and select the .zip (in my case SuperSU-v2.79-201612051815.zip). Swipe right to confirm installation. Once it is installed, press Reboot System button. Phone will reboot twice. Do not interfere with the process during these multiple reboots, the things are getting done, so just wait once Android is started. When it's started, the phone is rooted and functional!
If you would like to install Magisk instead, the instructions are exactly the same. Grab the latest ZIP from the original thread and flash it with TWRP. That's it!
7. (OPTIONAL) RESTORE YOUR DRM KEYS
If you had successfully backed up your DRM keys in step #2, it is now time to restore it back to the device. There is a flash_dk.cmd script shipped with the Root kernel repack script you used in the previous step. flash_dk.cmd can be used to flash the DRM partition back to your phone.
At first prepare the flashable .ftf:
Code:
flash_dk.cmd <ta backup image> dk.ftf
And then flash dk.ftf via Flashtool, just like you flashed the whole firmware in the step #4, but don't wipe anything this time.
8. OPTIONAL STEPS
8.1. Xposed installation
If you use Lollipop and later, you should install Xposed APK from here. At the time of writing there is XposedInstaller_3.0_alpha4.apk installer there.
Once APK is installed, grab the latest .zip from the repository, I've got xposed-v86-sdk23-arm64.zip. Install it in a regular TWRP way covered in step #6.
Once all these steps are done, you should have Xposed Installer app in your phone, and if you open it and check Framework section, if everything is alright, there will be text in green, something like "Xposed framework version 86 is active".
8.2. Resolving Voice Search and random volume up/down issues while using regular headphones
See this thread.
8.3. Disable startup notification if there is a newer firmware available
Some people get annoyed by a persistent notification, which is displayed once the new firmware become available (new Android version from Sony). Rooted users cannot just tap it and update over-the-air, because they need to perform a complex rooting procedure in beforehand (covered in this guide). It is possible to disable this notification. You may get these notifications by email anyway.
The easiest and safest way is to use some autorun manager. I used Autorun Manager Pro and disabled all receivers of system apps com.sonymobile.fota.service, fota update service and Software update. Notification vanished after a restart.
You may even freeze or remove these apps via some app manager like Titanium Backup Pro.
8.4. Disable that damned green LED light while phone is charged and attached to the cable or docked
This is a historic Xperia behavior, not easily fixable without the root. The notorious green LED is on all night no matter which settings you set up. In fact, there is no setting to switch it off.
However, if you are rooted, you can solve this issue easily. One method is to install a free Light Flow - LED Control app. Once it is installed, you need to enable the following settings in the Settings > Device Settings and Root section: Direct mode, Root mode and Run every command as root. Then you can mess around with individual notifications in the Notification settings, but I just cleared all in there and hey! — the annoying green LED is gone!
THAT'S IT
At this point you have a stock Sony Android enhanced with root privileges. SuperSU / Magisk app is also installed, so you are ready to use root right away. SuperSU now can be updated in a regular way via Play Store. Magisk has it's own updating capabilities.
P.S. WHEN NEW FIRMWARE IS AVAILABLE
Once the new firmware is released, you may perform the same procedure for it beginning from the step #4, but if it is a minor upgrade, you may want not to wipe anything during Flashtool flashing this time. If it is a major upgrade, e.g. Marshmallow > Nougat, you probably may want to start with a clean system and wipe all.
Fragmentation said:
Getting your phone recognized by your computer (driver installation).
(optional) Backup your DRM keys.
Unlocking a bootloader.
Flashing stock firmware with Flashtool.
Repacking and flashing a kernel.
Installing SuperSU.
(optional) Restore your DRM keys.
Optional tasks.
Click to expand...
Click to collapse
I'm pretty sure that once you have unlocked the bootloader, the easiest thing at that point is to use fastboot to flash a custom kernel/recovery, then boot to recovery, flash su, then reflash your original kernel. Then you're rooted.
Plus, rooting is easy now even with locked bl, since we have Kingroot, and new Sony bootloader with real recovery.
(However, I can't say for sure on every device... I appreciate you taking the time to post...)
levone1 said:
I'm pretty sure that once you have unlocked the bootloader, the easiest thing at that point is to use fastboot to flash a custom kernel/recovery, then boot to recovery, flash su, then reflash your original kernel. Then you're rooted.
Click to expand...
Click to collapse
Hey. If you'd say this to my mom, I'm sure she'll not understand any of these. And with this guide she at least have some chance of success.
levone1, why at the end would you flash your original kernel again instead of just running your custom kernel that you made like in the guide?
F2a said:
levone1, why at the end would you flash your original kernel again instead of just running your custom kernel that you made like in the guide?
Click to expand...
Click to collapse
If you flash stock-based kernel via boot.IMG in fastboot that will work with your stock ROM, great, keep it. I was just imagining easiest thing to be to flash, for example, CM boot IMG, just to be able to get into recovery to flash su. Usually stock-based kernels are zips, with other things besides just boot IMG. What I've usually done with unlocked BL and stock ROM is use fastboot to flash CM boot and recovery IMG, then go to recovery and flash supersu, then use flashtool to flash kernel only of stock ROM. Once you reboot, rooted, you can do whatever from there.
Which ROM have you flashed to 6883. The Nougat?
levone1 said:
If you flash stock-based kernel via boot.IMG in fastboot that will work with your stock ROM, great, keep it. I was just imagining easiest thing to be to flash, for example, CM boot IMG, just to be able to get into recovery to flash su. Usually stock-based kernels are zips, with other things besides just boot IMG. What I've usually done with unlocked BL and stock ROM is use fastboot to flash CM boot and recovery IMG, then go to recovery and flash supersu, then use flashtool to flash kernel only of stock ROM. Once you reboot, rooted, you can do whatever from there.
Click to expand...
Click to collapse
I am not quite sure what you mean tbh so forgive me if I missunderstand.
stock kernels are not zips they come in .elf hence the use of rootkernel to unpack/repack it to something more manageable. nowadays supersu makes changes to this partition once flashed, so if you flash stock kernel.sin containing kernel.elf again from flashtool changes will be reverted and you loose root.
the easiest way to get into twrp recovery without flashing anything is to just fastboot it.
nigeta_gr said:
Which ROM have you flashed to 6883. The Nougat?
Click to expand...
Click to collapse
Yes, the latest official firmware available for Z5P (E6883) is Nougat (7.0). I flashed it during the assembly of this guide.
I suppose it will work with my E6833 as well.
Fragmentation said:
Yes, the latest official firmware available for Z5P (E6883) is Nougat (7.0). I flashed it during the assembly of this guide.
Click to expand...
Click to collapse
nigeta_gr said:
I suppose it will work with my E6833 as well.
Click to expand...
Click to collapse
I'm sure it will.
Fragmentation said:
At first I created a guide about rooting stock Marshmellow of Sony Xperia Z5 Premium. After some time I realized that it may be useful to users of virtually any recent Sony phone, so here is my Sony Cross-Device general rooting thread. I will mostly copy-paste bits from my previous guide, but using renewed screenshots and firmwares'/tools' versions.
Click to expand...
Click to collapse
Ogromnoye spasibo bratan!
This helped me tremendously, just wanted to say thanks!
FYI, I'm using latest Nougat 333 UK firmware on Xperia X F5121 US version --- so that my fingerprint scanner works. Got stuck in a boot loop after installing TWRP but after reading your thread, I fully understood and fixed the reason why. The root tool from GitHub worked kinda --- meaning I had busybox and others but no su binary I still had to install SuperSU.zip via TWRP to actually have root. You documented a similar experience.
JZ SmartMort said:
Ogromnoye spasibo bratan!
This helped me tremendously, just wanted to say thanks!
FYI, I'm using latest Nougat 333 UK firmware on Xperia X F5121 US version --- so that my fingerprint scanner works. Got stuck in a boot loop after installing TWRP but after reading your thread, I fully understood and fixed the reason why. The root tool from GitHub worked kinda --- meaning I had busybox and others but no su binary I still had to install SuperSU.zip via TWRP to actually have root. You documented a similar experience.
Click to expand...
Click to collapse
You're welcome, zemlyak! Sure, for root you definitely need SuperSU, it just won't work without it this way. It's a shame US versions of Xperias don't have fingerprint scanner activated, but it's cool to hear, that flashing another region firmware helps.
Hi, I followed everything until the part where I need to flash the modified kernel in step 5. There is no error messages. the output is exactly like the screen captures. When I start the phone, I don't see the amber light. I cannot proceed. Where did I go wrong? Appreciate any help available.
Edit: Used a rooted stock kernel from another thread. Seems to work. Still not sure what I missed out though.
viperc said:
Hi, I followed everything until the part where I need to flash the modified kernel in step 5. There is no error messages. the output is exactly like the screen captures. When I start the phone, I don't see the amber light. I cannot proceed. Where did I go wrong? Appreciate any help available.
Edit: Used a rooted stock kernel from another thread. Seems to work. Still not sure what I missed out though.
Click to expand...
Click to collapse
Hey. If the phone don't turn on amber light for a while during the boot up, then TWRP is not there.
If you used the kernel repack script I mentioned in the guide with a very recent Sony's firmware, probably you didn't notice, that TWRP has not been integrated into the kernel due to some error. It is because this script should be frequently updated to work with any newly released firmware, and Tobias, its author, apparently have not time to do this.
However, you can update the script yourself, following this procedure.
viperc said:
Hi, I followed everything until the part where I need to flash the modified kernel in step 5. There is no error messages. the output is exactly like the screen captures. When I start the phone, I don't see the amber light. I cannot proceed. Where did I go wrong? Appreciate any help available.
Edit: Used a rooted stock kernel from another thread. Seems to work. Still not sure what I missed out though.
Click to expand...
Click to collapse
I don't have the amber LED light on boot up on my X Compact but everything works fine. I can't seem to find it but I recall reading somewhere an actual reason why I didn't see it but as far as I know it's not a problem.
Edit: Simple check, reboot and hold volume down. Do you enter TWRP? I do even though I never see the amber led.
F2a said:
I don't have the amber LED light on boot up on my X Compact but everything works fine. I can't seem to find it but I recall reading somewhere an actual reason why I didn't see it but as far as I know it's not a problem.
Edit: Simple check, reboot and hold volume down. Do you enter TWRP? I do even though I never see the amber led.
Click to expand...
Click to collapse
Maybe it wasn't a proper kernel for your rom or device, I also experienced some errors including yours but at last (after 12 try) I found a working kernel for me. I really don't know what the problem is, sometimes it just doesn't work...
Fragmentation said:
Hey. If the phone don't turn on amber light for a while during the boot up, then TWRP is not there.
If you used the kernel repack script I mentioned in the guide with a very recent Sony's firmware, probably you didn't notice, that TWRP has not been integrated into the kernel due to some error. It is because this script should be frequently updated to work with any newly released firmware, and Tobias, its author, apparently have not time to do this.
However, you can update the script yourself, following this procedure.
Click to expand...
Click to collapse
Thanks. I will look into that again when my region's Sony release the latest firmware.
F2a said:
I don't have the amber LED light on boot up on my X Compact but everything works fine. I can't seem to find it but I recall reading somewhere an actual reason why I didn't see it but as far as I know it's not a problem.
Edit: Simple check, reboot and hold volume down. Do you enter TWRP? I do even though I never see the amber led.
Click to expand...
Click to collapse
Interesting, didn't try that lol. I used another pre-rooted sick kernel to flash after my attempt failed. I can see the amber led now with the other kernel.
Tried again after re-downloading the script. It's working now. Thanks.
if not do drm-fix, and flash dk.ftf with old flashtool, the result is" FIDO KEYS NOT PROVISONED PROVISION FAILED"
any way to fix this?
This thread is a complete guide and must be sticked, Thanks :fingers-crossed:
You should add backupTA-V2 for Lollipop devices..
Thread : https://forum.xda-developers.com/crossdevice-dev/sony/universal-dirtycow-based-ta-backup-t3514236
iovyroot method is very old..

[Repository][XT907] Stock Firmware and Custom ROMs from 4.1.1 to 7.1 [SEPT 2017]

Hello! I spent a while researching and learning about my XT907. I absolutely love this phone and I am in love with Android 4.4, but I was also keen to try other versions. So I gathered everything you need to flash ANY Android custom ROM and or Stock Firmware to your XT907.
There are (or were. I'll explain below) several custom ROMs for this device, most of which were built for phones with a Jellybean 4.1 bootloader, IF it's unlocked. In the case of this device, if you didn't unlock it before June of 2014, then your bootloader is likely still locked which means you can't put any custom ROMs on it
There is still light at the end of the tunnel though. You can pay 'Sunshine S-Off' US$25 to unlock the bootloader for you. You can still be rooted to use their app, but if you have Xposed framework installed, you'll have to uninstall it first. They accept many different types of payment, including Bitcoin! However if you don't want to spend the money, the XT907 CAN BE ROOTED! Simply download and install the latest version of KingRoot then go here and follow the steps to replace it with SuperSU.
When it comes to restoring your firmware back to stock (in case you brick your phone), @sd_shadow and his list of phone saving tutorials is the place to go. If you want a custom ROM, see below
Over the last few years, it's become incredibly hard, almost impossible, to find everything you need to flash a custom ROM to your XT907, including the ROM itself. This becomes more the case with older versions of Android. Today, that has come to an end. I've spent the better part of a week or so gathering every single file you need to flash firmware or every custom ROM version from Android 4.1.2 to 7.1. Just go to the Google Drive link posted below, click/tap on XT907, and there you go. Everything is placed in it's own set of folders, with the exception of optional APKs. You can get detailed installation instructions at the respective links below.
--------------------------------------------------------------------------------------------------------------
***BOOTLOADER MUST BE UNLOCKED TO FLASH A CUSTOM ROM!***
I am not responsible for any harm or damage done to your device or yourself. Use the files and guides at your own risk!!
Google Drive link to all the files you need. (Please see links below for tutorials etc. Some of these are old posts, and download links are broken. If so, this where my Google Drive link saves you).
- How To: Downgrade from KitKat 4.4.2 to Jellybean 4.1.2 (Required if you are on KitKat and want to flash a ROM other than Lollipop or custom KitKat).
- TWRP Custom Recoveries available at Google Drive link in respective folders.
- Custom ROMs included:
Android 5.0.2 Lollipop; Resurrection Remix for KKBL (UNOFFICIAL) by @bacu12
Android 5.1 Lollipop; CyanogenMod 12.1 for KKBL (OFFICIAL) (Please go here for a detailed installation guide).
Android 6.0 Marshmallow; Lineage 13 for JBBL (UNOFFICIAL) by @ilichva
Android 7.1 Nougat; Lineage 14.1 for JBBL (UNOFFICIAL) by @ilichva. (Only available through the link here).
- Stock Firmware with RSD Lite tool included at Google Drive link:
Android 4.1.1 Jellybean
Android 4.1.2 Jellybean
Android 4.4.2 KitKat
- [INDEX] Motorola Droid Razr M (2015) (Everything you need to know about fixing, flashing and upgrading your XT907 by @sd_shadow)
***BOOTLOADER MUST BE UNLOCKED TO FLASH XPOSED FRAMEWORK ON DEVICES RUNNING 5.0 OR ABOVE***
- [OFFICIAL] Xposed for Lollipop/Marshmallow [Android 5.0/5.1/6.0, v87, 2017/08/19] (ROOT Required: XDA thread with instructions and files to install Xposed Framework)
- [OFFICIAL] Xposed for Jellybean/KitKat [Android 4.0.3-4.4.2 v2.7] (ROOT Required: Xposed Framework official website; install files and instructions)
RESERVED -
Tested:
All sets of Stock Firmware: Works
Lineage 13: Works; Xposed: Works
[Tutorial] Flashing CM 12.1 custom ROM (Lollipop 5.1), SuperSU and Xposed Framework
***REQUIRES UNLOCKED BOOTLOADER***
If you don't want to downgrade your XT907 to a JBBL (Jellybean bootloader) then follow the tutorial below to flash the CyanogenMod 12.1 (Lollipop 5.1) custom ROM, SuperSU and install Xposed Framework onto your UNLOCKED XT907. This is for the KitKat BOOTLOADER ONLY.
WARNING: I am not responsible for any damage you may cause to your device and or other individuals. Use this guide AT YOUR OWN RISK.
1) Please download the appropriate folder labeled 5.1-Android-CM12.1-KKBL from my Google Drive link.
2) Make sure to have the appropriate Motorola and ADB drivers installed or this will not work.
3) Power off your phone.
4) Now press and hold, all at the same time, volume down + volume up + power button for 5 seconds. Release the power button first and 2 seconds later, release the volume buttons.
5) You should now be in your recovery screen. Use the volume down button to navigate to AP fastboot and press volume up to select it.
6) Now plug your phone into your PC. Make sure to have a good cable.
7) Now open the folder you just downloaded from Google Drive. Extract the file named TWRP-KKBL-XT907.zip to the same folder, or your desktop (whatever is easy for you).
8) Open the folder you just unzipped and place the file 'recovery.img' in the same folder as ADB.
9) Open an ADB command window (right click on your opened ADB folder and select 'open command window here') and type fastboot devices. This will show you if your device is properly connected. If you see a serial number and the word 'device' next to it, continue to the next step.
10) Now it's time to install a custom recovery. Type in the following code below. Make sure you placed the recovery.img into your ADB folder.
Code:
fastboot flash recovery recovery.img
11) You will see about 3 lines of errors. Just ignore them. When the process is complete (you'll know it's done when you see something like C:\) type the following line below:
Code:
fastboot reboot
12) Please keep your phone plugged in. When it's finished rebooting, in the ADB window type:
Code:
adb reboot recovery
13) If all goes well, you should have TWRP custom recovery properly installed on your XT907. You will see a list of several things. Now we are going to flash CM 12.1 to your device. Keeping your phone plugged in, you should be able to freely move files while in TWRP recovery. On your desktop PC click: start > computer > XT907 > Double click internal storage. (NOTE: If you can't move files in recovery, reboot normally and place the files into your device's internal storage manually as described below).
14) Go back to the folder you downloaded earlier and copy the file labeled cm-12.1-20160822-NIGHTLY-xt907.zip. Paste it into the INTERNAL STORAGE of your device. DO NOT place it in any other folder or directory. Again go back to the folder you downloaded earlier and copy the file labeled open_gapps-arm-5.1-nano-20170830.zip. Also paste it into your phone's internal storage (the same place as the CM file).
15) Now on your phone, from TWRP recovery main screen, tap 'wipe'. Now look at the bottom where the arrows are. It should say 'swipe to factory reset.' Please swipe the button. When it's finished, go back to the TWRP home screen and tap 'install'. Navigate to where you placed the CM12.1 file and select it. Now tap 'Add more zips' on the screen near the bottom left. Navigate to the open_gaaps file and select it. Look at the top of the screen and it should say you have '2 of max of 10 files queued'. If so find the arrows at the bottom where it says 'swipe to confirm flash'. Go ahead and swipe it.
16) When the process is finished (it might take a minute or two), from the TWRP home screen, tap 'Reboot' and select 'System'. Your phone will reboot. The reboot process can and usually will take SEVERAL minutes to complete the first time. During the reboot process, DO NOT TURN OFF YOUR PHONE or attempt to reset it. Just let it go about it's business. In about 5-8 minutes you should have booted to your new custom CyanogenMod 12.1 (Lollipop 5.1.1). Go ahead and continue with the setup process.
Flashing SuperSU and installing Xposed Framework
1) When done with your general setup, navigate to the folder you downloaded from Google Drive earlier. Copy the file labeled SuperSU-v2.82-201705271822.zip and paste it into the internal storage of your device (The same place as before). If you've been successful up to this point, you can delete the other zip files you added to your device earlier.
2) Use ADB to reboot to recovery. From TWRP home screen tap install and navigate to the SuperSU zip file you just added and select it. Now go down to the arrows at the bottom and please 'swipe to confirm flash'. When the steps have completed, go back to TWRP home screen and tap reboot then system. SuperSU (Super User) is now flashed to your system and you are now ROOTED. With Wifi on, you can go to the Google Play Store and download the updated SuperSU app. When installed, open it and it will ask you to update the binary. Please install using the 'normal' method. If successful, allow SuperSU to reboot your device.
3) If you would like to install the Xposed Framework onto your phone, you can follow the guide here. Also available at the link are the files to install Xposed. You can also use the ones I provided inside the folder you downloaded from Google Drive earlier. They are the same files as in the guide linked in this step.
If you have any trouble or if I missed a step, please post comments. Also post success stories so I know I did something good!
RESERVED for Lineage 13 Tutorial coming soon.

Categories

Resources