Bought an XA2 to replace my Moto G4 (which has a dodgy camera lens) yesterday, installing LineageOS was borderline impossible cus of their weird partitioning and DRM,
Why Xperia of all? It's the most locked down shit. Some older ones even require you to pay them to unlock bootloader for you. Also lineage is unavailable for it or were you trying to port it?
I could only use fastboot with USB 2.0 ports, which meant digging out an old laptop, then when I actually figured it out the screen died. It also has an SD tray that takes you 5 minutes to remove even with tweezers, and a bunch of features I don't need like a fingerprint sensors.
Never buy anything with fingerprint sensor or you'll get weird shit cases. Also did it not come with the sd tray pin thing? Why did the screen die anyway while plugged, you need full battery before flashing on anything otherwise you'll get the brick.
I just want a phone that does the job, why overcomplicate the device so much? I'm returning it and I'm just going to get a modded lens replacement.
But isn't that also true with computers or even browsers? Most PCs have botnet OS preinstalled in them and on browser's case both Chrome and Firefox has telemetry that track you (heck even the websites too) so you had to install addons for the website and to cover up the sneaky fingerprints.
If you haven't given up, just always look for prospect ROM first (Plasma mobile, Postmarketos, Omnirom, Lineage, Resurrection Remix, AOSPA AOSPE, crdroid), and find the exact phone, follow instructions and voila, even the new ROM itself isn't enough since you still had to do shit with the browser and there's no addons, well you even had to replace the SystemWebView otherwise google will always know everything you browse and also the kernel has fallback dns requests, also the apps share PID now so your firewall has to whitelist the botnet apps sharing same PID! clever clever, google.
Also if the rom uses the default Oreo launcher, it will have built in google integration when they botched "Launcher2" to bitrot and most custom roms boast having the google integration botnet feature embedded in the launcher (few roms like resurrection don't).
You: Ok google, were you recording everything this entire time?
Google Assistant: yes, as always and you currently have 50 GiB of personal information on our servers
proof: https://invidio.us/watch?v=hLjht9uJWgw
Honestly I dont trust anything above there as even raw AOSP had so many backdoors + telemetry and still phone google anyways especially with systemwebview, lineage is shit too and does not protect you from the bloated code or binary blobs that chrome will fetch to record your voice (creepy but true).
If that bothers you, good thing there's the godsend app called AFwall but that too isn't enough as during boot it literally leaks (so you had to init.d it fast), apps can literally list all your installed apps which itself is a fingerprint. The next problem is you'll still have shit in there, If I were you I'd lookup Necunos Solutions though it is a complete downgrade, it is running everything FOSS (gpu and even baseband) and is at least better than anything Replicant could offer since most of their devices are hard to find.
...if you can't hack it, you don't own it.