[TOOL] Newflasher (xperia command line flasher)

xFirefly93

Senior Member
Jan 10, 2018
1,423
2,291
113
Timrå
First of all hide your sensitive data from log. Try to set slot to A with newflasher from command line:

newflasher set_active:a

than reboot to bootloader mode and reflash whole rom by skipping only persist, flash the rest without skipping any single file from rom (except persist)
Newflasher seems to not find my Xperia 1 or anyone of the .FTF specific firmware files that is generated after a fully completed download with XperiaFirm. See the attached screenshots / pictures because I am literally stuck at the very personal moment and nothing that I've tried with manually myself seems to even work or getting me past Step #1 in the whole flashing process. What to do next..? :silly:
 

munjeni

Senior Member
Jun 2, 2011
9,019
21,774
263
Newflasher seems to not find my Xperia 1 or anyone of the .FTF specific firmware files that is generated after a fully completed download with XperiaFirm. See the attached screenshots / pictures because I am literally stuck at the very personal moment and nothing that I've tried with manually myself seems to even work or getting me past Step #1 in the whole flashing process. What to do next..? :silly:
Your screenshots doesn't show anything which can help and it not show any info about problem. Which problem you have? On a first look on your screen shoots I can suggest you renaming of the folders:

instead of folder name "xperia 1 firmware"

change to "xperia_1_firmware"

in short make sure full path not contain space since newflasher have problem with it. Another thing which I can see is "writing command: ...............sin", what you have done? Did you added some command line parameters? You just need to put newflasher inside folder of the firmware and double click newflasher.exe, you no need to pass any extra parameters!
 

churchner420

Senior Member
Mar 25, 2015
264
17
38
Just tried to switch to customized UK on my Xperia 5 II XQ-AS52. I let everything as it was in the downloaded folder from XperiFirm. Everything during the flash process was fine but then when I wanted to restart the device it says device corrupted. I am on the latest XperiFirm and newflasher. Tried to repair my device using Xperia Companion but that failed as well. Anything I can do? My device is still locked btw
 

TripodKnight

Member
Mar 24, 2013
13
3
3
Just tried to switch to customized UK on my Xperia 5 II XQ-AS52. I let everything as it was in the downloaded folder from XperiFirm. Everything during the flash process was fine but then when I wanted to restart the device it says device corrupted. I am on the latest XperiFirm and newflasher. Tried to repair my device using Xperia Companion but that failed as well. Anything I can do? My device is still locked btw
I had the same problem flashing my AS52. Newflasher hangs on one file. I removed that file from the ROM directory and it flashed the rest and it got the phone to boot but my camera and phone calls don't work.

Edit: this file it hangs on is called dsp_X-FLASH-ALL-2389.sin

I think this might be a newflasher problem for the new untested ROMs.

I also relocked my bootloader and tried to restore using the Xperia companion app and it also failed to restore to factory defaults. It kept saying failed and try again.
 
Last edited:

TripodKnight

Member
Mar 24, 2013
13
3
3
Unable to Flash Xperia 5 ii XAS52

Your screenshots doesn't show anything which can help and it not show any info about problem. Which problem you have? On a first look on your screen shoots I can suggest you renaming of the folders:
Hi Munjeni, thank you for this tool. I've tried multiple ROMs and all end with the same error when flashing this file on my Xperia 5 ii XAS52. Removing the file lets the remaining files flash but my ROM does not have the camera or phone functioning.

Are you able to please let me know what I've done incorrectly?

Thanks!
 

Da9L

Senior Member
Jan 31, 2007
1,029
24
0
32
This might be a very noob question, sorry for me asking, but i have a Sony Z2 Tablet, running a custom recovery and rom, but i have some battery issues which is the same across all the different custom roms I've tried, so i want to go back to stock.

Basically can I use XperiFirm to download a firmware for my device and use this tool to flash it with even though I'm on a custom rom and recovery? Is there any files in the download from XperiFirm that i need to remove or can I just use this tool right away? Doesn't matter if my tablet gets bootlocked etc. again as I can always unlock it again if need be.
 

munjeni

Senior Member
Jun 2, 2011
9,019
21,774
263
Just tried to switch to customized UK on my Xperia 5 II XQ-AS52. I let everything as it was in the downloaded folder from XperiFirm. Everything during the flash process was fine but then when I wanted to restart the device it says device corrupted. I am on the latest XperiFirm and newflasher. Tried to repair my device using Xperia Companion but that failed as well. Anything I can do? My device is still locked btw
Hi Munjeni, thank you for this tool. I've tried multiple ROMs and all end with the same error when flashing this file on my Xperia 5 ii XAS52. Removing the file lets the remaining files flash but my ROM does not have the camera or phone functioning.

Are you able to please let me know what I've done incorrectly?

Thanks!
Hi, if it fail with xperia companion than I realy have no idea, might be your device related! Try flashtool if nothing help! Also try oldest firmware. From the screenshoot you posted dsp is not flashed / not corupted existing dsp partition. Have no idea. Also see post 1351 and try it
 
Last edited:

munjeni

Senior Member
Jun 2, 2011
9,019
21,774
263
This might be a very noob question, sorry for me asking, but i have a Sony Z2 Tablet, running a custom recovery and rom, but i have some battery issues which is the same across all the different custom roms I've tried, so i want to go back to stock.

Basically can I use XperiFirm to download a firmware for my device and use this tool to flash it with even though I'm on a custom rom and recovery? Is there any files in the download from XperiFirm that i need to remove or can I just use this tool right away? Doesn't matter if my tablet gets bootlocked etc. again as I can always unlock it again if need be.
Nothing special, download firmware with xperifirm, put newflasher inside firmware, remove persist.sin (or confirm with 'n' when newflasher ask you), reboot phone to flash mode, double click newflasher and folow carefully
 

TripodKnight

Member
Mar 24, 2013
13
3
3
Hi, if it fail with xperia companion than I realy have no idea, might be your device related! Try flashtool if nothing help! Also try oldest firmware. From the screenshoot you posted dsp is not flashed / not corupted existing dsp partition. Have no idea. Also see post 1351 and try it
Thank you for your help. I've tried the steps in 1351 and it did not make a difference. I also have flashed with the earliest XQ-AS52 rom available on XperiFirm and did not have luck.

Others with the XQ-AS52 are beginning to have bootloops using Newflasher as well. Perhaps a warning should be included that shows Newflasher does not work yet with the Xperia 5 ii XQ-AS52.

EDIT: I have now tried flashing using a different USB port with a different USB Cable (not the Sony Official Cable) and now newflasher flashes properly. Strange, but I won't question it!

Thanks for all your help!
 
Last edited:

Da9L

Senior Member
Jan 31, 2007
1,029
24
0
32
Nothing special, download firmware with xperifirm, put newflasher inside firmware, remove persist.sin (or confirm with 'n' when newflasher ask you), reboot phone to flash mode, double click newflasher and folow carefully
I think I might be doing something wrong. There is no persist.sin file in the downloaded firmware (Sony Z2 Tablet Wifi). Anyway, if i power down my device and press Volume down while plugging in the USB cord it shows up as "SOMC Flash device".. Trying to use your tool while in this mode I get "No usb device with vid:0x0fce pid:0xb00b !". I've also installed the drivers it requests to install just before (GordonGate). If I instead press Volume up while plugging in the USB cord it shows up as "Sony Fastboot interface" but the result is the same when I use your tool, I once again get "No usb device with vid:0x0fce pid:0xb00b !".

Fastboot works fine for other tasks though, as I've used that to flash recovery and boot img earlier.

I'm using Windows 10 if it matters.. Any idea what I might be doing wrong?
 

munjeni

Senior Member
Jun 2, 2011
9,019
21,774
263
Thank you for your help. I've tried the steps in 1351 and it did not make a difference. I also have flashed with the earliest XQ-AS52 rom available on XperiFirm and did not have luck.

Others with the XQ-AS52 are beginning to have bootloops using Newflasher as well. Perhaps a warning should be included that shows Newflasher does not work yet with the Xperia 5 ii XQ-AS52.

EDIT: I have now tried flashing using a different USB port with a different USB Cable (not the Sony Official Cable) and now newflasher flashes properly. Strange, but I won't question it!

Thanks for all your help!
I expected the problem was not a newflasher, I am prety sure that newflasher working on all recent xperia models, I'm glad you have figured out problem!
 
Last edited:

munjeni

Senior Member
Jun 2, 2011
9,019
21,774
263
I think I might be doing something wrong. There is no persist.sin file in the downloaded firmware (Sony Z2 Tablet Wifi). Anyway, if i power down my device and press Volume down while plugging in the USB cord it shows up as "SOMC Flash device".. Trying to use your tool while in this mode I get "No usb device with vid:0x0fce pid:0xb00b !". I've also installed the drivers it requests to install just before (GordonGate). If I instead press Volume up while plugging in the USB cord it shows up as "Sony Fastboot interface" but the result is the same when I use your tool, I once again get "No usb device with vid:0x0fce pid:0xb00b !".

Fastboot works fine for other tasks though, as I've used that to flash recovery and boot img earlier.

I'm using Windows 10 if it matters.. Any idea what I might be doing wrong?
Double check driver status inside windows device mannager! What is a usb vid and pid while SOMC Flash device?
 

Da9L

Senior Member
Jan 31, 2007
1,029
24
0
32
Nothing special, download firmware with xperifirm, put newflasher inside firmware, remove persist.sin (or confirm with 'n' when newflasher ask you), reboot phone to flash mode, double click newflasher and folow carefully
Double check driver status inside windows device mannager! What is a usb vid and pid while SOMC Flash device?
Attached a screenshot from where i suppose that info is listed:

EDIT fixed img:
 

killa92

Senior Member
Jul 17, 2011
60
2
8
England
Hi, I am having such a pain to flash G8232, I simply want to flash G8232_Customized DE_41.3.A.2.247-R1E. Flashtool didnt have device included and I can only find support files tested on 41.3.A.0.401. So I thought to try Newflash but I see this issue :-/
 

Attachments

munjeni

Senior Member
Jun 2, 2011
9,019
21,774
263
Hi, I am having such a pain to flash G8232, I simply want to flash G8232_Customized DE_41.3.A.2.247-R1E. Flashtool didnt have device included and I can only find support files tested on 41.3.A.0.401. So I thought to try Newflash but I see this issue :-/
I'm unsure about xzs but if your somc flashdevice usb pid is adde than you can't use newflasher, instead search for xflasher
 

killa92

Senior Member
Jul 17, 2011
60
2
8
England
I'm unsure about xzs but if your somc flashdevice usb pid is adde than you can't use newflasher, instead search for xflasher
Thanks mate, will check that out. I ended up managing to get flashtool to do the job but had to use a slightly older firmware version as didn't have a recent .FSC file, once region was changed I just finished of with companion repair and all is well and upto date with new regional cust. I did actually USB log the companion session so I could create a more recent FSC for better flashtool accuracy regarding write areas but it doesn't seem to be parsing even though I did it all correctly. Times have changed since my old device, Sony just doesn't break so easily ?
 

jamchu1988

Member
Jun 29, 2017
18
1
0
Code:
--------------------------------------------------------
            newflasher.exe v36 by Munjeni @ 2017/2020
--------------------------------------------------------

Determining available free space by GetDiskFreeSpaceEx:

  Available space to caller    = 27626 MB
  Total space on current drive = 976632 MB
  Free space on drive          = 27626 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&28b1272&0&4#{a5dcbf10-6530-11d2-901f-00c04fb951ed}
Class Description: SOMC Flash Device
Device Instance Id: USB\VID_0FCE&PID_B00B\5&28B1272&0&4


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!
y
ERROR: TIMEOUT: failed with error code 997 as follows:
Overlapped I/O operation is in progress.
 - Error write! Need nBytes: 0xd but done: 0x0
nBytes[0x0]:


Error dumping trimarea partition 1 !!
Hi, sorry if this has been answered already. I have error 997. I have tried running as admin. Flashtool was working for me, until it didn't so I'm trying the newflasher. I have an XZ3 and I'm trying to flash H8416_Vodafone LC Not Net Locked_52.1.A.3.92-R8C

It's currently softbricked (I hope) and am trying to flash any working firmware on it. If you would like any info please ask :eek:

Also bootloader is unlocked. It currently hangs on the SONY logo if I try to boot in Recovery it gives the dead android and "No command"
If I try flashing TWRP it gives a red exclamation and corrupt data.

I'm also reading through the replies in this thread with error 997 so I'll edit this post if I find any solutions for my case... Ok so I tried flashing just the partition folder and that worked... I'll be back!

WOW!!! THANK YOU SO MUCH GUYS. I've managed to get my phone to boot thanks to everyone here and munjeni for making this awesome program! Hopefully everything works with this firmware, modem etc. Maybe I'll try rooting and getting TWRP back, just very thankful I didn't hard brick. :) :) :)
 
Last edited:

churchner420

Senior Member
Mar 25, 2015
264
17
38
Thank you for your help. I've tried the steps in 1351 and it did not make a difference. I also have flashed with the earliest XQ-AS52 rom available on XperiFirm and did not have luck.

Others with the XQ-AS52 are beginning to have bootloops using Newflasher as well. Perhaps a warning should be included that shows Newflasher does not work yet with the Xperia 5 ii XQ-AS52.

EDIT: I have now tried flashing using a different USB port with a different USB Cable (not the Sony Official Cable) and now newflasher flashes properly. Strange, but I won't question it!

Thanks for all your help!
Very interesting. Trying a differrent cable right now as well. What exaclty did you exclude? And did you say 'no' to all the questions newflasher asked during the flash?
I always exclude partition and userdata. Btw you can't use flashtool cause flashtool doesn't even know the Xperia 5 II yet. I created an ftf file with it and changed the device name in the Meta inf folder to XQ-AS52 but then flashtool doesn't even show the firmware anymore...
This is definitely a newflasher issue and not depending on the cable or the usb port... @munjeni

Edit: tried a different cable but that does not change anything... Still looping on the Sony logo. Can't even get to the bootanimation.
 
Last edited:
  • Like
Reactions: munjeni