Root&Recovery4Xperia Z2 Tablet MM Stock ROM Locked Bootloader (.575 .291) in 2 steps!

danalec

Senior Member
Dec 18, 2012
63
48
0
Root&Recovery4Xperia Z2 Tablet MM Stock ROM Locked Bootloader (.575 .291) in 2 steps!

--- [ introduction ]
this script is a recovery installer (TWRP) for Sony Xperia Z2 Tablet with Marshmallow Stock Rom (23.5.x) and works with locked bootloader.
the only requirement to the script work is to have a .575 kernel in the time of installation, you can flash another kernel later (.291 by example).


--- [ how to ]
step 1) flash Kernel 23.5.A.0.575 for TWRP boot [if you already have a listed .575 kernel, jump this step]
Kernel SGP511 23.5.A.0.575 (Customized UK) **SGP512 users reported that SGP511 kernel works flawlessy, offsets were checked and they match.
Kernel SGP521 23.5.A.0.575 (Customized UK)
Kernel SGP551 23.5.A.0.575 (Claro BR)


step 2) grab View attachment 3898241 and run install.bat to boot TWRP:Recovery & Root for Marshmallow

now install SuperSU (by the time of this post SR1-SuperSU-v2.78-SR1-20160915123031.zip) and if you want other stuffs like Xposed sdk 23 and enable Multi-Window

after all of this, you can flashback Kernel 23.5.A.1.291 back
Kernel 23.5.A.1.291 (Generic BR) (Mirror)

Enjoy! Cheers! :good::highfive:

--- [ complimentary ]
-Flashtool by @Androxyde
-SuperSU by @Chainfire's
______

--- [ .575 kernels iovyroot added ]
SGP511 Generic UK
SGP512 Generic UK TW
SGP521 Generic UK
SGP551 Claro BR

--- [ versions ]
TWRP 3.0.2-0
Installation Script: beta release 0.4

--- [ credits & thanks ]
@shoey63 for Recovery & Root for MM .575/.291 LB infos
@zxz0O0 for iovyroot
@gustavo_v for iovyroot offset explanation
@Nut for XZDualRecovery and TWRP's mods
@simply_proto, @XenTeckz, @anandfr for Z2 Tablet SGP521 SGP512 UK TW 23.5.A.0.575 kernel and test
@casouzaj for suggesting TWRP update

______

--- [ FAQ ]
Q: I have official Xperia 23.5.A.1.291, Can I flash 23.5.A.0.575 kernel over it?
A: Yes

Q: I have flashed 23.5.A.0.575 kernel and I like to flash back 23.5.A.1.291, Is it possible?
A: Yes

Q: I cannot find 23.5.A.0.575 kernel for my model, Is it possible to use an older kernel?
A: Yes probably, with a high success chance. It will require to modify iovyroot, just follow the instructions to request.

Q: I have LL and I'd like to root it, is it possible?
A: Yes, just follow the instructions to request iovyroot modification.

Q: Will I lose TA partition?
A: No, that's why it works with a locked bootloader ;)

______

--- [ requesting your model ]
please upload and post your kernel firmware ftf (must be .575) file and version

to retrieve your kernel version run: adb shell cat /proc/version
(it must be similar to Linux version 3.4.0-perf-g43ea728 ([email protected]) (gcc version 4.9.x-google 20140827 (prerelease) (GCC) ) #1 SMP PREEMPT Fri Apr 22 17:27:56 2016)

______

--- [ download ]
View attachment 3898241
crc32: A6FA85E6
md5: ACBEAF8EAD78D8883D86925062FC0C6A
sha256: 8282DCD3E952A50A3080FB0BCE7F4EA810FE13705D314ED44232E3A30789BAB1
 
Last edited:

smoschi

Senior Member
Sep 15, 2011
145
18
0
hey guys,

I cant flash the kernel for my spg521 with flashtool, i got this error:
8/042/2016 22:42:42 - INFO - Now plug your device in Fastboot Mode
18/042/2016 22:42:48 - INFO - Selected kernel (boot.img or kernel.sin): C:\Users\hosnf\Documents\newFLASH2016\z2 TABLET\kernel_S1-SW-LIVE-9C84-PID1-0006-MMC.sin
18/042/2016 22:42:48 - INFO - HotBooting selected kernel
18/042/2016 22:42:49 - INFO - FASTBOOT Output:
creating boot image...
creating boot image - 11577344 bytes
downloading 'boot.img'...
OKAY [ 0.358s]
booting...
FAILED (remote: dtb not found)
finished. total time: 0.408s

this error from your bat.file:
kdir: '/data/local/tmp/mm_twrp_recovery_install': File exists
[100%] /data/local/tmp/mm_twrp_recovery_install
[100%] /data/local/tmp/mm_twrp_recovery_install
[100%] /data/local/tmp/mm_twrp_recovery_install
[100%] /data/local/tmp/mm_twrp_recovery_install
[100%] /data/local/tmp/mm_twrp_recovery_install
[100%] /data/local/tmp/mm_twrp_recovery_install
[100%] /data/local/tmp/mm_twrp_recovery_install
[100%] /data/local/tmp/mm_twrp_recovery_install
[100%] /data/local/tmp/mm_twrp_recovery_install
chmod: /data/local/tmp/mm_twrp_recovery_install/busybox: Not a directory
chmod: /data/local/tmp/mm_twrp_recovery_install/install_twrp_recovery.sh: Not a directory
chmod: /data/local/tmp/mm_twrp_recovery_install/iovyroot: Not a directory
chmod: /data/local/tmp/mm_twrp_recovery_install/modulecrcpatch: Not a directory
/system/bin/sh: /data/local/tmp/mm_twrp_recovery_install/iovyroot: not found

Finished!
hopefully, you can help me!

thx
 
Last edited:

rybaryba33

Member
Jul 28, 2012
48
5
28
Hi, I am on SGP512 23.5.A.0.575 stock.

How can I extract it, so I can go back to it, after rooting? Or maybe you have 512 version of custom kernel?

Thanks
 

rybaryba33

Member
Jul 28, 2012
48
5
28
And I am getting this:

sending 'boot' (11303 KB)...
OKAY [ 0.378s]
writing 'boot'...
FAILED (remote: Command not allowed)
finished. total time: 0.381s
 

smoschi

Senior Member
Sep 15, 2011
145
18
0
wrong kernel?

And I am getting this:

sending 'boot' (11303 KB)...
OKAY [ 0.378s]
writing 'boot'...
FAILED (remote: Command not allowed)
finished. total time: 0.381s
yep, i got same error!

I tried to replace the original kernel with this kernel in the firmware ftf-file and to install it with the flashtool about flashmode ... but its not working, when reboot in system the original kernel will not change :( with adb about cmd, i got this error: kernel cant upload :(

Maybee someone can explain how to flash the kernel or is the wrong kernel uploaded?

Thank you
 
Last edited:

peterge

Member
Nov 4, 2009
43
6
0
How you are installed the kernel? I think the uploeded kernel for the 521 is wrong? !?
I'm proceeded follows:
1) open XperiaFirm (from Flashtool), download and flash your desired MM.
download and flash http://forum.xda-developers.com/xperia-z2-tablet/general/ftf-vmo-ru-ua-kz-t3382673
2)Wait until you boot this ROM, enable USB debugging and start point 3
3) now grab the script and run install.bat (pop up message, which confirmed) to boot TWRP: Recovery & Root for Marshmallow
4)On the SD card you have downloaded or TWRP connect - mount SD card and Copy
now install SuperSU (by the time of this post UPDATE-SuperSU-v2.76-20160630161323.zip) and other stuffs like Xposed sdk 23 and enable Multi-Window
5)flash http://forum.xda-developers.com/xpe...gp521-vmo-ruuakz-flashable-prerooted-t3437936
Note: Of course I did everything Full Wipe and then settings and apk installed from the beginning.
 
Last edited:

ataraxist

Senior Member
Jan 25, 2012
299
30
0
Xperia Z2 Tablet Marshmallow Working ROOT for Stock ROM with Locked Bootloader
:rolleyes::laugh:

--- [ requirements ]
-Flashtool by @Androxyde
-SuperSU by @Chainfire's
-Recovery & Root for Marshmallow by me

--- [ .575 kernels iovyroot added ]
SGP511 Generic UK
SGP521 Generic UK
SGP551 Claro BR

--- [ versions ]
TWRP 3.0.2.0
Installation Script: beta release 0.2

--- [ how to ]
1) open XperiaFirm (from Flashtool), download and flash your desired MM.

2) you must flash Kernel 23.5.A.0.575 temporary for TWRP boot
Kernel SGP511 23.5.A.0.575 (Customized UK)
Kernel SGP521 23.5.A.0.575 (Customized UK)
Kernel SGP551 23.5.A.0.575 (Claro BR) (Mirror)

3) now grab the script and run install.bat to boot TWRP: Recovery & Root for Marshmallow (Mirror)

4) now install SuperSU (by the time of this post UPDATE-SuperSU-v2.76-20160630161323.zip) and other stuffs like Xposed sdk 23 and enable Multi-Window

5) OPTIONAL: flashback Kernel 23.5.A.1.291 back
Kernel 23.5.A.1.291 (Generic BR) (Mirror)

Enjoy! Cheers! :good::highfive:

--- [ credits & thanks ]
@shoey63 for Recovery & Root for MM .575/.291 LB infos
@zxz0O0 for iovyroot
@gustavo_v for iovyroot offset explanation
@Nut for XZDualRecovery and TWRP's mods
@simply_proto and @XenTeckz for Z2 Tablet SGP521 UK 23.5.A.0.575 kernel and test
@casouzaj for suggesting TWRP update

--- [ requesting your model ]
please upload and post your kernel firmware ftf (must be .575) file and version
to retrieve your kernel version run: adb shell cat /proc/version
(it must be similar to Linux version 3.4.0-perf-g43ea728 ([email protected]) (gcc version 4.9.x-google 20140827 (prerelease) (GCC) ) #1 SMP PREEMPT Fri Apr 22 17:27:56 2016)


--- [ todo ]
visual guide and more explanation like how to activate USB debug mode etc.


--- [ FAQ ]
Q: I have official Xperia 23.5.A.1.291, Can I flash 23.5.A.0.575 kernel over it?
A: Yes

Q: I have flashed 23.5.A.0.575 kernel and I like to flash back 23.5.A.1.291, Is it possible?
A: Yes

Q: I cannot find 23.5.A.0.575 kernel for my model, Is it possible to use an older kernel?
A: Yes probably, high success chance. Obviously it will require to modify iovyroot, just follow the instructions to request it.

View attachment 3839766
View attachment 3840696
Sorry if this question is noob.

I have MM already updated in my SGP511 via OTA. I want root and xposed framework. I know how to use flashtool. I just want to confirm my steps are correct or not?

STEPS
1. Since i already have MM, i just need to use flashtool to flash kernel .275 for TWRP boot via flashmode? Is this recovery temporary only? How to have a perm recovery installed? After flashing...i go to step 2 or do i reboot before running script?

2. grab the script and run install.bat to boot TWRP: Recovery & Root for Marshmallow

---------- Post added at 11:20 AM ---------- Previous post was at 11:12 AM ----------

Another question, using Flashtoool, do i fastboot to Doomlord "flash kernel" to flash the .275 kernel?

using Flashmode, it can't detect this file: kernel_S1-SW-LIVE-9C84-PID1-0006-MMC.sin
 

danalec

Senior Member
Dec 18, 2012
63
48
0
1. Since i already have MM, i just need to use flashtool to flash kernel .275 for TWRP boot via flashmode?
.291, please read the entire post again.

Is this recovery temporary only? How to have a perm recovery installed? After flashing...i go to step 2 or do i reboot before running script?
It depends what are you going to flash after installing recovery.
Most of users would install an entire full rom over the previous stock rom.
 

nscxp2005

Senior Member
Oct 20, 2008
502
19
0
I'm having an issue with this. I've flashed 291 for SGP511 and it boots fine.

I then flash the. 575 kernel, it comes back with a failed command error. I then use the bat file, but it does not boot me in to twrp recovery.

Any idea what I am doing wrong?

Sent from my SM-G928F using Tapatalk
 

casouzaj

Senior Member
Oct 13, 2006
2,219
569
193
57
Haibara-gum Yoshida-cho Sumiyoshi-shi
guys, post error log

if it appears the "file exists", just remove it in your tmp folder
@danalec, @shoey63 edited the recovery script in his last two updates, in the Z3 thread, that deletes the directory prior to actually pushing the files to the device. Perhaps you could edit yours too, in order to avoid unnecessary complaints. BR!
 
  • Like
Reactions: shoey63

veepee78

Senior Member
Aug 6, 2004
109
13
0
veepee.fi
I'm also having issues to flash 575 kernel.
Flashtool output:

07/012/2016 21:12:15 - INFO - Selected kernel (boot.img or kernel.sin): D:\Sony\flashtool home\x\kernel_S1-SW-LIVE-9C84-PID1-0006-MMC.sin
07/012/2016 21:12:15 - INFO - Flashing selected kernel
07/012/2016 21:12:15 - INFO - sending 'boot' (11287 KB)...
07/012/2016 21:12:15 - INFO - OKAY [ 0.356s]
07/012/2016 21:12:15 - INFO - writing 'boot'...
07/012/2016 21:12:15 - INFO - FAILED (remote: image is not a boot image)
07/012/2016 21:12:15 - INFO - finished. total time: 0.359s
07/012/2016 21:12:15 - INFO - FASTBOOT Output:
sending 'boot' (11287 KB)...
OKAY [ 0.356s]
writing 'boot'...
FAILED (remote: image is not a boot image)
finished. total time: 0.359s
 

casouzaj

Senior Member
Oct 13, 2006
2,219
569
193
57
Haibara-gum Yoshida-cho Sumiyoshi-shi
I'm also having issues to flash 575 kernel.
Flashtool output:

07/012/2016 21:12:15 - INFO - Selected kernel (boot.img or kernel.sin): D:\Sony\flashtool home\x\kernel_S1-SW-LIVE-9C84-PID1-0006-MMC.sin
07/012/2016 21:12:15 - INFO - Flashing selected kernel
07/012/2016 21:12:15 - INFO - sending 'boot' (11287 KB)...
07/012/2016 21:12:15 - INFO - OKAY [ 0.356s]
07/012/2016 21:12:15 - INFO - writing 'boot'...
07/012/2016 21:12:15 - INFO - FAILED (remote: image is not a boot image)
07/012/2016 21:12:15 - INFO - finished. total time: 0.359s
07/012/2016 21:12:15 - INFO - FASTBOOT Output:
sending 'boot' (11287 KB)...
OKAY [ 0.356s]
writing 'boot'...
FAILED (remote: image is not a boot image)
finished. total time: 0.359s
If your bootloader is locked, you cannot use fastboot. Select flashmode, instead.
 
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone