yashsingh1/xdaforums huggingface dataset:
[Sony Cross-Device General] munjeni:
see diferencie between xperia 5 II fwinfo.xml and my xperia 10 fwinfo.xml:

<?xml version="1.0" encoding="utf-8"?>
<fwinfo>
<project>PDX-206</project>
<product>Xperia 5 II dual</product>
<model>XQ-AS52</model>
<market>Europe</market>
<operator>Customized EEA</operator>
<swVer>58.0.A.22.21</swVer>
<custId>21598569</custId>
</fwinfo>

<?xml version="1.0" encoding="utf-8"?>
<fwinfo>
<project>Kirin</project>
<product>Xperia 10 dual</product>
<model>I4113</model>
<market>EU</market>
<operator>Customized EU</operator>
<swId>1318-6120</swId>
<swVer>53.1.A.3.85</swVer>
<cda>1317-7500</cda>
<cdfVer>R12C</cdfVer>
<fsVar>GENERIC</fsVar>
</fwinfo>

Missing cda, cdf and fsvar in xperia 5 II, even xperifirm have no firmwares for xperia 5 II, probably sony server completely missing fw for your phone model too? So sony pc companion giving error probably because of missing fw on sony server? I can implement thing in newflasher but since missing information for xperia 5 II I curently can't implement for xperia 5 II . Where you found firmwares? Xperifirm giving error "invalid cdf list received" on all 5 models of the xperia 5 II ...
[Sony Cross-Device General] churchner420:
Ok lol I can download the Xperia 5 II firmwares on XperiFirm with no problem. Btw Xperia Companion worked fine before I flashed anything with newflasher... So the files are there. Would be really nice if you could implement something into newflasher. That would be awesome. Btw there was a new XperiFirm update to add compatibility with the be 5 II stuff (v 5.5.0). In that one the developer said cda info was dropped cause the newer devices won't have that anymore. Just have a look at the changelog in the XperiFirm xda thread
[Sony Cross-Device General] munjeni:
Ok found it in 5.5.0, all firmwares including xperia 10 don't use cda anymore. Related to newflasher sorry I can't implement it, I no want to make a mess between firmwares with/without cda info, in my opinion it's not need at all, newflasher worked for about 4 years without writing CUST and FS version to trim area without any problem, before newflasher xflasher done the same for about another 3 year, so in 7 years there was apsolutly no need to write anything into trim area other than those .ta files from firmware and I will not implement further anything in relation to it, its not need. More thing on this, newflasher will remain simple-to-use primitive flashing tool with fully minimal implementation, what is important in newflasher is just flashing possibility and nothing more. If somebody need CDA & CDF trim area write possibility fill free and create batch file to read info from firmware xml files and convert it to .ta file for use with newflasher, I will not impement and waste my time with it.

I'm believing you have doing something nonstandard (as like you told you have using non existing UK firmware) and you do not have logs and anything which can help me identify isue, so I can't help. Also some peoples from this two-three pages reported isue but didn't further confirmed anything, this make me think that he figured out thing and got it working. There is no point in commenting and speculating further. You should repeat failed EEA flash this way: switch to slot A, reboot, flash EEA, switch to slot B, reboot, flash EEA, switch to slot A, reboot, than try boot, let me know. You should use set slot batch files from attachment, put it in the same folder with newflasher, double click setslot_a to switch to slot a or setslot_b to switch to slot b. Nothing work -> give me booth log & trim area dump -> I get a look. Can I get screen shoot from failed sony pc companion?
[Sony Cross-Device General] frozenwaffles:
hmmm ok i have done that... but i will try it again just to be sure.

thankyou!
[Sony Cross-Device General] frozenwaffles:
Hi, ok i have just done this. please see the output. still not working...
[Sony Cross-Device General] churchner420:
Ok thanks for that. I will try it again when a new firmware comes out for EEA. Cause when I will try it to fix the next time I want it to work when I am finished cause I really need my device and can't reset it every day
[Sony Cross-Device General] munjeni:
Ok, my hope I helped a bit
[Sony Cross-Device General] churchner420:
Yes I think so. But again flashing the old EEA firmware does not work. When I try your steps flashing the firmware to both slots I can only use the latest build number or the device won't even boot because of the corruptions screen that automatically powers off the device after 5 sec.

I recommend you take a proper look at the 5 II cause even Sony said that they changed something with the way they put together the firmware and with the way the firmware is downloaded from XperiFirm. Can you maybe talk to the XperiFirm dev and ask him for help? He probably knows what's going on when you tell him that changing to another area like from EEA to UK doesn't work. The Sony changes were the reason why he needed to release an update for XperiFirm just for the Xperia 5 II cause Sony doesn't handle it like the 1 II and 10 II.
[Sony Cross-Device General] munjeni:
I actualy can't ask anybody since I have no idea what you have flashing. Did you folowed steps carefuly e.g. reboot (important) after switching to another slot? Did you saved logs? I'm unable to tell you anything without logs! I need booth newflasher log & trim area dump (do in mind dump AFTER unsucesfull boot because I need to see why your device unable to boot). Here is two-three peoples having problems with xperia 5 II & newflasher, I still don't think problem is newflasher. Problem might be old firmware, I don't know.
[Sony Cross-Device General] churchner420:
Man, the problem is I can't even reboot after I flashed EEA. It goes straight into the corruption screen... Therefore I have to stay on UK (sort of cause it still shows EEA although it's the latest boot number). And I flashed the firmwares just as I flashed every other device before. I am telling you man, the Xperia 5 II is cursed cause Sony changed sth significantly...
[Sony Cross-Device General] jdilla1987:
Hey all,

Big thanks to @churchner420 and @munjeni for continuing the discussion on the 5 ii.

Apologies for the late reply. I've read all the updates since I initially posted and I'm assuming it's an issue with how Sony(or XperiFirm) handles the firmware for the 5 ii? Since it's missing cda, cdf and fsvar...

When I flashed my phone, I went through the logs fairly thoroughly and didn't see an error messages. Even when I flash the older 58.0.A.22.21 versions, I don't get any errors. It seems like it's a successful flash until I try booting up the phone.

Like churchner420 said, I need my phone functioning for work purposes so I didn't have time keep re-flashing.

I will try to provide the log, ta dump when I get the chance.

So slots A and B both need to be flashed?

Sorry for the ignorance. Last time I messed with flashing firmwares this step did not exist.
[Sony Cross-Device General] churchner420:
Hey man, thanks to you as well for sticking around too. Yep, the issues are definitely caused by the new way Sony is handling things with the 5 II. What one needs to acknowledge is that flashing the Xperia 5 II isn't as easy as it was with the predecessors.
[Sony Cross-Device General] munjeni:
No! Newlfasher never depended on cda, cdf and other things! Those things is related for xperifirm only because sony changed a way about file structures on their server, so xperifirm is updated because newer changes on sony server no more use those cda info while downloading/searching for firmware, it have nothing to do with newflasher!

Again, no logs and I have no idea. Both slots probably need to be flashed (for test purpose) because of sin files with "other" name always going to the diferent slot, e.g. your phone active slot is A so sin files with "other" getting flashed to slot B, it working like that from the first public newflasher version, so probably something is changed now for xperia 5 mark 2 and probably those sin files "other" need to be flashed in the same slot (I'm just guesing), so to be able to try that after flashing to slot A you can try to switch to slot B, reboot to bootloader again (important step because you are still on slot A until reboot), reflash the same firmware while on slot B, than switch again to slot A, reboot to bootloader again (important step because you are still on slot A until reboot), reflash firmware again, in that case sin files with "other" will be in booth slots A and B, thats just for test! If that work I will need to update newflasher for xperia 5 II, right now I have no idea why your devices unable to boot after flashing, and I don't have your logs to be sure. Relation to ta dump I will need ta dump after unsucesfull boot! Don't give me ta dump before booting! So flash first, boot it, if it fail to boot put your phone into bootloader mode and dump ta right now after unsucesfull boot, give me by pm
[Sony Cross-Device General] munjeni:
You can't reboot? How than you flash back UK firmware? You just need to press volume down button to enter into bootloader mode, thats all about reboot. I asking for one more time, give me please newflasher log from EEA and also ta dump after unsucesfull boot, otherwise I realy no want to waste my time. Read post 1425 carefully please!
[Sony Cross-Device General] churchner420:
Ok, yes, guessing is indeed what we need cause we don't know how the 5 II works yet. I will try the steps you suggested as soon as possible and if it doesn't work I will give you a ta dump after the corruption screen.
[Sony Cross-Device General] munjeni:
Don't forget neflasher log too
[Sony Cross-Device General] churchner420:
@munjeni can you maybe give me a test version of a ne

Where does newflasher save that one?
[Sony Cross-Device General] munjeni:
It doesn't save, but you can do right click on top of window, select all or copy all
[Sony Cross-Device General] churchner420:
Ok man I have tried everything again. This time following your exact steps. But the results are the same. UK firmware shows GLOBALEEA in the service menu and the phone cannot be repaired by Xperia Companion and EEA firmware doesn't even boot at all. I have attached logs from flashing EEA to both slots (yes, I rebooted to bootloader after switching slots) and from flashing UK to one slot at the end. After I flashed EEA I also got a ta dump which is attached as well. After flashing EEA to both slots (before flashing UK) I tried to repair the phone with Xperia Companion and it reported back the same message (temporarily incompatible device) AND when giving me this message it still shows the newer UK build number which is still odd. I attached a screenshot for you. As before I flashed UK again being the only one the boots although it still shows GLOBALEEA. I really hope you've now got everything to fix the issue
[Sony Cross-Device General] frozenwaffles:
hi, yes here is the output from the first command:

C:\XPERIA Flashing\XQ-AU52_Customized SEA_59.0.A.10.5-R4A>newflasher Get-ufs-info

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

newflasher v36 by Munjeni @ 2017/2020

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

Determining available free space by GetDiskFreeSpaceEx:

Available space to caller = 23257 MB

Total space on current drive = 487739 MB

Free space on drive = 23257 MB

Device path: \\?\usb#vid_0fce&pid_b00b#8&211607db&0&2#{a5dcbf10-6530-11d2-901f-00c04fb951ed}

Class Description: SOMC Flash Device

Device Instance Id: USB\VID_0FCE&PID_B00B\8&211607DB&0&2

Writing command: Get-ufs-info

got first reply[0x19]:

00000000 46 41 49 4C 43 6F 6D 6D 61 6E 64 20 6E 6F 74 20 FAILCommand not

00000010 73 75 70 70 6F 72 74 65 64 supported

got fail reply: FAILCommand not supported

Closing device.

Press any key to continue . . .
[Sony Cross-Device General] churchner420:
I surccessfully repaired the 5 II with Xperia Companion cause the EEA firmware has been updated to the same build number as UK. So I was right from the beginning. I could not repair my device due to it being stuck between old EEA and the latest UK build number. Although I flashed UK it was still visible as EEA in the service menu but with the latest UK build number. Xperia Comopanion could not detect the device anymore because the latest EEA firmware wasn't released yet. Now that it is, the device could be repaired as usual.
[Sony Cross-Device General] munjeni:
Thanks! What I have found is this:

load_and_verify_vbmeta:657: ERROR: vbmeta_a: Image rollback index is less than the stored rollback index.

What I know is vbmeta is used for integrity verification check e.g. integrity of the boot chain, but it looks like vbmeta from your current firmware doesn't match firmware! Try another firmware or wait some recent updates, other than that I realy have no idea how to help you.

00000AF1 000C 47 4C 4F 42 41 4C 45 45 41 2D 41 32 -> GLOBALEEA-A2

Relation to GLOBAL EEA, what I have found is this string: GLOBALEEA-A2 , is this what you see inside service menu? I think it have nothing to do in relation to sony pc companion failure, I'm believing sony pc companion fail because of failed vbmeta integrity check e.g. sony pc companion think that your device is customised e.g. unlocked, we know sony pc companion fail when device is unlocked so probably sony pc companion have some more other mechanism to check some more things, I don't know. Your log clearly state that vbmeta and vbmeta system is flashed sucesfully, but at the end in your trim area dump we clearly see message about vbmeta rolback index... so again I can say its in most case a firmware isue!
[Sony Cross-Device General] munjeni:
@frozenwaffles thanks! Today I will update newflasher and make new version!
[Sony Cross-Device General] churchner420:
Yes "GLOBALEEA-A2 user" is what it says in the service menu, even after the software repair. Hope you could figure out what the problem is and update newflasher to a new version.
[Sony Cross-Device General] churchner420:
Does that fix all the XQ-AS52 problems and allow us to switch to any other firmware properly?
[Sony Cross-Device General] munjeni:
No, see post 1435! Its not newflasher isue! What I have done now is added support for xperia 5 II with emmc instead of ufs, autodetection, I didn't fixed anything related to GLOBALEEA, its not need at all! Even sony pc compnion didn't change GLOBALEEA string. Even there is no mechanism to extract those information from firmware e.g. GLOBALUK-A2 string from firmware trought newflasher, its simply not possible and no need at all, its just phone cosmetic thing and can be changed easy by making your own ta file.

If you realy need to change it to GLOBALUK-A2 create ta file with name e.g. mycust.ta add this than flash only those ta file:

02

00000AF1 000B 47 4C 4F 42 41 4C 55 4B 2D 41 32
[Sony Cross-Device General] munjeni:
New version is out!

- version 37 (09.12.2020)

Added support for Xperia 5 II with emmc instead of ufs

@frozenwaffles let me know with version 37. Do in mind you might get bootloop like churchner420 because of firmware isues on xperia 5 II, read post 1435 please before you proced, you should try diferent firmwares if one of it have bootloop!

Sorry not yet right calculation, will try reimplement tommorow!
[Sony Cross-Device General] jdilla1987:
Yes this was the exact issue I was having. Now that EEA has caught up to 58.0.A.28.25, Sony Companion recognizes my phone again. I just re-flashed slots A and B using the steps munjeni recommended and now I was able to restore my phone with the Sony app. For the time being, I'm just gonna stay on stock as I don't want to go through that again. Thanks again for your insight.
[Sony Cross-Device General] munjeni:
Hi, see post 1435, I have found what cause boot loop on your devices, vbmeta.sin image on those firmwares you tried have old rolback index, that cause boot loop by this error:

load_and_verify_vbmeta:657: ERROR: vbmeta_a: Image rollback index is less than the stored rollback index.

Now I'm believing sony fixed isue and made update. I can't tell for sure but there is possibility that old firmware can't be flashed over new firmware, aka rolback protection, this need to be confirmed! Where is rolback stored index I have no idea, you guys should open threads in xperia 5 II forum and open discusion related to it to involve more devs! Flashtool is not working for xperia 5 II ?? More info about rollback protection -> https://www.xda-developers.com/android-pie-rollback-protection/

Thats excatly what you have facing with UEE firmware ;)
[Sony Cross-Device General] frozenwaffles:
Thankyou! Im very grateful. Does it matter if my phone is unlocked? i tried to do the SONY Open devices program to get Andoird 11 on my phone, but im having trouble building the files for this...separate issue.

should i relock the bootloader before i flash with your software?
[Sony Cross-Device General] munjeni:
Version 37 is out but I had mistake in it and it will not be able to flash partition on emmc based devices as like yours one. I will try to figure out thing in next few days. No you no need to relock bootloader. Can you tell me what is a size of your internal phone storage?
[Sony Cross-Device General] munjeni:
Version 38 is out!

- version 38 (10.12.2020)

Fixed impropper implementation from v37

Now autodetection for proper partition sin file flashing might work on xperia mark 2 devices with emmc storage, let me know! @frozenwaffles please try and let me know!
[Sony Cross-Device General] frozenwaffles:
Hi, new issue. See attached...

How do i relock my bootloader?

(please note i labeled the txt file wrong for the version. i used v38.
[Sony Cross-Device General] munjeni:
Its probably connection isue (e.g. you have moved phone and lost usb connection), I'm double checked latest implementation against your log, all is ok and it will work I'm sure please try one more time. Take in mind, when you flash latest build you will not be able to flash old builds because of rolback protection! For idea about rolback protection read post 1443. Regarding "how to relock bootloader" here is some info -> https://xdaforums.com/t/guide-win10...g-with-magisk-and-flashing-firmwares.4177209/
[Sony Cross-Device General] frozenwaffles:
Hi Munjeni, sorry but this is still not working. I have tried another cable. another USB port. I have removed every bit of software and drivers to do with phones from my PC and rebooted and then started again..... still no good :(

My phone has also not disconnected.

What do you suggest?

I have attached a copy of the log file from flashtool incase this helps...
[Sony Cross-Device General] munjeni:
Thanks for flashtool log. Whats not working? In case newflasher not working I need newflasher log. I can see flashtool giving error null on bootdelivery whatewer that mean, is your firmware complete?
[Sony Cross-Device General] frozenwaffles:
Same problem as before...
[Sony Cross-Device General] munjeni:
How is that possible, it doing excatly the same as command Get-emmc-info. Can you try one more time and post newflasher log? What is a contents of your partition folder? Try disable antivirus/firewall
[Sony Cross-Device General] munjeni:
Ok, since newflasher use asynchonous usb bulk transfer/receive probably isue might be delay while newflasher print information about emmc info raw data and later emmc size on main screen so instead of OKAY reply those print screen delay caused newflasher to too late catch/not catch at all OKAY reply so instead receive timeout. Here is test version, let me know please. Don't forget neflasher log. I'm believing it can't be problem at all since priting informations is in microsecconds, even there never was a problem even with full debug logging in newflasher, but let see
[Sony Cross-Device General] frozenwaffles:
here is the terminal output from newflasher. is there a log file somewhere?

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

newflasher.exe v39 by Munjeni @ 2017/2020

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

Determining available free space by GetDiskFreeSpaceEx:

Available space to caller = 32801 MB

Total space on current drive = 487739 MB

Free space on drive = 32801 MB

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 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&31fdc72b&0&1#{a5dcbf10-6530-11d2-901f-00c04fb951ed}

Class Description: SOMC Flash Device

Device Instance Id: USB\VID_0FCE&PID_B00B\5&31FDC72B&0&1

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

Product: XQ-AU52

Version: 0.4

Bootloader version: 1320-2835_X_Boot_SM6125_LA2.0_Q_31

Baseband version: 1320-5254_59.0.A.8.33

Serialno: QV72175E3A

Secure: yes

Loader version: XFL-SEINE-SM6125-6

Phone ID: 0000:35506911185080,0000:35506911185081

Device ID: 5EC2136B

Platform ID: 0010A0E1

Max download size: 104857600

Sector size: 512

Rooting status: ROOTABLE

Ufs info: FAILUfs-info not supported

Emmc info: MICRON,0x014e,0x0

Default security: ON

Keystore counter: 2

Security state: tngQ2KuUgbJtI1o+OUezGv+Fj+32DiX+1mR4F3fq8iI=

Sake root: 502950A129F14DC3088D2DE18CDC

S1 root:

Root key hash: 1A4D7D6FFD8836E254191ED3CE06D771DBEA36760505A0CBD218DB9DDB705157BD12502950A129F14DC3088D2DE18CDC

Slot count: 2

Current slot: a

Device is put now in flash mode.

Repartitioning...

Found partition_delivery.xml in partition folder.

Determining EMMC size...

ERROR: TIMEOUT: failed with error code 997 as follows:

Overlapped I/O operation is in progress.

Set slot 'a' active.

Device is put now out of flash mode.

Sent command: continue.

Done.

Closing device.

Press any key to continue . . .
[Sony Cross-Device General] munjeni:
Good news, found isue in https://xdaforums.com/t/tool-newflasher-xperia-command-line-flasher.3619426/post-84084615

OKAY reply in the same raw data packet, thats crazy. Here is how it working normaly

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

I will try something today
[Sony Cross-Device General] munjeni:
Version 39 is out!

- version 39 (13.12.2020)

Since mark 2 devices protocol is changed a bit and on some devices OKAY reply is not in separated usb poacket, instead it is merged with data packet, added support for it

@frozenwaffles let me know & give me log please!
[Sony Cross-Device General] frozenwaffles:
ITS FLASHING!!!!!! :)

I'll report back if the phone works.... should i flash the 'persist' area?
[Sony Cross-Device General] frozenwaffles:
OK, phone is booting and i'm setting it up. thankyou so much!
[Sony Cross-Device General] hzj19960112:
I noticed a problem,I buy a CN version X5M2 (XQ-AS72)but I don't like CN fw,so I flashed SEA fw,then I see xpericheck.com has new fw version,but some days later I still can't get OTA,and I noticed some HK version user flash to CN fw can't get latest CN fw OTA too,I guess it's not only me have this problem.My English is not good,very sorry.I can't test anymore, because I manual flashed latest SEA version,then I use Xperia companion try to fix it,should be flash SEA fw,but I check the Xperia companion logs,and check the path,It's downloaded still CN fw,that's all...
[Sony Cross-Device General] huan10051988@gmail.com:
Run the tool but it says like this, the driver got ok as shown above. Please guide how to fix it.
[Sony Cross-Device General] munjeni:
Hi, you using wrong tool! Instead of newfasher you need xflasher!! -> https://xdaforums.com/t/tool-xflasher-xperia-command-line-flasher-for-pre-2017-devices.2986634/ or better do it with flashtool if you think xflasher is hard for understanding