[Xperia Tablet Z General] najoor:
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://xdaforums.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.