Xperia XZ (kagura/F8331/F8332)
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.
Kernel (shared with Loire/Dora):
Missing known issues:
Camera & Video recording
(also proper camera config: zoom, force flashlight)
Wi-Fi - user has to reenter the password after every reboot, works fine otherwise
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.
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
This is incredible timing! Just yesterday I started looking at picking up an Xperia X to try switching to Ubuntu Touch for my daily (sorry Pinephone, but development is taking a bit too long ). In an equally lucky turn of events, there are new phones of the X and XZ listed for sale, but I will have to act fast to get one. The OTA-13 update announced that it added both the X and XZ to the list of device, so how fleshed out does it feel to use? I see the issues listed are the camera, flashlight, and a wifi annoyance. Those seem completely bearable for the time being. The thread for the X lists video recording as the current issue.
So for someone interested in either phone and has an opportunity to get either, how do you like the XZ as a device and in it's current state of development?
@konradybcio I need your help please
I'm trying to backup the phone's DRM keys as per your first instruction using the tool you listed, but I can't tell if it's working. I don't see any files to confirm for sure that the keys are backed up. This is what is output after running the script:
@Ubuntu-chromebook:/backupTA-master$ ./backupTA.sh ./backupTA.sh: line 1: !/bin/bash: No such file or directory adb: error: cannot stat 'files/dirtycow64': No such file or directory adb: error: cannot stat 'files/run-as64': No such file or directory adb: error: cannot stat 'files/exploitta64': No such file or directory adb: error: cannot stat 'files/dumpta64': No such file or directory adb: error: cannot stat 'files/backupTA.sh': No such file or directory chmod: /data/local/tmp/*: No such file or directory /system/bin/sh: /data/local/tmp/backupTA.sh: not found adb: error: remote object '/data/local/tmp/TA_F8331_CB512BMU1V_20201011-0524.img' does not exist TA Sucessfully pulled to TA_F8331_CB512BMU1V_20201011-0524.img
It seems I'm missing something key. The OS is 6.0.1, I have the toggles for OEM unlock and USB debugging turned on. Is the device supposed to be rooted to back it up? What do you recommend to use for rooting?
This post is deleted!
This port has been pretty great for an initial port. I'd be glad to help if you ever need a hand with testing.
The installer can instruct the user to manually download binaries and handle the flashing for them starting in version 0.5.6-beta. Someone already made a PR here to flash the OEM binary for suzu, could someone who has a device for testing send me a PR to enable this for kagura as well? Thanks