I haven’t haven’t looked into firmware upgrades on the Sony Z2 tablet (SGP512) since I last rooted it years ago using the XZDualRecovery package. That included TWRP 220.127.116.11 & PhilZ Touch 6.59.0 recovery options. Sadly, this method does not seem to work in the latest version of the Sony firmware 23.5.A.1.291. Magisk apparently has issues with this device along with other Xperia devices out of the box so I won’t be using that.
The tablet was on Android 4.4.2 (KitKat) build number 17.1.2.A.0.314.
The latest as of this time is Android 6.0.1 (Marshmallow) build number 23.5.A.1.291.
I started noticing some apps were requiring a higher version of Android so it was time to delve more deeply into this.
Be sure to make a nandroid backup if you haven’t already made one for safety reasons.
FTF or flashtool firmware files are used to update Sony tablet/smartphones. We need to build one from scratch.
connect tablet via usb
install xperia companion
disconnect tablet during download
after download is complete close down xperia companion
connect tablet back to usb
install c:\flashtool\drivers\Flashtool-drivers.exe.. tick both “Flashmode Drivers + Fastboot Drivers” [ Disable driver signature enforcement if you are using Windows 8/ 8.1/ 10 PC].
tools -> bundles -> fileset decrypt
point to C:\ProgramData\Sony Mobile\Update Engine\DATESTRING\localstorage\US (variable)
highlight all FILE_* files
press right arrow so that it appears under ‘files to convert’.. press convert
after a bit you will get a prompt asking for branding/version
device: double click to bring up options (Sony Xperia Z2 Tablet (SGP512))
version : 23.5.A.1.291 (in this case)
select all files on left and press arrow to move to the right
DO NOT INCLUDE *.ta files
output file C:\Users\USERNAME.flashTool\firmwares
Use PRFCreator to create a pre-rooted firmware.
Tick the following boxes under Include:
DO NOT TICK THE FOLLOWING:
test the zip out manually to make it tests ok
flash this using twrp recovery after flash (do not reboot) goto wipe (ie factory reset) in twrp swipe to factory reset
For some reason when ‘Sign zip’ is ticked it produces a corrupt zip file don’t use that option.