Navigation

    UBports Robot Logo

    UBports Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Xperia XZ (kagura/F8331/F8332)

    Devices
    6
    11
    436
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      konradybcio last edited by

      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

      1 Reply Last reply Reply Quote 1
      • M
        Manchee1017 last edited by Manchee1017

        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?

        1 Reply Last reply Reply Quote 0
        • M
          Manchee1017 last edited by

          @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?

          1 Reply Last reply Reply Quote 0
          • M
            Manchee1017 last edited by

            This post is deleted!
            1 Reply Last reply Reply Quote 0
            • S
              Sousapro last edited by

              This port has been pretty great for an initial port. I'd be glad to help if you ever need a hand with testing.

              1 Reply Last reply Reply Quote 0
              • NeoTheThird
                NeoTheThird Administrators last edited by NeoTheThird

                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 🙂

                M 2 Replies Last reply Reply Quote 0
                • M
                  Manchee1017 @NeoTheThird last edited by

                  @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)

                  J 1 Reply Last reply Reply Quote 0
                  • J
                    joe @Manchee1017 last edited by

                    @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 🐕

                    1 Reply Last reply Reply Quote 0
                    • U
                      UniSuperBox last edited by

                      @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.

                      M 1 Reply Last reply Reply Quote 0
                      • M
                        Manchee1017 @UniSuperBox last edited by

                        @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?

                        1 Reply Last reply Reply Quote 0
                        • M
                          Manchee1017 @NeoTheThird last edited by

                          @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.

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post