[TOOL] Newflasher (xperia command line flasher)

munjeni

Senior Member
Jun 2, 2011
9,019
21,774
263
Last edited:

munjeni

Senior Member
Jun 2, 2011
9,019
21,774
263
I noticed a problem,I buy a CN version X5M2 (XQ-AS72)but I don't like CN fw,so I flashed SEA fw,then I see xpericheck.com has new fw version,but some days later I still can't get OTA,and I noticed some HK version user flash to CN fw can't get latest CN fw OTA too,I guess it's not only me have this problem.My English is not good,very sorry.I can't test anymore, because I manual flashed latest SEA version,then I use Xperia companion try to fix it,should be flash SEA fw,but I check the Xperia companion logs,and check the path,It's downloaded still CN fw,that's all...
Hi, thats not newflasher isue. You need to manuay change customisation strings in trim area. For idea You should dump this 3 units from trim area using newfasher from command line:

newfasher Read-TA:2:2202
newfasher Read-TA:2:2205
newfasher Read-TA:2:2206

Give me those 3 output logs and I will tell you the rest. I will not repeat things from pages 71,72,73 since I aready expained how it can be done by custom .ta files. And also I will not repeat that I will not impement those automation things in newflasher since newfasher is primitive tool whose usage/purpose is flashing only. Newflasher have apsolutly enought features/things for purpose, you guys just need to figure out what you need/can do with it. Give me those 3 logs and I will write in detais what you need to do
 
Last edited:
  • Like
Reactions: Meloferz

hzj19960112

Member
Jan 9, 2014
14
4
23
Hi, thats not newflasher isue. You need to manuay change customisation strings in trim area. For idea You should dump this 3 units from trim area using newfasher from command line:

newfasher Read-TA:2:2202
newfasher Read-TA:2:2205
newfasher Read-TA:2:2206

Give me those 3 output logs and I will tell you the rest. I will not repeat things from pages 71,72,73 since I aready expained how it can be done by custom .ta files. And also I will not repeat that I will not impement those automation things in newflasher since newfasher is primitive tool whose usage/purpose is flashing only. Newflasher have apsolutly enought features/things for purpose, you guys just need to figure out what you need/can do with it. Give me those 3 logs and I will write in detais what you need to do
PS E:\Hzj\XperiaTool\newflasher_v39> .\newflasher Read-TA:2:2202
--------------------------------------------------------
newflasher.exe v39 by Munjeni @ 2017/2020
--------------------------------------------------------

Determining available free space by GetDiskFreeSpaceEx:

Available space to caller = 314728 MB
Total space on current drive = 435719 MB
Free space on drive = 314728 MB
Device path: \\?\usb#vid_0fce&pid_b00b#6&2bceb4d8&0&8#{a5dcbf10-6530-11d2-901f-00c04fb951ed}
Class Description: SOMC Flash Device
Device Instance Id: USB\VID_0FCE&PID_B00B\6&2BCEB4D8&0&8

Writing command: Read-TA:2:2202
got first reply[0xC]:

00000000 44 41 54 41 30 30 30 30 30 30 30 63 DATA0000000c

data_buf[0xC]:

00000000 35 38 2E 30 2E 41 2E 32 38 2E 35 31 58.0.A.28.51

replied[0x4]:

00000000 4F 4B 41 59 OKAY

dump.bin created.
Closing device.
请按任意键继续. . .
PS E:\Hzj\XperiaTool\newflasher_v39> .\newflasher Read-TA:2:2205
--------------------------------------------------------
newflasher.exe v39 by Munjeni @ 2017/2020
--------------------------------------------------------

Determining available free space by GetDiskFreeSpaceEx:

Available space to caller = 314728 MB
Total space on current drive = 435719 MB
Free space on drive = 314728 MB
Device path: \\?\usb#vid_0fce&pid_b00b#6&2bceb4d8&0&8#{a5dcbf10-6530-11d2-901f-00c04fb951ed}
Class Description: SOMC Flash Device
Device Instance Id: USB\VID_0FCE&PID_B00B\6&2BCEB4D8&0&8

Writing command: Read-TA:2:2205
got first reply[0xC]:

00000000 44 41 54 41 30 30 30 30 30 30 31 64 DATA0000001d

data_buf[0x1D]:

00000000 55 6E 6B 6E 6F 77 6E 3A 20 4E 6F 76 20 32 38 20 Unknown: Nov 28
00000010 32 30 32 30 2F 31 33 3A 31 38 3A 35 32 2020/13:18:52

replied[0x4]:

00000000 4F 4B 41 59 OKAY

dump.bin created.
Closing device.
请按任意键继续. . .
PS E:\Hzj\XperiaTool\newflasher_v39> .\newflasher Read-TA:2:2206
--------------------------------------------------------
newflasher.exe v39 by Munjeni @ 2017/2020
--------------------------------------------------------

Determining available free space by GetDiskFreeSpaceEx:

Available space to caller = 314728 MB
Total space on current drive = 435719 MB
Free space on drive = 314728 MB
Device path: \\?\usb#vid_0fce&pid_b00b#6&2bceb4d8&0&8#{a5dcbf10-6530-11d2-901f-00c04fb951ed}
Class Description: SOMC Flash Device
Device Instance Id: USB\VID_0FCE&PID_B00B\6&2BCEB4D8&0&8

Writing command: Read-TA:2:2206
got first reply[0xC]:

00000000 44 41 54 41 30 30 30 30 30 30 31 64 DATA0000001d

data_buf[0x1D]:

00000000 55 6E 6B 6E 6F 77 6E 3A 20 4E 6F 76 20 32 38 20 Unknown: Nov 28
00000010 32 30 32 30 2F 31 33 3A 31 38 3A 35 32 2020/13:18:52

replied[0x4]:

00000000 4F 4B 41 59 OKAY

dump.bin created.
Closing device.
请按任意键继续. . .
PS E:\Hzj\XperiaTool\newflasher_v39>
 

munjeni

Senior Member
Jun 2, 2011
9,019
21,774
263
Well, trim area hold some information which you need to change yourself, you should read information first from phone, this is example:

// 58.0.A.28.25
// newfasher Read-TA:2:2202
0000089A 000C 35 38 2E 30 2E 41 2E 32 38 2E 32 35

// GLOBALEEA-A2
// newfasher Read-TA:2:2801
00000AF1 000C 47 4C 4F 42 41 4C 45 45 41 2D 41 32

// Unknown: Nov 2 2020/19:18:21 -> it should be something like GENERIC_58.0.A.28.25
// newfasher Read-TA:2:2206
0000089E 001D 55 6E 6B 6E 6F 77 6E 3A 20 4E 6F 76 20 20 32 20 32 30 32 30 2F 31 39 3A 31 38 3A 32 31

// Unknown: Nov 2 2020/19:18:21 -> it should be something like 1317-7500_R12C
newfasher Read-TA:2:2205
0000089D 001D 55 6E 6B 6E 6F 77 6E 3A 20 4E 6F 76 20 20 32 20 32 30 32 30 2F 31 39 3A 31 38 3A 32 31

// XQ-AS52 -> this is device model
// newfasher Read-TA:2:2210
000008A2 0007 58 51 2D 41 53 35 32

(explanatory example of the .ta file structure)
E.G. Information given from phone is in HEX format, and this is explanation:
00000AF1 000C 47 4C 4F 42 41 4C 45 45 41 2D 41 32

AF1 -> hex unit (in decimal 2801)
C -> size of the hex string (size of the green part in hex its C, when you convert C to decimal its 12, in our example GLOBALEEA-A2 contain 12 characters, 12 dec when convert to hex is C)
47 4C 4F 42 41 4C 45 45 41 2D 41 32 (string in hex format, when you convert it to ascii https://www.binaryhexconverter.com/hex-to-ascii-text-converter you get GLOBALEEA-A2), if you count number of chars its excatly 12)

Tools you need for all this is:
ascii text to hexadecimal converter -> https://www.binaryhexconverter.com/ascii-text-to-hex-converter
hex to string converter -> https://www.binaryhexconverter.com/hex-to-ascii-text-converter
hex to decimal converter -> https://www.binaryhexconverter.com/hex-to-decimal-converter
decimal to hex converter -> https://www.binaryhexconverter.com/decimal-to-hex-converter

In reverse order e.g. when you need to change something in your trim area you should create e.g. myown.ta file to flash back with newflasher (take all this as an example!!!):

Code:
// partition (do not change this & always 02 !!)
02

// 58.0.A.28.51
0000089A 000C 35 38 2E 30 2E 41 2E 32 38 2E 35 31

// GLOBALSEA-A2
00000AF1 000C 47 4C 4F 42 41 4C 53 45 41 2D 41 32

// Unknown: Nov  2 2020/19:18:21 -> you nedd to figure it yourself, it should be something like GENERIC_58.0.A.28.51
0000089E 0014 47 45 4E 45 52 49 43 5F 35 38 2E 30 2E 41 2E 32 38 2E 35 31

// Unknown: Nov  2 2020/19:18:21 -> xperifirm CID of the SEA fw, it should be something like 21610788
0000089D 0008 32 31 36 31 30 37 38 38
Do in mind this is just explanatory examle only!! Dealing with trim area is extremely dangerous (some units is extra extreme dangerous & never touch it e.g. hw config, sim lock, sim signature unit, probably more!!!) and your device if you do something wrong (e.g. write wrong size of the hex string) by writing your own trim area .ta file it might hard brick your device!! You guys need to figure out yourself and again double check before flash those custom .ta file!!! I can sugest you to open new thread in your device forum and point our example post as a reference until somebody figure out what excatly need to be writen in custom .ta file while flashing firmwares! Again, no error in newflasher window mean no problem with newflasher & not newflasher isue, so please do not repeat. Also I can sugest somebody give output of the folowing commands (from fully stock & never flashed device):

newfasher Read-TA:2:2202
newfasher Read-TA:2:2801
newfasher Read-TA:2:2206
newfasher Read-TA:2:2205
newfasher Read-TA:2:2210

It might help you better figure out things
 
Last edited:
  • Like
Reactions: mirhl and Meloferz

Vic.

Senior Member
Mar 7, 2012
338
136
63
Also I can sugest somebody give output of the folowing commands (from fully stock & never flashed device):

newfasher Read-TA:2:2202
newfasher Read-TA:2:2801
newfasher Read-TA:2:2206
newfasher Read-TA:2:2205
newfasher Read-TA:2:2210

It might help you better figure out things
Here's the output from my fully stock, never flashed 5 II. I also had a delay when receiving updates (was on Aug security patch, then I received Oct and Nov patches almost at the same time)
Code:
Writing command: Read-TA:2:2202
got first reply[0xC]:

  00000000  44 41 54 41 30 30 30 30 30 30 30 63              DATA0000000c

data_buf[0xC]:

  00000000  35 38 2E 30 2E 41 2E 32 38 2E 32 35              58.0.A.28.25

replied[0x4]:

  00000000  4F 4B 41 59                                      OKAY
Code:
Writing command: Read-TA:2:2801
got first reply[0xC]:

  00000000  44 41 54 41 30 30 30 30 30 30 30 63              DATA0000000c

data_buf[0xC]:

  00000000  47 4C 4F 42 41 4C 45 45 41 2D 41 32              GLOBALEEA-A2

replied[0x4]:

  00000000  4F 4B 41 59                                      OKAY
Code:
Writing command: Read-TA:2:2206
got first reply[0xC]:

  00000000  44 41 54 41 30 30 30 30 30 30 31 64              DATA0000001d

data_buf[0x1D]:

  00000000  55 6E 6B 6E 6F 77 6E 3A 20 4E 6F 76 20 20 32 20  Unknown: Nov  2
  00000010  32 30 32 30 2F 31 39 3A 31 38 3A 32 31           2020/19:18:21

replied[0x4]:

  00000000  4F 4B 41 59                                      OKAY
Code:
Writing command: Read-TA:2:2205
got first reply[0xC]:

  00000000  44 41 54 41 30 30 30 30 30 30 31 64              DATA0000001d

data_buf[0x1D]:

  00000000  55 6E 6B 6E 6F 77 6E 3A 20 4E 6F 76 20 20 32 20  Unknown: Nov  2
  00000010  32 30 32 30 2F 31 39 3A 31 38 3A 32 31           2020/19:18:21

replied[0x4]:

  00000000  4F 4B 41 59                                      OKAY
Code:
Writing command: Read-TA:2:2210
got first reply[0xC]:

  00000000  44 41 54 41 30 30 30 30 30 30 30 37              DATA00000007

data_buf[0x7]:

  00000000  58 51 2D 41 53 35 32                             XQ-AS52

replied[0x4]:

  00000000  4F 4B 41 59                                      OKAY
 
  • Like
Reactions: munjeni

mtshure

Senior Member
Apr 23, 2013
67
9
28
I got a 5 ii and will root soon after playing with stock for a few days. Currently on 58.0.A.10.3 and received 58 0.A.28.51 update notification.

Is it better to root then update by newflasher, or can I update first and root using the same method in the guide?
 

munjeni

Senior Member
Jun 2, 2011
9,019
21,774
263
I got a 5 ii and will root soon after playing with stock for a few days. Currently on 58.0.A.10.3 and received 58 0.A.28.51 update notification.

Is it better to root then update by newflasher, or can I update first and root using the same method in the guide?
If you update to the latest fw in most case root exploit you thinking to use will no more work! So better idea stay on old rom until you are sure latest fw is rootable!
 

munjeni

Senior Member
Jun 2, 2011
9,019
21,774
263
Here's the output from my fully stock, never flashed 5 II. I also had a delay when receiving updates (was on Aug security patch, then I received Oct and Nov patches almost at the same time)
Code:
Writing command: Read-TA:2:2202
got first reply[0xC]:

  00000000  44 41 54 41 30 30 30 30 30 30 30 63              DATA0000000c

data_buf[0xC]:

  00000000  35 38 2E 30 2E 41 2E 32 38 2E 32 35              58.0.A.28.25

replied[0x4]:

  00000000  4F 4B 41 59                                      OKAY
Code:
Writing command: Read-TA:2:2801
got first reply[0xC]:

  00000000  44 41 54 41 30 30 30 30 30 30 30 63              DATA0000000c

data_buf[0xC]:

  00000000  47 4C 4F 42 41 4C 45 45 41 2D 41 32              GLOBALEEA-A2

replied[0x4]:

  00000000  4F 4B 41 59                                      OKAY
Code:
Writing command: Read-TA:2:2206
got first reply[0xC]:

  00000000  44 41 54 41 30 30 30 30 30 30 31 64              DATA0000001d

data_buf[0x1D]:

  00000000  55 6E 6B 6E 6F 77 6E 3A 20 4E 6F 76 20 20 32 20  Unknown: Nov  2
  00000010  32 30 32 30 2F 31 39 3A 31 38 3A 32 31           2020/19:18:21

replied[0x4]:

  00000000  4F 4B 41 59                                      OKAY
Code:
Writing command: Read-TA:2:2205
got first reply[0xC]:

  00000000  44 41 54 41 30 30 30 30 30 30 31 64              DATA0000001d

data_buf[0x1D]:

  00000000  55 6E 6B 6E 6F 77 6E 3A 20 4E 6F 76 20 20 32 20  Unknown: Nov  2
  00000010  32 30 32 30 2F 31 39 3A 31 38 3A 32 31           2020/19:18:21

replied[0x4]:

  00000000  4F 4B 41 59                                      OKAY
Code:
Writing command: Read-TA:2:2210
got first reply[0xC]:

  00000000  44 41 54 41 30 30 30 30 30 30 30 37              DATA00000007

data_buf[0x7]:

  00000000  58 51 2D 41 53 35 32                             XQ-AS52

replied[0x4]:

  00000000  4F 4B 41 59                                      OKAY
Thanks for info! So units 2206, 2205, 2210 is not need to be changed at all. In most case what need to be done after flashing is updaing unit 2202 and 2801 to match flashed fw, this need to be confirmed. E.g. writing unit 2202 with version string e.g. 58.0.A.28.25, than reading unit 2801 for getting idea about what to change since I have no idea how this can be done trought newflasher e.g. reading this -A2 or GLOBAL, EEA, UK, SEA... blabla info string for constructing right string for write into unit 2801, writing to unit 2801 need to be manualy done by hand before write, for idea what to write to unit 2801, read unit 2801 first. If somebody have idea how this can be implemented in newflasher for automating our things, let me know. Before idea all this need to be proven working first.
 
Last edited:

k-royd

New member
Dec 19, 2020
1
0
1
I got a UK Xperia 5, but need to use it in the US region and need to get volte.

Downloaded US firmware with XperiFirm for US region, but is only intended for J8270 model, mine is J9210.

Can I still go ahead and flash the firmware for that purpose?

Here's the output from my fully stock, never flashed 5 II. I also had a delay when receiving updates (was on Aug security patch, then I received Oct and Nov patches almost at the same time)
Code:
Writing command: Read-TA:2:2202
got first reply[0xC]:
  ...
Here's the output from my full stock, never flashed Xperia 5. I have purposely not let it update to anything through Xperia Companion as yet!

Code:
$# ./newflasher.x64 Read-TA:2:2202
--------------------------------------------------------
            newflasher.x64 v39 by Munjeni @ 2017/2020           
--------------------------------------------------------

Determining available free space:

  Available space to caller    = 8337323 MB
  Total space on current drive = 9457763 MB
  Free space on drive          = 8340411 MB
found device with vid:0x0fce pid:0xb00b.
Writing command: Read-TA:2:2202
got first reply[0xC]:

  00000000  44 41 54 41 30 30 30 30 30 30 31 35              DATA00000015

data_buf[0x15]:

  00000000  31 33 31 38 2D 39 38 35 30 5F 35 35 2E 31 2E 41  1318-9850_55.1.A
  00000010  2E 39 2E 35 32                                   .9.52

replied[0x4]:

  00000000  4F 4B 41 59                                      OKAY

dump.bin created.
Closing device.
...
Writing command: Read-TA:2:2801
got first reply[0xC]:

  00000000  44 41 54 41 30 30 30 30 30 30 30 63              DATA0000000c

data_buf[0xC]:

  00000000  47 4C 4F 42 41 4C 45 45 41 2D 41 32              GLOBALEEA-A2

replied[0x4]:

  00000000  4F 4B 41 59                                      OKAY

dump.bin created.
Closing device.

Writing command: Read-TA:2:2206
got first reply[0xC]:

  00000000  44 41 54 41 30 30 30 30 30 30 31 33              DATA00000013

data_buf[0x13]:

  00000000  47 45 4E 45 52 49 43 5F 35 35 2E 31 2E 41 2E 39  GENERIC_55.1.A.9
  00000010  2E 35 32                                         .52

replied[0x4]:

  00000000  4F 4B 41 59                                      OKAY

dump.bin created.
Closing device.

Writing command: Read-TA:2:2205
got first reply[0xC]:

  00000000  44 41 54 41 30 30 30 30 30 30 30 64              DATA0000000d

data_buf[0xD]:

  00000000  31 33 32 30 2D 34 34 39 34 5F 52 37 42           1320-4494_R7B

replied[0x4]:

  00000000  4F 4B 41 59                                      OKAY

dump.bin created.
Closing device.

Writing command: Read-TA:2:2210
got first reply[0xC]:

  00000000  44 41 54 41 30 30 30 30 30 30 30 35              DATA00000005

data_buf[0x5]:

  00000000  4A 39 32 31 30                                   J9210

replied[0x4]:

  00000000  4F 4B 41 59                                      OKAY

dump.bin created.
Closing device.
$#
 

hotandroidpr

New member
Dec 21, 2020
1
0
11
hello & thanks for your professional program
I need to compile your app from my self.
when i use make this error showed to me:
Compiler error reporting is too harsh for ./configure (perhaps remove -Werror).
** ./configure aborting.
make: *** [makefile:50: newflasher.exe] Error 1