-
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-loireDevice:
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-kaguraHalium:
https://github.com/Halium/halium-devices/blob/halium-7.1/manifests/sony_kagura.xmlStatus:
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 otherwiseInstall:
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 -
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
-
@NeoTheThird I could probably help on this matter, but I will say that I don't quite know what this all means.
Are these binaries the DRM keys?
What are the prerequisites for testing? I've already installed UT and I did not manage to make a backup of the stock DRM keys beforehand.
What will these binaries do for the phone?
And of course what sort of risks am I looking at? (because while this phone isn't my DD yet, I do want it to be soon. I don't want to brick it) -
@Manchee1017 said in Xperia XZ (kagura/F8331/F8332):
@NeoTheThird I could probably help on this matter, but I will say that I don't quite know what this all means.
Are these binaries the DRM keys?
What are the prerequisites for testing? I've already installed UT and I did not manage to make a backup of the stock DRM keys beforehand.
What will these binaries do for the phone?
And of course what sort of risks am I looking at? (because while this phone isn't my DD yet, I do want it to be soon. I don't want to brick it)Same for me
-
@Manchee1017, your DRM keys are gone forever. The OEM binary/image contains proprietary drivers and firmware that Ubuntu Touch needs to work correctly. It does not contain DRM keys.
The OEM image must match what Ubuntu Touch is expecting or else it won't work properly.
If your phone doesn't work after flashing the OEM image, you can flash a different one from fastboot.
-
@UniSuperBox Yeah, I knew they would be. I tried so hard to back them up but I just could not get anything to work.
For the binaries, are there instructions on how to do it? Is it as easy as using the 0.5.6 launcher to reinstall UT?
-
@neothethird Hi Neo, I got around to trying to flash the binaries today using 0.7.4 beta. I didn't get any instruction for downloading binaries, it just installed UT and finished.
-
I installed Ubuntu Touch on my Sony Xperia XZ. It's very good OS. Libertine works fine. UI is quite responsive. I tried to connect external monitor through the USB port, but it didn't work. Charging indicator is not working while screen is on. If you need testers I could help.
-
I installed the UT on F8332. UT works fine except for the camera and Wifi bug. Big thanks to Devs.
How to get anbox work?
I followed what @c4pp4 mentioned in other thread.
sudo mount -o rw,remount /
sudo apt update
sudo apt install anbox-ubuntu-touch
anbox-tool install
sudo apt install android-tools-adb
sudo mount -o ro,remount /
cd /home/phablet/Downloads
wget https://f-droid.org/FDroid.apk
adb install FDroid.apk
Everything is pretty much was already installed. It fails when I run anbox-tool install. says
kagura not supported yet !!!any suggestions?
-
@aleem
Kernel has to be patched in order to run properly anbox.
Maybe your issue related to that. -
Unsupported devices:
OTA-15:
sudo mount -o rw,remount / sudo apt update && sudo apt install -y anbox-ubuntu-touch android-tools-adb sudo sync sudo mount -o ro,remount / mkdir ~/anbox-data wget -q --show-progress http://cdimage.ubports.com/anbox-images/android-armhf-64binder.img -O ~/anbox-data/android.img touch ~/anbox-data/.enable sudo start anbox-container start anbox-session
OTA-16:
mkdir ~/anbox-data wget -q --show-progress http://cdimage.ubports.com/anbox-images/android-armhf-64binder.img -O ~/anbox-data/android.img touch ~/anbox-data/.enable sudo start anbox-container start anbox-session
-
@c4pp4 Thanks. Although I did not see this post, I followed the same process. It worked, this would be helpful for the community.
-
UBports Installer 0.8.7-beta (AppImage)
Environment: openSUSE Tumbleweed 20210319 linux 5.11.6-1-default x64 NodeJS v12.18.3
Device: kaguraWhat I did.
1- First try . Enable OEM lock and Debug.
Phone didnt boot.
2-Second try. phone is on the flashmode and light is blue.
ubports app. flashed firmware again then ubport "installation update"
appears on screen after that I unplugged usb cable. No need install rest of it.
3- Ä°t has worked but just incoming call sound doesnt work. when you got a call no ringtone sound just vibration.Any solution for ringtone sound!
-
@elmx HI, You have now posted this question twice in two different thread for different devices. Can you please remove the one that does not apply directly to your device. UT ports are very device specific what works on one model will not work on another. Thanks
-
ubports installer 0.8.9-beta win
I flashed device following all instructions But on flash finished can't boot. If usb cable connected device bootloop on bootloader. If disconnect usb cable device loads to bootloader once and then turns off. OS can't be started.
-
@skynet UPD: After another failure I install TWRP recovery and after reboot UBPorts started!
-