yashsingh1/xdaforums huggingface dataset:
[Xperia Z2 General] poldier:
Someone please help me! My phone has been dead for 2 days, and I tried every written method to revive it, but no luck, its stuck in a bootloop, and I cant do anything with it..

The problem started, when I flashed an official ftf in flashtool. Since then, its stuck in a bootloop. It gets to the dancing xperia lines stage, but then it just reboots, and starts again. I tried flashing like 13 different ftf s, and no change.

My phone had an unlocked bootloader, and I was on a working nougat rom, I just decided to go back zo the official rom, by flashing an OG 5.1.1 ftf, then when it booted up, it got to the stage when it says updating android apps, and when it finished that, it just rebooted, and started it again and again.

Someone please help me what to do
[Xperia Z2 General] iXaidyiu:
You must have forgot to wipe user data in flashtool. Reverting to older Android versions requires full wipe and reset.
[Xperia Z2 General] ankoanko:
Hi everyone,somebody with the same problem?

Изпратено от моят D6503 с помощта на Tapatalk
[Xperia Z2 General] darknessmc:
Does anyone can use system rw with substratum with this tool?

If I used this tool, I can't use substratum because system is mount read-only. If I downgrade to 5.1.1 and root with king root then flash pre-rooted zip mm it works very well.
[Xperia Z2 General] coolsheriff:
hi. Help Please

Twrp menu does not come up when I do it.

Before clicking install.bat

In which mode do I need to connect to the phone?

Are you looking at this image?
[Xperia Z2 General] credditor:
Hi,

i read through all this thread but I am still not sure if I can use this successfully on my device:

D6503

Android 6.0.1

23.5.A.0.575

Do i still need to downgrade the kernel? Will this procedure wipe my phone?

I am thankful for any answers! :)
[Xperia Z2 General] credditor:
ok, I realized that that *291 actually is the upgrade, so I just tried it out. I first modified the install.bat to work on linux. The first time I executed it didnt seem to work, so I ran it another time and evrythign worked like a charme. In case any one is interested (you first have to copy your adb-binary to the "files" directory):

#!/bin/bash

cd files
./adb version
./adb kill-server
./adb start-server
./adb wait-for-device

echo "Device Detected!"

./adb devices

echo "Cleaning up for fresh install ..."

./adb shell "rm -rf /data/local/tmp/mm_twrp_recovery_install"

echo "Installing ..."

./adb shell "mkdir /data/local/tmp/mm_twrp_recovery_install"
./adb shell "chmod 755 /data/local/tmp/mm_twrp_recovery_install"
./adb push boot_twrp_recovery.sh /data/local/tmp/mm_twrp_recovery_install
./adb push busybox /data/local/tmp/mm_twrp_recovery_install
./adb push byeselinux.ko /data/local/tmp/mm_twrp_recovery_install
./adb push chargemon.sh /data/local/tmp/mm_twrp_recovery_install
./adb push install_twrp_recovery.sh /data/local/tmp/mm_twrp_recovery_install
./adb push iovyroot /data/local/tmp/mm_twrp_recovery_install
./adb push modulecrcpatch /data/local/tmp/mm_twrp_recovery_install
./adb push recovery.twrp.cpio.lzma /data/local/tmp/mm_twrp_recovery_install
./adb push wp_mod.ko /data/local/tmp/mm_twrp_recovery_install
./adb shell "chmod 755 /data/local/tmp/mm_twrp_recovery_install/busybox"
./adb shell "chmod 755 /data/local/tmp/mm_twrp_recovery_install/install_twrp_recovery.sh"
./adb shell "chmod 755 /data/local/tmp/mm_twrp_recovery_install/iovyroot"
./adb shell "chmod 755 /data/local/tmp/mm_twrp_recovery_install/modulecrcpatch"
./adb shell "/data/local/tmp/mm_twrp_recovery_install/iovyroot /data/local/tmp/mm_twrp_recovery_install/install_twrp_recovery.sh"

echo "Finished!"

echo "Rebooting into TWRP recovery ..."
./adb reboot
./adb kill-server

Anyways, I realized that there is still an update (to *291) planned. Will this official update unroot my phone?

Thanks!
[Xperia Z2 General] iXaidyiu:
.291 is latest for Z2 and there shouldn't be anymore updates.

As if there are, you cannot update because this will most probably brick your device as you have root.
[Xperia Z2 General] credditor:
Just to confirm: I am on 0.575 right now, and upgrading to 1.219 using the offical update would most likely brick my phone?
[Xperia Z2 General] iXaidyiu:
From OTA on a rooted phone, yes, soft brick.

But you can do so via flashtool, flash the .291 update INCLUDE none and EXCLUDE none. Then you will be updated when the process finished, but you will loose root and recovery.

//If I helped you, please tap the thanks button.
[Xperia Z2 General] alasqlany:
wen i open the Recovery tool cmd give me this

* daemon not running. starting it now on port 5037 *

* daemon started successfully *

adb server version (32) doesn't match this client (36); killing...

* daemon started successfully *

Device Detected!

List of devices attached

adb server version (32) doesn't match this client (36); killing...

* daemon started successfully *

CB5A266DZ8 device

Cleaning up for fresh install ...

adb server version (32) doesn't match this client (36); killing...

* daemon started successfully *

error: unknown host service

Installing ...

adb server version (32) doesn't match this client (36); killing...

error: could not install *smartsocket* listener: cannot bind to 127.0.0.1:5037: Only one usage of each socket address (protocol/network address/port) is normally permitted. (10048)

could not read ok from ADB Server

* failed to start daemon *

error: cannot connect to daemon

adb server version (32) doesn't match this client (36); killing...

any one help me plz !!!
[Xperia Z2 General] nezin Z2:
i have a doubt. in rooting sony z2 23.5.A.1.291 without downgrading.....

Sir in attachment there is recovery zip but there is no instructions about how to use and do i have to flash it too. I am a beganer
[Xperia Z2 General] JO_JO_MANUEL:
Thanks ,i try in my xperia z2 D6502 the same way it worked... thanks
[Xperia Z2 General] franataJr:
It's that permanent twrp guys? I reboot my phone but can't in twrp.. Please help??
[Xperia Z2 General] iXaidyiu:
You need to press VOL+ /VOL- when there is LED.
[Xperia Z2 General] brky09:
Hey my phone's model is d6502, got a problem while I'm rooting my phone?
[Xperia Z2 General] franataJr:
But my phone no light LED when reboot or turn off..why..i'm in Android 6.0 MM Stock..
[Xperia Z2 General] SuperMattew84:
Yes :)
[Xperia Z2 General] rocker00:
then i really don't know what's wrong i tested everything and all went fine so try to start form the beginning again,simply you must be on .291 firmware then flash .575 kernel with flashtool then run the tool it will boot into recovery flash supersu then flash .291 kernel and you are done.good luck
[Xperia Z2 General] egekonuk:
root and recovery for .575

İ have .575 version installed and its doesnt have root or recovery does this way works for me ? İ am a rookie in those stuff how can root as easy as possible? any help will appreciated.
[Xperia Z2 General] rocker00:
for .575 just enable usb debugging and run the tool and flash supersu that's it.
[Xperia Z2 General] egekonuk:
do i need to flash .575 kernel first ? and am i going to flash the supersu via flashtool (by changing .zip to .ftf) or is there another way?
[Xperia Z2 General] jacohell:
works ??
[Xperia Z2 General] rocker00:
if you are on .575 then dure there is no need to flash .575 kernel !, and sure nooooo for supersu !!!! flashing supersu is by twrp not flashtool ! bro if you are still new to this take care please of what you are doing to avoid bricking your device.
[Xperia Z2 General] rocker00:
have you enabled usb debugging ?

also adb drivers must be installed if you didn't install it download it from here http://xdaforums.com/showthread.php?p=48915118

also there is a trick to install adb drivers on windows 8 or 10 try to search for it.
[Xperia Z2 General] egekonuk:
yes i did
[Xperia Z2 General] karantamboli:
bro i have problem i did not going to recovery it says demon not started peer reset connection
[Xperia Z2 General] rocker00:
install adb drivers
[Xperia Z2 General] karantamboli:
i have installed abd drivers and try many times still problem please suggest me what i can do? and suggest steps to install adb in windows 10.
[Xperia Z2 General] EpicGtab:
my flashtool doesn't detect the .ftf file after I changed the extension. Any advice?
[Xperia Z2 General] Ninelpienel:
I have flashed the 575 and started the tool. When the device reboot, it doesn’t boot in the recovery, it boot in the normal mode. What can be wrong?
[Xperia Z2 General] EpicGtab:
Can someone put a guide on how to flash the kernel
[Xperia Z2 General] jijox05:
this is log from cmd while i start install.bat.

did i make a wrong step.?

cos it did not going to recovery :confused:

i do install .575 kernel first via flashtool.
[Xperia Z2 General] Zingata:
there must be something I am doing wrong....

I've been trying this since last night. Flashing the kernel via flashtool from 291 to 575. Opening up the device and running the tool. Few times I've had problems with the adb and few times it has given me the same screen as above user^^:

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

So reboot didn't open up a recovery obviously :D

There's one thing I noticed after all these: I am still on 291 even though many times I tried to flash the 575 kernel. There must be something I am missing here..?

Z2 - D6503

23.5.A.1.291

And I have not touched the bootloader or anything else ever with this device. Used to do these things with Xperia Arc alot more haha :D
[Xperia Z2 General] karantamboli:
Thanks Bro it's work for me .

but Bro Can i Use This Recovery Once and how to go into recovery return?
[Xperia Z2 General] rocker00:
sure you can ! restart the device and press volume down untill you see the purple led.
[Xperia Z2 General] maxxx83:
Bro it's all in this log...

You only have to update your ADB version 32 to version 36.

Just do that and no more problems.

Let me know if you have more problems with ADB or installing twrp or any other rom....i will help you.
[Xperia Z2 General] devogie:
This occurs in flashtool when I press volume down and plug the device. I installed the drivers and selected the folder where I placed the ftf file.

07/058/2017 17:58:55 - INFO - Device connected in flash mode

07/058/2017 17:58:55 - INFO - Opening device for R/W

07/058/2017 17:58:55 - INFO - Reading device information

07/058/2017 17:58:55 - INFO - Unable to read from phone after having opened it.

07/058/2017 17:58:55 - INFO - trying to continue anyway

07/058/2017 17:58:55 - INFO - Phone ready for flashmode operations.

07/058/2017 17:58:55 - INFO - Opening TA partition 2

07/058/2017 17:58:55 - INFO - Start Flashing

07/058/2017 17:58:55 - INFO - Processing loader.sin

07/058/2017 17:58:55 - INFO - Checking header

07/058/2017 17:58:55 - ERROR - Processing of loader.sin finished with errors.

07/058/2017 17:58:55 - INFO - Ending flash session

07/058/2017 17:58:55 - ERROR - Error in processHeader : 1 : Incorrect function.

07/058/2017 17:58:55 - ERROR - Error flashing. Aborted
[Xperia Z2 General] iXaidyiu:
Retry, this time don't do anything when flashtool is processing.
[Xperia Z2 General] devogie:
I am not really doing anything when flashtool is processing. I just plug the device while pressing volume down.

Do I need to redownload the files?
[Xperia Z2 General] iXaidyiu:
Nope. Instead you should retry flashing, because flashtool still can have some occasional bugs.

And use v0.9.18.6 for best stability and result.
[Xperia Z2 General] devogie:
Do you have link where I can download v0.9.18.6?

Thanks ^^
[Xperia Z2 General] iXaidyiu:
Link in my signarure.
[Xperia Z2 General] Mattkay19:
Does this work for D6502? Please respond! Thanks
[Xperia Z2 General] vikash1994b:
Yes
[Xperia Z2 General] Matty7701:
I tried twice nothing happened my device is D6502

I flashed the D6503_23.5.A.0.575

And then I did all of the other steps but nothing happened at all
[Xperia Z2 General] vikash1994b:
For me it works everytime. Even with new. 291 build.

poste the logs of tool here then we can help u better.
[Xperia Z2 General] Matty7701:
Hello

I did this twice but nothing happened can you help please?

---------- Post added at 12:03 PM ---------- Previous post was at 11:14 AM ----------

How? Sorry I'm new I don't know how to :{
[Xperia Z2 General] Kernel_Panic:
Firstly thx for this post. Can you give us some tweaks for Z2's battery drain issue in MM Rom?
[Xperia Z2 General] iXaidyiu:
Flash D6502 baseband patch.

[MENTION=4865506]Dr. Death[/MENTION], your show time.
[Xperia Z2 General] Bewildered Wolf:
Everything you need is here.

https://xdaforums.com/crossdevice-dev/sony/existenz-hacks-tweaks-battery-life-t3516705/post70024252

Press thanks if it helped. :)
[Xperia Z2 General] The_banner:
Nevermind, I found how to update adb and everything worked. Thanks and sorry for the disturb. Great job again! :good: :)
[Xperia Z2 General] si1233:
20/010/2017 21:10:52 - INFO - Phone ready for flashmode operations.

20/010/2017 21:10:52 - INFO - Current device : D6503 - CB5A1Y7W7D - 1282-0218_R1D - 1278-4770_23.5.A.0.575 - GLOBAL-LTE_23.5.A.1.291

20/010/2017 21:10:52 - INFO - Start Flashing

20/010/2017 21:10:52 - INFO - Processing loader.sin

20/010/2017 21:10:52 - INFO - Checking header

20/010/2017 21:10:52 - INFO - Flashing data

20/010/2017 21:10:52 - INFO - Processing of loader.sin finished.

20/010/2017 21:10:53 - INFO - Loader : S1_Root_9c84 - Version : MSM8974AB_27 / Boot version : S1_Boot_MSM8974AB_LA3.0_M_3 / Bootloader status : ROOTABLE

20/010/2017 21:10:53 - INFO - Disabling final data verification check

20/010/2017 21:10:53 - INFO - No bootdelivery to send

20/010/2017 21:10:53 - INFO - Processing kernel.sin

20/010/2017 21:10:53 - INFO - Checking header

20/010/2017 21:10:53 - INFO - Flashing data

20/010/2017 21:10:54 - INFO - Processing of kernel.sin finished.

20/010/2017 21:10:54 - INFO - Ending flash session

20/010/2017 21:10:54 - INFO - Flashing finished.

20/010/2017 21:10:54 - INFO - Please unplug and start your phone

20/010/2017 21:10:54 - INFO - For flashtool, Unknown Sources and Debugging must be checked in phone settings

20/010/2017 21:10:54 - INFO - Device connected in flash mode

this is what I get when I try to flash the kernal ftf file. I have turned on usb debugging and unknown sources
[Xperia Z2 General] iXaidyiu:
No errors presented.
[Xperia Z2 General] si1233:
Sorry about that. I thought I had an error while flashing the kernal, because when I clicked on install.bat file to flash recovery, the phone would normally reboot or sometimes it would output "adb server version (32) doesn't match this client (36); killing..." I fixed this using a different computer.
[Xperia Z2 General] serphinox:
This saved my 5 days of misery.
[Xperia Z2 General] Sky7ure:
Is this normal?

I already flashed the kernel to [x291], and flashed SuperSU via the RecoveryV5. But, I'm keep being prompted to upgrade the phone's system to [575], I guess! Do I have to ignore that? Because I do not think that the system is being properly installed! Is it normal for a rooted phone to get stuck in this kernel forever? And so I have to find a way to disable the prompt?! I truly apologize for my ignorance; I am just so confused!
[Xperia Z2 General] Sky7ure:
I was misinformed!

I apologize... Now I understand. I still have one simple question though... Am I suppose to flash back the 291-kernel with FlashTool or Recovery-5?^_^"

---------- Post added at 02:21 PM ---------- Previous post was at 02:07 PM ----------

I had made it as a script-kiddie! The kernel has been "installed" with RecoveryV5! Thank you all so much!^_^"

~ P.S. Hopefully now I can update the system. I wonder when does this root-access vanish? Perhaps, after a complete data-wipe and system backing up.
[Xperia Z2 General] shoey63:
You can't update successfuly with modified /system.

- Flash 291 with FlashTool

- Flash 575 kernel

- Run tool and root while in recovery

- Flash back 291 kernel afterwards

- Done. Rooted and no more update nags.
[Xperia Z2 General] Snuff1:
I have a problem. When I'm trying to flash .575 kernel it says that I must turn on Developer Options, USB Debugging and Unknown Sources. It's all checked but flashtool keeps saying that. Any sugestions? :confused:

05/044/2017 08:44:59 - INFO - Device connected with USB debugging on
05/044/2017 08:44:59 - ERROR - root : this bundle is not valid
05/045/2017 08:45:00 - INFO - Connected device : Sony Xperia Z2
05/045/2017 08:45:00 - INFO - Installed version of busybox : N/A
05/045/2017 08:45:00 - INFO - Android version : 6.0.1 / kernel version : 3.4.0-perf-g43ea728 / Build number : 23.5.A.1.291
05/045/2017 08:45:14 - INFO - Device disconnected
05/045/2017 08:45:36 - INFO - Device connected in flash mode
05/046/2017 08:46:03 - ERROR - root : this bundle is not valid
05/046/2017 08:46:03 - INFO - Selected Bundle for Sony Xperia Z2 (D6503). FW release : 23.5.A.0.575. Customization : Customized MEA
05/046/2017 08:46:03 - INFO - Preparing files for flashing
05/046/2017 08:46:04 - INFO - Please connect your device into flashmode.
05/046/2017 08:46:04 - INFO - Opening device for R/W
05/046/2017 08:46:04 - INFO - Reading device information
05/046/2017 08:46:04 - INFO - Phone ready for flashmode operations.
05/046/2017 08:46:04 - INFO - Current device : D6503 - BH90JLU816 - 1281-8713_R3D - 1278-4770_23.5.A.0.575 - GLOBAL-LTE_23.5.A.1.291
05/046/2017 08:46:04 - INFO - Start Flashing
05/046/2017 08:46:04 - INFO - Processing loader.sin
05/046/2017 08:46:04 - INFO - Checking header
05/046/2017 08:46:04 - INFO - Flashing data
05/046/2017 08:46:04 - INFO - Processing of loader.sin finished.
05/046/2017 08:46:05 - INFO - Loader : S1_Root_9c84 - Version : MSM8974AB_27 / Boot version : S1_Boot_MSM8974AB_LA3.0_M_3 / Bootloader status : ROOTED
05/046/2017 08:46:05 - INFO - Disabling final data verification check
05/046/2017 08:46:05 - INFO - No bootdelivery to send
05/046/2017 08:46:05 - INFO - Processing kernel.sin
05/046/2017 08:46:05 - INFO - Checking header
05/046/2017 08:46:05 - INFO - Flashing data
05/046/2017 08:46:06 - INFO - Processing of kernel.sin finished.
05/046/2017 08:46:06 - INFO - Ending flash session
05/046/2017 08:46:06 - INFO - Flashing finished.
05/046/2017 08:46:06 - INFO - Please unplug and start your phone
05/046/2017 08:46:06 - INFO - For flashtool, Unknown Sources and Debugging must be checked in phone settings
05/046/2017 08:46:07 - INFO - Device connected in flash mode
05/046/2017 08:46:25 - INFO - Flash canceled
[Xperia Z2 General] Bewildered Wolf:
Try this bro.

https://xdaforums.com/xperia-z2/help/help-recovery-t3514849/post70014758

//Press thanks if it helped.
[Xperia Z2 General] Snuff1:
Bro I can't. It keeps saying the same. USB debug is turned on! Same as Unknows Sources. WTF is the problem?!

Can I root my device via CMD?
[Xperia Z2 General] Bewildered Wolf:
Maybe [MENTION=6891123]iXaidyiu[/MENTION] can help you with this .
[Xperia Z2 General] iXaidyiu:
Pay attention to the -INFO- log level tag, it is just a reminder for you if you want to connect to flashtool after you have booted into android. The lines above clearly stated that the flashing is completed.

//Also, please no "WTF" or this kind of slang or inappropriate language appear on this international forum. Please stay calm.

You may want to try out some one-click root software out there.

[MENTION=4865506]Bewildered Wolf[/MENTION]
[Xperia Z2 General] Snuff1:
Hm, okay. Sorry for that :rolleyes: I succseded!

Here is a full story.

I want to install this room. But I need root accsess. So I watched this video and he uses kingroot, but I can't root my device. So I decided to watch downgrade video in order to root via kingroot because I don't understand what I have to do in this tutorial So, as I said earlier, I've installed updated version of flashtool and I succsessfuly downgraded my Sony XPERIA Z2 from official 6.0.1. to 5.0.2. but it can't boot. Message "unforurtnatly android.phone has stopped. What should I do with that now?
[Xperia Z2 General] iXaidyiu:
Clear /data in TWRP, or wipe userdata in flashtool.
[Xperia Z2 General] Snuff1:
Didn't mention - I have not installed any Recovery :( How to wipe userdata in flashtool?
[Xperia Z2 General] iXaidyiu:
See attached.
[Xperia Z2 General] Snuff1:
Another problem :( :( :( When I connect the device with USB cable to fastboot mode and start flashing the rom with enabled wipe and clear user data, it automaticly disconnet and reboot after couple of secounds.... USB cable is good, I got downgrade with that cable.

---------- Post added at 04:40 PM ---------- Previous post was at 04:32 PM ----------

I did it. Now waiting for flash to finish.... If it boot successfully and if I successfully root the devices via kingroot, then I need to flash a recovery and then just to install the rom from recovery?

---------- Post added at 04:42 PM ---------- Previous post was at 04:40 PM ----------

I did it. Now waiting for flash to finish.... If it boot successfully and if I successfully root the devices via kingroot, then I need to flash a recovery and then just to install the rom from recovery?
[Xperia Z2 General] iXaidyiu:
Only plug in when you are told by a prompt.

Reason: The preparation time for the FTF often exceed the maximum idle threshold for flashmode.

[MENTION=4865506]Bewildered Wolf[/MENTION], you arena here. I am not quite experienced with LBL ROM flashing.
[Xperia Z2 General] Bewildered Wolf:
[MENTION=8115648]Snuff1[/MENTION]

Yes, you just need to flash th rom via recovery.

Make sure you wipe data while flashing the new rom to make sure the installation is clean. Which rom are you planning to flash bro ?.
[Xperia Z2 General] Snuff1:
This one.

I just rebooted in to Philz Touch recovery and while I was reading, my screen turned off. So i just wanned to touch him and i touched something (idk what) and device rebooted into system. Idk, maybie I did something xD We'll see.

So, I've downloaded lastest 7.0 and now I'm heading to install it. I'll do a backup of my system just in case.

Another question: I want to have fully clean device, so I want to format my SD card after but there is a folder, I don't know correct name but it's something about recovery. Can I format my SD card without any damage to my system boot and recovery?
[Xperia Z2 General] Bewildered Wolf:
Yes you can i guess.

If you wipe that that will format your internal memory.

But u remember there was an option like format data something maybe that can format your sd card.

See if there is some option like that.

And please ask before doing something.

You can be stucked into a bootloop.

//Press thanks if it helped. :)
[Xperia Z2 General] Snuff1:
It helped ;)

No, I mean when I finish installing custom rom (currently backup in progress - 5109mb needed) I will connect phone to PC in mass storage and format my external SD card via PC. Nothing else... I guess that my internal storage will be empty as much as it can be because I'm doing fresh install of new custom rom, so just formating an external microSD card (16gb).

When my backup is finished, I will write name of the folder and that will maybie be more useful for you to tell me if I can format it.

Also, as I don't have previous eXistenZ rom on my device, I just need to flash last 7.0 and that's it? No such updates or anything else?

---------- Post added at 05:53 PM ---------- Previous post was at 05:51 PM ----------

I have two folders because of which I'm scared to format my external SD card. -clockworkmode and -XZDualRecovery
[Xperia Z2 General] dieccast39:
it works awesome thank you very much!!!
[Xperia Z2 General] hoang555:
confirmed working on D6502 Android 6.0
[Xperia Z2 General] tooplanx:
Hi, thanks for this resource.

I initially had difficulty following this guide so I made a super simple step-by-step guide of this to hopefully help other people who need a bit more detail when using all these tools and methods.

It can be found here:

https://xdaforums.com/xperia-z2/help/guide-idiots-guide-to-root-twrp-t3534647

I hope this helps other people!