Sony Xperia XZ (F8331 / Kagura) Porting

  • I was inspired to try out the porting guide during the live porting session this past weekend:

    I was able to make halium-boot and systemimage once, but the device didn't boot in the end.

    There are a number of challenges with this device:

    1. There is no official lineageos port: I found this possibly working port

    2. This is a "tone" device. It might need the SW_binaries_for_Xperia_AOSP_N_MR1_5.7_r1_v08_tone.img from (

    3. Manifest is a hackjob assuming that since the Lineageos port borrows from the "sumire" device, that copying those parts might work:

        <project path="device/sony/kagura" name="android_device_sony_kagura" remote="djselbeck" />
        <project path="device/sony/common" name="android_device_sony_common" remote="los" />
        <project path="hardware/sony/timekeep" name="android_hardware_sony_timekeep" remote="los" />
        <project path="kernel/sony/msm8994" name="ubports/android_kernel_sony_msm8994" remote="hal" />
        <project path="vendor/sony" name="proprietary_vendor_sony" remote="them" />

    Adding the remote as well, assuming that it is useful:

    <remote name="djselbeck"
            revision="cm-14.1" />
    1. There was no vendor file in
      So, assumed that this might get somewhere:
      copy vendor/sony/sumire to vendor/sony/kagura
      rename to

    2. Not sure about this one. It complained the first time, but not in later attempts
      edit device/sony/kagura/ to reflect kernel m8994 instead of m8996

    3. There is no kernel config, so... (again maybe a better kernel config somewhere)
      copy sumire kernel config to kernel/sony/msm8994/arch/arm64/config/tone_kanguro_defconfig

    4. When Buiding system image i had to use

    LANG=C make systemimage

    However, later attempts didn't make it far. I mistakenly used the "lunch" command the first time, but probably should use "breakfast". Attempts have been unsuccessful.

    Just thought I'd share that and hope that somebody else is interested and has a better idea what to do.

    The device, however, is not very friendly to android roms in general, so expectations are pretty low.

Log in to reply