yashsingh1/xdaforums huggingface dataset:
[Xperia Z2 Q&A, Help & Troubleshooting] Envious_Data:
Rebooting to recovery

Now given that your bootloader is unlocked ill explain from there onward..

Pre-Requisites:

Fastboot

a bootloader unlocked device

ability to follow instructions of course

1. download your recovery and kernel that uses fotakernel (recovery partition)

download your chosen recovery here

you can either use Advanced stock kernel or AndroPlus Kernel (which are 2 stock based kernels which support the Recovery partition)

2.Getting ready

copy the boot.img out of the zip and put it in a folder with your recovery .img

3. open a command window directed in the folder with your kernel img and recovery img

type in

fastboot flash boot boot.img

(if your kernel img is named that (change the last part apropriately)

then

fastboot flash recovery recovery.img

(again change the last part i needed)

reboot your device and enjoy
[Xperia Z2 Q&A, Help & Troubleshooting] HotKillerZzz:
Or you could just simply use the flashtool application to fastboot the kernel in. ?
[Xperia Z2 Q&A, Help & Troubleshooting] Envious_Data:
yes but you cant fastboot the recovery and its a good habit to get use to fastboot since its useful for when you need to do something flastool cant do or lets say you go to another brand. not many other brands have flashtool like programs
[Xperia Z2 Q&A, Help & Troubleshooting] draexo:
I've a bit of a learning curve here.

Phone is rooted but bootloader is locked.

I appreciate your posts.
[Xperia Z2 Q&A, Help & Troubleshooting] HotKillerZzz:
Yeap thats true haha :D

All my phones have been Sony phones, from Walkmans to the Z line.
[Xperia Z2 Q&A, Help & Troubleshooting] Envious_Data:
hehe nice

Nokia 3310 > nokia N95 > Xperia S > Xperia Z2

from my history of tinkering ive started with Xperia S but ive learned that using linux toolbox and fastboot is like the most useful thing to have and use.
[Xperia Z2 Q&A, Help & Troubleshooting] draexo:
TA Backed up per this thread: http://xdaforums.com/showthread.php?t=2292598

what do you mean by "flash free"????
[Xperia Z2 Q&A, Help & Troubleshooting] Envious_Data:
i dont remember, thats probably a typo.
[Xperia Z2 Q&A, Help & Troubleshooting] draexo:
I keep trying to take the OTA for .314 update, and I am getting a download that finishes, but says "could not verify". Any thoughts?
[Xperia Z2 Q&A, Help & Troubleshooting] Envious_Data:
cant update when your bootlloader is unloked or /system modified

i say just flash a FTF
[Xperia Z2 Q&A, Help & Troubleshooting] draexo:
Ah....OK. I'll have to find a nice ROM to flash.

Sent from my D6503

---------- Post added at 08:40 AM ---------- Previous post was at 08:40 AM ----------

Does CM work well on Z2?

Sent from my D6503
[Xperia Z2 Q&A, Help & Troubleshooting] Envious_Data:
yes, i recomend CM12 official, infected CM12 gives me some issues, CM12 from FXP also gives me some issues too but they are stable.
[Xperia Z2 Q&A, Help & Troubleshooting] draexo:
Thanks. I'll try that. And eventually PAC ROM.

Sent from my D6503
[Xperia Z2 Q&A, Help & Troubleshooting] skyzlequinox:
Can anyone show me the path to open the Android studio sdk, platform folder?? Really want to unlock my z2 bootloader
[Xperia Z2 Q&A, Help & Troubleshooting] Envious_Data:
I dont know that, i just used flashtool

(flashtool.net)

:)
[Xperia Z2 Q&A, Help & Troubleshooting] shane1diamond:
hello,

I just recently picked up a Z2 (D6503) and i am wanting to root. Ive done some research and havent found anything regarding the rooting process for the specific firmware i am running. 23.0.1.A.3.12 apparently this is the Taiwanese model. can someone point me in the right direction please thread etc? Thanks!
[Xperia Z2 Q&A, Help & Troubleshooting] Envious_Data:
You would need to downgrade to 314 and root and then upgrade and root mid way through

there is a prf creator thread in general that has a useful rooting method for Locked Bootloaders

the UB method you flash a recovery and kernel and through recovery superuser (root/superSU)
[Xperia Z2 Q&A, Help & Troubleshooting] Arafeh94:
how to make a full backup of my sony z2 stock firmware no root no recovery to use it when my phone brick or something happen ?
[Xperia Z2 Q&A, Help & Troubleshooting] Envious_Data:
You cant do a nand backup without recovery installed
[Xperia Z2 Q&A, Help & Troubleshooting] gamer649:
Can I ask, is unlocking the bootloader for the second+ time (so I've unlocked it once, relocked it, and then unlocked it again) not meant to wipe all data? Or is it meant to wipe your data each time you do it?

I'm only asking because the second time I unlocked my bootloader it didn't wipe any of my data.
[Xperia Z2 Q&A, Help & Troubleshooting] Envious_Data:
It should only do it the first time as far as i know
[Xperia Z2 Q&A, Help & Troubleshooting] benjamingwynn:
I recently got my hands on a Z2 and I can't really find anymore information on unlocking the device through this method. Does anybody else have any information on this? Does it work? What's the success chance?
[Xperia Z2 Q&A, Help & Troubleshooting] Envious_Data:
turns out the success rate is 0 because i found the person who said flashing the loader from a FTF lied

(ill correct that post)

folow the sony guide on developerworld.sonymobile.com
[Xperia Z2 Q&A, Help & Troubleshooting] benjamingwynn:
Thanks for the reply, unfortunately developerworld.sonymobile.com 404's though.
[Xperia Z2 Q&A, Help & Troubleshooting] Envious_Data:
http://developer.sonymobile.com/unlockbootloader/unlock-yourboot-loader/

correction :)
[Xperia Z2 Q&A, Help & Troubleshooting] benjamingwynn:
Thanks, but this is still only for handsets with an allowed bootloader unlock setting. Does anybody know anything about how the setting is stored, if it's encrypted or written into some ROM chip or if it's just a flag in some file on a read only partition.
[Xperia Z2 Q&A, Help & Troubleshooting] Envious_Data:
its in a encrypted partition that wont be cracked any time soon

(itll even take pros a few years)
[Xperia Z2 Q&A, Help & Troubleshooting] draexo:
So I decided to unlock the bootloader following your instructions (backup the TA keys and all). Once I unlocked it, the phone was.... well... very unhappy. Like a bad factory reset had been done. I could not set it up and I ended up installing a custom ROM (PAC). Should I decide to restore my NANDROID backup, which was stock, can I? There seems to be something about the stock kernel and the boot loader that I do not understand. So...

I currently have M5 kernel and PAC Rom. Can I NANDROID back to stock kernal/stock rooted rom?

Thanks
[Xperia Z2 Q&A, Help & Troubleshooting] Envious_Data:
Yes, if its a full restore then yes

Unlocking your bootloader formats /data so it could be different from just a normal reset
[Xperia Z2 Q&A, Help & Troubleshooting] draexo:
So, I could, in theory, switch been Roms, including stock rooted Roms, by backing up and restoring.

Sent from my Xperia Z2
[Xperia Z2 Q&A, Help & Troubleshooting] Envious_Data:
Yes, as said if it includes everything, data, cache, system, kernel
[Xperia Z2 Q&A, Help & Troubleshooting] draexo:
Do you have a recommended ROM for the Z2? I am pretty disappointed at the PAC Rom I am using currently as most of the picks that make it PAC are not included.
[Xperia Z2 Q&A, Help & Troubleshooting] Envious_Data:
I use stock because it has all my needs and is 100% stable

Decent battery, decent performance, looks good and had all i need feature wise

Id take Cm12.1 as secondary.
[Xperia Z2 Q&A, Help & Troubleshooting] draexo:
Which stock version are you using?
[Xperia Z2 Q&A, Help & Troubleshooting] Envious_Data:
Stock UK unbranded

Debloated

Xposed

GLtool

Slightly modified (some stuf i pulled from Envi-Rom)

Kernel Adiutor as my management app

+ AndroPlus Kernel V53

726 FW
[Xperia Z2 Q&A, Help & Troubleshooting] draexo:
Its the default and includes:

/boot

/recovery

/system

/data

/cache

Is this sufficient?

Does not /recovery include the kernel?

Is there a way to extract what I want (some misplaced photos I believe) out of the backup without restoring the actual entire rom and copying them to the external SD card?
[Xperia Z2 Q&A, Help & Troubleshooting] Arafeh94:
does I lose signal or my sim card detection (radio) if i flashed a firmware that are not made for my country ?
[Xperia Z2 Q&A, Help & Troubleshooting] Envious_Data:
No

Only if you flash for another device varient.

E.g D6503 firmware to a D6502
[Xperia Z2 Q&A, Help & Troubleshooting] rypemaster:
Are there any stock based ROMs with GAPPS removed?
[Xperia Z2 Q&A, Help & Troubleshooting] Envious_Data:
No but with root you can make it your self.
[Xperia Z2 Q&A, Help & Troubleshooting] rypemaster:
Thanks for the quick response, buddy. But could you point me to a guide? I'm a total noob.
[Xperia Z2 Q&A, Help & Troubleshooting] Envious_Data:
PRF creator thread in the general section that'll explain what you need.
[Xperia Z2 Q&A, Help & Troubleshooting] rypemaster:
I'm guessing this is the thread you mean:

http://xdaforums.com/xperia-z2/general/4-4-4-creating-rooted-update-package-t2933155

I'm with you so far. Could you just tell me how to strip the gapps data from the firmware before I build it(or should it be done at some other time)?
[Xperia Z2 Q&A, Help & Troubleshooting] Envious_Data:
No you cant actualy do that

A PRF zip still has the signed partition

So you have to flash it, modify it (e.g. remove gapps)and then pull it from the system and make your own flashable zip for later.
[Xperia Z2 Q&A, Help & Troubleshooting] Th3DON:
Hi,

Some quick questions..

1) if i Root, what features i will loose ? and Is the lost feature is a super cool feature *(i read its X-Reality Engine)

2) I also read about DRM and TA partition, (do i need to) is it possible to backup this?

3) Do i need to unlock my bootloade/r for instaling mods/ROMS . i am planning to have miui 6 on Z2.

4) Any loss for unlocking bootloader ?

5) Can i unroot and relock mybootloader so no one except the pros know about this ?

I am now on Lollipop FW so if you could point me to a working root method, it will be nice.

Thanks in advance.
[Xperia Z2 Q&A, Help & Troubleshooting] Envious_Data:
1. Just firmware updates

Bootloader unlocking breaks bionz, x-reality and supervivid aswell as fiermware updates

2. Yes with root

You can google for the TA backup tool

3. Yes and no

any rom that requires a custom kernel you need a unlocked bootloader (e.g. CM, aosp, anything based on such)(not stock Fyi)

4. See no.1

5. Undo changes, unroot, flash stock kernel and (restore you TA or) relock your bootloader

Once tou restore your TA there is no way of checking anything has been done aside your post and my reply.

Though as said a locked bootloader needs a stock kernel otherwise your device will brick so flash a stock kernel before you relock your bootloader or restore your TA
[Xperia Z2 Q&A, Help & Troubleshooting] Th3DON:
Really useful info especially the last one about relocking BL.

Thank you an have a good day..
[Xperia Z2 Q&A, Help & Troubleshooting] Envious_Data:
I dont think i mentioned it but

Restoring your TA backup will relock your bootloader because that should be its state when you backed it up

Locked and DRM keys present

:)
[Xperia Z2 Q&A, Help & Troubleshooting] Th3DON:
Hi again,

Regarding root, i heard the Towel root is fast and easy - https://towelroot.com/

Is it safe, because i dint see this on your thread.

Also, if you could suggest me a working backup tool for my Apps, tht will be grt.
[Xperia Z2 Q&A, Help & Troubleshooting] Envious_Data:
i dont think it works on newer firmwares at all

perhaps older ones
[Xperia Z2 Q&A, Help & Troubleshooting] negrojosh:
help!!!

Can any one help me with simpler explanation and ways of changing my z2 mac address... Its a lollipop android
[Xperia Z2 Q&A, Help & Troubleshooting] Envious_Data:
Not sure

Try using google search and look for guides on XDA

They probably get as simple as they can
[Xperia Z2 Q&A, Help & Troubleshooting] davidjumani:
Hey guys. Just want to know which phone has a wider range of aosp roms, the oneplus one or the z2? Gonna get a new one next month so need to decide soon. Thanks :)
[Xperia Z2 Q&A, Help & Troubleshooting] bdithug:
I own a z2, my wife uses my old oneplus one now. I can honestly say the z2 is a better overall choice for a phone. The oneplus one will have more aosp roms, but not a lot of them are stable, at least the last time I checked. I flashed about 5 or 6 different roms on the oneplus about a month or so ago to fix my wifes issues with the stock rom. All the roms I tried had bugs and issues. So I ended up going back to stock cm12s for her as it's probably the most stable of them all. I've never unlocked my bootloader on my z2 so I don't know much about aosp roms on the z2, but I know the Sony stock rom is pretty stable and damn close to stock aosp.

Personally I recommend the z2 over the oneplus any day. The oneplus I find gets slightly better battery life which is surprising, but that aside, the z2 is better in every other category. I've also had many issues with oneplus customer service (not to say Sony's is much better lol).
[Xperia Z2 Q&A, Help & Troubleshooting] davidjumani:
Well I never stick to stock as it's too boring. I always flash a custom rom and use Xposed like crazy. Just want to know which device has better aosp roms with more features as there's always multirom to play around with.
[Xperia Z2 Q&A, Help & Troubleshooting] EzZn0:
I got a z2 with software version 23.1.A.28 which means I need to follow this guide but I was wondering in what instance do I lose the DRM key? I want to still use stock and only use root. If I upgrade my phone to the latest stock after I rooted will I still keep the DRM-keys and the TA?

The things I basically want to do is root my phone, keep the DRM keys, make a backup of said DRM keys and the TA-partion, flash the latest stock rom that is possible and then happily use the phone. If you ever lose the DRM key, is it possible to get them back?

I was thinking about posting it here instead of clogging up the forum and I am fairly new to this
[Xperia Z2 Q&A, Help & Troubleshooting] Keme Wicasa:
hi. How can I restore my .dbk after android downgrade?

PCC says
[Xperia Z2 Q&A, Help & Troubleshooting] Olivier:
Hey Ben,

the same happened to me two years ago when I got my Xperia S. Just do one thing: Get rid of that device. Sony devices are very good, but not if they're completely locked down.
[Xperia Z2 Q&A, Help & Troubleshooting] nadesuke:
hi, I just got Z2 from my brother since he doesn't use it anymore.

I am planning to use the Z2 for emulating classic games like psx, sega, nes, n64 and I plan to hook it up to the big TV and play multiplayer games with my friends.

I was wondering if there is a way to connect multiple dualshock 4s at once? maybe by rooting it?
[Xperia Z2 Q&A, Help & Troubleshooting] Envious_Data:
I dont know of any apps that allow this but have you tried just via the normal app found in the settings

And as for connecting it to your TV you would need a MHL 3.0 addapter.
[Xperia Z2 Q&A, Help & Troubleshooting] nadesuke:
yes I've tried connecting using the xperia connectivity inside the settings, the thing is it only allows 1 dualshock to be paired at one time.

I already have a MHL 3.0 adapter by the way. ;)
[Xperia Z2 Q&A, Help & Troubleshooting] Envious_Data:
You could probably use one controler by bluetooth and another by USB

I dont have more than one controler to try this.
[Xperia Z2 Q&A, Help & Troubleshooting] nadesuke:
I will try that configuration later on after work. but I really prefer to not use cables at all though. do you have any more suggestions?
[Xperia Z2 Q&A, Help & Troubleshooting] Envious_Data:
Not that i can currently think of aside one of those multi-usb input items

But you said prefered no cables :)
[Xperia Z2 Q&A, Help & Troubleshooting] ced360:
for flashtool , unknown sources and debugging must be checked in phone settings

here is the error message I get wanting "me Unbrick Device" I do not know what to do I really need help.

this is the part that Flashtool system is unable to copy.

is locked bootloader with d6503
[Xperia Z2 Q&A, Help & Troubleshooting] Envious_Data:
could you provide more details?

Is your device bricked or is there a problem with flashtool?
[Xperia Z2 Q&A, Help & Troubleshooting] ced360:
I guess my phone is bricked because I do not go longer than the sony logo I turn it on

---------- Post added at 15:10 ---------- Previous post was at 14:59 ----------

may be that it is a bad problem for drivers Flashtool
[Xperia Z2 Q&A, Help & Troubleshooting] Envious_Data:
Unplug your phone

Download a FTF

There is a red reset key under the left flap

hold the red reset key till your phone vibrates 3 times

(you could put a rubber band on the power button and power key if it takes too long)

(DO NOT LEAVE YOUR PHONE ANYWHERE, WAIT TILL IT TURNS OFF AND FLASH A FTF IMEDIATELY)

Open flashtool and open the FTF for flashing

Once its off, connect it to your PC holding volume down

Let it flash

Your phone should work for obvious reasons, if it refuses to respond even after some time with a rubber band you will have to buy a replacement.
[Xperia Z2 Q&A, Help & Troubleshooting] ced360:
I just do exactly what you tell me. Flashtool always stop loading the system partition. and it puts me the error message already said
[Xperia Z2 Q&A, Help & Troubleshooting] Envious_Data:
Then your FTF may be corrupted
[Xperia Z2 Q&A, Help & Troubleshooting] ced360:
now my phone will not turn on .

he tells me "the software update failed . make sure that your phone is connected to the computer and try again" when I want to turn it on

---------- Post added at 15:39 ---------- Previous post was at 15:38 ----------

it's possible that? even if I take my ftf on xda?

---------- Post added at 15:47 ---------- Previous post was at 15:39 ----------

even with another ftf I get an error message on flashtoll "processing of system.sin finished with errors"

---------- Post added at 15:47 ---------- Previous post was at 15:47 ----------

and my phone does not work

---------- Post added at 15:48 ---------- Previous post was at 15:47 ----------

I tried to install driver PLUSIEUR Flashtool without success
[Xperia Z2 Q&A, Help & Troubleshooting] Envious_Data:
1. Your FTF may be corrupted so redownload

2. Run flashtool as admin

3. Install flashtool drivers for fastboot,flashmode, Z2 device drivers

Doing all this and reflashing your phone it will become unbricked
[Xperia Z2 Q&A, Help & Troubleshooting] ced360:
sorry but after loading several ftf on my pc and made several test it still does not.
[Xperia Z2 Q&A, Help & Troubleshooting] ced360:
Finally after having had a technician I have a sony standard exchange of phone . because of the technician after the phone has a problem .the I'm vaccance but normally I have another one in 10 days .
[Xperia Z2 Q&A, Help & Troubleshooting] DolDrum:
I have got a, perhaps silly, question.

When I root my Z2, will I still receive system updates from Sony?

Thanks
[Xperia Z2 Q&A, Help & Troubleshooting] MrPACS:
I don't believe so. You'll also have an unlocked bootloader.
[Xperia Z2 Q&A, Help & Troubleshooting] Envious_Data:
If your device has a unmodified system then yes if your bootloader is unlocked then no updates

Root = modified so updates will fail when rooted
[Xperia Z2 Q&A, Help & Troubleshooting] sa-ra:
Hello..

I have Sony Xperia Z2 and its touch is broken not the screen so I went to an technical maintenance and he said that I should replace the touch and the screen while another technical maintenance said that I should replace the touch only So what should I do in this situation ?

Sent from my Samsung Galaxy Grand Neo
[Xperia Z2 Q&A, Help & Troubleshooting] Envious_Data:
Z2 has a digitalizer grid on the glass its self, this is responsible for touch, try to replace this as it may be cheaper than the entire display unit.
[Xperia Z2 Q&A, Help & Troubleshooting] y300owner:
Guys if I get the bootloader unlocked by contacting Sony, will I be able to get OEM updates and will i get root access?
[Xperia Z2 Q&A, Help & Troubleshooting] Envious_Data:
1. No updates

2. No root

Root isnt something that comes with bootloader unlocking

It comes via placement weather its installed through recovery or security exploitation (aka root tools)

(this means you can root without bootloader unlocking but instead a firmware downgrade and use of a root tool)
[Xperia Z2 Q&A, Help & Troubleshooting] o0 Matt 0o:
You won't get root but you can flash a kernel with recovery straight away. If you have recovery, you can flash supersu and get root.

Like:

1. Unlock bootloader,

2. Download lp kernel from dev section,

3. Download supersu flashable package from chainfires website,

4. Flash boot.img (fastboot flash boot boot.img)

5. Boot into recovery

6. Flash supersu

7. Boot into phone with root.

Note you will lose your drm keys this way though.

Edit:

And about oem updates. Updates arnt reliable with a modified system so the safe answer is no. But again if you have recovery you can download updates and make a flashable zip to dirty flash in recovery. So I guess the simple answer is no but the slightly more complicated answer is yes.
[Xperia Z2 Q&A, Help & Troubleshooting] y300owner:
Is there a point to using DRM keys? I don't use Android pay or stream any movies on it.

I haven't upgraded to lolipop as I'm planning to skip the update and get official marshmallow after its release. Which means I get "KK kernel" from Dev section? Is this right?
[Xperia Z2 Q&A, Help & Troubleshooting] o0 Matt 0o:
What your on kitkat? Just get towelroot and problem solved. Or doomlords community root kit. Kitkat is vulnerable to security exploited used to get root.

Edit:

Drm adds camera functionality and image enhancements also. So you'll lose that. Have a search there's probably a thread about what you'll lose and make a decision after reading about it.
[Xperia Z2 Q&A, Help & Troubleshooting] wrbl:
Hey. Is it possible that touchscreen stopped working after system update ? Or maybe a touxh driver is corrupted ? My friend has this problem ;/
[Xperia Z2 Q&A, Help & Troubleshooting] hasanzahir:
Nice post. Very helpful indeed.
[Xperia Z2 Q&A, Help & Troubleshooting] yusuflala:
How to root Xperia z2
[Xperia Z2 Q&A, Help & Troubleshooting] yusuflala:
What is su binary..... And how to fix this problem
[Xperia Z2 Q&A, Help & Troubleshooting] tb5...:
on the latest 5.1.1 on my z2 D6503

stock os

in service info>config

"Bootloader unlock allowed - Yes "

how do i install custom roms on this device without losing camera quality :\

ty
[Xperia Z2 Q&A, Help & Troubleshooting] Envious_Data:
The camera quality loss is sort of a myth

You lose post processing when you unlock your bootloader but post processing can result in visual artifacts in your pictures
[Xperia Z2 Q&A, Help & Troubleshooting] ばか宁哥:
Thanks for your work!:)
[Xperia Z2 Q&A, Help & Troubleshooting] swhatevers:
Root

Hi,

So I watched this: http://www.xda-developers.com/how-to-root-the-sony-xperia-z2-xda-developer-tv/ and decided to give it a go. The video basically describes how to downgrade then root using community rootkit. The guy in the video SPECIFICALLY says that he downloaded the 17.1.1.A.0.402 ROM so I downloaded that one. Turns out he used the 17.1.A.2.55 ROM to get root (clearly an honest mistake... ). I was wondering if Flashtool can root the Z2 (running the recently flashed 17.1.1.A.0.402). I saw there are several options including towelroot and other methods. Can anyone confirm if Flashtool can root the Z2 or not? Downloading 17.1.A.2.55 would take me at least 3 hours so if root can be done using Flashtool I would save myself time and bandwidth.

Thanks in advance.
[Xperia Z2 Q&A, Help & Troubleshooting] Envious_Data:
I dont think flashtool works, i recomend using one of the root-kits found in the Z2 section or towelroot when on a older firmware

Next is to download or make a PRF zip (using prfcreator with a newer firmware FTF)

You can use XZdualrecovery to install recovery for locked bootloaders and through such you can flash the PRFzip i mentioned earlier