[Sony Xperia XZ1  Guides, News, & Discussion] dcrin3:
Hello user space,

A couple days ago I decided to take a chance by building AOSP for my G8342 Dual, the experimentation was quite... let's call it adventurous. It all started by firing up my VM, which I currently use to build, unofficially, LineageOS for my Nexus 5. I'd set a side enough space for the VM to cover the LOS build, not remembering the amount space used I was oblivious. I then jumped on Sony dev site, just to find out the XZ1 had been added to the list of unlockable devices, sweet! I backed up my current XZ1 data not sure whether the bootloader unlock would wipe all data, after sweeping the web for more information, it was confirmed that data would be wiped. I should have known because my N5 did wipe data, which I take is a security measure.

Back on the VM, per Sony's dev site, I made sure the necessary packages were installed which was all of them minus maybe one that wasn't. After all this VM builds for another device so it should be 98% complete. With haste, I 'repo sync'd that bad boi, and 'repo_update'd and on to the 'make -j4'. Little did I know, I had space issues. Remember that space issue up there?^^ It came to haunt me later, like 78% building complete later. :/. #$%^&(* I created a new VM with more space for both N5 builds and Xperia. The build was completed successfully, 3.xx-hrs later.

AOSP was manageable on the N5 with Google proprietary vendor files, etc. But this XZ1 is just blah.. even with the sony binary(4.4). By the way, without the sony binary(fastboot flash oem *.img) the thing will not boot. I flashed an unofficial gapps package from back in Dec. 2017, which I believe is the only functional(per xda) one for Oreo. Needless to say, the gapps package works.

Here are my issues with the AOSP XZ1: Android-8.1.0_r15

-SIM2 is defunct. I selected option 48 from lunch menu. Option 48 was aosp-g8342-userdebug.

-The camera, I know, DRM is sorta still there, with limits :/.

a.) Noise reduction is nowhere to be found even under good light. This camera has a good f-stop.

b.) HDR? It's there but is it actually performing its best work? No.

c.) Camera focus at close range, under a foot? Problematic or mostly nada on screen tap.

-A minor change: screenshot capture is now Volume down + power button. Aosp style!

Non-issues:

-Its plain vanilla, flat as a soda that's been seating out open all day.

-Because I built a userdebug version, root is automagically embedded.

https://source.android.com/setup/building#choose-a-target

You take on the responsibility of your device. Backup your data because the images will wipe everything.

=============How to flash=============

Get a copy of the latest binary here: software-binaries-for-aosp-oreo-android-8-1-kernel-4-4-yoshino

fastboot flash boot boot.img

fastboot flash recovery recovery.img

fastboot flash system system.img

fastboot flash vendor vendor.img

fastboot flash userdata userdata.img

fastboot flash oem SW_binaries_for_Xperia_AOSP_O_MR0_4.4_<release version>_<platform>.img

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

===============8.1.0_r20==========================

-Grab a copy of this aosp-g8342_dual-userdebug:

AOSP_Android-8.1.0_r20_G8342_Dual.zip

-Grab a copy of this aosp-g8341_single-userdebug:

AOSP_Android-8.1.0_r20_G8341_Single.zip

===============8.1.0_r20==========================

Here are a few screenshots:

View attachment 4451368

View attachment 4451369

View attachment 4451370

View attachment 4451371

View attachment 4451372

View attachment 4451373

perhaps it was a nice story to tell.... have a nice day xda.