[TOOL] Newflasher (xperia command line flasher)

Jan 9, 2021
1
0
11
Hello,

I have Sony Xperia XZ1 (G8342) model but its a prototype device [Build Number 47.1.A.2.141]

I had tried to flash it using Sony Xperia Companion but it refused and gave me an error message that the device was not a retail unit.

Then I tried flashing it using Sony EMMA. It initially reported the phone as "locked". I did some search and found that it was because its bootloader was locked. I followed the instructions given on the following URL and managed to unlock the bootloader using the unlock code obtained from Sony's website:


Afterwards, I again tried flashing the phone using EMMA. It download a file of over 2.5 GB, successfully installed it (within 15 seconds) but nothing changed on my phone. I tried with other ROM's and every time EMMA successfully installed within 15 seconds but nothing changed on my phone.

Due to the bootloader unlocked, my phone is unable to install banking APPs and I am unable to utilize the VoLTE capabilities of my service provider.

I am simply regretting unlocking the bootloader.

Is there any possibility of locking the bootloader again??? I tried different commands like "fastboot oem relock / OEM-lock / flashing lock_bootloader" etc. but no command seems to work.

It seems locking the bootloader back is not possible.

So, can NEWFLASHER flash the phone without bricking it? I have heard the Prototype phones can't be flashed to newer versions but some people have commented on XDA Forums that they managed to update their phones. I will share all the information needed to successfully flash it.

As of now the utility of the phone (a Snapdragon 835 processor phone) has been reduced to watching movies on Amazon Prime and YouTube.

Thanks.
 

munjeni

Senior Member
Jun 2, 2011
9,096
21,802
263
Hello,

I have Sony Xperia XZ1 (G8342) model but its a prototype device [Build Number 47.1.A.2.141]

I had tried to flash it using Sony Xperia Companion but it refused and gave me an error message that the device was not a retail unit.

Then I tried flashing it using Sony EMMA. It initially reported the phone as "locked". I did some search and found that it was because its bootloader was locked. I followed the instructions given on the following URL and managed to unlock the bootloader using the unlock code obtained from Sony's website:


Afterwards, I again tried flashing the phone using EMMA. It download a file of over 2.5 GB, successfully installed it (within 15 seconds) but nothing changed on my phone. I tried with other ROM's and every time EMMA successfully installed within 15 seconds but nothing changed on my phone.

Due to the bootloader unlocked, my phone is unable to install banking APPs and I am unable to utilize the VoLTE capabilities of my service provider.

I am simply regretting unlocking the bootloader.

Is there any possibility of locking the bootloader again??? I tried different commands like "fastboot oem relock / OEM-lock / flashing lock_bootloader" etc. but no command seems to work.

It seems locking the bootloader back is not possible.

So, can NEWFLASHER flash the phone without bricking it? I have heard the Prototype phones can't be flashed to newer versions but some people have commented on XDA Forums that they managed to update their phones. I will share all the information needed to successfully flash it.

As of now the utility of the phone (a Snapdragon 835 processor phone) has been reduced to watching movies on Amazon Prime and YouTube.

Thanks.
Hi, I don't know anything in relation to prototype devices, what I know is all xperia mark 2 devices have rollback protection, more info/idea you can see on page 72 and 73 (bootloop caused by rollback protection - see bootloader log related to vbmeta & rollback index), so in short you need to flash excatly the same rom version or newer one, if you flash older one you get boot loop, even how this is true somebody need to confirm I don't know.
 

munjeni

Senior Member
Jun 2, 2011
9,096
21,802
263
You should ask in xperia 5 II forum for better support! Recent rollback protection feature is realy questionable, for example how can we install custom rom e.g. lineage os? The same question would be how lineage bypass rollback protection? The same way you probably can install or not custom rom e.g. uk variant. I'm with xperia 10 mark 1 which don't have rollback protection so I can't help.
 
Last edited:

DennisDD78

Senior Member
Apr 22, 2011
424
71
58
Vladivostok
I flashed android 11 on my xpeira 1 and because i forget to delete the partion file so my storage become 64G,how can i fix it?thx for your help
Before flashing A11 parttion file should be deleted ?
Well, i don`t know so. I think that the tool is not ready to work with A11 since users have such difficulties.
Thanks for your answer!
 

eaglu01

Member
Apr 4, 2016
14
2
3
Before flashing A11 parttion file should be deleted ?
Well, i don`t know so. I think that the tool is not ready to work with A11 since users have such difficulties.
Thanks for your answer!
usually just need delete simlock.ta,but because I still haven't solve storage problem.I can' answer it properly,sorry
 

DennisDD78

Senior Member
Apr 22, 2011
424
71
58
Vladivostok
usually just need delete simlock.ta,but because I still haven't solve storage problem.I can' answer it properly,sorry
Yes, usually i also delete simlock.ta and persist.sin, so as not to lose keys and certificates , and after that start flasing.
But now, when you reported that you have storage issues after a11 flashed, i`m not really sure should i flash the phone by Newflasher, maybe i just do a factory reset the phone settings to make the new system clean.
I also can use Xperia companion, but i changed the customization from day 1, and because of it XC can`t do the full recover, if i remember it right ((
 

eaglu01

Member
Apr 4, 2016
14
2
3
Yes, usually i also delete simlock.ta and persist.sin, so as not to lose keys and certificates , and after that start flasing.
But now, when you reported that you have storage issues after a11 flashed, i`m not really sure should i flash the phone by Newflasher, maybe i just do a factory reset the phone settings to make the new system clean.
I also can use Xperia companion, but i changed the customization from day 1, and because of it XC can`t do the full recover, if i remember it right ((
I solve it by reset after flashing Android 11 and feel great now.:)
update: I found someone meet this problem too and reset didn't solve it,so I'm still not sure about that,but maybe you can try to flash Android 10 SEA then OTA to Android 11,here's a link may help you [Solved]Storage become 64G after flashing to android 11 by newflaher | XDA Developers Forums (xda-developers.com)
 
Last edited:

munjeni

Senior Member
Jun 2, 2011
9,096
21,802
263
I flashed android 11 on my xpeira 1 and because i forget to delete the partion file so my storage become 64G,how can i fix it?thx for your help
Hi, two questions for you
1. Your device is mark 2 or mark1? Model?
2. Your storage size is?

Newflasher have recently updated storage calculation trought emmc csd register dump, so it have some dificulties right now to determine right storage sin file based on storage size (i'm blieving it should work without problem, but can't tell anything without your nwflasher log), you guys should help me to solve isue this way:
1. reflash again all files except simlock and persist
2. give me newflasher log

Dirty solution is e.g. you have flashed 64gb partition image over 128gd device (in case newflasher realy have that bug) you should delete 64gb sin file and rename 128gb sin file to excatly the same name of the 64gb sin file and reflash it. But I prefer to fully see your newflasher log and try fix newflasher!
 
Last edited:

munjeni

Senior Member
Jun 2, 2011
9,096
21,802
263
Some solution to guys who have bootloop after flashing oldest rom and have rollback protection bootloop, refer to this post -> https://forum.xda-developers.com/t/...-locking-the-bootloader.4079715/post-83035119

I'm believing rollback index can be reset by command oem lock (xperia 1 and 5 and all mark 2 models which have oem lock command working), in short bootloader need to be unlocked before flash older rom, than do oem lock to reset rollback counter and lock bootloader. Or probably do oem lock before flashing older rom. Let me know! :)
 
Last edited:

eaglu01

Member
Apr 4, 2016
14
2
3
Hi, two questions for you
1. Your device is mark 2 or mark1? Model?
2. Your storage size is?

Newflasher have recently updated storage calculation trought emmc csd register dump, so it have some dificulties right now to determine right storage sin file based on storage size (i'm blieving it should work without problem, but can't tell anything without your nwflasher log), you guys should help me to solve isue this way:
1. reflash again all files except simlock and persist
2. give me newflasher log

Dirty solution is e.g. you have flashed 64gb partition image over 128gd device (in case newflasher realy have that bug) you should delete 64gb sin file and rename 128gb sin file to excatly the same name of the 64gb sin file and reflash it. But I prefer to fully see your newflasher log and try fix newflasher!
My device is mark 1 and my storage is 128gb,I fixed this problem by reset after flashing.
Do I need to flash again to get newflasher log,if it is needed I'm sorry that xperia 1 is my daily drive and I will be quiet busy until early Feb,it's also troublesome to backup and restore data in China.I should have free time after things are done,then I can help you to solve the problem.sorry again((
 

munjeni

Senior Member
Jun 2, 2011
9,096
21,802
263
There was ten reports about problem after flashing with newflasher but nobody mind to provide log, I won't fix without newflasher log & to be honest not care, no log no fix, no log no reply from now and future.
 

AkazaDorian

New member
Feb 24, 2016
2
0
31
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.
Here's an update on what happened in Android 11:
Code:
PS E:\Frank\Downloads\newflasher_v40> .\newflasher.exe Read-TA:2:2801
--------------------------------------------------------
            newflasher.exe v40 by Munjeni @ 2017/2020
--------------------------------------------------------

Determining available free space by GetDiskFreeSpaceEx:

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

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

  00000000  44 41 54 41 30 30 30 30 30 30 30 36              DATA00000006

data_buf[0x6]:

  00000000  53 45 41 2D 43 32                                SEA-C2

replied[0x4]:

  00000000  4F 4B 41 59                                      OKAY

dump.bin created.
Closing device.
Press any key to continue . . .
Haven't done any customized TA thing yet.
Read-TA:2:2801 now gives something that makes sense but does not follow the pattern. I'll keep it for now to see if the OTA issue has been fixed.