[Sony Cross-Device General] sToRm//:
I don't know if the OTA updates will work at all, if the device was unlocked once. I haven't checked this, but maybe there is no way back to OTA if the bootloader was unlocked before, because it's possible that it's depending on some TA data, that's erased while unlocking. If you have an unlocked/rooted device, the best way is to flash the firmware manually with Newflasher.

If you want to keep your userdata, you only have to delete the userdata_XYZ_.sin file in the firmware folder. I never deleted other files (.ta or others) because I think that's not needed. So you can flash the firmware for your device and I share a little guide here...

BUUUUUT... PLEASE BE SURE YOUR DEVICE IS NOT ENCRYPTED!

I personally upgraded my XZP from version to version with the method I mentioned. It worked perfectly before the device was encrypted. But after I upgraded the x.8.49 to a newer version, I had a really big problem. Because before this version, I used my own patched kernels that had no forced encryption. After I updated to 8.49 I used another kernel and forgot that it hasn't the optional encryption "hack". So the device was encrypted since I booted with this kernel. And after I updated to a newer firmware, the encrypted partition was corrupted and there was absolutely no way to get the data back. I had to wipe the device and start from scratch.

I recommend the following way to upgrade:

- Backup your complete /sdcard (/userdata) to an external SD card

- Use Titanium Backup (or another solution like that) and backup all your apps and settings to an external SD card

- You can (optional) export your contacts to the external SD, too

- If you want to be sure, make a Backup of all partitions with TWRP, too (also to the external SD card).

- If you have your backups on a save place (copy to your PC) then...

- Use Xperifirm to get the current firmware version

- Open the folder of the downloaded and unpacked firmware

- Extract the partition.zip, so that there is a folder "partition" in the firmware folder

- Move the userdata_XYZ_.sin file out of the firmware folder (don't delete it, because maybe you would need it later)

- Copy the Newflasher files to the firmware folder

- Run Newflasher and flash the firmware to your device

- If you want to, use XperiFIX (actually only for XZ Premium) to root and fix DRM

- Boot your device and check if it's running with the new firmware

>> If it works, then you are done. Nothing more to do.

But... If the device doesn't boot or the userdata is corrupted, then:

- Put the userdata_XYZ_.sin back to the firmware folder

- Flash the firmware again with Newflasher (the device will be clean flashed)

- Use XperiFIX if you want to (like mentioned before)

- Boot your device and do the needed settings

- Install Titanium and restore your app backups (only user apps!)

- Install a file manager and move the backed up /sdcard files (userdata) back to the device

- Maybe there are some apps that have to be restored manually, but you saved a lot of work with this.

You can (alternatively) also go back to the older firmware version, if you have a TWRP backup (/system and /data) and the old firmware pack.

- Flash the older firmware version (complete with partitions and userdata.sin)

- Flash TWRP via fastboot and run it

- Restore the /system and /data partitions with TWRP

- Boot your device. You should be on the old firmware like nothing happened.

Hope that helps!

Cheers!

P.S.: [MENTION=4120742]munjeni[/MENTION] Do you know something about the "Oreo Rollback Protection" in relation to Sony devices? Maybe this will bring us some problems in the future, if we want to downgrade with userdata or using backups?!