yashsingh1/xdaforums huggingface dataset:
[Sony Xperia XZ1 Compact Guides, News, & Discussion] metalik:
I secured the Oreo firmware (customized UK) and the Pie firmware (customized DE) .. using xperifirm. I downloaded Pie just to have the current release that's running on the phone nearby, in case any of my attempts go bad and I'd need to restore it.

By chance, I have for about 2 weeks the possibility to have a non-branded original "Customized UK" XZ1c. As far as I've seen, there 1 app only that's different compared with my original customized DE. I might flash this one to Oreo and back to Pie ... just to learn the process ... and only afterwards to get to work on mine.

I also took my time to look around the web before jumping into flashing.

There are topics which I don't quite grasp yet .. like DRM .. or attest keys.

The thing is that I don't want to break anything in doing this downgrade to Oreo. I don't need to root it, to unlock the boot loader, to break any X-Reality or other functionality. I'm truly amazed by the battery life, btw: I get 3 1/2 days plus with Stamina activated non-stop. The phone is very snappy even with Stamina ... and that's another issue: by downgrading, I wouldn't like to ruin anything of the battery management internal apps / features.

Another thing is this: i don't intend to preserve any data. Whatever I have as apps, currently, will be backed-up and re-installed from scratch + restore of personal data.

I'm now at the point of going through:

1. flashing with flash tool + xperifirm

OR

2. flashing with newflasher.

Basically, I'm trying to understand what the differences (risks) are and what's the safest to use.

Any advice from the XDA community is welcome on this one.

Best wishes,
[Sony Xperia XZ1 Compact Guides, News, & Discussion] vofferz:
[MENTION=3083418]metalik[/MENTION] download the firmware with xperifirm and from settings select to decrypt/decompress (don't remember how it is). Then delete all .ta files from the folder and persist*.sin (to avoid losing android attest keys and flash with newflasher.

Flashtool has some problems with newer phone models so it's not recommended for xz1c.
[Sony Xperia XZ1 Compact Guides, News, & Discussion] dsa88:
the right question would be, how to get the latest security patches but staying with oreo?
[Sony Xperia XZ1 Compact Guides, News, & Discussion] metalik:
gentlemen,

your input is highly appreciated.

aside from the persist*.sin and all .ta files .. should I take care of anything else?

P.S. I followed this tutorial (link) and it clearly indicates that warranty would not be voided if I would attempt such a re-flashing. Is it true?

P.S. the last question in the thread remains valid: how to apply the upcoming patches on top of Oreo? .. can those be obtained and flashed in a similar way? ... I doubt it would be a good approach because Sony is supposed to take the Google patches and make sure they integrate properly in their Android customization ...
[Sony Xperia XZ1 Compact Guides, News, & Discussion] Shahnewaz:
First take a screenshot of your current keystore status by typing this in the dialler *#*#7378423#*#*, then go to Service tests or Service info -> Security

I used newflasher since it's the last updated software for flashing.

Extract your ftf if required, put only the required files to downgrade in newflasher's folder. For me I only used kernel, system, userdata and cache.

Boot to flash mode, flash using newflasher, reboot and done! Make sure your keystore is intact by comparing the status of all keys with your screenshot.

I've used this method to downgrade temporarily, get temp root, backup my TA partition and then go back to current firmware. All keys intact.
[Sony Xperia XZ1 Compact Guides, News, & Discussion] vofferz:
I would flash everything else but the .ta and persist*.sin to ensure it works as intended with all files from the firmware you're using. Of course that resets all your userdata, but I guess a downgrade would require that anyway.

Warranty should be just fine - you're still just using official Sony firmware without any modifications to the device or system.

I don't think it will be possible to stay in official Oreo fw with locked bootloader and get recent security patches.

Sony will most probably implement the new patches only into the latest fw version - and that's Pie.

And if someone would make a custom rom with the latest patches on Oreo, you won't be able to install it with a locked bootloader.
[Sony Xperia XZ1 Compact Guides, News, & Discussion] metalik:
Hello again,

what's the impact of flashing persist*.sin ... I believe that's connected with the attest keys, right?

Later edit: I downgraded from Customized DE Pie to Customized UK Oreo. I used newflasher, deleted all *.ta from the root & boot folder ... but by mistake I forgot about the one small persist*.sin file.

Long story short: yes, leaving persist*.sin file in the folder and flashing with newflasher destroyed the Attest keys (I get them as NOT provisioned).

The phone seems to work without problems nevertheless. I re-flashed to an older Customized DE Pie and got the last valid OTA update. Going back to Customized UK Oreo did remove everything from the Service Tests > Security (it showed "none"). But on that the Xperia Companion did the trick (software repair). So it's back on the initial Customized UK Oreo - just attest key shows NOT provisioned ... so

Lessons learned: /*.ta + /persist*.sin + /boot/*.ta must be removed before flashing with newflasher.
[Sony Xperia XZ1 Compact Guides, News, & Discussion] Joecalone:
Hey, sorry to bring up this old thread but I don't suppose you still have a copy of 16.20? I've been looking for a working copy of it everywhere and I'm getting desperate
[Sony Xperia XZ1 Compact Guides, News, & Discussion] metalik:
Hey,

sorry for the late reply ...

I kept everything that I (historically) downloaded with Xperifirm ...

I just checked and one folder is this "G8441_Customized UK_1310-6856_47.1.A.16.20_R18B" ... about 2.55 GB in size.

the content of fwinfo.xml is this:

<?xml version="1.0" encoding="utf-8"?>

<fwinfo>

<project>Lilac</project>

<product>Xperia XZ1 Compact</product>

<model>G8441</model>

<market>United Kingdom</market>

<operator>Customized UK</operator>

<swId>1307-7511</swId>

<swVer>47.1.A.16.20</swVer>

<cda>1310-6856</cda>

<cdfVer>R18B</cdfVer>

<fsVar>GENERIC</fsVar>

</fwinfo>

and update.xml is this:

<?xml version="1.0" encoding="utf-8"?>

<UPDATE>

<SYSTEMPARTITIONIMAGE>partition.zip</SYSTEMPARTITIONIMAGE>

<BOOT>boot.zip</BOOT>

<NOERASE>appslog_X-FLASH-ALL-C93B.sin</NOERASE>

<NOERASE>diag_X-FLASH-ALL-C93B.sin</NOERASE>

<NOERASE>ssd_X-FLASH-ALL-C93B.sin</NOERASE>

<NOERASE>Qnovo_X-FLASH-ALL-C93B.sin</NOERASE>

<FACTORY_ONLY>persist_X-FLASH-ALL-C93B.sin</FACTORY_ONLY>

<NOERASE>userdata_X-FLASH-CUST-C93B.sin</NOERASE>

<SIMLOCK>simlock.ta</SIMLOCK>

<NOERASE>cust-reset.ta</NOERASE>

<NOERASE>master-reset.ta</NOERASE>

<RESETNONSECUREADB>reset-non-secure-adb.ta</RESETNONSECUREADB>

<NOERASE>reset-wipe-reason.ta</NOERASE>

</UPDATE>

in a nutshell: I can zip the folder and find a way to send it to you.

Best regards,
[Sony Xperia XZ1 Compact Guides, News, & Discussion] Shahnewaz:
I have my copy of 16.20 and related firmware. They are all Generic Latin America versions.
[Sony Xperia XZ1 Compact Guides, News, & Discussion] cynthi4:
Xperia XZ1 Compact 47.1.A.16.20 Firmware Search

Great! I have also been searching desperately for a G8441 47.1.A.16.20 firmware. The country doesn't matter.

If either of you are able to send a zip, I would love to host it on my drive for anyone else who comes looking.
[Sony Xperia XZ1 Compact Guides, News, & Discussion] vofferz:
[MENTION=9767819]cynthi4[/MENTION] Customized NOBA (nordic/baltic) latest Oreo: http://aeitis.org/xz1c/

It's downloaded and decrypted via xperifirm and zipped.

I'll keep it there for a while, but might remove soon.
[Sony Xperia XZ1 Compact Guides, News, & Discussion] Shahnewaz:
Here you go:

https://bigboidrive.duckdns.org/nextcloud/s/ZW4FQmqBE8Dfcp2
[Sony Xperia XZ1 Compact Guides, News, & Discussion] moist_line:
Hello, I just got a xz1c and I'm on 47.1.a.2.281. I haven't updated because of reported battery drain issues. Should I stick with this? Do you recommend pie at all? If not, what's the most stable build you'd recommend?
[Sony Xperia XZ1 Compact Guides, News, & Discussion] cynthi4:
Unless you have any specific issues with Oreo or see some advantage with upgrading to Pie, I wouldn't. I am not a big fan of Pie and went through this downgrade to 47.1.A.16.20 to avoid it. If you're interested in custom ROMs, I am running LineageOS 15.1 on my xz1c and it's been great!
[Sony Xperia XZ1 Compact Guides, News, & Discussion] espoice:
That's strange. Being still happy with my locked device, I've always regretted switching to pie so today I actually did the whole process to restore Oreo: downloaded the latest Costumized NOBA oreo the user few posts above linked, deleted *persist.sin and every *.ta files in the folder (even the one inside boot folder), run newflasher and then reboot. Too bad I found stock camera broken :(

I re-checked multiple times searching for those *.ta files to be sure to avoid this issue, but that's it: I got Oreo but now I have lost stock camera and who knows what else.

Does it mean I've lost those functionality forever? Is there any way to restore stock camera? Happy to see this thread still active
[Sony Xperia XZ1 Compact Guides, News, & Discussion] vofferz:
How did the stock camera break? Does it just crash or something?

Anyway, I don't think it's permanently lost.

Maybe you should first try to repair it with Xperia Companion. Although it might revert you back to Pie...

Did you already factory reset? (Though flashing the fw without deleting usedataxxx.sin does that anyway.)
[Sony Xperia XZ1 Compact Guides, News, & Discussion] Didgesteve:
Flash again, but leave the boot folder alone
[Sony Xperia XZ1 Compact Guides, News, & Discussion] espoice:
Thanks for the replies, I searched a lot everywhere and it seems that no simple method would have solved the issue. Basically having free time yesterday, I ended up unlocking the bootloader and applying drm patches :D

It has been a pain, but actually I ended up with Oreo and working camera. Nice to have magisk manager again!! It can seem easy but I actually spent the whole day between bootlooping and near death xperia experience. I think I'll post somewhere a step by step guide, with all the tools I used to perform this action. Thanks anyway have a nice day
[Sony Xperia XZ1 Compact Guides, News, & Discussion] TGN:
Please do that, would be so appreciated!

Need my substratum/andromeda dark mode back.

I cry every time i unlock my phone.

Most stupid thing i ever done was this update to 9, and i regret it with all my life, although i should have known a thing or two before i pressed ''update'' :)

I assume we have to wait quite a while for a custom pie rom on this device.
[Sony Xperia XZ1 Compact Guides, News, & Discussion] doobie12:
stuck on bootloop

hi everyone,

I tried following the guide on xperia blog to downgrade my us pie to oreo.

I cant post the url but its the same as someone added on this thread.

I did everything according to the guide, but my phone is now stuck on bootloop. 1-2 seconds on the sony logo and restarts all over.

I got the oreo files from the links here.

tried to flash the NOBA and than the GEL frimware and its the same.

Tried flashing the uk Pie that I Downloaded from Xpirifirm, and still Im on bootloop.

any Idea about my options??

thx
[Sony Xperia XZ1 Compact Guides, News, & Discussion] Didgesteve:
Download the the .20 version from this thread

Download newflasher, it's much easier and simpler than flashtool..

Unpack newflasher in the same folder as the firmware. Delete persist*.sin.

start newflasher.exe, follow instructions. Connect the phone in flashmode (plug it in to the computer while holding the volume up (+))

It may be that you didn't tick the delete data partition in flashtool. Unfortunately you can't go back to Oreo with your data partition, that might be what's causinng it to crash. You have to wipe the data for the downgrade to work.
[Sony Xperia XZ1 Compact Guides, News, & Discussion] doobie12:
Thanks for the reply,

I did use newflasher to flash the rom. used v13 that was in the link you added.

Also I tried the same rom u added here. but only after the NOBA rom didn't work.

Thing is I want to change it to euro rom so I can use the fingerprint scanner. So what I did is try to flash the NOBA .20 ROM, than got the bootloops, than tried again with the GEL .20 ROM that you put in the link here, and still was on bootloops, and lastly I tried the new PIE rom customised UK (downloaded from xpirifirm), and still had the bootloops.

Only thing is I didn't delete the persist*.sin (but did delete all .TA files) in my first few attempts. could it be the problem? After some attempts I saw the problem so I flashed again after deleting the persist*.sin. and still was stuck on bootloops.

Right now I'm back on US pie (used the xperia companion to repair the software).

Is it supposed to be ok to change from US to NOBA firmware while downgrading?

Thanks for the help
[Sony Xperia XZ1 Compact Guides, News, & Discussion] vofferz:
Did you delete userdataxxx.sin? You can't delete it and downgrade...

The persist sin -file should not cause a bootloop, but you have lost your Android attest keys by flashing it.

It should not matter which country's customization you flash on your phone other than some don't have all the same features.

Try flashing the NOBA firmware (or some else) again with newflasher deleting only the .ta files in the main folder. You don't need to delete the persist file anymore if you have already flashed it as the keys are lost anyway.
[Sony Xperia XZ1 Compact Guides, News, & Discussion] doobie12:
Your suggestion is exactly what I did the first time, which ended up with bootloops..
[Sony Xperia XZ1 Compact Guides, News, & Discussion] vofferz:
That seems weird... Have you been able to get your phone running at all since then?

Only suggestions I have is to try reflashing the whole firmware with only deleting the ta-files or download some other version with xperifirm and flash that.

Or if your bootloader is still locked, you could try fixing it with Sony's Xperia Companion.

I have to say that I haven't flashed the Oreo NOBA firmware myself even though I uploaded it, but it is the full fw downloaded from xperifirm, decrypted and zipped so it should work fine...
[Sony Xperia XZ1 Compact Guides, News, & Discussion] doobie12:
Yeah i fixed it with companion, so now i have pie again on my phone, but i hate it. And xpirifirm only has pie firmware.

I'm thinking on installing the aosp extended with oreo 8.1. If that goes wrong as well, will i be able to use xperia companion to fix it? Im asking only because my bootloader will be unlocked, which is not the case right now.

and do i need to install the TWRP for android 9 or 8.1? I want to install aosp oreo 8.1, but have on my device stock PIE ROM.

Thx
[Sony Xperia XZ1 Compact Guides, News, & Discussion] Didgesteve:
If you unlock your bootloader then you can never use Xperia Companion again. You will also loose some of the higher function software, the camera, x-reality, youtube HDR. Russles's AOSP does have a GCAM mod, so you would still be able to take pictures.

I am not recommending that you unlock your phone, if you're struggling to get a simple downgrade, then rooting and pushing stuff via ADB may be problematic. If you want to go to another custom rom then you'll need to flash Oreo and log into it before you do anything. If that bit can't be done, then you'll be where you are now, with a unlocked bootloader (and broken DRM). Unlocking it won't make flashing the rom easier, quite the opposite.

But if you are determined there is a process for backing up your TA partition, which is where you should start.

janjan's thread on his modded kernel is very helpful with some instructions and links and maybe you could root a stock build and modify it to be the way you want, rather than a whole other rom.

But to answer your question once you have been through the unlock process with Sony, you then need to flash the phone with a stock Oreo build, open it, enable USB debugging, before you flash the correct TWRP, that will open the phone up to being able to root it and flash ASOP or Lineage
[Sony Xperia XZ1 Compact Guides, News, & Discussion] doobie12:
Ok so I think I will take your advice and stay with locked bootloader..

I checked for some weird things in the process of flashing that I tried, and found two things.

1. In the newflasher after Im pressing 'n' for the first time, it recognizes my phone as 'somc flash device'.. Is that ok?

2. It takes about 1 min for the flashing process until newflasher prompts that it is done. I saw in some videos that it take about 5 min. after the infflating thing with the dots it finishes. Could it be that there are missing files? Is it supposed to be this fast?

Thank you very much
[Sony Xperia XZ1 Compact Guides, News, & Discussion] vofferz:
It should take longer than one minute to flash the whole firmware.

Press yes in the first prompt to install the gordongate driver, no on the second one.

The flashing should go through all the sin files inflating them and then flashing. The system partition only goes through many steps and takes about five minutes.
[Sony Xperia XZ1 Compact Guides, News, & Discussion] Didgesteve:
No, you're right it should be at least 4 - 5 minutes.

It's quite possibly a driver issue. Plug the phone in while it's in flash mode, open device manager, look for the phone, then try manulay assigning the driver from flashtool.
[Sony Xperia XZ1 Compact Guides, News, & Discussion] doobie12:
OK! so I did that, tried installing from a different PC, installing the driver from scratch, and got newflasher to recognize my phone in flashmode as "universal serial bus controller", and than it worked.. right now I'm running the oreo 8 on my phone, used the NOBA one.

Thank You so much for the help!!

btw, will i get any update suggestions to oreo 8.1? or only for Pie?

Thanks again!
[Sony Xperia XZ1 Compact Guides, News, & Discussion] Didgesteve:
There's no 8.1 stock, you might get nagged for a Pie update, but I think it stops after a while.
[Sony Xperia XZ1 Compact Guides, News, & Discussion] doobie12:
ok, so I got the noba working, and everything works fine, except the camera. stock app doesn't work, other apps don't work as well, and if i try to take a pic with whatsapp, i get a green picture. any idea on my options? i really need the camera to work. Will going back to Pie fix it? Is it fixable in any other way? thanks
[Sony Xperia XZ1 Compact Guides, News, & Discussion] Didgesteve:
Try a factory reset.

What you're describing is broken DRM, but I don't think that's possible as you haven't unlocked your bootloader.

If a reset doesn't fix it, try a different Oreo build, now you know it works :)
[Sony Xperia XZ1 Compact Guides, News, & Discussion] doobie12:
thx for the quick reply.

Tried factory reset already already and it didn't work. about a different build, i only have the NOBA and GEL. You know if the GEL has fingerprint enabled?

right now im on the customized uk Pie that i just downloaded from xpirifirm, and the camera works fine.

or if maybe you know where i can get other builds? i saw on some thread you put a link to oreo firmware that was g8141 which is not an xz1 compact, but you posted it at the xz1 compact forum? is it because it doesn't matter?

thanks
[Sony Xperia XZ1 Compact Guides, News, & Discussion] vofferz:
That Oreo camera issue is weird... As was stated it seems like the drm keys are missing even though you haven't unlocked the bootloader.

Could you check what the security info says about the drm keys in your phone?

Type *#*#7378423#*#* in the Dialer and select Service info / security. If you'd post a screenshot, it would be nice to see if some keys are missing. (Maybe blur out the IMEI code.)

The camera works in Pie even without the drm keys unlike in Oreo.

---------- Post added at 03:49 PM ---------- Previous post was at 03:37 PM ----------

Btw. I think you can flash an old Oreo firmware and allow OTA uodates until you have the latest Oreo. If I remember correctly, the updates come one at a time and it won't offer Pie until you have the latest Oreo.

You can get an old customized CE1 Oreo firmware from here: https://xdaforums.com/xperia-xz1-compact/development/devonly-exploits-temp-root-to-backup-t3795510 if you want to try it.
[Sony Xperia XZ1 Compact Guides, News, & Discussion] doobie12:
thanks
[Sony Xperia XZ1 Compact Guides, News, & Discussion] Didgesteve:
No, I posted that in error.

Here's a couple of .20 builds
[Sony Xperia XZ1 Compact Guides, News, & Discussion] doobie12:
thx man!
[Sony Xperia XZ1 Compact Guides, News, & Discussion] vofferz:
No permissions to view the file...
[Sony Xperia XZ1 Compact Guides, News, & Discussion] doobie12:
I guess this one should work

https://ibb.co/tbt1rnV
[Sony Xperia XZ1 Compact Guides, News, & Discussion] vofferz:
The keys seem OK as the only one not present is the android attest key which was wiped by flashing the persist sin file. It shouldn't affect camera functionality, so the problem is somewhere else...
[Sony Xperia XZ1 Compact Guides, News, & Discussion] vofferz:
I just read a post that might solve your problem. You have to unzip the boot zip file in the firmware so that flashing it also flashes the Oreo bootloader.

I think with newer version of the fw or xperifirm it's unzipped by default but it might not be with that Oreo build.

So you should end up having a folder called boot inside the fw folder with some files in it.

https://xdaforums.com/showpost.php?p=79210690&postcount=729

Edit; it seems that in the zip I uploaded the boot folder is already unzipped so it shouldn't cause the problem...
[Sony Xperia XZ1 Compact Guides, News, & Discussion] doobie12:
Hey, thanks for the suggestion, but it was already unzipped when i used it, just as you said was in the zip you uploaded.
[Sony Xperia XZ1 Compact Guides, News, & Discussion] vofferz:
Did you leave the .ta file in the boot folder or delete it? I don't know if it matters but someone said not to delete the one ta in the boot folder, just the ones in the main one before flashing?
[Sony Xperia XZ1 Compact Guides, News, & Discussion] doobie12:
i did delete it, as was written in the instructions. cool, maybe that was the problem.. i will try some time soon and let you know if it worked.

thanks
[Sony Xperia XZ1 Compact Guides, News, & Discussion] doobie12:
So, took me a while but I finally got to it... Keeping the .ta in the boot folder did fix the camera issue. Right now it seems like everything is working fine!!

Thank you so much for all the help!!
[Sony Xperia XZ1 Compact Guides, News, & Discussion] kovarka4:
Hello, I also want to downgrade from Pie to Oreo using newflasher. Xperia XZ1 c here. Just to make sure - what did you erased from the main folder? All .ta files? Did you erased any .sin file?

Thanks!
[Sony Xperia XZ1 Compact Guides, News, & Discussion] doobie12:
As I remember I deleted all the .ta files in the main folder, but not the .ta, in the boot folder. about the .sin, didnt delete any of them...
[Sony Xperia XZ1 Compact Guides, News, & Discussion] vofferz:
If you don't delete the persist...sin file before flashing you'll lose Android attest key.

I don't know if that really matters though. There's a longish thread about it by [MENTION=4418980]j4nn[/MENTION] who would probably be the best person to answer that.
[Sony Xperia XZ1 Compact Guides, News, & Discussion] j4nn:
[MENTION=7803472]vofferz[/MENTION], [MENTION=9902650]kovarka4[/MENTION], Android Attest key would get lost if you flash persis.sin. But it is useful only while bootloader is still locked. After unlock, it seems better when it is lost - otherwise it allows google to see easily the unlocked state. See the "Android Attest key lost" thread for more details.
[Sony Xperia XZ1 Compact Guides, News, & Discussion] kovarka4:
So I deleted also persis.sin and it works perfect. Everything is working fine! So lucky with my android 8 back.

Thanks for help!