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

Root Key Hash[0x20]:

00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

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
Loader version: XFL-MSM8998-N-35
Phone ID: 0000:35783808059099
Device ID: A6D4C462
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: 5818FE00C000FE00030000030A990000E018FE00C000FE002818FE00C000FE00

- Error, go_into_flash_mode DATA reaply size: 12 less than expected: 13!
End.
Drücken Sie eine beliebige Taste . . .
[Sony Cross-Device General] munjeni:
Sorry forgot that DATA reaply do not contain ":", new version is out :o
[Sony Cross-Device General] munjeni:
In the same time I have added sanity checks (skip flashing partition.sin if outside partition folder), hope your device boot now :)

Edit:

I am limited to thanks per day so instead of pressing thanks button I must thank you, many thanks! Only remaining thing is your confirmation about if device boots!

And also I didn't see you have flashed boot delivery and ta files, its remain too, but before you do that please confirm your device boot, if not please don't flash boot delivery and ta files! Other than that seems all right. :)
[Sony Cross-Device General] munjeni:
I'm believing that thing is because your device is unlocked, but can you tell more details? Thats a message during boot or? Your device boots ok?
[Sony Cross-Device General] :
yes everything working, they just changed unlocked bootloader notification.

before flashing i deleted simlock.ta, i'm not sure if that's needed
[Sony Cross-Device General] munjeni:
So everything working, thats great! I don't know how that notification looks and have no idea what that notification mean so I can't by now make something to clear that notification, if you guys have idea how it can be gone let me know please!
[Sony Cross-Device General] :
after unlocking bootloader there was text saying that you have to wait 5 seconds before boot starts because of unlocked bootloader, they just changed graphics and text in new firmware
[Sony Cross-Device General] munjeni:
Please remember something, I made newflasher for all you, I didn't made it for me remember that, I dodn't ask for money for my work, all is for free, all is done in my spare time and for free, I have made everything just to make all you happy, remember that! I must say something more, some xda members, including some moerators, don't appreciate my effort, thats shame. I lost my recognised developer / recognised contributor title because ot that guys, I allways must remind all you that.

Enjoy flashing! Cheers! ;)
[Sony Cross-Device General] rocker00:
I don't even own 2018 model but hats off munjeni! respect :good:
[Sony Cross-Device General] munjeni:
Me too :) Many thanks for your words!
[Sony Cross-Device General] :
that's what i was thinking about since i saw this thread. it's hard to maintain android ROMs if you don't own the device and looking at what you do this is pure magic from my point of view
[Sony Cross-Device General] munjeni:
Thanks man for words and also for your time testing my tool, you are one of the guys who speedup developing process for 2018 model, you know that! You saved my log waiting time, support for 2018 models is done within one day which is almost more than fast, thanks again to You and to [MENTION=5571921]Snow_Basinger[/MENTION] for your time! We done not so easy job but we done it!

To all who have v11 please redownload v11, done one thing wrong in previous v11 (broken 2017 devices), its fixed now and new v11 can be used on 2017 devices too! Its recommended to redownload for 2018 device too!
[Sony Cross-Device General] Snow_Basinger:
I just followed your instructions.

It was hard but it was a fun time.

I want your wonderful knowledge even a little:)

Thank you for your hard work.
[Sony Cross-Device General] serajr:
Hats off... Pure genius ( I borrow the words already said by friend of ours [MENTION=4675598]shoey63[/MENTION] )!!

Respect!!
[Sony Cross-Device General] jimzhong:
Thanks. v11 works on my XA2(H3123). There is a double free bug in the proced_ta_file() function. I commented out some calls to free() to get it working.:)
[Sony Cross-Device General] Meloferz:
Hi Munjeni, flashed my Xperia XA2 H3123 with completed files downloaded from Xperifirm and was successful!

Thanks you very much for your work!
[Sony Cross-Device General] munjeni:
I'm thankls button limited so can't press it more than 16 times, thanks you guys, enjoy!
[Sony Cross-Device General] championswimmer:
I compiled older Flashtool for Mac https://xdaforums.com/crossdevice-dev/sony/flashtool-0-9-24-4-mac-t3775160

Figured out that XZ2 isn't supported. I will try to take some time out to compile Newflasher for Mac.

Will need -

1. xmlwf for mac prebuilt (searching)

2. libexpat for mac prebuilt lib (searching for this too)

Apart from that it'll be easy to make this work on Mac.
[Sony Cross-Device General] dcrin3:
[MENTION=4120742]munjeni[/MENTION] I don't even care about the silly title. I see the knowledge, the work, the time put in(hours and hours and days and days, to no end). It is utter insanity to see this given to a community for free, THANK YOU VERY MUCH.

Let me you ask a question about how newsflasher works. For example, let me use the XZ1 for the discussion. When you write the code to push the .sin files into the phone, is the technique going to be the same for that very phone? I'm assuming because you have a new version, you had to push code differently for newer models.

Will the technique always be the same for the XZ1? Then having to modify newsflasher to match a new technique for say, a new series of phones?

Thanks again for your hard work.
[Sony Cross-Device General] dcrin3:
Here is another screenshot of it successfully finishing.

I was flashing new April security updates. I tried going back to March 1 security update release but my device is bootlooping now.

I get the sony logo for about 15seconds before it restarts the device.

=============================================

Not to worry, I had issues with USERDATA space because of moving between XZ1 - .119 & XZ1 .145... I think it was too much back and forth, between the userdata, boot.img. It's fixed now, plus I had backups.
[Sony Cross-Device General] li0nh3art3d:
My issue on my XA2 is that the new baseband will not downgrade when flashing the older firmware, but the bootloader and system/vendor/oem files will, thus causing a bootloop from being on the wrong baseband.

The reason I wanted to downgrade is because Xposed does not work on the new update; it causes bootloop.
[Sony Cross-Device General] munjeni:
Thanks! Sin is special extension which need to be extracted and its contents uploaded to the phone, short explanation. There is 4 sin version ,1,2,3,4, every year, two it change, so tool need to be litle modified for that. Protocol used for flashing change too, so tool again need to be litle modified. Generaly nobody know e.g. if xz1 get things changed (i'm believing not), and also nobody know if sin version change for an phone model e.g. for xz1, in short explanation hope it help you understand how it working. :)
[Sony Cross-Device General] munjeni:
In most case bootloop is caused by messing phone with two diferent version of the files. I always recommend flashing whole firmware including every each firmware file!
[Sony Cross-Device General] li0nh3art3d:
I flashed the entire firmware (minus userdata & simlock), what caused the bootloop is when i downgraded to the lower version of firmware (because Xposed doesn't work on the new version), i ran fastboot getvar all, and the bootloader is on the older version, and the baseband stays on the new version (baseband won't downgrade).

I am unbootlooped now because I flashed the new firmware again, however now Xposed doesn't work (if i install it, it will bootloop)

Is there any way to downgrade the baseband, or is it stuck on the newer version? because even though it doesn't give an error when flashing, fastboot getvar all indicates it's not downgrading. (the bootloader does downgrade however)
[Sony Cross-Device General] munjeni:
From my knownledge never was a problem downgrading old firmware including old baseband and things at least on my z1c, did you missing something? I think your bootloop is caused by diferent format of the userdata e.g. diferent selinux context on userdata which cause bootloop, or maybe diferent userdata uid. About baseband version can't tell, I never paid atention to version of the baseband. Probably your old firmware contain the same baseband like your new firmware! Downgrading from totaly diferent version of rom is always recommended to flash whole firmware including userdata, all ta, all sin, all!
[Sony Cross-Device General] munjeni:
I'm believing you have flashed the same baseband e.g. your old firmware contain the same baseband like it was on new firmware.
[Sony Cross-Device General] li0nh3art3d:
I definitely flashed the modem.sin file, it flashes with no errors, but upon bootlooping after downgrading, i ran the fastboot getvar all command, and it indicates that the bootloader does indeed downgrade, however the baseband version remains on the newer version; it will not downgrade, therefore when downgrading, it triggers a bootloop. the userdata backup I have is from the older firmware, so if it was the userdata, it would fix it by restoring the backup data, but i don't believe this is the case because 1) i tried that and 2) fastboot getvar all indicates the baseband is still the newer version after downgrading.

I was wondering if there was something in the code somewhere preventing from writing an older version over a newer version perhaps

oh well. I'm sure a new Xposed framework will be released sooner or later; hopefully it will work again once it's released ?

---------- Post added at 08:38 AM ---------- Previous post was at 08:35 AM ----------

the older firmware had a lower baseband version... I remember running fastboot getvar all, it was 50.A4.104, the new one is 50.B5.79 i think

It is not a huge deal, but I wouldn't mind going back down to 50.A4.104 firmware. The bootloader downgrades, baseband does not for some reason :sad:
[Sony Cross-Device General] munjeni:
Try reflash whole old firmware including all ta files, including all sin files, including partitionimage, including boot delivery, and including userdata, all! Don't restore anything! And tell me. I am prety sure it will work!

About old baseband and new baseband, we can't know what is done on remote server, maybe sony refreshed all old firmwares with new baseband or maybe your firmware which you downloaded contain new baseband, we don't know that for sure, I'm believing baseband is no problem dowgrading to oldest one, problem is nobody know which firmware contain that old baseband. How are you sure that your old firmware have old baseband? You can extract sin file and confirm that by looking into hexeditor and string of the baseband version, thats a only way to get sure you have old baseband file!
[Sony Cross-Device General] munjeni:
Can you post modem.sin file of the old firmware?
[Sony Cross-Device General] li0nh3art3d:
i am not near my PC right now, but i have a backup of the older modem.sin converted to img with unsin

https://drive.google.com/file/d/1tDcuaIwQFAJeUbbSK9luBQuQCW2BC5Xc/view?usp=drivesdk

i attached the output from the older firmware. when i flash the older firmware now, the bootloader downgrades, the modem says it flashes without any error, however when i did getvar all (to confirm the firmware had downgraded since I was bootlooped), it says B.5.79 baseband, not the A.4.104 like the old, however the bootloader is the older version, which i believe is why older firmware caused the bootloop.

i will try again when i get to my PC flashing userdata and simlock as you say..
[Sony Cross-Device General] munjeni:
Flash all without skipping anything and let me know!

Edit:

I see A.4.102 on your picture
[Sony Cross-Device General] munjeni:
Inside yours modem.img, extracted it and searched for two combinations of case sensitive strings "A." and "B.", found nothing related to something similar to two version you posted, even there is nothing like A and B strings which can point me to the version of the baseband, so I am unsure if baseband is realy inside modem.sin! Even I have no idea in which sin file baseband lives. I can't help you more with this sorry! Just to sugest you, flash all from an firmware, don't skip anything, don't restore anything, just make fully clean installation of the firmware you need and tell us about result. Simlock will be skeep since my tool don't flash simlock ta file, so no need to delete simlock.ta. Don't mix firmware files. Chose fw you want to flash, flash all files and tell us. If possible post full log from newflasher so I can see what you have flashed.
[Sony Cross-Device General] munjeni:
By your post 1.

By your post 2 -> https://xdaforums.com/showpost.php?p=76173543&postcount=803

By your post 3 -> https://xdaforums.com/showpost.php?p=76175101&postcount=806

Trough these 3 posts from you I clearly see your updated baseband. :) Or I misunderstand something?
[Sony Cross-Device General] li0nh3art3d:
yes the point is I want to downgrade it.. but it's stuck upgraded, it won't go back down
[Sony Cross-Device General] munjeni:
It depends on which version of the baseband is inside firmware! You can't expect baseband e.g 1111111 if firmware have baseband 2222222, understand? You must search for firmware which contain baseband version you want.
[Sony Cross-Device General] munjeni:
And one more thing, baseband is inside amss sin file, not inside modem sin file.
[Sony Cross-Device General] li0nh3art3d:
i understand that. i am flashing the previous version of firmware, however the baseband won't downgrade back
[Sony Cross-Device General] munjeni:
Whole?
[Sony Cross-Device General] li0nh3art3d:
yes. The bootloader and everything else will downgrade but I think sony may have put something in the newer firmware code to disable downgrading of the baseband because everything else goes down, the bootloader and everything just not the baseband..
[Sony Cross-Device General] munjeni:
Ok, I have no device to test that thing but who know maybe it is realy true. Hope somebody confirm that. Thanks!
[Sony Cross-Device General] amakuramio:
newflasher is stuck on .... on ta backup even if i press yes or no

nvm needed a second reconnect :)
[Sony Cross-Device General] oF2pks:
"no cache , nuh cry" : https://github.com/sonyxperiadev/de...c7708ee#diff-851c1957e02c2723bb9bf93945de321c

https://hastebin.com/ritibinike.coffeescript

Can some tell:

-approximate speed comparison between NewFlasher & Flashtool for the complete flashing process,

-Playstore stays <certified> or not ?

btw: for xz1' decryption purpose, after flashing, is it possible to avoid the very first boot, then fastboot twrp for format /data + flash NOverity-opt-encrypt(V2) to change "fileencryption" to "encryptable" in /vendor/etc/fstab.qcom.
[Sony Cross-Device General] sonyalmarshad:
flasher v11 worked like a charm with my Sony Xperia XA2 Ultra H4213

after flashing started my device like a new device and everything was ok..

but the message on the boot still remains :

Your Device Software Can't be Checked for Corruption

Please Lock your Bootloader..

i dont know if there is a solutiuon for this matter ??
[Sony Cross-Device General] jimzhong:
I am also interested in finding a solution.
[Sony Cross-Device General] amakuramio:
can anyone explain in detail the functions of these ta files? my battery is stuck to 0% when downgrading to nougat on xz premium

I didnt flash them
[Sony Cross-Device General] Meloferz:
Edit: wrong thread

Enviado desde mi H3123 mediante Tapatalk
[Sony Cross-Device General] jimzhong:
1. I only used newflasher. It took about 5 minutes.

2. uncertified. (I unlocked the bootloader and installed magisk).
[Sony Cross-Device General] ch3mn3y:
I've seen ine thing, not sure if someone reported.

When flashing firmware to XA2 or XA2 Ultra Newflasher says that it's missing the partition files in partition folder.

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

However XA2 firmware seems to have only one partition-X.sin file, which is not part of .zip and even if it's enough to create folder, call it partitions and put that file inside, maybe [MENTION=4120742]munjeni[/MENTION] You could make it easier for some users, by making Newflasher to flash this file even outside the folder? Maybe using an if statement? Or will it break the script?

Didn't check how it is with XZ2 and Compact.
[Sony Cross-Device General] munjeni:
I can't improve partition flashing mechanism since files located in partition folder use diferent command set for flashing. You are right, partition,sin file on some devices is inside top folder with all other sin files, last time I have noticed that after some guy reported "command not allowed", it was because partition.sin file was inside top dir and instead of getting command "repartition" got command "flash" which gaved error "command not authentificated". So I wrote notice inside newflasher":

No .sin files in partition dir...
You must extract partition.zip into 'partition' folder if you want flash partition image!
[COLOR="Red"]On 2018 models you must move partition sin file to 'partition' folder if you want flash partition image![/COLOR]

which tells that partition.sin file must be moved to partition folder in case need to flash (the same like for 2017 models)! Can't change that since its well known allready that partition files must be inside partition folder. Maybe send message to xperifirm dev to make some functions for move that sin file to partition folder?
[Sony Cross-Device General] ch3mn3y:
Thought it would be enough to use some if/else command like in C language (and probably most if not all others). Seems not. Sorry for bothering :)
[Sony Cross-Device General] munjeni:
Not easy and realy not need since thing about partition flashing on 2017 devices is allready well known, no want to make mess when it is allready known. Only a thing maybe somebody contact xperifirm dev to make some more func (inside firmware unpack function) to move that sin file to partition folder, I think its better idea:)
[Sony Cross-Device General] oF2pks:
Anyway, following xda guide for Google registration works fine for my "Newflasher-ed" modified xz1

https://www.xda-developers.com/how-to-fix-device-not-certified-by-google-error/

Indeed! 3mn on both Win10 & Linux

Thx [MENTION=4120742]munjeni[/MENTION] , I also confirmed upgrade works 100%, on fbe encrypted xz1, with /userdata__.sin & /fotakernel__.sin removed before flash, to keep twrp + apps + settings + magisk.img.

Now my "problem" is Widevine L1 loss towards L3; any idea how to fix that ( [MENTION=8363210]sToRm//[/MENTION] ) ?

I even tried restore my

"very first"

TA.bin (dd) & matched backup (twrp), but no luck: still L3.
[Sony Cross-Device General] mirhl:
≥ XZ premium TA partition is different and can't just be backuped with previous methods.

(and storm is too busy keeping at bay noobs to notice when I raise the issue)
[Sony Cross-Device General] dcrin3:
My play store is not even certified, I usually use newsflasher for updating minus userdata.sin file. DRM info matches yours, streaming services are working(nfx,prime). Is there anything else that's important to have for DRM(camera's working too)?

---------- Post added at 08:13 PM ---------- Previous post was at 08:02 PM ----------

[MENTION=4120742]munjeni[/MENTION] These .ta files can be skipped/removed until further notice right? Our phones will never need them for updates right?
[Sony Cross-Device General] mrsatan:
ERROR: GetOverLapped_out_Result: failed with error code 1 as follows:

Incorrect function.

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

nBytes[0x0]:

- Error writing command getvar:max-download-size!

I get this over and over on two different machines. Tried multiple cords and different drivers. I can fastboot and such with adb just fine but newflasher just never wants to work. I don't understand why. This isn't my first rodeo either.

---------- Post added at 03:21 PM ---------- Previous post was at 02:46 PM ----------

Ok so it seems to only work with the flashtool drivers. Good to know for future individuals.
[Sony Cross-Device General] munjeni:
Post newflasher full log next time since I didn't see much from these short log! Possible things, bad gordongate driver (use one from newflasher, double click newflasher and extract gordongate.7z archive and try install that driver), seccond thing maybe your firmware is corupted (try redownload)...
[Sony Cross-Device General] mrsatan:
I used the flashtool drivers and it worked fine. Something with it not seeing the device properly with the other drivers.
[Sony Cross-Device General] octopus82:
it does'nt work with xz2 h8216 , any other solution please ?
[Sony Cross-Device General] hungvip2001:
Hello, guys:)

Is this work with xz1 ?:confused:
[Sony Cross-Device General] dcrin3:
Yes of course.
[Sony Cross-Device General] munjeni:
Which I know it works! Post your newflasher log if you need help.
[Sony Cross-Device General] munjeni:
Thanks! Somebody already mentioned about that bug https://xdaforums.com/showpost.php?p=76165175&postcount=788 , I will try to fix!
[Sony Cross-Device General] munjeni:
V12 is out, quickly fixed bug , thank you reporting this! :)
[Sony Cross-Device General] munjeni:
Can you please try 32 bit version? I still not understand where and why free call fail expecialy because now all free call is checked by if() . [MENTION=7952659]jimzhong[/MENTION] can you help me here?
[Sony Cross-Device General] :
same on 32bit
[Sony Cross-Device General] munjeni:
Huh, reading almost 30 minutes and I unable to figure why free call fail, can You please run newflasher with valgrind?

https://stackoverflow.com/questions/5134891/how-do-i-use-valgrind-to-find-memory-leaks
[Sony Cross-Device General] :
here it is
[Sony Cross-Device General] munjeni:
Strange but no previous error in your log or I'm so tired and unable to see :(

If I didn't get this I will try to remove dinamyc alocation completely from function get_reply, have no idea why free(get_reply) fail after caling function get_reply. I can't promise when I will fix this, have so many priority jobs in my private life, but hope somebody figure this :( Anyway thanks a lot reporting this!
[Sony Cross-Device General] :
windows version works just fine on VM just as on bare metal so it's not that much of a problem
[Sony Cross-Device General] munjeni:
V13 is out! I have removed now dynamic allocation from function get_reply so there is no more maloc and free and hope v13 is working now :)
[Sony Cross-Device General] :
V13 works as expected, system restored
[Sony Cross-Device General] munjeni:
Very good, many thanks!
[Sony Cross-Device General] hungvip2001:
Hi, guys:p

What is the best way to clean install stock rom with a unlocked bootloader? Use flashtool or newflasher?

I try newflasher but my problem still there:eek:
[Sony Cross-Device General] munjeni:
More details would be of a good help! If your plan is to use newflasher flash all, don't skip .ta files and don't skip anything. If you have any problem include here newflasher log, picture or whatever