Great guide! Thank you! It's working wonderfully.
I have a few notes/changes based on my experience that I'll share in case others come across these issues:
For Newflasher, you have to put your phone into flash mode first, but it wasn't explained how. For Sony devices, the method is explained here:
https://developer.sony.com/develop/open-devices/get-started/flash-tool/useful-key-combinations/
(I held it for at least 10 seconds. The phone screen won't show anything, but you will here a Windows device connection sound.)
Newflasher didnt flash anything the first time I tried. The first time I ran it I had it dump the trim area, so maybe you have to run it again and skip that step. I wasn't sure why it didn't work so I also redownloaded the firmware from xperifirm, and placed in the root of my hard drive in a folder with no spaces. Running it after those steps worked. (I also installed Xperia Companion in between these attempts, but I doubt that made a difference. People say you need to close xperia companion and potentially stop all related processes/services for newflasher to work).
You might want to add a note at the beginning of step 4 that warns this will wipe your phone (I was doing it on a fresh phone because I already knew this, but others may not know until it's too late).
Step 4, #17 says to run
fastboot reboot fastboot
on newer phones, but don't do this, just skip that step. That starts the phone in fastbootD and the computer doesn't see the phone anymore until you shut down the phone and boot back into normal fastboot mode (with nothing showing on the phone screen).
Step 4, #19, after doing
fastboot -w
it erased almost everything except it failed at erasing 'metadata'. I tried again with the same result so I just proceeded to
fastboot reboot
and my phone rebooted to a screen about my data may be corrupt, with two options: Try again or Factory reset. I did the factory reset option and it successfully cleared the metadata. I had to wait a minute or two and then it rebooted into android successfully.
Thanks again for the guide!
Next I'm trying to degoogle this phone and replace google play services with microg, but the guide I found uses TWRP. Hopefully I can figure out some alterations to the process to make it work.