yashsingh1/xdaforums huggingface dataset:
[Sony Cross-Device General] thrash001:
--------------------------------------------------------
newflasher.exe by Munjeni @ 2017
--------------------------------------------------------
Device path: \\?\usb#vid_0fce&pid_b00b#5&448f588&0&1#{a5dcbf10-6530-11d2-901f-00
c04fb951ed}
Class Description: USB-Controller
Device Instance Id: USB\VID_0FCE&PID_B00B\5&448F588&0&1

DATA[0x20]:

00000000 44 41 54 41 30 30 30 30 30 30 32 30 00 00 00 00 DATA00000020....
00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

Max download size: 104857600
Product: G8141
Version: 0.4-SONY-0.1
Bootloader version: 1306-5035_X_Boot_MSM8998_LA1.1_N_59-A
Baseband version: 1306-8499_45.0.A.1.229
Serialno: CB512EADT6
Secure: yes
Sector size: 4096
Loader version: XFL-MSM8998-N-35
Phone ID: 0000:35783808059099
Device ID: A6D4C462
Platform ID: 2005E0E1
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

Using existing folder flash_session

No .sin files in current dir!
ERROR: TIMEOUT: failed with error code 997 as follows:
▄berlappender E/A-Vorgang wird verarbeitet.
- Error write! Need nBytes: 0x4 but done: 0x20
nBytes[0x20]:

00000000 53 79 6E 63 00 00 00 00 00 00 00 00 00 00 00 00 Sync............
00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

- Error writing command Sync!
Drücken Sie eine beliebige Taste . . .
[Sony Cross-Device General] munjeni:
Thanks you a lot! Seems device info is ok now, I see problem only after device info when we write command sync, now I have enabled very verbose debug log, let see whats going on, new version is out
[Sony Cross-Device General] munjeni:
Found mistake! :( Forgot to receive one more reaply when device respond with DATA string :o Investigating now, hope in next 30 to 60 minutes I make new version
[Sony Cross-Device General] chivu10:
can somebody help me pls. i recive this error. "no usb device with vid:0x0fce pid:0xbxxb ! " thx
[Sony Cross-Device General] ishemes:
Yes, my log looks exactly the same. It also took about 15 minutes to generate the 1.t file which ends up being a few hundred kilobytes. The 2.t file took only a few second and is larger.
[Sony Cross-Device General] munjeni:
Guys I need full logs, full logs mean all log from main window + all .ta files + tadump.log, without full log I have no idea whats going on so can't fix.
[Sony Cross-Device General] indesisiv:
Main window just said it had completed and I could disconnect phone. (if I remember correctly) I will have to pull the other files for you tomorrow night once I get back to my computer. Unless someone else has done by then.
[Sony Cross-Device General] VeixES:
Attach removed.
[Sony Cross-Device General] Lazaros_K:
I successfully flashed my XZP G8141 using the V8 , from Customized IT to Customized GR. I pressed n on both optional requests at the beginning.During the whole process i was very nervous byt in the end it was all a smooth success!

Thank you munjeni and everyone who helped find issues! I really appreciate your hard work and effort.

The phone successfully opened and everything is fine. I am currently performing a software repair from the Xperia Companion.

One more question. Do i have to flash a new software update everytime? or just update like before? OTA / Through Xperia Companion.
[Sony Cross-Device General] ch3mn3y:
To flash fw without losing data, which .sins should be moved/removed? Appslog and userdata is enough? What about diag, persist, ssd?

Flashtool adds qnovo to wipe (XZ firmware), but it shouldn't affect user data, right?
[Sony Cross-Device General] pbarrette:
Odd.. I swear I posted logs to you yesterday, but now the post is missing in this thread.

I'm also subscribed to the thread, but don't seem to be getting notifications, so something odd is going on.

Anyway, attached are the logs for the XZ1c with the usual password.
[Sony Cross-Device General] munjeni:
Many thanks guys!! I'm looking into it!
[Sony Cross-Device General] munjeni:
Identified isue after analysing raw trim area from unlocked bootloader, problem is this:

Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F

00027A90 [COLOR="Blue"]A1 09 00 00[/COLOR] [COLOR="Red"]00 00 00 00[/COLOR] C1 E9 F8 3B ¡.......Áéø;
00027AA0 13 13 13 14 ....

Unit 0x9A1 (blue) with size 0 (red), but my tool is programmed to return error in case unit size is 0, omg. V9 will be fully working!
[Sony Cross-Device General] VeixES:
Set the phone to flashmode, waiting for v9 :)
[Sony Cross-Device General] munjeni:
V9 done :)
[Sony Cross-Device General] sToRm//:
Awesome! You are the man! :good:
[Sony Cross-Device General] munjeni:
Please password protect your trim area dump to make it world non readable, send me password by pm! Omg I forgot to catch one aditional reply.

V10 is out!
[Sony Cross-Device General] munjeni:
How much time tool consume for dumping trim area? Somebody said that it use 15 minutes, is that true?
[Sony Cross-Device General] VeixES:
15-20minutes easily.

v10 failed on first try. reconnected the phone and it completed without error in main window.
[Sony Cross-Device General] munjeni:
I'm getting error when I press thanks button (Sorry, you are limited to 8 thanks per day) so I must say many thanks man! Thats it. Trim area dumper is done, its working but we are limited curently. Trim area partition 1 is fully unrestricted, its fully dumped. Partition 2 is dumped too but not a fully since we curently have no idea how to authentificate (sake authentification), and as a result we have dumped only unrestricted units from partition 2, restricted units can't be read without authentification and give error in tadump.log (FAILCommand not authenticated).

Restricted units in partition 2 starts at unit num 65536 and can't be dumped curently:

FAILUnable to read TA unit 65535, error=-22
FAILCommand not authenticated

:) If we somehow get idea what is need for sake authentification we ca ndump trim area fully. By now we are limited and we can't dump drm key and the rest of units startitng at 65536 :)
[Sony Cross-Device General] xrenoix:
Hello munjeni i have look in my Android 8.0 service menu/security/ Keystore hash key it possible authentification for Ta backup ? Thank you so much
[Sony Cross-Device General] munjeni:
No, that's not a key, that's a hash.
[Sony Cross-Device General] xrenoix:
OK this is just a Digital footprint ? :( Thank you so much for your great work im donate to you soon I have no monaie for this moment with my baby !!! Thank you bro
[Sony Cross-Device General] MacSeoin:
Hey guys,

I originally flashed from 3 UK to customised UK using the original NewFlasher, all worked fine.

Now I'm trying to use V10 and constantly getting No usb device with vid:0x0fce pid:0xb00b !

Help please, I've been all through this thread and tried everything stated

EDIT: Re-installing the Xperia Companion fixed it
[Sony Cross-Device General] zohaib0001:
[MENTION=4120742]munjeni[/MENTION]

I did not understand TA Dumper completely.

Is TA dumper in your tool means that it can backup TA.img partition (with DRM Keys) of XZ premium ? For locked bootloaders
[Sony Cross-Device General] RyuzakiTA:
Is it okay to flash oreo on a xz premium with last version? Is there some file i should remove from folder?

Thanks!!
[Sony Cross-Device General] sToRm//:
No, it dumps only available data. The keys are only available with authentification.
[Sony Cross-Device General] izyer:
its any way i can extract oem_X-FLASH-ALL-C93B.sin to see some settings? it doesnt work with flashtool. thanks
[Sony Cross-Device General] pbarrette:
Hi izyer,

You can extract SIN files for the XZ1c with UnSIN.

Be aware that many settings are actually in the overlay APKs, so you'll have to decompile those too.
[Sony Cross-Device General] izyer:
Thanks , im curious if they added VoLTE settings for my operator.
[Sony Cross-Device General] munjeni:
This one support much more formats https://xdaforums.com/crossdevice-dev/sony/tool-unpack-format-sony-kernel-image-t3530077 kernels. sin, img, elf ...etc, and one more can dump from block device directly :)
[Sony Cross-Device General] munjeni:
Flash all!
[Sony Cross-Device General] ch3mn3y:
You mean without data wipe? Just remove appslog, userdata, diag, ssd, persist and all .ta files from fitmware folder. That way it will work. Confirmed that there is no problem after flash.

Sent using XT1562 - Resurrection Remix/Optimus Kernel
[Sony Cross-Device General] munjeni:
Its recommend to flash all after switching from e.g. nougat to oreo, don't skip anything!
[Sony Cross-Device General] ch3mn3y:
[MENTION=4120742]munjeni[/MENTION]

As always, but still some people prefer to do an "update" and if they are not afraid of bootloops and other problems with bad/old data, they can do it. It's their choice, doesn't matter how good or bad :)
[Sony Cross-Device General] munjeni:
But can't skip things in case comming from nougat to oreo, in that case must flash everything, that's totaly two diferent roms! Or in case comming from old nougat to new nougat e.g. build 1.2.3.4 to the build 1.4.3.2, in that case also recommend flash all! I don't understand why you guys prefering dirty installation, it's always recommend wipe all in case you install lineage or aosp or etc, so the same thing is on stock rom too to have always clean install. You guys will get situation when somedays sony decide to change partition layout or something and you skip some important things and brick your phone because you didn't flashed all.
[Sony Cross-Device General] ch3mn3y:
Theoretically. Remember than even if it's meant to be an full flash set of files, Oreo is still an update, which can be flashed as OTA without loosing userdata. It's not safe, as it's totally different OS, but as far as I know it works flashed a OTA using Your tool.

I don't recommend it too, I know it's not safe, but some people like the risk and/or don;t want to lose their data and apps. You are not responsible for what users d with Your tool.
[Sony Cross-Device General] munjeni:
Yes sure, but since question was what need to be skip, as always I can say its recommend flash everything.
[Sony Cross-Device General] FartyParty:
I only flash system nowadays when doing fw updates. It's so pointless reflashing the whole thing just for an fw update.

Comparing all the times I've done full and quick there's literally no difference at all.

Did the same with Nougat -> Oreo on one of my XZP, no issues whatsoever.

Those .ta files are only causing problems with decryption which then forces a reformat.

The whole "recommend" thing is just pure bs.
[Sony Cross-Device General] ch3mn3y:
[MENTION=8004595]FartyParty[/MENTION]

Only system? No kernel??
[Sony Cross-Device General] FartyParty:
I always flash custom for magisk directly afterwards anyway.
[Sony Cross-Device General] munjeni:
[MENTION=8004595]FartyParty[/MENTION], flasing only system is wrong. You might need kernel too since almost every update folowing kernel updates too, in most case not only kernel is need. SO always full flash is recommend. Not a bs.
[Sony Cross-Device General] FartyParty:
It is BS, you "recommend" it because you made it an old habit and now you think your way is the best and only way.

No, I don't need to flash kernel if I'm gonna flash another custom kernel after.

System (and kernel if you plan on using stock) is enough.

I have 6 XZP, I have done extensive flashing comparing full and quick flashing.

For an update of the fw there's no need to do a full flash and that is facts.

Doing a full flash if you intend to just update+save data results in failed decryption which forces a format.

Doing a quick flash results in a successful update with no data loss.
[Sony Cross-Device General] munjeni:
You can do whatever you want, flashing whole fw is recommend. Not everybody have custom kernel and not everybody have unlocked bootloader. BS is in WC and not inside newflasher.
[Sony Cross-Device General] munjeni:
Word "recommended" mean nobody is force to flash everything, I just say what I have found trought snifing sony pc companion packets, sony pc companion doind excatly the same what I recommend, so if you believing that you're smarter than sony just do whatever you want, but don't complain when something goes wrong with your device.
[Sony Cross-Device General] FartyParty:
Not everyone wants to do a full flash each time they update their fw either.

Besides, you don't need custom kernel or unlocked bootloader.

You shove your "recommendation" down peoples throat if they ask about saving the files as if there's only one way.

If someone wants to save their data you tell them its bad when there's no difference.

I'm here to explain that you can either full flash or quick flash depending if you want to keep or lose data.

Both are are identical and just as safe.

So it's like I said, you're running on an old habit thinking it's the best solution.

You even said it yourself, that you wipe your phone each time a new fw comes out.

Also, this is directly from your OP.
[Sony Cross-Device General] munjeni:
I don't think, I know what I say! Flasing system and kernel, only, is possible, indeed. I don't saying that it is not possible. Its possible. My choice, always, is to install things fully and clean. But you can do whatever you want, thats your choice. Again and in the future my recommendetation is to flash whole fw since baseband, bootloader, oem, blabla, etc, lalala can't be updated by flashing only system image and kernel image, it must be clear.
[Sony Cross-Device General] munjeni:
Yes, but are you realy up to date? Indeed your system and kernel is up to date, indeed your userdata is not wiped, but rest of the things is not up to date since you skiped it. Yes, it works I know without "things" indeed, but how it works on top old bootloader and old baseband or blabla or lalala that's questionable. I'm not going to talk more about it, everybody have its own choice to do whatever want.
[Sony Cross-Device General] zippy01:
How do you run this on android? I tried cd to storage directory and using (./) and tried (am start) tried (run) nothing will work
[Sony Cross-Device General] munjeni:
Easy! Put firmware folder to the /data/local/tmp, do everything like you do on PC, only one diferencie is you don't have newflasher.exe so you can't double click on .exe, instead you need to start terminal emulator, cd to /data/local/tmp and start newflasher.

adb shell
su
cd /data/local/tmp/firmware
chmod 755 ./newflasher.XXX_pie
./newflasher.XXX_pie

In case newflasher didn't start look for error message because maybe you will need to stop selinux enforce which prevent you start newflasher, or you don't have root...etc
[Sony Cross-Device General] zippy01:
Thank you for that [emoji846] So root is needed?
[Sony Cross-Device General] munjeni:
yes sure!
[Sony Cross-Device General] pbarrette:
Oh. Hey! That's pretty cool. I hadn't seen that one before.

For a "dirty" flash on the XZP, sure, you can probably get away with that, but you are probably also missing updated sensor, modem, bluetooth, etc. firmware.

If you're going to dirty-flash, but want to keep your data, why not flash all SINs except

userdata

?

Besides, on the XZ1 and XZ1c there's a

vendor

sin that contains a lot of the stuff that exists in the XZP's system partition. I wanted to make this clear in case anyone with an XZ1/XZ1c thinks a

system_X-FLASH-ALL-XXXX.sin

is the only thing they need. It's not.

Actually, it's probably the lack of a vendor partition that is one of the reasons the XZP doesn't have Project Treble support. Repartitioning was probably out of the question for a OTA update, so no vendor partition makes the vendor segregation required for Treble more difficult.

Yes. Dirty flashing is never recommended, but if people weren't willing to experiment, then I'd have never flashed the US's OEM sin to the UK firmware and would then have to choose between having VoLTE or a fingerprint reader. Non-recommended flashing can, sometimes, work our for the best.

That said, if you're going to do it, you should know what you're getting into.
[Sony Cross-Device General] munjeni:
Everybody have choice, yes!
[Sony Cross-Device General] yacloo:
Xperia Companion reads out update.xml file for different situations

newflasher is just cli flasher and everything controlled manually it is not like flashtool

for example xzp's update.xml

<?xml version="1.0" encoding="utf-8"?>
<UPDATE>
<SYSTEMPARTITIONIMAGE>partition.zip</SYSTEMPARTITIONIMAGE>
<BOOT>boot.zip</BOOT>
<NOERASE>appslog_X-FLASH-ALL-42E5.sin</NOERASE>
<NOERASE>diag_X-FLASH-ALL-42E5.sin</NOERASE>
<NOERASE>ssd_X-FLASH-ALL-42E5.sin</NOERASE>
<NOERASE>Qnovo_X-FLASH-ALL-42E5.sin</NOERASE>
<FACTORY_ONLY>persist_X-FLASH-ALL-42E5.sin</FACTORY_ONLY>
<NOERASE>userdata_X-FLASH-ALL-42E5.sin</NOERASE>
<SIMLOCK>simlock.ta</SIMLOCK>
<NOERASE>cust-reset.ta</NOERASE>
<NOERASE>master-reset.ta</NOERASE>
<RESETNONSECUREADB>reset-non-secure-adb.ta</RESETNONSECUREADB>
<NOERASE>reset-wipe-reason.ta</NOERASE>
</UPDATE>
[Sony Cross-Device General] javiwz:
Is here some one used to flash a xz premium? I want to buy a Spanish Ver. xz premium and flash it to another version firmware, but I do not know if it is so stable as to be able to flash without serious risk.

I used the flashtool to flash my Z5 and T, is so stable that I can trust it.

So share me how is your experience using the newflasher, and if you can receive the OTA after the flash. Will this void the warranty?Where can I download the drivers for the xz premium ?

Regard
[Sony Cross-Device General] munjeni:
For example red one is inside xml file but is unused and never flashed. Don't know what you can do with that xml file. I'm snifed SPCC usb packets and done excatly the same what I saw in packet sniff log when device is flashed with an firmware!
[Sony Cross-Device General] munjeni:
Your question is already ansvered, just search. Tool, is stable and prety safe. Drivers you can get by:

method 1:

installing sony pc companion software, when you start flashing with pc companion software it will install necessary drivers!

method 2:

You can also extract drivers by starting newflasher and confirming with Y when tool prompt you about installing gordongate, gordongate.7z archive will create if you confirm with Y, extract gordongate.7z archive and install driver.
[Sony Cross-Device General] javiwz:
Ok, I will buy the xzp this afternoon and then flash the Italian's firmware

Enviado desde mi E6653 mediante Tapatalk
[Sony Cross-Device General] Kyrius:
I tried flashing my XZP with the newest CE 1 (i am currently on A1- Austria). I returns following message:

Error, didnßt got repartition OKAY reply! Got FAILcommand not authenticated

Am i missing something? i downloaded using xperifirm, extracted the partition files, and deleted all ta files.
[Sony Cross-Device General] ch3mn3y:
U use latest Newflasher? Did U unpack the partition.zip file?

Sent using D6503 - Resurrection Remix/RR N
[Sony Cross-Device General] Kyrius:
yes to both questions. i unziped it to partition folder as stated in the fist post.
[Sony Cross-Device General] shoey63:
But you deleted all the TA files. Some are required for bootloader and maybe partition as well. Only simlock.ta is dangerous, but I'm sure the tool prevents it from being flashed.

Edit: I'm talking from my experience with Xflasher on my Xperia X.
[Sony Cross-Device General] Kyrius:
i downloaded everything again and left all ta files except simlock untuched. No changes, still the same error. I guess i´ll have to wait for my carrier to updated.
[Sony Cross-Device General] munjeni:
Post a full log. I can't tell you whats going on without full log! In most case sony changed again partition file names, but last time it was fixed in newflasher v13, hope you used v13 last time? Again, log is need.
[Sony Cross-Device General] Kyrius:
v13? i see only v10, where do i find 13?

EDIT: tried wih v10 again. It worked. Thans for all the help guys!
[Sony Cross-Device General] karrouma:
with new flasher v10

delete all files in the folder and leave system_S1-SW-xxxxxxxxx

flash this file and boot you divice it will work

if you have rooted u can use prf creator and flash the file with twrp
[Sony Cross-Device General] munjeni:
Flash all if you coming from nougat to oreo! And if you get any error post newflasher log (full log)! In case you get e.g. partition error post full log + partition.zip
[Sony Cross-Device General] a121232:
GordonGate driver doesn't work on my laptop running Windows 10 64bit.

Anyone else?

Btw, I'm using XZP SO-04J (Japan). May I flash G8141's ROMs on it? And how?
[Sony Cross-Device General] ch3mn3y:
Did You try to install them in normal mode or in safe mode with disabled driver signature chcecking?

And I think international version's fw should work, but You will lose support for Felica, etc and some 3G/LTE bands as Your device supports different than G8141, so ones supported by modem and unsupported by firmware will be unavailabke, same with supported by modem, but not by fw.

Sent using XT1562 - Resurrection Remix/Optimus Kernel
[Sony Cross-Device General] munjeni:
I'm having win10 64bit and it works! And I have included working gordongate driver inside newflasher, just double click newflasher.exe, folow screen, confirm with Y when tool prompt you about gordongate, 7z archive with the driver will be created inside same folder with newflasher, extract 7z archive and install, it should work.
[Sony Cross-Device General] kamalaggi:
Any one with errors try the Sony cable that came with the phone. Everytime I flash using a 3rd party cable I always get a error message.
[Sony Cross-Device General] kanej2006:
Not working, tried for hours and hours with same old error message ''no usb device with vid::0x0fce''

I have all drivers correctly installed, ADB & Fastboot drivers all working yet the very same error message keeps being displayed. Any solution??
[Sony Cross-Device General] kanej2006:
Would it be possible to help with newsflasher? It seems so simple but after having spent hours on three different computers I'm yet to get anything done.

Keep getting errors when trying to flash firmware.

I'm currently on Android 7 Nougat rooted with recovery and root. Bootloader unlocked. I'm attempting to flash the new Oreo rom.

I've tried two different Sony Xperia XZ roms with newsflasher and unable to do so.

All drivers correctly installed, ADB & Fastboot drivers all working as normal.

After the bit that says ''Type 'y' and press ENTER if you wish to dump trim area'' I get errors whether selecting yes or no.

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

Incorrect function.

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

nBytes[0x0]

End
[Sony Cross-Device General] munjeni:
Hey dude, this is not for XZ! Only XZP and all 2017 devices! :)
[Sony Cross-Device General] kanej2006:
For me it was VERY complicated as I've never used Newflasher before and there was no guide of how to use it. :(

However, I came across THIS guide and I was finally able to get it working:

https://xdaforums.com/showpost.php?p=72958788&postcount=16

I have the XZ Premium.
[Sony Cross-Device General] Ambroos:
If you need to decide what files to delete to flash your device, just look at update.xml, it contains all the information. Files listed with NOERASE should be deleted, just like files listed with FACTORY_ONLY. That's all. Everything else should remain in place or you may end up with an incomplete flash.

I just did this on my XZ Premium (from 47.1.A.3.254 to 47.1.A.5.51) and it worked great, and it always worked great in the past too.

(Thanks again [MENTION=4120742]munjeni[/MENTION], newflasher is a godsend!)
[Sony Cross-Device General] glovesave:
saved my butt, when stuck on bootloop

You saved my butt, I followed a previous post and ended up in a bootloop.

I just did your steps and I now have working fingerprint unlocker (Central Europe 1 rom)

Thank you ! :good: