yashsingh1/xdaforums huggingface dataset:
[Xperia Z2 General] hickira:
I need help, I have a D6502 and this is what i get :

23/059/2018 02:59:37 - INFO - Flashtool Version 0.9.18.6 built on 30-05-2015 22:30:00

23/059/2018 02:59:37 - INFO - Executing search strategies to find proxy selector

23/059/2018 02:59:38 - INFO - No proxy found for IE. Trying next one

23/059/2018 02:59:38 - INFO - Strategy firefox failed trying next one : No Firefox installation found

23/059/2018 02:59:38 - INFO - No proxy found for java. Trying next one

23/059/2018 02:59:38 - INFO - Syncing devices from github

23/059/2018 02:59:39 - INFO - Scanning devices folder for changes.

23/059/2018 02:59:51 - INFO - Pulling changes from github.

23/059/2018 02:59:52 - INFO - Devices sync finished.

23/059/2018 02:59:56 - INFO - Device disconnected

23/000/2018 03:00:32 - ERROR - root : this bundle is not valid

23/000/2018 03:00:32 - INFO - Selected Bundle for Sony Xperia Z2 (D6503). FW release : 23.5.A.0.575. Customization : Customized MEA

23/000/2018 03:00:32 - INFO - Preparing files for flashing

23/000/2018 03:00:33 - INFO - Please connect your device into flashmode.

23/001/2018 03:01:12 - INFO - Device connected in flash mode

23/001/2018 03:01:12 - INFO - Opening device for R/W

23/001/2018 03:01:12 - INFO - Reading device information

23/001/2018 03:01:12 - INFO - Phone ready for flashmode operations.

23/001/2018 03:01:12 - INFO - Current device : D6502 - BH908AF217 - 1296-1482_R1D - 1278-4770_23.5.A.0.575 - GLOBAL-HSPA_23.5.A.1.291

23/001/2018 03:01:12 - INFO - Start Flashing

23/001/2018 03:01:12 - INFO - Processing loader.sin

23/001/2018 03:01:12 - INFO - Checking header

23/001/2018 03:01:12 - INFO - Flashing data

23/001/2018 03:01:12 - INFO - Processing of loader.sin finished.

23/001/2018 03:01:13 - INFO - Loader : S1_Root_9c84 - Version : MSM8974AB_27 / Boot version : S1_Boot_MSM8274AB_LA3.0_M_3 / Bootloader status : ROOTABLE

23/001/2018 03:01:13 - INFO - Disabling final data verification check

23/001/2018 03:01:13 - INFO - No bootdelivery to send

23/001/2018 03:01:13 - INFO - Processing kernel.sin

23/001/2018 03:01:13 - INFO - Checking header

23/001/2018 03:01:13 - INFO - Flashing data

23/001/2018 03:01:14 - INFO - Processing of kernel.sin finished.

23/001/2018 03:01:14 - INFO - Ending flash session

23/001/2018 03:01:14 - INFO - Flashing finished.

23/001/2018 03:01:14 - INFO - Please unplug and start your phone

23/001/2018 03:01:14 - INFO - For flashtool, Unknown Sources and Debugging must be checked in phone settings

23/001/2018 03:01:14 - INFO - Device connected in flash mode

23/002/2018 03:02:35 - INFO - Device disconnected
[Xperia Z2 General] Fredwuz:
And what's exactly your problem?
[Xperia Z2 General] hickira:
well it is still in .291 what did I do wrong ?
[Xperia Z2 General] Fredwuz:
When you plug your phone in and run the script do you give storage permissions? Then don't give any permissions just plug the phone in and run the script. Do this after you flashed
[Xperia Z2 General] AndroidRant:
Uuuh so how do I access the recovery later on? I know it's installed because it booted directly to it the first time and I flashed the SuperSU zip but then I couldn't figure out how to boot to recovery again, I want to perform a nanodroid backup if it's even possible on locked bootloader, I see no reason why it wouldn't be..
[Xperia Z2 General] Fredwuz:
I think you can't boot into recovery after you flashed the original kernel.
[Xperia Z2 General] AndroidRant:
Ohcrap yeah I forgot about that lol, thanks!

So I suppose it's not possible to backup and restore nanodroid on locked bootloader, and if it is it must be a pain in the ass..
[Xperia Z2 General] mahesh911:
Has anyone tried to root with magisk using this method??

Like instead of step - flashing supersu from recovery, flash magisk and then flash back Sony 291 kernel...

Will it work?

Locked bootloader here... I did hav rooted with supersu before and recently has to factory reset for a repair. So looking to root with magisk v18...
[Xperia Z2 General] userxda2:
Same situation here... Have u try mate? I dont have my ROM backed up, so yeah... I doubt to try it...
[Xperia Z2 General] mahesh911:
No I still looking for answers... Ya mine rom just settled well but needs root to deal with internal memory space.

For magisk like they say needs patched magisk or guess I think to use adrians Sony elf boot bridge method to install magisk. Til magisk V16 I see nobody had problems in other devices.until v17 nd v18 has some installation issues.. Thats wat iam asking but everybody has unlocked bootloader nd running custom roms which magisk install fine for them...

There is another thread which says about magisk on our Z2 but it's so much complicated adb steps. This thread method is d easiest.. And well nobody tried anything with latest magisk I think.. Then we just use that supersu... Will experiment next year when free..nd if it works I will DM you...
[Xperia Z2 General] Sky7ure:
I'm not being able to download the files (error 410)...
[Xperia Z2 General] nfsmaster007:
I tried magisk instead of flashing supersu and just an error message will pop up. I also tried bootbridge and that works until you try to start your phone. It will just crash so its not working :/
[Xperia Z2 General] Shadow_Company:
i need help!!!

Sir i am Using Sony Xperia Z2

i wanna Root it But i Don't Know How

Watched Tutorials on YouTube Showing This Method But When i Reach FlashTool To Flash The Kernel it's not Showing in FlashTool

And Flash is Cancelled.....
[Xperia Z2 General] kripget:
thank you so much for this tutorial

my xperia z2 is now rooted and have twrp installed but does this procedure also unlock bootloader? for ive read some comments saying their bootloader's unlocked after rooting

and lastly, if ever this rooting tutorial won'tunlock bootloader, do i still need to before flashing custom roms for it's noted on some custom firmware flashing tutorials to make sure bootlader should be unlocked before flashing

Thanks a lot again

thanks in advance if you answer my questions

Please don't get tired of helping the development on this phone

---------- Post added at 09:31 PM ---------- Previous post was at 09:31 PM ----------

thank you so much for this tutorial

my xperia z2 is now rooted and have twrp installed but does this procedure also unlock bootloader? for ive read some comments saying their bootloader's unlocked after rooting

and lastly, if ever this rooting tutorial won'tunlock bootloader, do i still need to before flashing custom roms for it's noted on some custom firmware flashing tutorials to make sure bootlader should be unlocked before flashing

Thanks a lot again

thanks in advance if you answer my questions

Please don't get tired of helping the development on this phone
[Xperia Z2 General] umairaziz1:
Miui
[Xperia Z2 General] samuhfernandes2:
Xperia z2 d6543

Work in my Z2 D6543? same version number, 23.5.A.1.291
[Xperia Z2 General] Akihiko4:
Hello, thanks for making this tutorial.. And i have a question..

Can i root sony z2 whithout downgrade to .575, i already have the recovery...
[Xperia Z2 General] darknessmc:
If you have recovery installed then you can root without any problem. Just flash superSU.
[Xperia Z2 General] WaseemAlkurdi:
Is USB debugging strictly necessary for this? Could it be done on a phone that is bootlooping?
[Xperia Z2 General] Spank2000:
is there a way I can install Magisk instead of Supersu for systemless root?? Thanks for this tool.
[Xperia Z2 General] tonnyo:
thank you! I got the same problem with Sony Xperia PC studio open!
[Xperia Z2 General] sshaikh:
>*-flash supersu then flash .291 kernel

I'm trying to repurpose a Z2 I have lying around for a single application. To do this I want a relatively new (custom?) ROM. Before I unlock the bootloader I want to backup my TA partition... just in case.

The link to .291 in the OP doesn't seem to work any more, but do I need it considering I just want to backup the TA partition? And even if I didn't want an alternative ROM, why not stick to .575?

Bonus question: what custom ROM currently has the most mindshare for this phone?
[Xperia Z2 General] cabelo_pa:
Is there a chance someone can reupload "Z2_23.5.A.1.291_Marshmallow_Kernel_Flasher.zip"? Main link is broken.

-

Don't mind. I just downloaded 575 and 291 roms and extracted from there. The thing is, I don't know how to transform kernel into "flashable", so I've flashed 291 back with flashtool.
[Xperia Z2 General] kakashi7593:
I also can't download .291 flashable kernel, google drive file is not available anymore.

Can someone re-upload please ?
[Xperia Z2 General] Oswald Boelcke:
Thread closed on request of OP @rocker00
[Xperia Z2 General] Alt80:
maybe you can try reflashing the whole .291 ftf, and do rooting again. Mine just works flawlessly.
[Xperia Z2 General] lightningglasses:
I know it says for 23.5.A.1.291 but can this be done on 23.5.A.0.575?
[Xperia Z2 General] rocker00:
yes, just enable usb debugging and run the tool and flash supersu.
[Xperia Z2 General] axute:
Summary works for me:

prepare:

Upgrading adb (from android-sdk) - perhaps dont required (32/36 version)

enable usb debugging (settings > developer > )

allow unknown sources (settings > security > )

go flashmode:

latest flashtool 0.9.22.3, flash the kernel from the zip (renamed to ftf, copy to flashtoolHome > firmwares)

reboot

DISABLE flashtool! (32/36 adb issue connection)

Enable MSC-Mode for USB

Copy update-superSU to SDCard

open CMD in administrator mode

go to directory and run the install.bat

reboot (auto)

twrp:

install the update-superSU*.zip

reboot

go flashmode

flash only the kernel from sony ftf ( ...1.291)

reboot

thank you all :)
[Xperia Z2 General] Sa3:
Hi.. Installing .575 kernel is the same way as installing a whole firmware (moving the file in that location, choose flashmode... etc.) ? plus installing supersu and .291 kernel using twrp yes ? Then what is the use of the recovery file attached ? wiping data is recommended ? Thank you :)
[Xperia Z2 General] mohnishxxx:
will it work for xperia z2 D6502 firmware 23.5.A.0.575 Bootloader locked and custom recovery not installed?
[Xperia Z2 General] fobsi:
This question may seem stupid. As we enter the recovery? I'm new with Z2. :x
[Xperia Z2 General] Karlmetalz85:
:svetius:
[Xperia Z2 General] fedakpeter:
Many thanks, I updated 2day from .575 to .291 my D6503 with LB and this just came very handy.

I noticed TWRP is 3.0.2.

Is this OK for LB? I read elsewhere that for LB it needs to be 3.0.0. When I try to flash 3.0.0 image, it remains 3.0.2.

Also I can't mount SD card in TWRP, but otherwise all work well, I just have to flash zips from internal storage...

How can I swap twrp 3.0.2 with sirius 3.0.0 image?

Appreciate your work/time
[Xperia Z2 General] rocker00:
yes its for LB no worries there is no need to stay in 3.0.0 this one is faster and better & regarding sd mount issue i have never had this issue ! .

if you wanna revert to 3.0.0 replace the twrp with 3.0.0 the path is system/etc/mm_twrp_recovery replace the file and set permission and reboot.thank you.
[Xperia Z2 General] aerique:
Awesome thanks, finally rooted my Xperia Z2! Some notes for things that confused me:

In my case Flashtool popped up a dialog about "default.fsc" and whether to use it or not. Selecting to not use default.fsc worked for me.

When my phone was booted again it still said it was using kernel 291 in "About Phone" in settings. Apparently this is no problem since I was able to run the tool and root it.

The tool will give a lot of warnings at the end about not being able to find stuff, again this is apparently no problem.
[Xperia Z2 General] deepgrass:
Credit to axute for your instruction, added some of my comment in red.

Tested on locked BL on .291, and now with rooted. :highfive:
[Xperia Z2 General] Karlmetalz85:
Im following axute post..

Here how it works..

Q: i'm still on .291 after i flash .575 kernel

A: don't worry just keep move to next step because i

also had that problem but although you find built

number still .291 ,actually you already in .575

Q:win usb drivers in the flashtool folder won't install

A: probably you're using windows 8 @ 10..all you

need to do is by disable sign drivers by going to

pc setting>restart now> pick no 7, disable signed

drivers..then restart pc again then install drivers

in flashtool folder

Q:when i click install.bat in recovery,cmd won't

install recovery and phone wont boot into

recovery

A:go to pc>properties>advanced system setting>

advanved>environment variables>new..

Now you add where should cmd find path for

install.bat you put in sd card..

I don't know how you do it guys but this is how it works for me..

Sony Xperia Z2 rooted & twrp installed
[Xperia Z2 General] kiwishd2:
this method worked for me, I had trouble at a few points, mainly installing install.bat as I was always installing with admin rights, after a few tries I realised that I should install it without, I did however lose my recovery after a few restarts, so I flashed again had a play around and installed existenz rom, which is running nicely. cheers [MENTION=4702982]rocker00[/MENTION] for the tread
[Xperia Z2 General] moreinfo:
Hi, I have stock 23.5.A.1.291, can I use this method to root it? thanks
[Xperia Z2 General] Pixelado:
Worked on the first try. Thanks my man!
[Xperia Z2 General] gitzz:
Does D6502 and D6503 have same kernel?
[Xperia Z2 General] cindra:
[MENTION=4702982]rocker00[/MENTION] Thank you for sharing this, and big thanks to all people who contributed to making this. Worked perfectly.
[Xperia Z2 General] tarkan-t29:
Hello everyone, I flashed the .575 using Flashtool, booted the phone and started install.bat with an administrative CMD. But I had this :

Installing ...

mkdir: '/data/local/tmp/mm_twrp_recovery_install': File exists
[100%] /data/local/tmp/mm_twrp_recovery_install/boot_twrp_recovery.sh
[100%] /data/local/tmp/mm_twrp_recovery_install/busybox
[100%] /data/local/tmp/mm_twrp_recovery_install/byeselinux.ko
[100%] /data/local/tmp/mm_twrp_recovery_install/chargemon.sh
[100%] /data/local/tmp/mm_twrp_recovery_install/install_twrp_recovery.sh
[100%] /data/local/tmp/mm_twrp_recovery_install/iovyroot
[100%] /data/local/tmp/mm_twrp_recovery_install/modulecrcpatch
[100%] /data/local/tmp/mm_twrp_recovery_install/recovery.twrp.cpio.lzma
[100%] /data/local/tmp/mm_twrp_recovery_install/wp_mod.ko
iovyroot by zxz0O0
poc by idler1984

Error: Device not supported
Device name: D6503
Kernel version: Linux version 3.4.0-perf-gc14c2d5 (BuildUser@BuildHost) (gcc version 4.9.x-google 20140827 (prerelease) (GCC) ) #1 SMP PREEMPT Tue Jun 28 11:15:51 2016

Finished!

Rebooting into TWRP recovery ...

Then the phone just reboots.. Any idea why this happens? I have a Z2 D6503 Build Number 23.5.A.291

Thank you for the help in advance !
[Xperia Z2 General] ticktock666:
made the same mistake, make sure flashtools is closed and DON'T run the install.bat as administrator, just double click the file normally.
[Xperia Z2 General] tarkan-t29:
The same result occurs :( . After checking up the commands one by one, I've noticed that it's iovyroot who outputs those lines :

Error: Device not supported
Device name: D6503
Kernel version: Linux version 3.4.0-perf-gc14c2d5 (BuildUser@BuildHost) (gcc version 4.9.x-google 20140827 (prerelease) (GCC) ) #1 SMP PREEMPT Tue Jun 28 11:15:51 2016

Any idea why this occurs?
[Xperia Z2 General] shoey63:
You haven't flashed 575 kernel first.
[Xperia Z2 General] ticktock666:
he said in his post he flashed the .575 using flashtools.

The way it worked for me was this (using D6502 model) :

- flash .291 rom using flashtools, I wiped APPS_LOG and USER DATA, didn't exclude anything, then let it fully boot and set it up.

- enable usb debugging and unknown sources.

- turn off device, flash ONLY kernel from .575 ftf that I have using flashtools, don't wipe anything and exclude everything but the kernel.

- made sure flashtools was closed, booted the device and used the tool, device rebooted into recovery

- turn device off, flash kernel only from .291 ftf

- Done

One thing though, I didn't use the tool from this thread, I actually went into the original Z3 thread where the Dev had a v2 version of the tool, so I downloaded it, replaced the recovery for the Z2 into it and used it, not sure if this has anything to do with it but I'll attach it here.

Edit: xda won't allow me to upload files.... no idea why. here's a link though http://www106.zippyshare.com/v/a9mnp9kI/file.html
[Xperia Z2 General] BroenGuiraldson:
ok

ok

ok

ok

ok

ok, root ok, try to reboot into recovery = nok
[Xperia Z2 General] rocker00:
restart the device once you see the green led keep pressing volume down until you see the purple led.
[Xperia Z2 General] tarkan-t29:
[MENTION=4675598]shoey63[/MENTION] and [MENTION=2377094]ticktock666[/MENTION] after trying and retrying to flash the kernel several times, I decided to flash an older ROM (5.0.1) that I rooted then installed the recovery and finally installed the excellent Existenz. Thanks everyone :) !
[Xperia Z2 General] DarkJoney:
Flashed kernel via flashtool, device is D6502.

But, I stuck at flashing recovery. I tried running bat as user, as admin, from C drive root.

IDK what's wrong with it. Debugging and unknown sources are on.
[Xperia Z2 General] DarkJoney:
Alt80

Thank you, your bat worked perfectly.
[Xperia Z2 General] japskren:
[MENTION=7336628]Alt80[/MENTION], your .bat work like a charmed!!! :victory:

Big Thanks.. :good:

[MENTION=4034890]axute[/MENTION], Thanks for the summary, it's help me alot
[Xperia Z2 General] Umerulaziz:
D6502

Hello

I have flashed this zip to D6502. Firstly i was not getting signals and it was asking to insert sim card. Than i found some base band patch and tried to enter into recovery. Now it has entered into boot loops. Can anyone please help? I want .291 with recovery and xposed installed.

THanks
[Xperia Z2 General] BroenGuiraldson:
Sorry. No Led flashing on my device. Tried to restart with TWRP Manager but no issue.

I'm searching what happens because I need to install Xposed Framework, just this one and then I'll not "modify" my phone anymore, too much issues, bootloop, Sony isn't custom friendly.
[Xperia Z2 General] rocker00:
sure you did something wrong try to start from the beginning and all should be fine.
[Xperia Z2 General] BroenGuiraldson:
Bastard method but it turns me crazy, so after the device boots into recovery automatically, I flash the phone following te topic "[ROM][PRE-ROOTED][SU MOD[TWRP][Xposed] Xperia Z2 D6503 CUSTOMISED PACK 23.5.A.1.291", and ... here we go, I have access to every functions like root, recovery and xposed.

Thank you very much rocker00 for your tools who permits my phone to have these advanced functions, thumb up ! (I add a thank on your first post)
[Xperia Z2 General] intothedeeper:
Hello there! Can anyone add the support of Xperia Z2a (D6563) in this amazing tool, please?
[Xperia Z2 General] XDANoob:
Your bootloader is locked or unlocked?
[Xperia Z2 General] shoey63:
Are you able to post the kernel.sin?

Edit: It's ok, I got it. I'll add it later.
[Xperia Z2 General] BroenGuiraldson:
Locked bootloader
[Xperia Z2 General] XDANoob:
THX, i have big trouble to unlock the bootloader under Win 10 (ADB driver) and i need a recovery and this ist answer ;):o

Ps.: With locked bootloader recovery don't work.
[Xperia Z2 General] steinilux:
Hi... what PATH system variable?

Sorry... found it :)
[Xperia Z2 General] pacchio:
I have the same problem as other users as well...

Can't flash the .575 kernel. Apparently everything goes smoothly with flashtool, but if I check in the settings, I'm still on .291, and the .bat gives those usual errors at the end about folders not found, and the phone reboots normally.

I have already tried 4 times. What am I doing wrong?
[Xperia Z2 General] CraZy RaMpAgE:
Root Done .. thanks :)

Now how to install xposed on stock MM .291 d6502 ??
[Xperia Z2 General] shoey63:
Here you go. Just extract iovyroot from the .tar archive and replace the one in Recovery_for MM575_291\files with it.
[Xperia Z2 General] Pixelado:
Great job! I would be nice to include those files for the Z2a in the OP, along with instructions.
[Xperia Z2 General] deepgrass:
Flash the zip file here. Z2 uses sdk23/arm

http://xdaforums.com/showthread.php?t=3034811
[Xperia Z2 General] pacchio:
Any help? Has anyone figured out what is happening?
[Xperia Z2 General] CraZy RaMpAgE:
Which version should work without bootloop ?
[Xperia Z2 General] shoey63:
Flashing a kernel won't change the build number. Check that kernel build date is April 22. Then reboot phone and PC and try again with a different usb cable and/or port.
[Xperia Z2 General] pacchio:
Just checked, and it actually says April 22. Now that I think about it, after my last try, I got the OTA notification of a system update available, so I suspected the downgrade might have worked.

But still no luck with the tool... I'll try again using a different usb port and cable.

---------- Post added at 11:48 AM ---------- Previous post was at 11:16 AM ----------

Ok, I've tried all usb ports and different cables, still no luck. Later I'll give one last try from another computer, and then I'll just give up.
[Xperia Z2 General] shoey63:
Don't give up just yet. Try this version

Edit: Also copy adb.exe from Test-Recovery_for_MM575-291\Files to C:\Windows\System32

View attachment Test-Recovery_for_MM575-291.zip
[Xperia Z2 General] pacchio:
Awesome! Now it worked! Although I didn't copy the adb.exe, I didn't see that part of the message.

But apparently it worked anyway.

Thanks! Just out of curiosity, what's different with that file? Is 7zip to blame, maybe something went wrong in the compression process?

As some other users had the same problem as me, would it be worth to add that zip to the OP?
[Xperia Z2 General] shoey63:
I just modified the bat file to clean up any botched previous attempts.

And you maybe right about 7zip. I don't think Windows native archive manager plays nice with it.

It's not my thread, but the OP can add the zip for sure.

note: This zip has a Z3 recovery, but works for Z2 because it's the same hardware.
[Xperia Z2 General] pacchio:
Oh, true, you're not the OP.

Just to be precise, though, I do have 7zip installed, so the archive hasn't been extracted by the windows archive manager, in my case.

Now I just need to do some reading in a couple other threads, and try and find a version of Xposed that doesn't take me into bootloop. :laugh:
[Xperia Z2 General] kinsah:
No more TV... who cares?

Working flawless with UK_Customized_D6503_23.5.A.1.291_1282-0226_R11D, using old Flashtool 0.9.18.6 in Windows 10, following instructions and using files in post #1.

Btw, did not worked with my original brazilian D6543_Customized_BR_1281-5466_23.5.A.1.291_R3D (did not recognized device, got no root nor recovery, messed up the wifi) , and did not worked with up to date Flashtool 0.9.22.3 (boot freeze).

Thank you OP (who cares with the crappy DTV in D6543...)
[Xperia Z2 General] tonypro79:
xposed-v85-sdk23-arm.zip
[Xperia Z2 General] CraZy RaMpAgE:
Thank you i tried v86 its working fine
[Xperia Z2 General] pacchio:
So no bootloop?
[Xperia Z2 General] rocker00:
regarding xposed,i remember when i updated my device to 291 and flashed v86 the phone was totally unstable, lagging and hanging so i flashed v85 and all went fine so i recommended v85 not v86,i attached it if anyone want it,also if you gonna flash v85 over v86 wipe cache & dalvik after flashing.
[Xperia Z2 General] CraZy RaMpAgE:
I am now using v86 :confused:
[Xperia Z2 General] rocker00:
if it's working fine so it's ok if not flash v85 simple as that ! :D
[Xperia Z2 General] mitpio:
Recovery

Many thanks it works
[Xperia Z2 General] tahagamal:
thanks

this method solved my issue
[Xperia Z2 General] Zakud:
Recovery not installed

HI,

I managed to root my device, for some reason i don't have a recovery. did i do something wrong?
[Xperia Z2 General] riane9:
where do you flash the .291 kernel? In flashtool or in recovery too? Sorry Im just being careful and I want to try it out. Thanks
[Xperia Z2 General] rocker00:
recovery.
[Xperia Z2 General] rocker00:
sure you did something wrong because with this tool you get recovery before root !