yashsingh1/xdaforums huggingface dataset:
[Sony Cross-Device General] 1xz1c:
Thanks so much for the reply, @munjeni. So I don't need to place any file inside the firmware folder?

Here's what I've got:

`.local/share/newflasher` contents:

expat-2.2.9 (folder)

include (folder)

zlib-1.2.11 (folder)

.git (folder)

Android.mk

Application.mk

makefile

newflasher (shared library)

newflasher.1 (text doc)

newflasher.c

newflasher.ico

newflasher.rc.in (text doc)

readme.md

version.h

.gitignore

bin

Link target: /home/xxx/.local/share/newflasher/newflasher

(allowed to execute; open with Autorun Prompt)

Connected phone in flash mode.

~$ cd /home/xxx/Desktop/G8441

~/Desktop/G8441$ /home/xxx/bin/newflasher

bash: /home/xxx/bin/newflasher: Not a directory

I'm probably missing something simple and/or stupid. Sorry to take up your time with this. I really appreciate your work and help.

Edit: I tried this:

~/Desktop/G8441$ /home/xxx/bin

Which got me this:

--------------------------------------------------------

bin v41 by Munjeni @ 2017/2020

--------------------------------------------------------

Determining available free space:

Available space to caller = 41612 MB

Total space on current drive = 119170 MB

Free space on drive = 47708 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

cannot open /dev/bus/usb/002/001 for writing

cannot open /dev/bus/usb/001/005 for writing

cannot open /dev/bus/usb/001/004 for writing

cannot open /dev/bus/usb/001/003 for writing

cannot open /dev/bus/usb/001/002 for writing

cannot open /dev/bus/usb/001/001 for writing

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

Some research led me to set these udev rules:

SUBSYSTEMS==”usb”, ATTRS{idVendor}==”0fce″, ATTRS{idProduct}==”31f4″, MODE=”0666″

SUBSYSTEMS==”usb”, ATTRS{idVendor}==”0fce″, ATTRS{idProduct}==”b00b″, MODE=”0666″

SUBSYSTEMS==”usb”, ATTRS{idVendor}==”0fce″, ATTRS{idProduct}==”0dde″, MODE=”0666″

Then I restarted, reconnected device in flash mode and tried `~/Desktop/G8441$ /home/xxx/bin` again, but with same result as before.
[Sony Cross-Device General] munjeni:
You need to become root as newflasher not working while executed as unprivileged user! Google it "how to become root user" on your distro e.g. Ubuntu! Please don't make this thread as "how to use linux machine", this is newflasher thread, if you need to learn basics use google for it. You are on a good way, what you need to do is to become root and it will start flashing!
[Sony Cross-Device General] ruchan:
Hi,

I'm trying to flash a Docomo XZ3 to Global firmware but unable to do so, here's the error log on newflasher:

Product: SO-01L

Version: 0.4

Bootloader version: 1310-7079_X_Boot_SDM845_LA2.0.1_Q_208

Baseband version: 1313-7727_52.1.B.0.422

Serialno: QV713NW31K

Secure: yes

Loader version: XFL-SDM845-O-25

Phone ID: 0000:35652809245492

Device ID: FA93263E

Platform ID: 2008B0E1

Max download size: 104857600

Sector size: 4096

Rooting status: ROOTABLE

Ufs info: SKhynix,H28S7Q302BMR,A002

Emmc info: FAILEmmc-info not supported

Default security: ON

Keystore counter: 2

Security state: dS3QaYTgEB9EEOi83MaafFx6k+wygTuc1UW4KpXTsSo=

Sake root: B7DF

S1 root: S1_Root_e090

Root key hash: C8D92A2DBA1482588EFF712963329500AC7155CEA8494FDD4B7B180F2F871801

Slot count: 2

Current slot: b

Device is put now in flash mode.

Repartitioning...

Found partition_delivery.xml in partition folder.

Determining LUN0 size...

UFS raw data[0xA9]:

00000000 40 00 00 00 00 00 03 04 01 00 01 7F 00 01 04 00 @...............

00000010 02 10 08 18 01 02 03 04 01 AD 10 10 02 00 1D 01 ................

00000020 03 20 43 02 20 00 00 00 00 00 05 00 00 00 00 00 . C. ...........

00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

00000040 23 02 00 01 00 00 00 00 00 00 0C 00 00 00 00 00 #...............

00000050 EE 58 00 00 00 00 01 02 00 00 00 00 00 EE 58 00 .X............X.

00000060 00 00 00 23 02 01 01 01 01 00 00 03 00 0C 00 00 ...#............

00000070 00 00 00 00 04 00 00 00 00 01 02 00 00 00 00 00 ................

00000080 00 04 00 00 00 00 23 02 02 01 02 01 00 00 03 00 ......#.........

00000090 0C 00 00 00 00 00 00 04 00 00 00 00 01 02 00 00 ................

000000A0 00 00 00 00 04 00 00 00 00 .........

LUN0 size = 62480384

Processing partition-image-LUN0_X-FLASH-ALL-B6B5.sin

- Extracting from partition-image-LUN0_X-FLASH-ALL-B6B5.sin

- Extracting signature partitionimage_0.cms

- Uploading signature C:\Users\Chan\.flashTool\firmwares\Downloads\H8416_Customized UK_1316-4520_52.1.A.3.92_R10C\partition\partitionimage_0.cms

signature:0000053c

Error, didn't got signature OKAY reply! Got reply: FAILFailed to verify cms

Set slot 'b' active.

Device is put now out of flash mode.

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

Press any key to continue . . .

What am I doing wrong? Please help. TIA!
[Sony Cross-Device General] munjeni:
You need to flash SO-01L firmware, you can't flash other!
[Sony Cross-Device General] 8CXLGM:
After I flashing the xz3 of Softbank to h8416, I found that the CPU small core was full all the time and couldn't sleep deeplyIt (It consumes a lot of electricity).At the same time, there seemed to be something wrong with the classification of storage space, and there was less storage space. It should be a 64GB mobile phone PS:Newflasher shows success.
[Sony Cross-Device General] Stoilpseudo:
Hi Everyone !

I've been trying to flash a Stock ROM for my sony XPERIA 5 II to get rid of the operator overlay.

All drivers are up to date, I got the last version of newflasher(v41.0) and dowload the latest ROM Available on Xperifirm (XQ-AS52_Customized EEA_58.1.A.3.87)

I got the following message when i try to flash it

Do you have any idea on how to fix it ?

Thanks for your help.
[Sony Cross-Device General] munjeni:
Newflasher must use usb version 2, try put your cable in USB2.0 slot instead of USB3.0 or USB3.1 , we allready discused here in relation to problem with fast USB like USB version 3, see post https://xdaforums.com/t/tool-newflasher-xperia-command-line-flasher.3619426/post-84428071 . Newflasher uses asynchronoys usb transfer and to get it work on fast usb like on modern computers I must implement synchronous usb transfer probably but I have no free time right now for it, maybe in two-three months I will do it. Try to use USB2.0 or another usb cable!
[Sony Cross-Device General] munjeni:
@8CXLGM which bug you see about internal storage? I see everything went ok in your log.
[Sony Cross-Device General] p0k3sm0t:
Any one flash the US Android 11 firmware yet? Is volte working now?
[Sony Cross-Device General] 8CXLGM:
When I finish flashing, the storage space setting of my mobile phone shows that "system" occupies 1GB, while "other apps" occupy 10GB. In the next few days, the space occupied by "system" will eventually become 10GB, while "other apps" will still occupy 10GB. That is to say, my mobile phone will lose 20GB of storage space if I don't install any apps. You can see the picture below, the app I installed The largest is 3gb, and the second is 600MB
[Sony Cross-Device General] p0k3sm0t:
If anyone is interested. I flashed us android 11 do my xperia 1ii. I can see no issues. And VOLTE is working. I'm going to continue setting up the phone. Let you know if I have anything come up.
[Sony Cross-Device General] munjeni:
Its nothing in relation to newflasher! You should open thread in your phone model subforum on xda, it have nothing in relation to newflasher.
[Sony Cross-Device General] dmam27:
Hi all,

I'm trying to flash my xperia 5ii and I'm facing the following error:

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

Overlapped I/O operation is in progress.

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

nBytes[0x0]:

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

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

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

Overlapped I/O operation is in progress.

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

nBytes[0x0]:

- Error writing command powerdown!

Closing device.

Press any key to continue . . .
[Sony Cross-Device General] levone1:
Hi @munjeni - I have Xz2 compact, model h8314, and I'm flashing files extracted from ftf "H8314_52.0.A.8.25_1313-2374_R4B.ftf", and I'm getting the same error

Could there be some other cause?

Difference with my log is the first few partitions flashed with "OK" message, (I think Bluetooth and 1 or 2 others), but then I got failed with message about reject signature..

So I found out that it was tripping over files, "partition-image-LUN0_X-FLASH-ALL-B6B5.sin partition-image-LUN1_X-FLASH-ALL-B6B5.sin partition-image-LUN2_X-FLASH-ALL-B6B5.sin"

Not sure what they are, but if I remove them, everything flashes OK, but phone won't boot...
[Sony Cross-Device General] munjeni:
Without log I can't know what is wrong. You need to put partition images into partition folder
[Sony Cross-Device General] levone1:
Thank you - sorry, my fault for extracting improperly. It's all solved now, and all partitions flash with no error, except for sync response error at the end. But the phone still won't boot. I just get Sony logo for 10 seconds and reboot...

Thanks
[Sony Cross-Device General] levone1:
I can post a log if helpful, but it's all normal and everything "OK" except for sync error at the end..
[Sony Cross-Device General] munjeni:
See this https://xdaforums.com/t/tool-newflasher-xperia-command-line-flasher.3619426/post-72610228
[Sony Cross-Device General] munjeni:
I'm believing this https://xdaforums.com/t/tool-newflasher-xperia-command-line-flasher.3619426/post-84603931 cause uncatched reply from sync response. You should ignore it since few devices reported that problem, even newflasher worked by default to skip sync response year ago, it was known problem and there is no fix for it curently until I port synchronous usb functions.

I'm made dedicated post for known problems and its fix -> https://xdaforums.com/t/tool-newflasher-xperia-command-line-flasher.3619426/post-72610228 and will periodically update it
[Sony Cross-Device General] levone1:
OK thanks. So do you think in my case that the sync error could be causing the problem? Because I have no other errors, and everything flashing OK, but still no boot...
[Sony Cross-Device General] munjeni:
I realy don't know, maybe! Try diferent rom, cable or usb2 slot if you have. Also you might try flash partitions first, reboot than flash one by one sin file to get idea which one cause problem. Also you should switch to diferent slot before reglash maybe some partitions on diferent slot have corruption and cause sync isue, I dont know realy
[Sony Cross-Device General] chrisrg:
Since December I'm using newflasher to return xperia XA2 to stock condition and it's a great tool, much appreciated, many thanks.

I thought it was supposed to flash to both slots but notice this does not appear to happen when flashing device with slot_a active(as far as I can understand it) although this also looks normal behaviour when compared to other logs in this thread.

Flashing device with slot_b active does flash both slots, except bootloader (slot_b only)

Is this the correct behaviour for newflasher? Is running newlasher twice an acceptable workaround, and if it is, would flashing both slots without booting device in between be ok?
[Sony Cross-Device General] munjeni:
By default newflasher didn't flashed things to booth slots, but as per reguest -> https://github.com/newflasher/newflasher/issues/29 I have implemented it.
[Sony Cross-Device General] chrisrg:
I've edited my first post to try to make it clearer.

I've read the github a few times and all of this topic and understand flashing to both slots is implemented.

When flashing though,the log shows when device is flashed with slot a active, only slot a gets flashed.

Never mind.
[Sony Cross-Device General] munjeni:
Hey you are right! And you are first who noticed that! I will try to fix that bug soon! Thank you for reporting that!

Edit:

Quickly found my mistake on line 4273 -> https://github.com/newflasher/newflasher/blob/master/newflasher.c#L4273 and allso on line 4349 -> https://github.com/newflasher/newflasher/blob/master/newflasher.c#L4349 OMG!
[Sony Cross-Device General] munjeni:
New version is out!

- version 42 (11.03.2021)

Fix bug in flashing booth slots when current slot is A, thanks to @chrisrg for discovering bug!
[Sony Cross-Device General] chrisrg:
I'll give it test run tomorrow! 😀
[Sony Cross-Device General] chrisrg:
Ah, many thanks for this @munjeni. I couldn't wait to try it; works perfectly now.

newflasher flashes to both slots when slot a is active slot. Log included just in case anyone wants to see it.

Flashing to active slot b also goes to both slots, same as before. Log same as one in post #1,649 above.
[Sony Cross-Device General] munjeni:
Thanks! One thing which is not flashed to booth slots is bootloader, I will add in next version!
[Sony Cross-Device General] 0120qwq:
Ťhanks you bro :)

i have a question,my phone is xperia 1 ii, I upgraded the system to the latest version, but I found bugs and defects, so I wanted to use newflasher to downgrade to the old system, but when I downloaded the firmware and flashed it in, the phone could not be turned on and it displayed "your device is corrupt, it can't be trusted and will not boot."

Is this what is the reason? Can it be solved?
[Sony Cross-Device General] Pandemic:
Yes it can be solved by posting a log.
[Sony Cross-Device General] munjeni:
Open your browser and read carefully ten pages back...
[Sony Cross-Device General] Pandemic:
I have a question and maybe someone tried it..

Can we downgrade from android 11 to android 10 or do we get some issues ? I have unlocked bl btw.
[Sony Cross-Device General] munjeni:
Moved to -> https://xdaforums.com/t/tool-newflasher-xperia-command-line-flasher.3619426/post-72610228
[Sony Cross-Device General] lgoxvxe:
I used lg g7 OTG to flash Xperia 1, and showed an error. Did I do something wrong?
[Sony Cross-Device General] KK102:
Hello, I was using newflasher to flash the firmware, but when it finishes, the phone just keep boot again and again, please reply this if

someone know what to do.

the final message from the CMD

Processing boot delivery...

boot_delivery.xml not exist in boot folder or no boot folder.

Set slot 'a' active.

Device is put now out of flash mode.
Sent command: Sync
Waiting sync to finish...
.sync response[0x4]:

00000000 4F 4B 41 59 OKAY

done
Sent command: continue.
reboot mode response[0x4]:

00000000 4F 4B 41 59 OKAY

Done.
Closing device.
[Sony Cross-Device General] munjeni:
A segmentation fault with error 139 basically means you are trying to read something you don't have access to. That have many meaning which you will need to figure out (see dmesg for idea), for example maybe selinux denials, insuficient privilegies... etc
[Sony Cross-Device General] munjeni:
No log and no real reply. Rollback protection -> https://xdaforums.com/t/tool-newflasher-xperia-command-line-flasher.3619426/#post-72610228
[Sony Cross-Device General] AkazaDorian:
Has anyone tried fixing the OTA issue on Android 11 for Xperia 5 II? Would like to know some details on how it should be done. Thanks in advance!
[Sony Cross-Device General] p0k3sm0t:
What OTA update you talking about? If flashed with correct firmware OTA updates still go through?
[Sony Cross-Device General] AkazaDorian:
Please check page 71 of this thread, there was some discussion about it on Android 10
[Sony Cross-Device General] tuval:
Hi.

I have XQ-AS52 demo. I flash phone other region firmware, but the demo doesn't go away. Maybe someone can help?
[Sony Cross-Device General] munjeni:
Its allready discused in this thread and figured out that it is not newflasher isue but firmware usue! Isue is identified inside vendor partition inside customisation xml file vendor forgot to change customisation string! Try search for that post.
[Sony Cross-Device General] AndreyAleks:
Oh, your program doesn't ignore simlock.ta anymore (v13 did), and no mention in changelog...

I just flashed my phone and now it doesn't see simcards :(

What can I do?
[Sony Cross-Device General] munjeni:
It perfectly ignore all units from simlock! Even 2500 downloads and nobody had problem with simlock. In diferencie from version 13 to right now there is nothing changed in function flash_ta. Post your log.
[Sony Cross-Device General] munjeni:
Yes simlock.ta is completelly ignored! See your log:

Processing simlock.ta
- Partition: 2
- Unit: 7DA (2010)
- Unit size: 0x13c
- Skipping unit 7DA

After you switch to diferent slot you must always reboot to make slots active othervise you are on the same slot until you reboot. Further things about your sim status please ask in thread of those rom author or inside your phone forum...
[Sony Cross-Device General] AndreyAleks:
Thanks for confirmation! I've tried to flash all firmware files (except simlock and persist) and now it's ok. All working just as earlier.
[Sony Cross-Device General] shyshi2021:
Hello, I am using the latest version of firmware and newflash, the flashing is complete, but I cannot boot
[Sony Cross-Device General] p0k3sm0t:
Please add log if you want help.
[Sony Cross-Device General] munjeni:
Flash everything excluding only persist.sin
[Sony Cross-Device General] shyshi2021:
Delete persist.sin flashing again
[Sony Cross-Device General] munjeni:
I must see log of the newflasher otherwise I have no idea how to help you
[Sony Cross-Device General] md07:
hi all, i need help

My phone original is Xperia XZ2 Premium SOV38 AU, i flashed succesful to UK firmware, before flash UK firmware, i deleted all file.TA and persist.sin.

But now,i want to back original AU firmware. So, can i flash all file (inclue TA and PErsist) ?

And, AU firmware is now Android 9, but my phone now on Android 10 UK firmware. So can i downgrade by Newflasher?
[Sony Cross-Device General] munjeni:
Flash everything, only exclude persist
[Sony Cross-Device General] idaneli2:
man i really need your help with newflasher can you reply me in private?
[Sony Cross-Device General] MegaSharkXDA:
Hi there! First time using Newflasher (v42).

I tried to flash version H3213_Customized IBE_50.2.A.3.77-R1B onto an Android 8 Xperia XA2 Ultra.

I got no errors on the command line but ended up on a bootloop (doesn't get past Sony screen). Flashing process seemed unusually fast. I can't find any log on the newflasher folder apart from a flash_session\oem.000 file. Is this it?

Can you help me out? Thanks in advance!
[Sony Cross-Device General] munjeni:
Hi, log is inside main screen of the newflasher!
[Sony Cross-Device General] p0k3sm0t:
You would flash the same way. Not sure if you have downgrade protection or not. The mark 2 devices will NOT downgrade. Security protection to not go back to an u secure version.
[Sony Cross-Device General] MegaSharkXDA:
Sorted it out on my own, thanks :) Device has successfully booted
[Sony Cross-Device General] munjeni:
You should do downgrade! More info inside post 4 -> https://xdaforums.com/t/tool-newflasher-xperia-command-line-flasher.3619426/post-72610228
[Sony Cross-Device General] Sjll:
Hi,

Here I found a 'bug': On Sony's Dynamic partitions devices, the vendor_b and product_b are empty in super image. If the users staty on slot B before using newflasher, they will bootloop when try to boot. Is there anyway to force the slot to A after flashing?
[Sony Cross-Device General] lebigmac:
Hi you can switch boot slots like this

./fastboot --set-active=a
[Sony Cross-Device General] munjeni:
Procedure is simple - after you change slot you need to reboot, after reboot you need to reflash rom otherwise your device will not boot because e.g. on stock rom sin image with sufix _other_ is always flashed to the diferent slot e.g. you are on slot a _other_ is always flashed to slot b and vice versa, so if you swith to diferent slot and you din't reflash the things your device will fail to boot, hope this help.
[Sony Cross-Device General] munjeni:
and like this :)

newflasher set_active:a
[Sony Cross-Device General] Sjll:
Thanks, but slot change in fastboot mode is not allowed on a locked device.
[Sony Cross-Device General] munjeni:
Try newflasher e.g:

newflasher set_active:a

or

newflasher set_active:b

Do in mind when you change slot you must reboot first, than boot to flash mode and reflash your rom otherwise you get bootloop! More info -> https://xdaforums.com/t/tool-newflasher-xperia-command-line-flasher.3619426/post-84975991
[Sony Cross-Device General] Sjll:
Thanks, this command could change slot in flash mode (Green LED).

But you might not understand my issue.😂

For example, If currently my device is in slot B. Newflasher will flash the whole super image to physic super parition, but logical partitions vendor_b, product_b in super image are empty, so the device will never boot with Slot B.

But after flashing, newflasher will set Slot B active.

- Extracting sparse chunk bootloader.000
- Uploading sparse chunk E:\XQ-AU52_Customized HK_59.1.A.2.28-R5B\boot\bootloader.000
download:01b7cc00
OKAY.
Partition: bootloader have slot: yes
erase:bootloader_b
OKAY.
flash:bootloader_b
OKAY.
- End of bootloader_X_BOOT_SM6125_LA2_0_1_R_113_X-FLASH-ALL-E9C8.sin

Set slot 'b' active.

Device is put now out of flash mode.
Sent command: Sync
Waiting sync to finish...
.sync response[0x4]:

00000000 4F 4B 41 59 OKAY

done
Sent command: reboot-bootloader.
reboot mode response[0x4]:

00000000 4F 4B 41 59 OKAY

If I checked in fastbootd mode, vendor_b, product_b are empty.

(bootloader) partition-size:super:0x300000000
(bootloader) partition-size:system_a:0x721C8000
(bootloader) partition-size:system_b:0x10E98000
(bootloader) partition-size:product_a:0x5CC31000
(bootloader) partition-size:product_b:0x0
(bootloader) partition-size:vendor_a:0x231CB000
(bootloader) partition-size:vendor_b:0x0

So for Dynamic parition devices, newflasher should set Slot A active before/after every flashing.
[Sony Cross-Device General] munjeni:
I understand what you mean, but newflasher is primitive tool and reguires user interaction - you must do what you need. Even newflasher can be used for example from bash/batch script to extend things for needs. Super partition with empty product_b and vendor_b is nothing in relation to newflasher but an bad rom design and we can do nothing about that. A/B slot feature is definitelly not changeable while using stock rom.
[Sony Cross-Device General] Sjll:
Yup, if newflasher add a step, active Slot A before every flashing, then these devices after Xperia 10 II will not get into bootloop trouble.
[Sony Cross-Device General] munjeni:
Slot change is for experienced users you must agree, so for novice users with less knownlegde is not recommend to change slot, agree? If I do step to always change slot to A than everybody who allready set slot B and who want slot B e.g. while using lineage for example will complain about why slot A is set, agree? I definitelly will not do that. You should set slot you need before you use newflasher, its simply a less trouble than having forced slot A
[Sony Cross-Device General] Sjll:
KK, thansk for your answers.

------EDIT-----

For these users, who already on slot B after stock upgrading, after they flashing with newflasher will always be bootloop because of the bad super image design. Hope this feedback could help them.
[Sony Cross-Device General] p0k3sm0t:
Thanks for this info. Do the DRM KEYS stay? And what about attest key provisions? I flashed persist.sin for ever ago and no attest key provisioning. Does all that get fixed as well? I'm not seeing any info about it.
[Sony Cross-Device General] munjeni:
Simple, if you unlock bootloader device unique key is bye bye for ever, no way to get it back for sure. If you flashed persist without making backup situation is the same, curently no known way to generate new one. About drm functionality Im not sure ask somebody, probably it get back.
[Sony Cross-Device General] haidaroh9:
How to flash xperia using other phone.where can i find any guide?thanks