yashsingh1/xdaforums huggingface dataset:
[Sony Cross-Device General] xz3user:
How do I flash the firmware to the latest version using this tool without modifying the oem folder on the XZ3? Also, is there anyway to flash the latest OEM partition without overwriting the launcher that I installed using temp root method?
[Sony Cross-Device General] sndestroy:
Hello there! I have a XA2 Ultra that out-of-the-blue got stuck in the infamous bootloop (reboots after Xperia logo), and desperately need to recover files from internal memory.

I dl'd with XperiFirm EXACTLY the same FW it has now (variant, region etc). Newflasher flashed the phone correctly and I chose to keep userdata, believing it would boot a-fresh. But it's still stuck in the same bootloop :( seems the problem is in the user partition itself?

I know the thread is NOT for this, but still... Anyone know how to "extract" the userdata partition from a bootloop-stuck Xperia phone? Doesn't matter if it's corrupt, that I could deal with later... I'm now positive that doing a full flash w/Newflasher will recover my phone, but I need to take out my files first :cry:
[Sony Cross-Device General] munjeni:
I don't know, you should ask in xz3 forum
[Sony Cross-Device General] munjeni:
Unlocked bootloader? If not unlocked and you attempt to unlock bootloader factory reset will be performed and you will lose your userdata! In case bootloader is unlocked allready, simple temporary boot an twrp recovery and dump all your data!
[Sony Cross-Device General] Nimda01:
Tried only userdata.sin at first and it works. Later managed to flash the whole FW (except deleting .ta and persist.sin) which works successfully too.

Seems like Sony didn't change anything (or didn't change that much) in Mark IV's bootloader compared to III's

Anyway, Thanks for your answer and contribution to this tool!
[Sony Cross-Device General] munjeni:
Its seems the same with no modification between mark 3 and mark 4, thanks for testing on mark 4 and comfirming! :)
[Sony Cross-Device General] pranavrr:
I need help,

tried to flash xperia 5 sov41 with UK firmware but ended up having it corrupt.

I used newflasher and got Error, didn't got flash OKAY reply! Got reply: FAILWrite fail at the end.

I am all new to this please help.
[Sony Cross-Device General] munjeni:
How do you think someone can help you when there is no newflasher log? :) If it is at the end after "sync" ignore it since its allready known problem on some devices
[Sony Cross-Device General] aboiledtiger:
Hi @munjeni ! I'll appreciate your advice. trying to flash a 2018 XA2 (H3123) newflasher fails:

No usb device with vid:0x0fce pid:0xb00b !

and indeed:

Product ID: 0x0dde

Vendor ID: 0x0fce (Sony Ericsson Mobile Communications AB)

Version: 1.00

Speed: Up to 480 Mb/sec

Manufacturer: Google

Location ID: 0xfa120000 / 3

what am I missing?

thx...

nevermind... I found this:

https://xdaforums.com/t/solved-full-wipe-newsflasher-no-usb-device-vid-0x0fce-pid-0xb00b.3931984/

regards...

dx
[Sony Cross-Device General] wednesyao:
Thanks for this wonderful tool! Now I'm suffering flashing my 1 IV. It's firmware is CN (which version is higher) and I want to flash it the Hongkong (which version is lower) one. After I flash my phone bricks. v52 flasher, XperiFirm's firmware, I have no idea about the failure. Do I need to unlock the bootloader?
[Sony Cross-Device General] Pandemic:
Flash the correct fw and no not needed to unlock the bootloader so far i know.
[Sony Cross-Device General] Guttergorm:
Hi, I recently bought an xa2 (h4113) dual and somehow bricked it (old fastboot version initially?). Meaning, the device reboots 5 times and then show the meessage "[..] corrupt [..] not boot [..]". I can get a connection in emma, can activate green (recovery?) and blue (fastboot?) modes, but i do not know how to proceed. Actually I'm a little bit scared to completely brick it.

I have newflasher and a directory H4113_Customized DACHBLX_50.2.A.3.77-R5B retrieved by XperiFirm.

I am used to classic moto phones and I am somehow lost with all this new (to me) a/b stuff, no visual stock recovery and so on. Any help very much appreciated.

Spoiler content hidden.
[Sony Cross-Device General] munjeni:
Just put your phone in "green" and double click newflasher.exe, than folow on screen messages & prompts carefully and you are done. If you need usb driver put newflasher in an empty folder, double click them and folow on screen driver extraction prompt, newflasher will extract driver which you need to install, install them. Than go back to "green" and install rom you need
[Sony Cross-Device General] Guttergorm:
@munjeni Thank you, unbricked it, great tool and kudos!
[Sony Cross-Device General] Anon1337:
supposedly the motherboard was completely dead as the Sony Service Center states that it was completely swapped for a new one

I will post more once I get my hands on the phone. It's still on its way to me.
[Sony Cross-Device General] munjeni:
It heave another meaning too, for example it might be power supply problem on your PC for example it didn't deliver max 5.2V over usb instead maybe a bit more e.g. 5.4V , check that first before you kill your next phone!
[Sony Cross-Device General] Anon1337:
no the ports are ok I use them daily on plethora of devices
[Sony Cross-Device General] munjeni:
Ok, I just giving idea. Nothing is impossible :)
[Sony Cross-Device General] UsernameNotRecognized:
Hi @munjeni ,

I just restored everything to stock by flashing xperifirm. I forgot to remove all the .ta files so now I "lost" all info, device doesn't know what IMEI I used to have etc.

I did make a backup though, so I have a tadump_1.ta and tadump_2.ta. I assume I can recover by flashing these 2 back? How do I do so?

Edit: Actually quite concerning there's no information whatsoever on how to recover except just people telling you to "not do so". I'm stupid however.

Edit again: I flashed A11 back, the ony where I patched magisk a long time ago and this one has the IMEI just fine. The IMEI is thus not lost, something's going wrong that causes all A12 roms to be unable to talk with the sim card. I don't think this has anything to do with newflasher.

Final update: This post was very useful.

https://xdaforums.com/t/some-cases-in-flash-from-android-11-to-android-12.4411665/

Albeit hard to read, as can be seen in the previous edit it worked fine after. The I flashed stock 12 and all was fine, and now GSI and all is fine. Problem solved.
[Sony Cross-Device General] munjeni:
You need to flash WHOLE rom, NOT to delete any single file from firmware! Thats a only clean way to flash rom.
[Sony Cross-Device General] UsernameNotRecognized:
That's what I did but then I got wonky behaviour. Maybe it also had to do with me manually trying to flash the software binary.

Software binaries for AOSP Android 12.0 – Kernel 5.4 – Sagami (latest) | Developer World

developer.sony.com

Anywhow, it's solved. Apologies for thinking it had to do with newflasher, it clearly did not.
[Sony Cross-Device General] munjeni:
Never ever flash trim area backup! Never ever touch trim area! Those backups is only in case dead end to phone, total brick.
[Sony Cross-Device General] munjeni:
I realy don't know whats going on with it, might be some low level binaries like bootloader, modem...etc also have some rollback protection, I don't know realy. Sombody need to watch that e.g. bootloader version, modem version...etc and let us know
[Sony Cross-Device General] quoccuong7993:
Hi guy. i Have xperia 5 mark II (Softbank version A002SO) with BLU NO. And i try to flash A stock firmware and it show "You device i Corrupt....."

Anyone can give me Solution for this :(
[Sony Cross-Device General] munjeni:
page 108 have some information. Just read some pages back too
[Sony Cross-Device General] grcool:
Hello!

To save OTA updates I flashed only

oem*

files, after reboot my phone works OK, but there is no more software version information.

Is it possible to fix it without data loss?

UPD: I flashed firmware completely and now everything is fine)
[Sony Cross-Device General] pEtErtgh:
Hi everyone, someone can help me this big problem: I have a xperia 5 II softbank version but I want o flash to global rom and also wants to keep 5G and VoLTE so which is rom can fit it ? Furthermore, I try flash many version but some of them make my phone can't boot and show corruption. Some of them can boot my phone but cannot detect sim card. After that, my phone was brick, xperia companion repair show that device not compatible. So I cannot return Softbank rom because I try already and it show corruption. Now I'm in Customized EEA work normal without sim detect. ( my region is SEA, not singapore or china and part of them )
[Sony Cross-Device General] Pandemic:
Reflash the correct firmware and dont mess up your xperia, you made a bad choise to buy a softbank version, buy next one a global one then you didn't need to have those struggles.
[Sony Cross-Device General] farzzy:
Hi and thanks a lot for the tool,

it seems my Xperia 10 iii has a wrong pid :

newflasher says No usb device with vid:0x0fce pid:0xb00b !

and indeed in the device manager I can see : USB\VID_0FCE&PID_EEEE

I've tried with different computers and different ports and the pid always seem to be eeee. Is my device bricked ?
[Sony Cross-Device General] munjeni:
Did you tried another cable? Did you checked for dust inside usb port on phone side? is your device softbricked?

Next questions is, what you see inside device mannager other than vid and pid, did you see the name of the usb device? Do you see yellow triangle over usb device under device mannager? It looks like your phone is not in flashmode but in another mode, for that you will not see sony flash device inside device mannager and we need to know what you see there! Before you start looking for that things do usb driver update by running newflasher from an empty folder, than confirm with "y" when newflasher ask you for driver extraction, extract driver, install driver, reboot pc, see what you than see inside device mannager.
[Sony Cross-Device General] farzzy:
Thanks for the reply ! I should have specified that my device is softbricked at the moment (I think I flashed the patched boot img of a newer firmware by mistake). I tried multiple cables and blowing off potential dust from the phone's port but it does not seem to change anything.

Also I have no issue detecting my phone in fastboot (pid is 0dde there), the problem just happens when trying to flash with newflasher, in flash mode.
[Sony Cross-Device General] munjeni:
Hi, since you didn't replied to all my questions how can I help?
[Sony Cross-Device General] farzzy:
Hi, didn't see you edited your message.

I tried again today and the device appeared differently, with the triangle you describe, and the right pid (yesterday it only appeared as a generic usb device called XQ-BT52). After installing the drivers, etc, I was able to flash the stock rom without any issue !

I'm not sure what triggered it to work this time so I'm afraid I cannot help other people with a similar issue ... To be sure it wasn't on the computer's side, I connected it to my other computer and it was recognized as well. I guess I was in the wrong mode yesterday then, but I had the green light so I'm surprised this was not flash mode...

Anyway, thanks a lot for the help, and for maintaining that wonderful tool !
[Sony Cross-Device General] munjeni:
Version 55 is out!
[Sony Cross-Device General] lottary:
--------------------------------------------------------

newflasher.exe v52 by Munjeni @ 2017/2020

--------------------------------------------------------

Determining available free space by GetDiskFreeSpaceEx:

Available space to caller = 12690 MB

Total space on current drive = 75841 MB

Free space on drive = 12690 MB

Optional step! Type 'y' and press ENTER if you need GordonGate flash driver, or type 'n' to skip.

This creates GordonGate driver installer in the same dir with newflasher.exe!

n

Device path: \\?\usb#vid_0fce&pid_b00b#5&263077b1&0&4#{a5dcbf10-6530-11d2-901f-00c04fb951ed}

Class Description: Sony sa0200

Device Instance Id: USB\VID_0FCE&PID_B00B\5&263077B1&0&4

Do you want to keep userdata? Type 'y' and press ENTER to confirm, or type 'n' to erase userdata.

n

Reboot mode at the end of flashing:

typa 'a' for reboot to android, type 'f' for reboot to fastboot, type 's' for reboot to same mode, type 'p' for poweroff, and press ENTER.

a

Optional step! Type 'y' and press ENTER if you want dump trim area, or type 'n' and press ENTER to skip.

Do in mind this doesn't dump drm key since sake authentifiction is need for that! But it is recommend to have dump in case hard brick!

n

ERROR: GetOverLapped_out_Result: failed with error code 1 as follows:

Incorrect function.

- Error write! Need nBytes: 0x18 but done: 0x0

nBytes[0x0]:

- Error writing command getvar:max-download-size!

ERROR: GetOverLapped_out_Result: failed with error code 1 as follows:

Incorrect function.

- Error write! Need nBytes: 0x8 but done: 0x0

nBytes[0x0]:

- Error writing command continue!

Closing device.

Press any key to continue . . .

-------------------------------------

Xperia 5 iii

How to fix this error?
[Sony Cross-Device General] Rachsutha:
update driver
[Sony Cross-Device General] munjeni:
https://xdaforums.com/t/tool-newflasher-xperia-command-line-flasher.3619426/post-72610228
[Sony Cross-Device General] lottary:
Sorry but I couldn't find any solution on the link. I have deleted sony pc companion and reinstalled it from my xeria 5 iii but same problem happened.
[Sony Cross-Device General] munjeni:
ERROR: TIMEOUT: failed with error code 997 as follows:

Overlapped I/O operation is in progress.

FIX --------> https://xdaforums.com/t/tool-newflasher-xperia-command-line-flasher.3619426/post-84603931

You have possible problem with:

1. windows

2. drivers

3. usb cable

4. pc usb port

5. phone usb port

Check all five things! If you can't get it work on your own pc try somebody else, also try another cable, check for dust inside usb port on phone side... etc, hope this help.
[Sony Cross-Device General] crustier:
I bought that one cheap Xperia 5 II on Ali.

How to find out if it was unlocked & relocked before? There're Android 12 version before latest update.

In security tab under service menu i have:

Rooting status NOT_DONE

Has ever been unlocked No

But one exception - on list Key Provision daemon i have SOTER ATTK NOT APPLICABLE (don't know what that is and Google not helping, only leads to github page of Soter function which detects attacks by the network?). All other keys PROVISIONED.
[Sony Cross-Device General] Aqq123:
"ATTK" is likely "attestation key" and "Soter" likely refers to Tencent's garbage that is only used in China: https://github.com/Tencent/soter#a-quick-look-at-tencent-soter

Just a guess but maybe you have a Chinese firmware flashed on a device originally from another region and that's why it's showing like that. Anyway, I don't think there's anything to miss. In fact, I'd be glad to see "not applicable" with regard to this if I were you.
[Sony Cross-Device General] munjeni:
Attest keys get missing when original persist partition get flashed! You must always need to have original persist partition dump otherwise you will miss atestation keys probably 4ever, more info https://xdaforums.com/xperia-xz1-compact/help/android-attest-key-lost-bootloader-t3829945
[Sony Cross-Device General] go0:
Can newflasher "dump"/backup the ROM currently on an xperia? As in, copy from phone to PC hard drive so it can be restored to whatever state it is currently in if you need to?
[Sony Cross-Device General] munjeni:
It can not!
[Sony Cross-Device General] go0:
Thanks for the quick reply. Is this functionality planned? Is there any other tool to do this? The only guides I've found are very old (so unclear if they still apply) and require root (which would be fine AFTER the backup, but not BEFORE).
[Sony Cross-Device General] munjeni:
I'm not planing to make something like that. You should root your phone first than use DD to dump internal strorage completely, for more info please use search, I'm not very active on xda nor developing something recently, things is changed a lot and I have no idea whats new
[Sony Cross-Device General] go0:
Thanks for the advice, I was planning on trying to use a recovery to back everything up but I keep soft bricking my phone following instructions like these . Newflasher has saved my butt already 3 times in 3 days now. I can't get neither recovery nor GSI flashed on these devices. (pdx206 and 225)
[Sony Cross-Device General] munjeni:
If you flash something which is not "stock" than you must unlock bootloader. Also search about "rollback protection"!
[Sony Cross-Device General] NSH021:
Optional step! Type 'y' and press ENTER if you need GordonGate flash driver, or type 'n' to skip.

This creates GordonGate driver installer in the same dir with newflasher.exe!

n

Device path: \\?\usb#vid_0fce&pid_b00b#5&37e1b124&0&1#{a5dcbf10-6530-11d2-901f-00c04fb951ed}

Class Description: SOMC Flash Device

Device Instance Id: USB\VID_0FCE&PID_B00B\5&37E1B124&0&1

ERROR: Error CreateFile! failed with error code 5 as follows:

Access is denied.

Press any key to continue . . .

Getting this error on my xperia 5 I, this is after I used xperia companion software repaire
[Sony Cross-Device General] munjeni:
You must exit sony pc companion otherwise newflasher can't use usb driver which is in use by sony pc companion!
[Sony Cross-Device General] NSH021:
tq very much it worked
[Sony Cross-Device General] OhayouBaka:
So having got my Xperia 1 IV, I can confirm that Newflasher is working as expected albeit with one notable exception. You will need to set your active slot to A via newflasher before flashing the firmware. newflasher set_active a Otherwise you'll run into an endless bootloop. I assume this might apply to other MK4 gen devices as well? I didn't have to do this with my Xperia 1 III.
[Sony Cross-Device General] Emba4:
you wouldnt happen to know if theres a way out of tat loop would you? if i issue set-active a now it just gives:

Writing command: set_active

ERROR: GetOverlapped_in_Result: failed with error code 31 as follows:

A device attached to the system is not functioning.
[Sony Cross-Device General] grmsk:
Could someone kindly tell what I am doing wrong?

I decided to flash Xperia 1 III XQ-BC72 from customized RU to customized SEA firmware. I bought used phone and it was reset to factory settings. The system suggested to download and apply updates. Instead, I downloaded firmware through XperiFirm and flashed the phone through Newflasher. Newflasher flashed the phone without errors. When booting the phone shows SONY logo for a second, blinks green light a few times, reboots and goes into loop. After fifth reboot the phone shows ‘your device is corrupt it can't be trusted’ message and turns off. After I reflashed it with Newflasher back to customized RU which I also downloaded through XperiFirm the same problem remains as well as with customized TW. What am I doing wrong? How should I repair the phone?

Edit: I am using PC with Windows 10 and Newflasher v 55.
[Sony Cross-Device General] xdauserart:
Thanks for this tool.

UPDATE: I found the fix to the problem below. I needed to start device in Flash mode (volume down) instead of Fastboot mode (volume up).

How can i run it for Xperia 10 II? Now the device shows "You device is corrupted. .. .Will turn off in 5 sec".

1. I build newflasher' with make for 55 version.

2. Copied it to directory with vbmeta* files.

3. I run `.\newflasher` it shows:

--------------------------------------------------------
newflasher v55 by Munjeni @ 2017/2020
--------------------------------------------------------

Determining available free space:

Available space to caller = 222503 MB
Total space on current drive = 479363 MB
Free space on drive = 246926 MB
cannot open /dev/bus/usb/004/001 for writing
cannot open /dev/bus/usb/003/001 for writing
cannot open /dev/bus/usb/002/001 for writing
cannot open /dev/bus/usb/001/004 for writing
cannot open /dev/bus/usb/001/003 for writing
cannot open /dev/bus/usb/001/002 for writing
cannot open /dev/bus/usb/001/001 for writing

No usb device with vid:0x0fce pid:0xb00b !

But in `dmesg` it is:

[11726.569389] usb 1-1: New USB device found, idVendor=0fce, idProduct=0dde, bcdDevice= 1.00
[11726.569403] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[11726.569409] usb 1-1: Product: Android
[11726.569414] usb 1-1: Manufacturer: Google
[11726.569417] usb 1-1: SerialNumber: QV7225V43A

So i guess pid is wrong (should be 0x0dde), right?

Update. The same with `sudo`
[Sony Cross-Device General] munjeni:
Thats rollback protection inside device, mean you can't flash older firmware only newer one than currently you have on phone! Search xda for fix, don't ask please here, its tousand of time reported in this thread which have nothing to do with rollback protection
[Sony Cross-Device General] munjeni:
No usb device with vid:0x0fce pid:0xb00b, that mean you need pid 0xB00B! You are probably in fastboot mode (power+volumeup), but you need to be in flash mode (power+volumedown)!
[Sony Cross-Device General] joeminati:
@xdauserart

I kept getting the same error only after just flashing a firmware that was corrupt due to a older firmware. Afterwards, phone would not detect in Flash/Fastboot and Xperia Companion.

Was able to fix this by actually rebooting the computer and the phone was recognized once more.
[Sony Cross-Device General] joeminati:
Anyone one know the new flasher command to factory reset / erase all?

After flashing US firmware, I would like to factory reset Xperia 1 IV, and the corrupt message came up. It may work by factory resetting but the corrupt message prompts immediately and is unable to get into recovery mode.

Thanks

Update: Nevermind. I was able to flash the latest US firmware on Xperia 1 IV CT72.

I knew it was a firmware rollback issue but was impatient.
[Sony Cross-Device General] haga22:
I got rollback protection issue: "Your device is corrupt..." on my 5 ii. I wanna unlock bootloader -> repair -> relock. But i can not open USB Debug and OEM unlock bcs i can not boot into setting. What should i do buddies? :'(

Edit:

never mind. Prob solved
[Sony Cross-Device General] JUNAID-IQBAL:
how to boot into flash mode in sony xperia xz3 ?
[Sony Cross-Device General] ForTheKerWIN:
turns out it is a bad USB cable
[Sony Cross-Device General] grmsk:
Thank you! Though the answer was in this thread.

In my case I had to set in terminal command newflasher.exe set_active:a and then by separate command set newflasher.exe

It worked like a charm and I managed to flash SEA firmware as I initially intended.

Thank you again for this programme.
[Sony Cross-Device General] LadFromWales85:
I've used your tool to flash Customized EU/UK onto my O2 UK Xperia 1 IV.

Phone has booted up and appears to be working fine, but I do get an error when flashing bootdelivery

Processing boot delivery...

Found boot_delivery.xml in boot folder.
- Boot delivery version: 8450-0001
- Verifying if boot delivery match with device...
searching for: PLATFORM_ID="001870E1";PLF_ROOT_HASH="CE738EFA78393FA07CAE66C2DCA711449BC36B3AB78734713A7FB08527E7DAAEEE1833BFD6EEDB2ABD968FBA981B5B35"
Didn't found bootdelivery that match your device!

Any ideas? :)
[Sony Cross-Device General] munjeni:
Probably O2 branded bootloader hash do not match that bootdelivery we searching for, so it not allowing to reflash bootloader with another provider/nonprovider bootloader, I realy don't know! Look into your boot-delivery.xml file, you will notice few diferent configurations and few diferent bootloader.sin files, newflasher determines which one to flash trought PLATFORM_ID and PLF_ROOT_HASH information from your phone and search for right bootloader.sin file trought boot-delivery.xml file, if it didn't find than that have two meanings, 1. there is no such sin file, 2. there is no right configuration for your device! Do not try to flash by yourself those critical sin files otherwise you will face hard brick in most case!