yashsingh1/xdaforums huggingface dataset:
[Sony Cross-Device General] munjeni:
Hi, can you try flash only dsp sin file? For me it looks like you have usb cable isue because as you can see https://github.com/newflasher/newflasher/blob/master/newflasher.c#L1656 your log show that line 1657 is missing in your log " Error writing download command " which seems indicate that your usb cable lost connection and cause interuption in usb transfer. If flashing only dsp give you the same isue than I will try to enable more debug logs in newflasher just for you to test, but first let me know what is happening while flashing only dsp!
[Sony Cross-Device General] wnijiko:
I use the original data cable. I tried several times, everytime the new flasher stopped at the dsp.sin,so I flashed the single dsp.sin, the same error occured,now Im using the android 11 but the mic and speakers have no sound when make a phone call or what's app call
[Sony Cross-Device General] munjeni:
Can you show me full log while flashing only dsp?
[Sony Cross-Device General] wnijiko:
this is the full log flashing only dsp

--------------------------------------------------------
newflasher.exe v40 by Munjeni @ 2017/2020
--------------------------------------------------------

Determining available free space by GetDiskFreeSpaceEx:

Available space to caller = 10699 MB
Total space on current drive = 141795 MB
Free space on drive = 10699 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.
p

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#8&3a6eeffa&0&1#{a5dcbf10-6530-11d2-901f-00c04fb951ed}
Class Description: SOMC Flash Device
Device Instance Id: USB\VID_0FCE&PID_B00B\8&3A6EEFFA&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-AS72
Version: 0.4
Bootloader version: 1320-2827_X_Boot_SM8250_LA2.0_R_107
Baseband version: 58.1.A.1.178
Serialno: QV7208H752
Secure: yes
Loader version: XFL-EDO-SM8250-16
Phone ID: 0000:35,0000:35
Device ID: C8
Platform ID: 200C30E1
Max download size: 104857600
Sector size: 4096
Rooting status: ROOTABLE
Ufs info: SAMSUNG,KLUEG8UHDB-C2D1,1000
Emmc info: FAILEmmc-info not supported
Default security: ON
Keystore counter: 2
Security state: 9hVHs82HDVbmXdpJ3fHpaod1NV4/GQSuzrwwyrEcD9s=
Sake root: 19408654C25217EDC7BEF2FED8FB
S1 root:
Root key hash: 502D5117AE7B00D9F89E4EAE078EE07D347F313333898EB57EB909BDA341D53D477719408654C25217EDC7BEF2FED8FB
Slot count: 2
Current slot: a

Device is put now in flash mode.

No .sin files in partition dir...
You must extract partition.zip into 'partition' folder if you want flash partition image!
On 2018 and UP models you must move partition sin files to 'partition' folder if you need flash partition images!

Processing .sin files...
Created ouput folder flash_session

Processing dsp_X-FLASH-ALL-2389.sin
- Extracting from dsp_X-FLASH-ALL-2389.sin
- Extracting signature dsp.cms
- Uploading signature D:\Software\Xperia 5 II\dsp\flash_session\dsp.cms
signature:0000088f
OKAY.
- Extracting sparse chunk dsp.000
- Uploading sparse chunk D:\Software\Xperia 5 II\dsp\flash_session\dsp.000
download:04000000
ERROR: TIMEOUT: failed with error code 997 as follows:
Overlapped I/O operation is in progress.
- Error write! Need nBytes: 0x200000 but done: 0x0
nBytes[0x0]:

Error uploading chunk 7!

ERROR: TIMEOUT: failed with error code 997 as follows:
Overlapped I/O operation is in progress.
- Error, no set_active:a OKAY reply!
Sent command: powerdown.
ERROR: TIMEOUT: failed with error code 997 as follows:
Overlapped I/O operation is in progress.
Error, no powerdown response!
Closing device.
Press any key to continue . . .
[Sony Cross-Device General] mak6021:
Help, run the program, a, n, n

And nothing's happening.

End of the download error

Something is connected to the Download max

?

Sony xz2

Like, the write maximum size is higher.

Is it possible because I have one sim and I was stitched from two xz2 sim machines?
[Sony Cross-Device General] Saiphable:
I tried downgrade , and All is ok, but only Mark 1
[Sony Cross-Device General] munjeni:
No log no help.
[Sony Cross-Device General] munjeni:
This looks like the same isue like this -> https://xdaforums.com/t/tool-newflasher-xperia-command-line-flasher.3619426/post-84084615 (caused by OKAY reply in the same packet), I will try to fix that! I'm made more debug logging inside newflasher version just for your situation, try one from attachment with only dsp flasing and please give me log!
[Sony Cross-Device General] Meloferz:
before my Xperia 10 II was updated to android 11, this message was shown, and there is a message about downgrading.

i'm curious now, if we unlock the bootloader and we want to try a ROM based on Android 10, i think that we will not able to boot it, right?
[Sony Cross-Device General] munjeni:
See this post https://xdaforums.com/t/tool-newflasher-xperia-command-line-flasher.3619426/post-84309899 , based on my analyse oem lock reset rollback index so probably you can bypass rollback protection that way. Do in mind its curently untested and somebody need to confirm!
[Sony Cross-Device General] munjeni:
This is not possible to flash xperia xz2 firmware because of diferent signing key, I have no idea how you flashed xperia xz2 fw. Even I have no idea why you getting error "failed to init keystore". You should try flash Customised EU firmware for H9493 first as maybe CN firmware you curenlty trying to flash is somohow not working!
[Sony Cross-Device General] munjeni:
HI, I'm checked almost everything in order to try get idea about problem you have, have found nothing! Your problem is related to transfer_bulk_async function, I have no idea why it fail. Try check SOMC Flash Device driver under device mannager, or try install another gordon gate driver, also try one from newflasher! My driver which I have installed is 3.2.0.0 from date 06.Dec.2017 . Also try another usb cable to be sure problem is not related to cable! Let me know!
[Sony Cross-Device General] Priterms:
Thx, I just tried to flash in other customised firmware of h9493, but still output exactly the same log
[Sony Cross-Device General] munjeni:
It looks like your phone is branded? E.g. locked to e.g. O2, vodaphone...etc. Try branded firmware e.g. from your provider (in case your phone is branded)
[Sony Cross-Device General] munjeni:
This error I see for the fiorst time, even google didn't show results about:

Error, didn't got signature OKAY reply! Got reply: FAILFailed to init keystore

I have no idea what you have done. Can you describe in details how you broke phone and which fw version you have flashed before phone breaked?

@Priterms you should also try to switch to diferent slot! Trought command line you can do it with this command:

newflasher set_active:b

that make sure reboot bootloader by disconnecting usb cable! Than try to reflash rom. Make sure give me log
[Sony Cross-Device General] Priterms:
This phone was bought in China, there is only one customized version of xz3 in China, so it should not be caused by the branded
[Sony Cross-Device General] munjeni:
This error I see for the fiorst time, even google didn't show results about:

Error, didn't got signature OKAY reply! Got reply: FAILFailed to init keystore

I have no idea what you have done. Can you describe in details how you broke phone and which fw version you have flashed before phone breaked?

@Priterms you should also try to switch to diferent slot! Trought command line you can do it with this command:

newflasher set_active:b

than make sure reboot bootloader by disconnecting usb cable! Than connect again and try to reflash rom. Make sure give me log
[Sony Cross-Device General] hupengwei:
need help ,please!

last night i was trying to downgrade to oreo using my PC,when it comes to flash boot,my PC shut down due to electric problem。

i try to reflash firmware and get this.

it seems the newflasher doesn't find my phone,or doesn't recognize it.

i try to check with driver,i don't find any problems.

In device manager,i can see my phone as "somc flash device",but the device id is

USB\VID_0FCE&PID_ADE2&REV_0000

i'm curious about this and how can i recover my phone?
[Sony Cross-Device General] munjeni:
newflasher is for 2017 and up models with pid B00B, if your device is model before 2017 and have pid ADDE than search for xflasher. If your device pid is not b00b or not adde booth tools will not work. Try uninstall & remove somc flash device, reboot and make sure its removed after reboot, than install again.
[Sony Cross-Device General] hupengwei:
i'm pretty sure that my phone was a boob device and it's 2017 and up models,since it's a XZ1c & i've had flash it with newflasher to update it from oreo upto pie sucessfully. i tried reinstall the drive,before the drive was installed it was recongized as a qhusbulk and then it turns to somc flash device.

from one post in xda fourm someone says it is because that you unforunatly lose your bootloader.

i'm afraid that my phone can't be repaired since there's no leak of sony-signed firehose.
[Sony Cross-Device General] munjeni:
You sucesfully changed to slot b but it didn't helped. I am afraid you have faced hardbrick. Try flash only bootdelivery (boot folder) and give me log.
[Sony Cross-Device General] munjeni:
Sorry I have no idea. Try linux newflasher or try somebody pc to be sure problem is not on your windows machine side
[Sony Cross-Device General] wnijiko:
Hi,@munjeni good news,yesterday I used the old usb type-c to type-b cable instead of the original c to c cable,to flash the single dsp.sin,it worked ! So I flashed the full 58.1.A.1.178 firmware,no issues at all, the phone is running normally. Before I flashed,I checked the SOMC Flash Device driver I used before,same as you 3.2.0.0 06.12.2017 .I was wondering what caused the issue,the driver dosen't function well in Thunderbolt 3 usb-C ports or just the type-C cable dosen't match the flash program.But now I can confirm that the newflasher is fine to flash the android 11 in sony mark II device. Thank you very much for helping me sovle the problem.
[Sony Cross-Device General] munjeni:
Don't know what you have done earlier but seems you have nulled keystore on your phone so bootloader unable to verify signature and reject flashing. No go with newflasher. Did you tried sony pc companion to repair phone? Do you getting blue led (fastboot) while confirm newflasher reboot mode f?
[Sony Cross-Device General] munjeni:
Thats good news! I'm believing newflasher need to send command "disable charging" before start flashing, Also I thinking to switch to synchronous usb bulk transfer instead of curent asynchronous usb bulk transfer since usb speed on recent phone models is fast so probably newflasher fail because of that. Can you try your first cable but on usb 2 slot instead of usb 3 slot? I will investigate to implement that in further version
[Sony Cross-Device General] Priterms:
I just tried to repair with xperia pc companion, it shows

"Something went wrong with the software repair

Modified Secure Software detected. This unit cannot be re-flashed with Sony software. Please return unit where it was purchased."

Enter F in newflasher, the phone will restart, but the LED light is still green, and the phone will bootloop and cannot enter fastboot
[Sony Cross-Device General] munjeni:
Than your phone is definitelly dead. What about if you flash xz2 fw, does it work? Only chance for your phone is to somehow get into fastboot mode whatever it is xz2 or your original fw, in that case you would be able to temporary boot an twrp recovery and flash raw partitions e.g. an backup of another phone raw partition (skipping only trim area partition), if you somehow can enter into fastboot mode to boot an twrp you have chance. Is your phone unlocked? If not you will probably need to unlock it maybe something get happen and allow you to flash things regulary. Do you have done something to trim area? Thats strange that you have flashed fw of the xz2 to xz3 phone, its strange because newflasher or any other tool can't bypass signature verification and allow flash fw from diferent phone model, thats apsolutly strange how you have done that. Do you have backup of the trim area? Seccond option is to desolder emmc and proccess things hardware way, and third last option is to buy new mainboard or to send phone to repair centre.
[Sony Cross-Device General] churchner420:
Hello @munjeni and thank you for cintinuously updating this flasher. Is newflasher working properly on A11 firmwares for XQ-AS52 (Xperia 5 II). Since I need my device and really want to use the UK provider firmware with A11 I would like my device to work properly afterwards
[Sony Cross-Device General] churchner420:
Hello, have you tried that with an Xperia 1 II, 10 II or 5 II? Cause newflasher was always working with mark II devices except for the Xperia 5 II.
[Sony Cross-Device General] churchner420:
Is there no way that this could brick my device or corrupt anything else?
[Sony Cross-Device General] churchner420:
Hello @munjeni I have tried to flash my Xperia 5 II (XQ-AS52) to Android 11 with newflasher v40 and I can confirm that it does NOT work at all. Without the partition folder it flashes the firmware BUT the device says it is corrupt and does not boot then. When I include partitions it does not flash at all Here is the log when including partitions and when excluding it. Hope you can sort out the problem
[Sony Cross-Device General] munjeni:
I see problem thanks for log! But right now I do not have free time, hope in next few days I make v41! What I can see LUN0 is twice flashed, last one is flashed but it is wrong (have no free time to check why it got flashed). Soon! You shold delete partition-image-LUN0_249896960_X-FLASH-ALL-2389.sin and reflash whole rom until I fix isue!
[Sony Cross-Device General] donkeyman1234:
Can anyone share how you successfully flash from 10 to 11(x1 ii or x5 ii) without data lost and apps still running, kind of confused after reading different posts.
[Sony Cross-Device General] churchner420:
You're welcome ;) Okay no rush though. Is that the reason why it doesn't flash with partition or why it shows that the phone is corrupt after flashing without partition?
[Sony Cross-Device General] churchner420:
For now flashing the Xperia 5 II does not work. And because of user data incompatibility you always have to flash everything from the firmware folder including the userdata.sin which wipes your data
[Sony Cross-Device General] donkeyman1234:
Just like clean flash, have to install apps and everything all over again. I think I will stay at 10 for the time being. Thanks.
[Sony Cross-Device General] munjeni:
Yes, your log tells that right LUN0 partition is flashed than for some reason instead of skipping another LUN0 file it got flashed which is not what anybody want, I will check that when I get some free time! By your log your lun0 size is:

LUN0 size = 124936192

so right partition to flash for lun0 is partition-image-LUN0_124936192_X-FLASH-ALL-2389.sin , seccond lun0 you should delete partition-image-LUN0_249896960_X-FLASH-ALL-2389.sin and try flash all again. Newflasher need to skip lun0 file in case it not match lun partition size, but for some reason it not work and I need to check why
[Sony Cross-Device General] munjeni:
Version 41 is out!

- version 41 (03.01.2021)

Removed temporary solution from version 41 so right lun0 sin file get flashed and seccond lun0 get skipped or booth skipped if lun0 sin file do not match device storage size

@ churchner420 let me know if now partition-image-LUN0_249896960_X-FLASH-ALL-2389.sin get auto skipped
[Sony Cross-Device General] Pandemic:
Great bro and it fix also the 64gb issue instead having 128gb then on xperia 1 ?
[Sony Cross-Device General] churchner420:
Does that version also fix the device corruption after flashing A11? I skipped the partitions folder the last time cause it wasn't working with v40 and got a phone that would not not because of corruption
[Sony Cross-Device General] munjeni:
I can't tell you that, you tell me! And if you skip partition flashing we will not get working newflasher, so try it and let me know! Don't forget log too!
[Sony Cross-Device General] churchner420:
Tried v41 now and everything works now on my Xperia 5 II. But changing the firmware customisation still does not work. I can flash the latest A11 customized UK but when I perform a software repair with Xperia Companion it goes back to the old one (cause EEA has not been updated to A11 yet)
[Sony Cross-Device General] munjeni:
Good! But you didn't show log and I don't know if v41 is working corectly. Realted to customisation string (which live in trim area) I allready explained you in some earlier post how it can be done using an custom .ta file! It can't be done trought newflasher since newflasher doesn't know the name of the your fw since string which need to be writen to trim area simply doesn't exist in fw, so if you need to change customisation string you can do it by creating an custom .ta file which you need to flash, so if you need it just look some pages back and read it again I not going to repeat.

Edit:

Confirmed not working!
[Sony Cross-Device General] churchner420:
Okay thanks, yes I remember that. Just to be sure: can I create a txt file, put the string in and then rename the file to xyz.ta?

UK -> 00000AF1 000B 47 4C 4F 42 41 4C 55 4B 2D 41 32

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

Are those the correct codes?
[Sony Cross-Device General] churchner420:
I have tried it now but it still does not work...

Here you can see the log. But it still shows Customized EEA in the service menu as you can see at the screenshot
[Sony Cross-Device General] wnijiko:
Sorry to reply so late,kinda busy these days,there's no usb 2.0 slots on my xps laptop,so I can't test that for u right now,but I think your thoughts are correct.We should solve the type c cable problem because the recent phones all get usb type-c to c cable and the ram is usf 3.0 or 3.1,which makes the transfer speed much faster.Thank you again.
[Sony Cross-Device General] wnijiko:
My phone is Xperia 5 II,XQ-AS72,doing fine in flashing Android 11 after I changed the data cable to USB Type-C to Type-A cable ,I suggest you update the SOMC driver version to the newest and try another data cable.Thats what I do.
[Sony Cross-Device General] churchner420:
It is working now, the problems were the partition files. That is solved now with v41. But the problem wih customisation remains
[Sony Cross-Device General] munjeni:
One question, how you doing firmware flash? Are you flash all files ecept persist.sin? Or you delete some files e.g. some .ta files? Which one you delete? You must do clean flash including userdata, all ta files, partitions and boot delivery (except persist.sin), always clean full flash. If I remembered right reset-customisation.ta and factory reset ta, if you skip some ta files probably it was a reason for customisation do not get updated. My sugestion is try flash all except persist.sin. If you have flashed all than I realy have no idea why customisation remain the same.
[Sony Cross-Device General] churchner420:
I always flash everything excluding persist partition. Do I need to flash the custom ta file to both slots in order to get UK customisation?
[Sony Cross-Device General] churchner420:
I now tried flashing the whole firmware again including my customisation.ta UK file. It still shows EEA in the service menu. I think I just have to give up using UK firmware with UK ETAs and UK repair in Xperia Companion. That worked for every device by just flashing another customisation firmware and then repairing the phone with Xperia Companion. But with the 5 II that is just not possible anymore... Any other ideas?
[Sony Cross-Device General] munjeni:
I'm realy confused, as I know unbranding never was a problem for sony phones until mark II devices, probably sony done something to prevent unbranding? E.g. devices branded to UK can't be EEA... ? This need somebody confirm. Whats going on while flashing with flashtool, does switch from UK to EEA working?
[Sony Cross-Device General] churchner420:
It still is possible to debrand the phone but I assume it won't stay like that. Since the Xperia Companion software repair goes back to your original provider or custom region OTA updates will probably be the same. If you could figure out how to completely change to fpr example UK with working UK OTAs and UK Xperia Companion software repair that would be marvellous
[Sony Cross-Device General] tanipat:
here is

--------------------------------------------------------
newflasher.exe by Munjeni @ 2017
--------------------------------------------------------
Device path: \\?\usb#vid_0fce&pid_b00b#6&3a757eec&0&1#{a5dcbf10-6530-11d2-901f-00c04fb951ed}
Class Description: Universal Serial Bus controllers
Device Instance Id: USB\VID_0FCE&PID_B00B\6&3A757EEC&0&1

Product: G8142
Version: 0.4-SONY-0.1
Bootloader version: 1306-5035_X_Boot_MSM8998_LA1.1_N_59-A
Baseband version: 1306-8501_45.0.A.1.244
Serialno: CB512E66JV
Secure: yes
Loader version: XFL-MSM8998-N-35
Phone ID: 0000:35700808021756,0000:35700808021757
Device ID: BC5D534D
Platform ID: 2005E0E1
Max download size: 104857600
Sector size: 4096
Rooting status: ROOTABLE
Ufs info: TOSHIBA,THGAF4G9N4LBAIRB,0100
Emmc info: FAILEmmc-info not supported
Default security: ON
Keystore counter: 1
Security state: BA1894F07A55612C78DAADBA68D953CB4B3D2133
Sake root: D159
S1 root: S1_Root_e69c
Root key hash: C30DEC2471CEA311E6918657367B51068A39583BBF89FD68B379BCD5A709AB1B

Device is put now in flash mode.

Repartitioning...
extracting: partition-image-LUN0_X-FLASH-ALL-42E5.sin
extracting: partition-image-LUN1_X-FLASH-ALL-42E5.sin
extracting: partition-image-LUN2_X-FLASH-ALL-42E5.sin
extracting: partition-image-LUN3_X-FLASH-ALL-42E5.sin
extracting: partition-image-LUN4_X-FLASH-ALL-42E5.sin
extracting: partition-image-LUN5_X-FLASH-ALL-42E5.sin

Processing partition-image-LUN0_X-FLASH-ALL-42E5.sin
- unable to open partition/partition-image-LUN0_X-FLASH-ALL-42E5.sin!

Device is put now out of flash mode.
Sent command: Sync
Sent command: powerdown

End.
Press any key to continue . . .
[Sony Cross-Device General] munjeni:
Is partition folder created?
[Sony Cross-Device General] tanipat:
Yes it is created, and the rar file is gone now
[Sony Cross-Device General] munjeni:
Sorry! :(

I'm working on it!