This is a port of Ubuntu Touch for the Sony Xperia XZ (kagura/F8331/F8332)
This is the second port out of the SONY Tone platform series. It is heavily based on the port for F8131 (kagura). Hence it shares all of its features.
Sources:
Kernel (shared with Loire/Dora):
https://github.com/fredldotme/device-kernel-loire
Device:
https://github.com/fredldotme/device-sony-common
https://github.com/fredldotme/device-sony-common-init
https://github.com/konradybcio/device-sony-tone
https://github.com/konradybcio/device-sony-kagura
Halium:
https://github.com/Halium/halium-devices/blob/halium-7.1/manifests/sony_kagura.xml
Status:
Working:
Audio
Calling
SMS
Wifi
Wifi hotspot
Status LED
Bluetooth
GPS
Vibration
Libertine
Orientation sensor
USB/MTP
USB/ADB
Video decoding
MicroSD support
Anbox
Missing known issues:
Camera & Video recording
(also proper camera config: zoom, force flashlight)
Flashlight
Wi-Fi - user has to reenter the password after every reboot, works fine otherwise
Install:
Before unlocking the bootloader, you might want to back up your DRM keys (which enable some proprietary SONY features on the stock firmware) (you can NOT restore them if you don't back them up now!): https://forum.xda-developers.com/crossdevice-dev/sony/universal-dirtycow-based-ta-backup-t3514236 (note, you need to be on early firmware (think Android Marshmallow) to do that).
Make sure to upgrade your device to the latest stock Android 8.0 before continuing (search for a version like 41.3.A.
Windows: https://developer.sony.com/develop/open-devices/get-started/flash-tool/
Linux: http://www.flashtool.net/downloads_linux.php (run with GTK_IM_MODULE=ibus ./FlashTool) and https://xperifirm.com/tutorial/install-xperifirm-linux/
After upgrading boot android at least once so that the upgrade can complete.
OEM unlock your device: https://developer.sony.com/develop/open-devices/get-started/unlock-bootloader/
Boot your device into fastboot mode by shutting it down and keeping the Volume Up button pressed while plugging in a USB cable between your phone and PC. The status LED should become blue.
In case of flashing issues please wipe system, data & cache partitions using TWRP
Flash the OEM binaries from: https://developer.sony.com/file/download/software-binaries-for-aosp-nougat-android-7-1-kernel-4-4-tone/ using fastboot flash oem SW_binaries_for_Xperia_AOSP_N_MR1_5.7_r1_v08_tone.img
If the above fails the baseband and bootloader upgrade did not work.
Run the upcoming UBports Installer (probably 0.4.19beta and onwards):
Bring the device in fastboot mode as described by the installer
It might fail to detect kagura/XZ so manually select it that case
Untick writing system partition via fastboot - this fails often - writing system partition via adb in recovery works better
select 16.04/arm64/hybris/devel (in the future rc and stable might be populated too)
if the installer fails after downloading the system image - retry
if the installer fails again and does not reboot into the "recovery mode" showing the ubports robot, you can bypass the issue by manually flashing the recovery image using:
$ fastboot flash boot .cache/ubports/dora/firmware/halium-unlocked-recovery_kagura.img