yashsingh1/xdaforums huggingface dataset:
[Sony Cross-Device General] hungvip2001:
No. I used newflasher and it works successfully. I just searching for the cleanest way to clean install stock rom
[Sony Cross-Device General] li0nh3art3d:
if you have a 2018 device, newflasher. Flashtool hasn't been updated for 2018 devices yet
[Sony Cross-Device General] MartinX3:
I have a XZ2 H8296 and get this

(Ubuntu Mate x64 18.04)

newflasher.x64

--------------------------------------------------------
newflasher.x64 v13 by Munjeni @ 2017/2018
--------------------------------------------------------

Determining available free space:

Available space to caller = 31264 MB
Total space on current drive = 156815 MB
Free space on drive = 39252 MB

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

PS: Sorry, forgot to put this phone into the fastboot mode.
[Sony Cross-Device General] stefauresi:
Hi,

I used Newflasher v13 for my XZ2 (H8216)

Everything works perfectly

Thank you
[Sony Cross-Device General] failteck:
I tried installing German also Uk customized firmware from H8216 but it didn't work they kept bootlooping on Canadian model of the XZ2 (H8276) but installing my original firmware worked any solutions or is it just my phone?
[Sony Cross-Device General] ch3mn3y:
Try to flash without AMSS files. It's modem, so probably is not compatible with Your H8276.
[Sony Cross-Device General] failteck:
You mean fsg.sin file right? Or am I missing another one?
[Sony Cross-Device General] scrarfussi:
i used new flasher on my xz2 now it wont boot

says it is corrupt and cant be trusted

i was trying to load unbranded firmware
[Sony Cross-Device General] failteck:
The other guy told me it might be a modem issue what XZ2 do you have?
[Sony Cross-Device General] scrarfussi:
H8216

i have tried customized UK

customized South Africa

Customized Europe All to no Avail I get No errors on Newflasher

just On the phone
[Sony Cross-Device General] munjeni:
Try flash all files without skiping anything! Make sure you have downloaded right firmware for your model!
[Sony Cross-Device General] munjeni:
And in case your device not boot post your newflasher log in full.
[Sony Cross-Device General] ToraxOutlaw:
Hello guys, just looking for some help. I recently bricked my Xperia and have been unable to restore the stock firmware using either flashtools or newflasher. The bricking occured after I screwed up the rooting process and was trying to revert it back to the factory firmware.

Flashtools gets to about flashing system.15 and it stops responding or working at all, with newflasher I get this error.

- Extracting sparse chunk flash_session/system.015

- Uploading sparse chunk flash_session/system.015

download:063ff070

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

Overlapped I/O operation is in progress.

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

nBytes[0x0]:

Error uploading chunk 50!

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

Overlapped I/O operation is in progress.

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

nBytes[0x0]:

Error writing command 'go out of flashmode'!

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

Overlapped I/O operation is in progress.

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

nBytes[0x0]:

- Error writing command Sync!

Press any key to continue . . .

Phone Model: Sony Xperia XZ Premium (G8141)

F/W: Original Sony Oreo 47.1.A.12.179

Rooted and Boot Loader Unlocked

Any help would be much appreciated.
[Sony Cross-Device General] shoey63:
/system is corrupted. Format it in TWRP and try again.
[Sony Cross-Device General] munjeni:
Agree with [MENTION=4675598]shoey63[/MENTION] , you first need to flash partition image, than reflash the rest, its recommend to flash all files after you reflash partition image! Or try reformat system partition like shoy63 say
[Sony Cross-Device General] ToraxOutlaw:
how would i reformat the partitions or recreate them???
[Sony Cross-Device General] munjeni:
The same like you flashed firmware with newflasher, but this time move all sin and all ta files out of the folder where newflasher lives, make folder called "partition", put partition sin files inside folder partition and run newflasher, it will reflash partitions, when you done move back all sin and ta files to the newflasher and flash the rest. Or option two, boot an twrp and try reformat system partition. Or option 3, run Sony PC Companion software and start procedure "repair my phone".

One important thing, NEVER try to repair/modify/etc your partitions with your hand, it might corupt your trim area and give you hard brick! Its always recommend to repair partition scheme by using sin files designed for that task! These partition files is part of the firmware which you downloaded with XperiFirm, its inside partition.zip in some cases and in another cases (like xa2 have) inside single sin file. In booth cases partition iomage must be extracted from partition.zip (pre 2018 models) or partition.sin (in case 2018 devices) and put to the folder caled "partition", in that case my tool can flash partitions. If you dont created partition folder or partition folder not contain these partition files my tool not going to flash partitions. So if you want to flash only partitions you must create partition folder and put/move partition files to that folder. In your case (because of broken partitions) you need to reflash only partitions image, hide other sin and ta files because you going to reflash only partitions. Later you can reflash whole firmware. Hope helps?
[Sony Cross-Device General] ToraxOutlaw:
OK. i used flashboot to erase all the partitions. I then used newflasher in bits, so i used newflasher to sort out the boot and partitions first. I then used newsflasher to flash everything but the system. I am now currently flashing the system over. will let you know how this goes.

---------- Post added at 08:18 PM ---------- Previous post was at 08:10 PM ----------

Still the same error.

- Extracting sparse chunk flash_session/system.014

- Uploading sparse chunk flash_session/system.014

download:063ff040

OKAY.

flash:system

OKAY.

- Extracting sparse chunk flash_session/system.015

- Uploading sparse chunk flash_session/system.015

download:063ff070

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

Overlapped I/O operation is in progress.

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

nBytes[0x0]:

Error uploading chunk 50!

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

Overlapped I/O operation is in progress.

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

nBytes[0x0]:

Error writing command 'go out of flashmode'!

End. You can disconnect your device when you close newflasher.exe

Press any key to continue . . .
[Sony Cross-Device General] munjeni:
Sorry but I must see whole log from newflasher, and also whole log during partitions flash

Edit:

It might be also problem with bad usb cable, double check your cable! Also make sure use newflasher version 13, previous versions had problem with memory allocation, now its solved. Also might be isue with antivirus, try turn it off and try. Anyway without full log I can't help much, need to see full log and to tell you if I see something bad in your log!
[Sony Cross-Device General] munjeni:
You can't use newflasher for L, its for xperia Xz and up! Use flashtool for L! Or you can try xflasher but nobody tried mediatek so no body can say anything about possible brick until somebody try :)
[Sony Cross-Device General] bigrammy:
Hi Thanks for the reply :good:

Sony L1 and not the L

The L1 is a reasonably new model and follows the XA1 way of doing things also mediatek.

Or are you saying this does not support S1 loader protocol :o
[Sony Cross-Device General] munjeni:
Ah didn't know that, in that case newflasher. I'm usure right now about mediatek but I think somebody allready reported about problems with mediatek on old models (pre 2017), it reguired speacial fsc scripts for flashing if I am not wrong, so do in mind maybe the same situation is with new models which have mediatek! You can try flash somothing e.g. cache.sin only (files which jave less chance to damage your device), and later try some more e.g. system.sin and finaly (when no brick happened and you think thing is pretty safe) try flash the rest! Your question was what to flash, as always I recommend all, mean bootdelivery, partition, all .ta filea, all .sin files.... all.
[Sony Cross-Device General] munjeni:
By looking now into fsc script I can see your device do not use new flashing protocol, it seems use old flashing protocol? Alos I see some lines with:

getLoaderConfig

setLoaderConfig

this is not implemented in xflasher (in case you need to try xflasher), so I recommend you try with flashtool! Probably xflasher is not right tool for you since no body reported anything using xflasher on mediatek! Newflasher you no need to try since it will for sure not work! I can't say how it even be safe using flashtool or can't say anything about if flashtool even support your device. Maybe better idea for you is to consult with [MENTION=2807379]Androxyde[/MENTION]! Never hurry if you no want dead device!
[Sony Cross-Device General] bigrammy:
I linked the fsc for this device in my previous post edit. https://xdaforums.com/showpost.php?p=76846035&postcount=871

Looking through that I see no mention of some of the .ta's that are included in the XperiFirm download.

I think the original problem of bricking the C4/C5 came from the boot delivery side of things.

The C4/C5 firmware's was bundled with a bunch of preloader's LK's etc and I "THINK" that FlashTool may have flashed the wrong ones or combinations causing the Bricks.

I could be totally wrong of course :laugh:

C4 Boot Folder.

boot_delivery.xml
Cosmos_S1BootConfig_MiscTA_20150227.ta
lk_S1-BOOT-TEST-B316-0001-MMC.sin
lk-sign-signed_S1-BOOT-LIVE-4154-0004-MMC.sin
logo_S1-SW-TEST-B316-0001-MMC.sin
logo-sign-signed_S1-SW-LIVE-4154-PID1-0005-MMC.sin
preloader_s1sbl_PLATFORM-MT6752-LIVE-95CE-OEM1-ROOT_S1-BOOT-LIVE-4154-0004-MMC.sin
preloader_s1sbl_S1-BOOT-TEST-B316-0001-MMC.sin
secro_S1-SW-TEST-B316-0001-MMC.sin
secro-sign-signed_S1-SW-LIVE-4154-PID1-0005-MMC.sin
tee1_PLATFORM-MT6752-LIVE-95CE-OEM1-TEEIMG_S1-SW-LIVE-4154-PID1-0005-MMC.sin
tee1_S1-SW-TEST-B316-0001-MMC.sin
tee2_PLATFORM-MT6752-LIVE-95CE-OEM1-TEEIMG_S1-SW-LIVE-4154-PID1-0005-MMC.sin
tee2_S1-SW-TEST-B316-0001-MMC.sin

The Newer firmwares do not have all the extra logo's preloaders LK's etc so less likely to flash the incorrect ones.

EDIT: You Replied before I finished Typing mine :laugh: Thanks :good:
[Sony Cross-Device General] munjeni:
That thing is not a new about boot folder, every xperia have that thing! Right file from boot folder is autodetected trought information from device, booth tools ask device for info and by that way chose right binary, so I don't think problem was related to wrong binary. If you compare fsc from e.g. xperia z and fsc from an mediatek there is diferencie like setloaderconfig (which not exist on z), I realy don't know if that is realy need (see some of the my posts in my xflasher thread between Androixyde and me! Androxide I think added fsc as a mandatory because mediatek devices gets bricked without fsc (if I am not wrong), but I thinked it is not need and asked somebody to try xflasher but since nobody tried I can't say anything about it because nobody tried or bricked using xflasher, of course if somebody realy whant to try that thats on his own risk.)
[Sony Cross-Device General] Uxorious:
I just tried flashing XZ1 firmware 205. AE base + US compact oem.

Get this error:

- Extracting sparse chunk flash_session/system.025

- Uploading sparse chunk flash_session/system.025

download:063ff070

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

A device attached to the system is not functioning.

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

nBytes[0x0]:

Error writing download command!

Any ideas?
[Sony Cross-Device General] munjeni:
You must close and exit Sony PC Companion software before you use newflasher, if that not help double check your micro usb cable functionalitty. If booth not help try another firmware or try the same again
[Sony Cross-Device General] Uxorious:
I already tried 2 different cables, and the same release twice.

Reverting to 179 worked.

Will try another 205 release shortly...
[Sony Cross-Device General] Uxorious:
I noticed v13 of newflasher was out (I was using v11).

That fixed it!
[Sony Cross-Device General] li0nh3art3d:
Just an update ... I was successfully able to downgrade my baseband with both new versions of Flashtool and Emma, however with Newflasher, whenever I flash the lower version of firmware, upon the command 'fastboot getvar all', the firmware/bootloader downgrades but the baseband will not downgrade, despite being able to upgrade.

My devices used are the Xperia XA2 pioneer and discovery. Newflasher doesn't show any errors however it's clear that the baseband will not downgrade on my device without Flashtool or Emma, however it will upgrade for some reason.
[Sony Cross-Device General] munjeni:
How you updated with flashtool when flashtool doesn't support xa2 at this moment? One thing about baseband, maybe emma writes baseband version to the trim area? My tool is simple, tool don't mess with trim area so I'm believing your baseband is still updated but old baseband version string is inside trim area. You can check easily if your baseband is realy updated by looking for md5 sum of the baseband partition before and after flashing to comfirm all our things, in that case I can look further and maybe investigate tool further. Remember one thing, I don't own new xperia model, I have an old xperia z1 compact so all I can do to my tool is nothing, without device I can do nothing, only can do something in case somebody test something, find something, and finaly tell me something, hope you understand what I mean. Our tool is made for my own educational purpose (without owning device), it was hard working on it without device but thing which I done for free everybody have benefit using it. If you want to contribute to our tool you can test some more things and try to get idea why baseband is not flashed, I'm believing its flashed but curently I can't confirm without device. You can look e.g. into trim area dump by searching for baseband string e..g. on sucesfully flashed device with emma and also in trim area dump after flashing with newflasher, by that way you and me can get idea about baseband thing!
[Sony Cross-Device General] ch3mn3y:
It does. Week or so ago came 0.9.25.0 update with support for XA2 and XZ2 families.
[Sony Cross-Device General] munjeni:
Folowing this link -> https://xdaforums.com/showthread.php?t=920746 its 0.9.23.0
[Sony Cross-Device General] ch3mn3y:
This thread is very slowly updated. Look at its title :P

Check here: http://www.flashtool.net/downloads.php

0.9.25.0 came to all 3 OSes, not like 0.9.24.x, which skipped OS X.
[Sony Cross-Device General] Klaus N.:
I guess Androxyde simply didn't update his signature yet. Just take a look at the FlashTool homepage :)

I've already installed it on both Win10 and Linux and can confirm, it works with my XZ2 :good:

Edit: [MENTION=4254806]ch3mn3y[/MENTION] was fast as hell
[Sony Cross-Device General] li0nh3art3d:
I appreciate all the work you put into the tool. I only wanted to report that it works well upgrading, but there's something malfunctioning with downgrading but only on the baseband portion of the firmware (the rest downgrades). I found this out because when using Newflasher to downgrade, it bootloops and the command 'fastboot getvar all' indicates all firmware aside from the baseband indeed downgrade, including the bootloader. And I successfully upgraded, so whatever is malfunctioning in the code, only applies to downgrading and specifically the baseband.

I'm not near my PC now but perhaps in the future I can test when I have time. I just wanted to let you know of the issue for now.
[Sony Cross-Device General] munjeni:
Ok I trust you but since you're first one who report it I am waiting more results since I realy can't fix it without device, hope somebody give more results and examples which will be good enough for getting me idea about thing. Which sin file contain baseband anybody know for sure?
[Sony Cross-Device General] chichino84:
Dumb question:

Does it mean to put actually ONLY the newflasher.exe file into firmware directory OR ALL FILES contained in newflasher_v13.rar?

Thx

It's obviously all the content inside .rar files, sorry
[Sony Cross-Device General] munjeni:
Yes only newflasher.exe in case you use Windows machine
[Sony Cross-Device General] ehBrY:
Issue resolved.
[Sony Cross-Device General] munjeni:
That files doesn't goes into "partition" folder! You need to put these files in the same folder with newflasher! :)
[Sony Cross-Device General] zippy01:
Can anyone advise if downgrading works fine without issues on the XZ1?

Thanks in advance
[Sony Cross-Device General] MartinX3:
On XZ2 I hadn't a problem.

But it has A/B
[Sony Cross-Device General] zippy01:
Can confirm, multiple downgrade was no problem on XZ1 in case anyone else wondered

Thanks for this tool [MENTION=4120742]munjeni[/MENTION]
[Sony Cross-Device General] CMT 1412-4444 'Fours':
just got myself a Z4 Tab and it's still on Marshmallow. I have the latest firmware downloaded through Xperifirm, and after putting newflasher.exe into the firmware folder, holding the volume [-] key before connecting to my laptop to get the solid green light that indicates flash mode, and running it newflasher from the firmware folder, I get the following:

I did do this once when I put the Central Europe firmware onto my XZ1 Compact (US fingerprint disabled, you all know how that is), however I feel like I'm missing a step. I have downloaded the correct drivers from Sony's website for the Z4T, but every time I go to Device Manager and try to manually update them, it tells me the default drivers from 2006 are the latest one.

Clearly I'm in the wrong, but I don't know why :/
[Sony Cross-Device General] ch3mn3y:
[MENTION=6866650]CMT 1412-4444 'Fours'[/MENTION]

Newflasher is only for few devices and Z4 Tablet is not one of them. For Your tablet use Xflasher (made by munjeni as well) or Flashtool. Xflasher looks and works exactly the same as newflasher, but it's for devices with older flashing standard (pre-Treble I think).
[Sony Cross-Device General] zippy01:
If I want to keep userdata and upgrade what do I keep? Do I still flash boot and partition?

Thank you
[Sony Cross-Device General] ch3mn3y:
Userdata and Appslog should be enough. You still flash boot as it's too important and doesn't affect user's data.
[Sony Cross-Device General] zippy01:
Thank you, what about partition? Does that flash the internal?
[Sony Cross-Device General] ch3mn3y:
That I'm not 100% sure. Myself I would exclude it from flashing, but, as far as I know, it's important part and should be flashed.
[Sony Cross-Device General] Arne Sacnussem:
--------------------------------------------------------
newflasher.exe v13 by Munjeni @ 2017/2018
--------------------------------------------------------

Determining available free space by GetDiskFreeSpaceEx:

Available space to caller = 10230 MB
Total space on current drive = 113281 MB
Free space on drive = 10230 MB
Error! You do not have needed 10240 MB available free space on your
disk drive! You have only 10230 MB free.

sad story
[Sony Cross-Device General] dcrin3:
If you want to upgrade while keeping userdata then just remove the userdata.sin file. Keep everything else where it should be based on XperiFirm.
[Sony Cross-Device General] zippy01:
Thanks for the help guys I usually clean flash but it's such a minor update I think I only want to remove the system update notification

I have a full nandroid ready just in case.

Is there another way to remove the system update notification these days?
[Sony Cross-Device General] dcrin3:
Yes. I use Titanium backup to remove it, wipe-data, uninstall app.

I use TB to remove all the added software after upgrade while saving userdata.
[Sony Cross-Device General] zippy01:
Thank you for that back to basics and removed. I didn't think to remove because I tried to remove a prime video app with TB but it fails with cannot locate app so thought it was a bug.

Removed it now notification went after reboot and will clean update when there is a worthwhile update.

Thanks again
[Sony Cross-Device General] niaboc79:
Hi,

anything special with xz2? I've just flashed a firmware but nothing has been flashed even if the app hasn't said anything wrong.
[Sony Cross-Device General] MartinX3:
I used xperifirm months ago to flash h8266 on m h8296.

As far as I know, it has new flasher buildin.

But my bootloader is also locked.
[Sony Cross-Device General] zippy01:
What did you do? Was there any messages at all?

Unless I have missed a something I believe that is incorrect. Also you can still flash with a locked bootloader
[Sony Cross-Device General] niaboc79:
According to app all was flashed...

I will retry tomorrow
[Sony Cross-Device General] muhschaf:
I plain don't get it how this is supposed to work on my XZ1 Compact.

I put ONLY the .exe in the Xperi dir with all the .sin files and the both 'boot' and 'partition' folder. then klick newsflasher.exe, confirm or decline the Gorgon thingy and then the console windows plain vanish. Phone is in fastboot mode (Volume UP, USB connect then -> Blue LED )

Wrong mode?
[Sony Cross-Device General] Klaus N.:
Yes, you have to be in flash mode to get this working (please, read the op).
[Sony Cross-Device General] muhschaf:
ah okay then is a bit unfortunate that this led goes also green if you only plug it in and recharge.
[Sony Cross-Device General] powercamg4:
Can someone please mirror the download, XDA only spits out "410 Gone"
[Sony Cross-Device General] sladluk:
A question, is the newflasher method working with the new XZ3 with Android Pie? Anyone tested? Thx
[Sony Cross-Device General] Tuxedo75:
yes, I'm also interested I've a branded XZ3 with old and bloaty firmware and want to flash sony stock and newver one...

Anyone tested safely on xz3?
[Sony Cross-Device General] sladluk:
Hi, i tested it on a XZ3 and it works. ?
[Sony Cross-Device General] Tuxedo75:
Only one more question...

I read somewhere to extract a partitinon.zip file or to delete .ta files(that was a quite old guide effectively it seems related to xz premium).

On xda newflasher page instead seems enough to put newflasher.exe in the“ H8416_“, directory create by Xperifirm and lunch it.

How do you do the flash?

Thank you in advance

Inviato dal mio H8416 utilizzando Tapatalk
[Sony Cross-Device General] sladluk:
Yes, just put the newflasher.exe in the directory and launch it.
[Sony Cross-Device General] PhonerX:
Attention, according to this thread about XZ1 Compact, Attest Key is lost if you flash persist.sin with newflasher on a bootloader locked phone.

After flash, it reads - Android Attest Key NOT PROVISIONED

It does not help to do a full factory reset.

It does not help to flash full firmware, not even the version which the phone was bought with

Please read and be careful before flashing your device.

[MENTION=4120742]munjeni[/MENTION], Do you have an idea why this is happening?
[Sony Cross-Device General] Klaus N.:
The same happened to my XZ2, when I was flashing while it was on locked bootloader. Even running Sony Emma on my now unlocked device did not bring it back.

Does someone know what that key is for?
[Sony Cross-Device General] MartinX3:
https://source.android.com/security/keystore/attestation

This may help
[Sony Cross-Device General] PhonerX:
According to Android partition basics thread here:

PERSIST - contains data which shouldn't be changed after the device is shipped, e.g. DRM related files, sensor reg file (sns.reg) and calibration data of chips; wifi, bluetooth, camera etc.
[Sony Cross-Device General] Klaus N.:
I already found that after writing my last post. This helps only to understand, but not how to solve it. I guess there's nothing I could do - most probably lost forever :p