yashsingh1/xdaforums huggingface dataset:
[Sony Cross-Device General] Zafikitt:
Hello, thanks for your app, I have a Sony XZ1 G8341 with Android Pie and firmware GENERIC_47.2.A.11.228 from Vodafone in Spain, I can use your APP to downgrade to Oreo, I just want that version, no root and unlock the bootloader , I would like to know if it is safe to do the downgrade and if it affects my DRM keys and the functionality of my Sony mobile, I would like to know what firmware I can use to flash it. Thank you very much.
[Sony Cross-Device General] munjeni:
Yes you can but make sure chose right fw for model G8341 ! You no need to unlock bootloader! And your bootloader will remain locked.
[Sony Cross-Device General] Zafikitt:
Thank you very much for your answer. Will I have any problem with the camera (green camera or camera that does not focus) or the nfc when I return to oreo? This version G8341_8.0.0_47.1.A.16.20_Germany.ftf would work for Spain, thank you very much again
[Sony Cross-Device General] munjeni:
Sony firmwares comes with boot folder which contain few different configuration and few diferent bootloaders, there is one file called bootdelivery xml file, newflasher read device info and search trought bootdelivery xml file to chose right one bootloader, you must know excatly which one to flash if you going to flash it by yourself. Try to flash cache.sin file, if you getting the same error make sure you have right firmware for your device model ! If you still getting the same error probably your trim area is broken? Trim area is unique per device, you can't use it from another device! If you do not have working trim area backup you can't repair phone in any way! If you put emmc from another phone you must have data on it excatly as like your original emmc otherwise trim area and other things will be invalid since device unique key not match with it. If you ask me where is device key I don't know! It probably lives inside rpmb, you should ask here https://forum.gsmhosting.com/vbb/f672/rpmb-questions-2704742/ I realy don't know those things. Or probably it lives in the same location with pbl (primary boot loader), probably on graphic card? I realy have no idea. To be honest I don't even care anymore, I not touching anything phone related for 4 years, even not flashing.
[Sony Cross-Device General] mysticall:
I think Sony uses emmc's CID to generate a unique hash. But I don't have a programmer to change cid and try.

Thanks.

Introduction to the Sony (-Ericsson) Xperia Galaxy

As far as I understand the TA partition contains the unique information for each device.
[Sony Cross-Device General] mysticall:
I connected via the uart protocol to the phone:

keystore is in rpmb

[ERROR @ keystore.c:375]:

Invalid counter rpmb: 4, cms: 4
[Sony Cross-Device General] tnlolicon:
thanks for tool.my xperia 5 iv is chinese version,i download hk&tw os and use this tool to install,both fiall.

phone show "Your device is corrupt. It can't be trusted and will not boot.Your device will be powered off in 5 seconds."

anyone can help me

tool code as:

Processing boot delivery...

Found boot_delivery.xml in boot folder.

- Boot delivery version: 8450-0001

- Verifying if boot delivery match with device...

searching for: PLATFORM_ID="001870E1";PLF_ROOT_HASH="CE738EFA78393FA07CAE66C2DCA711449BC36B3AB78734713A7FB08527E7DAAEEE1833BFD6EEDB2ABD968FBA981B5B35"

Didn't found bootdelivery that match your device!

=========== FIRMWARES HISTORY LOG =============

NEW_VERSION: erased_user_data:true, variant:user, s1boot_version:8450-0001_X_Boot_SM8450_LA1.0_S_23-B, cdf_version:Unknown: Apr 5 2022/02:48:30, fs_version:Unknown: Apr 5 2022/02:48:30, sw_version:64.0.B.0.266

NEW_VERSION: erased_user_data:true, variant:user, s1boot_version:8450-0001_X_Boot_SM8450_LA1.0_S_39, cdf_version:Unknown: Sep 6 2022/04:29:48, fs_version:Unknown: Sep 6 2022/04:29:48, sw_version:64.0.M.4.29

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

Set slot 'a' active.

Device is put now out of flash mode.

Sent command: Sync

Sent command: continue.

Done.

Closing device.
[Sony Cross-Device General] munjeni:
I told you that allready about rpmb, it have one time programable fuse, when some thigs is writen there fuse gets blown and no more way to change that, Look into QSEECOM api for idea! Also we have found some things inside rpmb and we found some ways to read it and also we found some keys there too and some more things which we have no idea what is it, but key which we found there when we xor it with some keys from trim area we have some matches with other keys isnside trim area. When device get unlocked those key from rpmb is gone and thats why now restoring trim area have no efect to restoring "locked device status". Don't ask me what we have found I didn't remembered, it was 4 years ago and I no more playing with phone world, it simply not interest me anymore! We simply didn't figured out how to simulate firmware signature check but goal was to try to understand how it work on phone and we wanted to do that manualy using openssl, we have found only part of that trought public keys we found in trim area / firmware signature but we didn't done that to the end since main public key is missing and we didn't figured out where those key is stored, and finaly we simply stuck. If you ask me about progress I have no idea, it was a lot of work and a lot of mess, and it was 4 years ago so I forgot almost all.
[Sony Cross-Device General] munjeni:
Search for rollback protection! Those questions on this thread is repeat for about 40 pages and I realy no want to repeat the same thing sorry, simply open page-two backward and you will get it.
[Sony Cross-Device General] LadFromWales85:
I am facing this issue again now while flashing the latest o2 firmware to my o2 supplied XQ-CT54

It says in the info at beginning of flash

Platform ID: 301870E1
Root key hash: CE738EFA78393FA07CAE66C2DCA711449BC36B3AB78734713A7FB08527E7DAAEEE1833BFD6EEDB2ABD968FBA981B5B35

and in the boot_delivery.xml file there is

<CONFIGURATION NAME="COMMERCIAL_001870E1">
<BOOT_CONFIG>
<FILE PATH="PDX223_XBootConfig_MiscTA.ta"/>
</BOOT_CONFIG>
<BOOT_IMAGES>
<FILE PATH="bootloader_X_BOOT_SM8450_LA2_0_T_108_X-FLASH-ALL-6348.sin"/>
</BOOT_IMAGES>
<ATTRIBUTES VALUE="PLF_ROOT_HASH="CE738EFA78393FA07CAE66C2DCA711449BC36B3AB78734713A7FB08527E7DAAEEE1833BFD6EEDB2ABD968FBA981B5B35""/>
<HWCONFIG CERTIFICATE="x_conf_hwconfig_8ff3" REVISION="HWC_XGeneric_001" VERSION="7"/>
<KEYSTORE CERTIFICATE="x_conf_keystore_8ff3" REVISION="DKS_Nagara_Com_001"/>
<SECURITY_PROPERTIES REVISION="SP_SM8450_002"/>
<SECURITY_STATE VALUE="723KkD5L1HNkjxxEaOJJ+mOiycbp2AlAZkGvz5n0QhY="/>
</CONFIGURATION>

These would appear to match?

I am still getting the error

Processing boot delivery...

Found boot_delivery.xml in boot folder.
- Boot delivery version: 8450-0001
- Verifying if boot delivery match with device...
searching for: PLATFORM_ID="001870E1";PLF_ROOT_HASH="CE738EFA78393FA07CAE66C2DCA711449BC36B3AB78734713A7FB08527E7DAAEEE1833BFD6EEDB2ABD968FBA981B5B35"
Didn't found bootdelivery that match your device!

Any ideas? :)
[Sony Cross-Device General] munjeni:
Seems O2 doing xml formating diferently, see how it need to look:

<CONFIGURATION NAME="COMMERCIAL_000AC0E1">
<BOOT_CONFIG>
<FILE PATH="Kirin_XBootConfig_MiscTA.ta"/>
</BOOT_CONFIG>
<BOOT_IMAGES>
<FILE PATH="bootloader_X_BOOT_SDM630_LA3_0_1_P_404_X-FLASH-ALL-8F02.sin"/>
</BOOT_IMAGES>
<ATTRIBUTES VALUE="PLATFORM_ID=&quot;000AC0E1&quot;;PLF_ROOT_HASH=&quot;5F01088791F1DDAD20DB0DF59453943E4D275929A01705C83502AD5403F9010F&quot;"/>
<HWCONFIG CERTIFICATE="S1_HWConf_70f0_0004" REVISION="HWC_Nile_Com_001" VERSION="7"/>
<KEYSTORE CERTIFICATE="x_keystore_2397" REVISION="DKS_Ganges_Com_001"/>
<SECURITY_PROPERTIES REVISION="SP_SDM630_002"/>
<SECURITY_STATE VALUE="s6ZQ7CdFcdUuxOhSCPYLc3QKqTXE7y02kYBHQO/htv0="/>
</CONFIGURATION>

Thats how it looks in Sony xml formating. You should modify xml by yurself carefully to match Sony formating, I realy have no time to make newflasher compatible with non Sony standard xml formating
[Sony Cross-Device General] LadFromWales85:
The device you are quoting in your post looks entirely different, and the file name referenced, PLF Root Hash etc do not look right at all?

Have you quoted the wrong device?

Device is a XQ-CT54 (Xperia 1 IV o2)

NM I misunderstood, though having edited the xml to match how you are displaying it, I've got it to flash now! :)

Phone trolled me with no signal for a bit on boot but all is fine!

Thanks :) :)
[Sony Cross-Device General] munjeni:
I'm gaved just example for you to get idea about diference between O2 xml formating and Sony xml formating, I'm glad you understood in the end :)
[Sony Cross-Device General] LadFromWales85:
I downloaded all four variants available for XQ-CT54 variant (EUUK, o2, EE, Altice FR) and all of them have the same formatting of the xml. This is not an o2 only issue.
[Sony Cross-Device General] munjeni:
Ok, but it is not a valid xml files since two " is not terminated correctly and that make whole xml file invalid.

<ATTRIBUTES VALUE="PLF_ROOT_HASH="CE738EFA78393FA07CAE66C2DCA711449BC36B3AB78734713A7FB08527E7DAAEEE1833BFD6EEDB2ABD968FBA981B5B35""/>

Try open it with internet explorer, it will not display content!

Nevermind, I not going to hardcode that in newflasher since I think thats a bug in xml formating for your device model (probably only for your device model).
[Sony Cross-Device General] LadFromWales85:
I don't think I have internet explorer hah.

Though even in your above post showing the correct format for Newflasher

<ATTRIBUTES VALUE="PLATFORM_ID=&quot;000AC0E1&quot;;PLF_ROOT_HASH=&quot;5F01088791F1DDAD20DB0DF59453943E4D275929A01705C83502AD5403F9010F&quot;"/>

The extra quotes are there also, what is missing is the PLATFORM_ID, which needs adding in order for Newflasher to match the phone up with the correct bootloader.

<ATTRIBUTES VALUE="PLF_ROOT_HASH=&quot;CE738EFA78393FA07CAE66C2DCA711449BC36B3AB78734713A7FB08527E7DAAEEE1833BFD6EEDB2ABD968FBA981B5B35&quot;"/>

No worries though, if you do not update Newflasher to support the format Sony are using with this model (and have done for all updates so far) we'll just have to continue modifying the boot_delivery.xml file to make it work with Newflasher

Thank you, though :)
[Sony Cross-Device General] welshlad:
Hi, just wondering if you could help a fellow countryman out please?

I've got the 1 iv on O2 also, and wanting to flash the Customized EU/UK. I've used this tool to flash many Xperias in the past with no problem.

I'm struggling with the "Set slot 'a' active" command I need to put in before flashing. Could you tell me where/how I do that. I've tried a few times already but just keep ending up in a boot loop that can only be rescued with Xperia Companion.

Diolch :)
[Sony Cross-Device General] munjeni:
Put newflasher in an empty folder e.g. on local disk C with name bb, so now open windows command prompt and tell command prompt to enter into folder C:\bb

cd C:
cd bb
./newflasher set_active:a

before you tell newflasher to set slot A put phone into flashinig mode and do commands above. After you change slot you need to reflash your rom, and it must be newer than yuor current rom oherwise you will end up into bootloop caused by rollback protection. About rollback protection I will not tell, ten tousend times is repported/explainned/asked in this thread, just search a bit about that. Hope this help.
[Sony Cross-Device General] welshlad:
Hi, just wondering if you could help a fellow countryman out please?

I've got the 1 iv on O2 also, and wanting to flash the Customized EU/UK. I've used this tool to flash many Xperias in the past with no problem.

I'm struggling with the "Set slot 'a' active" command I need to put in before flashing. Could you tell me where/how I do that. I've tried a few times already but just keep ending up in a boot loop that can only be rescued with Xperia Companion.

Diolch :)

Legend, got it sorted. Thanks so much (y)
[Sony Cross-Device General] mirhl:
Besides this very thread, here's where we discussed TA and whatnot during the years

https://xdaforums.com/t/xz1c-xz1-xzp-temp-root-exploit-to-backup-drm-keys-implemented.3795510

https://xdaforums.com/t/solved-android-attest-key-lost.3829945/

Unfortunately it is gonna be some effort to recollect everything, after much of the links further provided within got screwed by the xenforo transition.
[Sony Cross-Device General] JohnnyJEL:
im getting a weird error,

┌──(owner㉿ilak)-[~/Documents/L1/firmware/G3313_Customized US_43.0.A.7.106-R6A]
└─$ sudo ./newflasher.x64
--------------------------------------------------------
newflasher.x64 v55 by Munjeni @ 2017/2020
--------------------------------------------------------

Determining available free space:

Available space to caller = 569304 MB
Total space on current drive = 958367 MB
Free space on drive = 618059 MB

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

can someone explain what im doing wrong?
[Sony Cross-Device General] herbicide:
I get the same error as JohnnyJEL. Here is my session attempting to run 'newflasher.x64':

$ cd "Sony Xperia XZ2"/"H8216_Telstra AU_52.1.A.0.672-R4C"/
$ ls *.ta
auto-boot.ta cust-reset.ta master-reset.ta osv-restriction.ta reset-kernel-cmd-debug.ta reset-non-secure-adb.ta reset-wipe-reason.ta simlock.ta
$ ls ../NewFlasher/
newflasher.arm32 newflasher.arm64 newflasher.arm64_pie newflasher.darwin64 newflasher.exe newflasher.i386 newflasher_v55.zip newflasher.x64
$ sudo ../NewFlasher/newflasher.x64
--------------------------------------------------------
newflasher.x64 v55 by Munjeni @ 2017/2020
--------------------------------------------------------

Determining available free space:

Available space to caller = 8495 MB
Total space on current drive = 905081 MB
Free space on drive = 54542 MB

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

How do we specify the device NewFlasher should use?
[Sony Cross-Device General] munjeni:
What say "lsusb" command? Device is in flash mode or in fastboot mode? :)
[Sony Cross-Device General] herbicide:
The device is in 'fastboot' mode. I didn't know there is a separate 'flash' mode, how do I get to that?
[Sony Cross-Device General] herbicide:
$ lsusb | grep Sony

Bus 001 Device 096: ID 0fce:0dde Sony Ericsson Mobile Communications AB Android

The device is in 'fastboot' mode. I didn't know there is a separate 'flash' mode, how do I get to that?
[Sony Cross-Device General] munjeni:
Fastboot mode = volumeUP + Power button = blue light

Flash mode= volumeDown + Power button = green light
[Sony Cross-Device General] casouzaj:
Isn't it just the volume up/down (i.e. no power button) whilst connecting the USB cable?
[Sony Cross-Device General] munjeni:
Yes it can be done wothout power button
[Sony Cross-Device General] puteh:
Determining available free space by GetDiskFreeSpaceEx:

Available space to caller

= 110717 MB Total space on current drive 190775 MB

Free space on drive

- 110717 MB

Optional step! Type 'y' and press ENTER if you need GordonGate flash driver, or type 'n' to skip. This creates GordonGate.7z archive in the same dir with newflasher.exe!

Device path: \\?\usb#vid_efce&pid_beeb#5&3b19be35&0&2#{a5dcbf18-6530-11d2-901f-80c84fb951ed} Class Description: libusb-win32 devices

Device Instance ID: USB\VID_OFCE&PID_B00B\5&38198E35&0&2

Optional step! Type 'y' and press ENTER if you want dump trim area, or type 'n' and press ENTER to skip. Do in mind this doesn't dump drm key since sake authentifiction is need for that! n

Optional step! Type 'y' and press ENTER if you need to flash bootloader, bluetooth, dsp,modem, rdimage to booth a,b slots, or type 'n' to skip. By default it is NOT flashed to booth slots, do on your own risk!

y - Error write! Need nBytes: 9x18 but done: exe nBytes [exe]:

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

End. You can disconnect your device when you close newflasher.exe Press any key to continue
[Sony Cross-Device General] dima_vy:
Hi!

I'm not sure, that this the right thread to ask, but, I will try my luck here also😊

I have xperia 5iii from UK. I live in Israel. The phone can't turn on volte. I know that xperia 1IV works in Israel fine. So the question is - can I replace modem files in firmware folder of my phone with the files from xperia 1 IV and flash it with newflasher?

Thank you
[Sony Cross-Device General] munjeni:
You need to install gordongate usb drivers which you can install by folowing newflasher window text! In case you have compiled newflasher by yourself do in mind newflasher not use libusb!
[Sony Cross-Device General] munjeni:
You can't! Every model have its own signed fw which you can't use from another model, it simply will not flash at all, in worst case you might hard brick your device!
[Sony Cross-Device General] john615:
Is it possible to relock bootloader? I want my Xperia Pro 5g to be completely stock again. Is this possible once the bootloader was unlocked?

Can someone please guide me step by step on how to relock bootloader? I unlocked it a few months back and installed an older firmware. Now I just want to lock the bootloader and get the latest firmware and ota updates, and just have the phone back to stock. I completely forgot the process.

I'm willing to pay someone to help me out if possible. It shouldn't take too long. I will lock bootloader, then repair with xperia companion to get DRM back. I just dont know where to begin.
[Sony Cross-Device General] herbicide:
Thank you. Now that I know the difference between 'flash mode' and 'fastboot mode', NewFlasher can flash the vendor ROM when the device is in 'flash mode'.

I hope that helps you too, @JohnnyJEL.
[Sony Cross-Device General] munjeni:
Man use Google and search for that, there is a ton of sites shares that info, diferencie is only "does my devices can be relocked", thats what you need to know first! For example I have Xperia 10 and I have unlocked bootloader but until I figured that I can't relock my bootloader it was too late since I was in hurry to unlock bootloader and later figured out that I can't relock bootloader. Just search about that thing first! Procedure for relocking bootloader is the same for all Xperia devices, main diferencie is not all device have feature "relock bootloader". So just search for example "how to rellock bootloader on Xperia" trought Google and you will get info for sure for step by step guide.
[Sony Cross-Device General] KONR4D:
SOMC Flash device has CODE 10 error in device manager even after installing gordongate from newflasher. Spent the last 2 days looking it up but found nothing. Enters flash mode but isnt recognised by the system.
[Sony Cross-Device General] munjeni:
Looks like usb cable isue? Usb post isue pc side or phone side? Dust inside usb port phone side? OS isue? Many more things to check!
[Sony Cross-Device General] KONR4D:
good points to check. didnt think about them. thanks

update: tried a diff pc with only installing the driver while the phone was connected in flash mode. instantly recognised no error
[Sony Cross-Device General] mirhl:
Not really?

Relocking through reflashing the original TA was always possible until XZP/XZ1.

Then somehow it didn't work anymore (alas I don't remember the details, again)

Last but not least, since ~X1 (as you know?) not only TA restoring is good, but oem lock should also be a thing.
[Sony Cross-Device General] munjeni:
J4nn and me analysed that things detaily, there is some keys inside rpmb which we sucesfully dumped, and we found that if you restore TA it didn't restore key in rpmb! If I remembered right key from rpmb when XOR with key from some ta unit (didn't rebember) match key from unit 66667. What is used for key from rpmb I realy didn't remembered. In general device is not the same like when device was factory locked, and what problems can we get because of missing key from rpmb I don't know. To be honest I don't care anymore, its not my hobby for a long time.
[Sony Cross-Device General] Nhshop:
hello, mr. munjeni. I really thank you for the project you created. Sorry, I also read the thread discussing bootloader unlock: no and your comment was in there. Maybe this file can help you. This file contains ".dll" which can hack username and password of s1 networktool. It worked 2 years ago for my sony xperia and changed bootloader to yes. Now unusable. Maybe you can update or create a new ".dll" so it can be reused. Thank you.

Sorry for the bad english.
[Sony Cross-Device General] munjeni:
Thats not error but warning! Without update.xml you wouldn't be abble to keep userdata, instead an clean installation. Clean installation is always prefered!
[Sony Cross-Device General] munjeni:
That not working for free, and that can't be cracked, these app reguire paid credits to get unlock code from the remote server.
[Sony Cross-Device General] Zero-21XX:
If I need preserve my data, what I need?
[Sony Cross-Device General] munjeni:
Just folow carefully what newflasher window tell you
[Sony Cross-Device General] kfrin:
Hi munjeni!

I want to thank you very much for your tool because it just saved my G8341 which was stuck in a bootloop. Impossible to flash it with Flashtool so thanks again!

FYI, I unlocked the bootloader on my XZ1 years ago and I want to relock it but I still didn't succeed to do it.

I'll keep you updated guys if I have any chance with doing the thing.

Sorry for my bad english
[Sony Cross-Device General] munjeni:
Xz1 do not have bootloader lock feature as like my xperia 10 also don't, you can't lock bootader if you have unlocked it
[Sony Cross-Device General] Traace:
Newflasher is refusing to flash anything to my phone at all... while Flashtool can. What is going on?

Steps I followed:

Optional Step 1: Installed the drivers

Step 1: Downloaded the right firmware and placed newflasher.exe into the Firmware Directory next to .ta , .sin, boot, partition

Step 2: Put phone in Flash Mode, connected it to the pc and start newflasher.exe

Wait Wait Wait but nothing happens at all. Not after 2 min, not after 5 min, not after 20 min, never...

Logs:

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

newflasher.exe v55 by Munjeni @ 2017/2020

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

Determining available free space by GetDiskFreeSpaceEx:

Available space to caller = 112755 MB

Total space on current drive = 299239 MB

Free space on drive = 112755 MB

Optional step! Type 'y' and press ENTER if you need GordonGate flash driver, or type 'n' to skip.

This creates GordonGate driver installer in the same dir with newflasher.exe!
[Sony Cross-Device General] munjeni:
The rest of log? Phone model? Next to it, driver installed? Checked in device mannager correctness of the driver? Usb cable ok? Phone usb port ok? Sony pc companion software shut down? And also checked task bar if it is realy shut down? Etc...
[Sony Cross-Device General] janolucero:
hi @munjeni please guide me.

I have an Xperia 5 II XQ-AS52 (europe) firmware 58.2.A.10.126

Sadly I flashed japanese firmware XQ-AS42 v58.2.A.10.163 thinking it was a better one than the older europe release.

The problem is I can't go back to the euro firmware because if I flash it my phone go in a loop and says " your device is corrupt it cant be trusted and will not boot"

If I boot the japanese firmware my phone reads both sim cards but none of them have signal. I have tried flashing older firmwares but the problem persist and tried to fix it with xperia companion but it says "temporary device incompatibility" and shows me my phone info. Even if I flashed an older android version it stills shows the japanese one.

This is what Companion says:

Temporary device incompatibility detected​

Could not perform the selected operation at this time. Please try again later.

UEGetPhoneInfoARBHigh

XQ-AS52 3530 43040143 58.2.A.10.163

2.18.6.0 / Windows 10 Home 64 bit / Win64 / US / /

Please help me.
[Sony Cross-Device General] munjeni:
Sorry I have old xperia 10 and I can't help, what I know about "your device is corrupt..." mean rolback protection cause that. The only way to bypass that is see post 4 !
[Sony Cross-Device General] janolucero:
Thanks for the fast response I'm gonna try that. Is there a drm fix for fw v58?
[Sony Cross-Device General] munjeni:
You need to ask somebody who have Xperia 5 II. I'm not in android development for 5 years and I can't help with that