Rooting a Z2 with locked bootloader and recent lollipop system

Search This thread

derjaeger

Senior Member
Jul 24, 2015
62
26
Hi all,

I am kinda new here and would like to put a question, hoping it's not a repetition (I have been browsing though this forum thoroughly, but apparently couldn't find a proper answer). This is the situation:

- bought a used Z2
- Z2 was from UK O2 operator and it had operator lock and unlockable bootloader
- network operator lock has been cleared with unlock code
- O2 customized firmware has been wiped away by flashing a recent 5.0.2 stock lollipop
- unlockable bootloader still exists so cannot upload any customized/rooted .zip system

Clearly, the only thing I can do to modify this phone is to upload .FTF firmares to it, due to unlockable bootloader. Right now, I see available online only unmodified stock .FTF firmwares.

THE QUESTION: is there ANY way to create a pre-rooted .FTF file (modding not strictly necessay but rooting essential) so that I can upload it to the phone?

Thanks for all your precious advice!!!
 

ptmaniac

Senior Member
Jul 17, 2009
377
216
Aveiro
Nexus 7 (2013)
Sony Xperia XZ
You can't modify .ftf files as they are signed by sony. easiest solution is to root your phone with kingroot , install nut's dual recovery and then flash any stock prerooted zip (or a custom rom if you want) you can find on this forum. kingroot will be gone when you finish the .zip install too :)
 

derjaeger

Senior Member
Jul 24, 2015
62
26
You can't modify .ftf files as they are signed by sony. easiest solution is to root your phone with kingroot , install nut's dual recovery and then flash any stock prerooted zip (or a custom rom if you want) you can find on this forum. kingroot will be gone when you finish the .zip install too :)

Thanks for answering!

Wouldn't just installing kingroot be enough for a simple rooting of the stock fw?
All I need is the ability to run some apps which need root (e.g. ad-away, set dns, etc.) and nothing more. Is the latest version tested on Z2 running 5.0.2?

Thanks again!
 

ptmaniac

Senior Member
Jul 17, 2009
377
216
Aveiro
Nexus 7 (2013)
Sony Xperia XZ
Thanks for answering!

Wouldn't just installing kingroot be enough for a simple rooting of the stock fw?
All I need is the ability to run some apps which need root (e.g. ad-away, set dns, etc.) and nothing more. Is the latest version tested on Z2 running 5.0.2?

Thanks again!

Kingroot works fine on 5.0.2 but by itself will not disable sony RIC and you won't get a writable system. Nut's dual recovery will disable RIC on boot, just install it after rooting and you should be good to go.
I suggested flashing a preroot zip just because i don't like kingroot app to manage root permissions and it's hard to replace it with supersu. flash a preroot zip and you'll end with a clean stock rom+supersu+nut's dual recovery and fully writable system :)
 
Last edited:

derjaeger

Senior Member
Jul 24, 2015
62
26
Thanks a lot buddy!

I will try kingroot+nut recovery and see how I find myself.
I will always be one step away from uploading a custom .zip in case I need supersu.
You really made my day!!! :))))
 

gazza35

Senior Member
Sep 10, 2006
247
59
Dumfries
Drop bk to kitkat, root and recovery no problem using practically any tool, I used Z2 dual recover installer, once it reboots to recovery you flash su update from chainfire, rooted and recovery done.
Then just use prf creater to make an ftf into a flashable rooted room, yes you can add root and recovery to that too, flash that from recovery, job done.
You can use lollipop ftf to do that if you wish.
 

derjaeger

Senior Member
Jul 24, 2015
62
26
Drop bk to kitkat, root and recovery no problem using practically any tool, I used Z2 dual recover installer, once it reboots to recovery you flash su update from chainfire, rooted and recovery done.
Then just use prf creater to make an ftf into a flashable rooted room, yes you can add root and recovery to that too, flash that from recovery, job done.
You can use lollipop ftf to do that if you wish.

Thanks for your answer!
But isn't this procedure including downgrade somewhat longer than the previous suggested one?
 

ptmaniac

Senior Member
Jul 17, 2009
377
216
Aveiro
Nexus 7 (2013)
Sony Xperia XZ
Drop bk to kitkat, root and recovery no problem using practically any tool, I used Z2 dual recover installer, once it reboots to recovery you flash su update from chainfire, rooted and recovery done.
Then just use prf creater to make an ftf into a flashable rooted room, yes you can add root and recovery to that too, flash that from recovery, job done.
You can use lollipop ftf to do that if you wish.

Go back to kk? why? it's a waste of time nowadays... the solution i mentioned won't even need to touch flashtool it's easier and quicker...
 

derjaeger

Senior Member
Jul 24, 2015
62
26
Just one last question: reading thrads about 5.1.1 it looks that it's due in a few days.
Would it be better to root now (as kingroot is still untested on 5.1.1 ) and then flash 5.1.1.ftf or just wait for it and then root?
Thanks
 

gazza35

Senior Member
Sep 10, 2006
247
59
Dumfries
Go back to kk? why? it's a waste of time nowadays... the solution i mentioned won't even need to touch flashtool it's easier and quicker...

Very true and if all are happy then it's all good, just don't forget to check ya phone afterwards for all the intrusive crap that kingroot throws on ya phone, tried it and it definitely didn't root my Z2 or a load of others.
 

ptmaniac

Senior Member
Jul 17, 2009
377
216
Aveiro
Nexus 7 (2013)
Sony Xperia XZ
Just one last question: reading thrads about 5.1.1 it looks that it's due in a few days.
Would it be better to root now (as kingroot is still untested on 5.1.1 ) and then flash 5.1.1.ftf or just wait for it and then root?
Thanks

IF you root now and install nut's dual recovery, you'll just need to flash a preroot 5.1.1 zip when it's released.

Very true and if all are happy then it's all good, just don't forget to check ya phone afterwards for all the intrusive crap that kingroot throws on ya phone, tried it and it definitely didn't root my Z2 or a load of others.

Sure, i also don't like kingroot. Like i said before it does root fine but doesn't disable ric, flashing nut's recovery after solves this.
And if you flash a preroot zip after there will be no traces of kingroot on the phone. Downgrade to kk and flashtool is still not necessary...
 

derjaeger

Senior Member
Jul 24, 2015
62
26
IF you root now and install nut's dual recovery, you'll just need to flash a preroot 5.1.1 zip when it's released.

Good afternoon!

I have been though your procedure and, I must say, kingroot and nut's recovery installed well. Now the phone is rooted. Also added Purify app. There is just one problem left.

At the moment I have a stock 23.1.A.1.28 FW installed, just wanted to make a try with a 23.2.A.1.62 to see how the whole process goes. Instead of preparing the full .zip file, I already had a ready one, so I uploaded it into the phone, plus another .zip for gapps. Then, trying to start recovery, the phone does not enter recovery, but boots normally.

I know that nut's recovery is installed well, as, after installation process, it showed up a recovery (philz's?) with grey keys, and I also went though its menus to check it up. Right now these are the ways I tried, failing, to start recovery:

- immediately after switching on the phone (after vibration), pressing volume up
- immediately after switching on the phone (after vibration), pressing volume down
- starting manually (any of the 3 proposed recoveries) from NDR UTILS app
- starting manually from XZRecovery app

None of these methods work, the phone sometimes makes a double reboot (i.e. stays at "sony" first screen goes black and then goes back to sony screen again) but always ends up with loading android system. Is this maybe due to my locked bootloader? In this case would the only option be every time doing FTF upgrade+kingroot+nut's? Or is there some sure method to boot the recovery and install whatever I want?

After all, if it started once, I believe it can start again....
Thanks!
 

ptmaniac

Senior Member
Jul 17, 2009
377
216
Aveiro
Nexus 7 (2013)
Sony Xperia XZ
IF you root now and install nut's dual recovery, you'll just need to flash a preroot 5.1.1 zip when it's released.

Good afternoon!

I have been though your procedure and, I must say, kingroot and nut's recovery installed well. Now the phone is rooted. Also added Purify app. There is just one problem left.

At the moment I have a stock 23.1.A.1.28 FW installed, just wanted to make a try with a 23.2.A.1.62 to see how the whole process goes. Instead of preparing the full .zip file, I already had a ready one, so I uploaded it into the phone, plus another .zip for gapps. Then, trying to start recovery, the phone does not enter recovery, but boots normally.

I know that nut's recovery is installed well, as, after installation process, it showed up a recovery (philz's?) with grey keys, and I also went though its menus to check it up. Right now these are the ways I tried, failing, to start recovery:

- immediately after switching on the phone (after vibration), pressing volume up
- immediately after switching on the phone (after vibration), pressing volume down
- starting manually (any of the 3 proposed recoveries) from NDR UTILS app
- starting manually from XZRecovery app

None of these methods work, the phone sometimes makes a double reboot (i.e. stays at "sony" first screen goes black and then goes back to sony screen again) but always ends up with loading android system. Is this maybe due to my locked bootloader? In this case would the only option be every time doing FTF upgrade+kingroot+nut's? Or is there some sure method to boot the recovery and install whatever I want?

After all, if it started once, I believe it can start again....
Thanks!

Nut's dual recovery works fine on LB (i have unlockable bootloader too) probably something you installed messed up the recoveries, did you install/update busybox from the play store? Nut's dual recovery includes it's own busybox which can't be replaced / updated.
Reinstalling the recoveries with the installer on your pc should fix the problem and make them work again.
 

derjaeger

Senior Member
Jul 24, 2015
62
26
Nut's dual recovery works fine on LB (i have unlockable bootloader too) probably something you installed messed up the recoveries, did you install/update busybox from the play store? Nut's dual recovery includes it's own busybox which can't be replaced / updated.
Reinstalling the recoveries with the installer on your pc should fix the problem and make them work again.
Hi,
it looks like the device was somewhat messed up. U were right that i had installed another busybox from gplay, nevertheless uninstalling it did not sort out any effect. Also nut's reinstall failed. Maybe there was some chaos still inside due to experiments done before using kingroot, like, for instance, trying towelroot.

This is how I acted to solve the issue:
- downloaded most recent fw with xperifirm (Telekom.de one, full of useless apps)
- completely flashed phone with .ftf
- reinstalled kingroot
- reinstalled nut's recovery

Now the phone is back again rooted and I deleted some stupid apps with root app delete.

I am now eagerly waiting for 5.1.1 release, hope there will be a vanilla firmware somewhere this week :)))
Best would be to already download a patched .zip image.

Right now thanks for the ideas!
 

gazza35

Senior Member
Sep 10, 2006
247
59
Dumfries
Hi,
it looks like the device was somewhat messed up. U were right that i had installed another busybox from gplay, nevertheless uninstalling it did not sort out any effect. Also nut's reinstall failed. Maybe there was some chaos still inside due to experiments done before using kingroot, like, for instance, trying towelroot.

This is how I acted to solve the issue:
- downloaded most recent fw with xperifirm (Telekom.de one, full of useless apps)
- completely flashed phone with .ftf
- reinstalled kingroot
- reinstalled nut's recovery

Now the phone is back again rooted and I deleted some stupid apps with root app delete.

I am now eagerly waiting for 5.1.1 release, hope there will be a vanilla firmware somewhere this week :)))
Best would be to already download a patched .zip image.

Right now thanks for the ideas!

It's all part of the experience of learning what's best, I always only use dual recovery because windows can install it directly and root at same time, there used to be plenty of rooting apps like kingroot but you don't see so many anymore, but I'm glad you're sorted, when ya get 5.1.1 just use prfcreater to make it into flashable zip then you don't lose root and have to go through the process all over again.
All the best

---------- Post added at 01:26 AM ---------- Previous post was at 01:21 AM ----------

http://xdaforums.com/crossdevice-dev/sony/tool-prfcreator-easily-create-pre-t2859904
 

derjaeger

Senior Member
Jul 24, 2015
62
26
Thanks a lot!

Yes, it really goes this way, now waiting for an unbranded fw, as this night the first branded ones have started to roll out...

I am really happy: for a couple of months I thought I was buried behind that nasty unlockable bootloader, and now i discovered it's even better, as rooting it without touching bootloader allows the software to work at 100% of it specs :)

Coming from Samsung to Sony is kinda rough at first for nibbling but when the right instruments are present and clear it's worth dealing with superior hardware.

Also, must say that Sony is lately improving its behaviour, after so many years of mafia attitudes towards buyers :)

Inviato dal mio X500U utilizzando Tapatalk
 

gazza35

Senior Member
Sep 10, 2006
247
59
Dumfries
I've had Samsung, HTC, Apple, blackberry and finally stuck with Sony, I guess they all have pros and cons, Samsung phones are the easiest to mod and flash, Sony is quite daunting for newcomers very much like HTC. Can be tricky to learn.
Horses for courses and all that, I much prefer a rooted phone with locked boot, no particular reason except the drm keys etc, I do think camera is better on lb, than the quality on ul, although there is a drm restore mod on cross Dev, for ul, it does make xreality work, but it doesn't remove the missing key error in security tests.
I read on a page that once drm keys are gone, Sony won't honour the warranty, very much like Samsung and the knox counter, I'm not sure tho, but I do know I'll always remain Lb and stock based rom.
Only problem I have is getting wifi tethering working properly, it's doing my head in, 4 weeks of decompiling and editing and still can't get my phone to broadcast on any other channel except 1.

GGGRRRRRR @ SONY.
#whattheheckhaveyoudonesony
 

derjaeger

Senior Member
Jul 24, 2015
62
26
All so true!

Btw1, when I reflashed last evening the phone was also complaining when I went to hotspot section in order to configure it.... I think they messed up something, but maybe 5.1.1 will have fix so let's see...

I have a couple of Mediacom X500U, which I discovered, besides being fairly nice phones after more than a year of use, that are basically rebranded HTC phones (this comes out of their factory hex code detected by Linux). Do you think they could be modded like for generic HTC or never heard about them?
 

gazza35

Senior Member
Sep 10, 2006
247
59
Dumfries
All so true!

Btw1, when I reflashed last evening the phone was also complaining when I went to hotspot section in order to configure it.... I think they messed up something, but maybe 5.1.1 will have fix so let's see...

I have a couple of Mediacom X500U, which I discovered, besides being fairly nice phones after more than a year of use, that are basically rebranded HTC phones (this comes out of their factory hex code detected by Linux). Do you think they could be modded like for generic HTC or never heard about them?

Looks like a cheap option of unb
randed HTC, but no, I don't think a HTC section would help.
I think it's an Italian release, dual simply phone, simply Google pointed to an Italian forum androidiani androidiani, run the link through a webpage translator and you may be in luck for root and rom, I think towelroot may root it.
 

derjaeger

Senior Member
Jul 24, 2015
62
26
Actually framaroot already offered rooting at the price of a horrible hack (3-4 reboots before device is ready when turning on or rebooting, plus device instability on heavy loads), never tried towelroot on it.

But problem is not about rooting rather than getting rid of horrible stock firmware. The latest fw edition by Mediacom was a total disaster (forums cry loud) and I thought it would be great to try to put some mod on the phones: this is why I had in mind to ask you if there is a general toolkit for HTC phones (like flashtool for Sony) which I could use to try to take care of it and experiment....

Inviato dal mio X500U utilizzando Tapatalk