Thinking About Starting an Xperia 1 III Port

Hello.

Recently I got my hands on a used XQ-BC52. So I am thinking about creating a port for this device. It has some really good hardware - the SoC has great performance (1 x 2.84 GHz + 3 x 2.42 GHz + 4 x 1.8 GHz ), the screen is nice and clear and it has 12GB memory. Overall, it is a solid device. I want to give it a second life.

The Technical Stuff

So, this device is running Android 13 factory. I have verified that the bootloader is unlockable.
Now, I see that it is part of Sony’s open devices program. Also, there are Lineage builds based on Android 16 but I do not know what binaries does it use - sony open devices or ones extracted from the stock android? I could not find any information aboutthe state of the LOS port, e.g. what works and what does not.

My question is: if I were to embark on such an adventure, what should this port be based on? Sony open devices or the LineageOS stuff?

9 Likes

Based on @rinigus work, I guess you should go with Lineage builds. See this: New binaries / blobs for Xperia V and IV : What is happening actually? - #182 by rinigus

6 Likes

My wife did use the lineage android for xperia 1 iii some time ago and i can confirm that all featueres of the device did work

6 Likes

I can only recommend Lineage. SODP state for 1IV was extremely bad and I wouldn’t count on it. As LOS is officially supported for it, go for it.

Also, I suggest to use LOS21 as we do for Xperia 1IV/5IV. LOS23 maybe too new for porting.

14 Likes

I would be very interested in this port. I own a 1III and would be happy to help, even though I have no programming knowledge.
My phone is available for testing purposes.

3 Likes

I am trying to build LOS21 as recommended here but I got stuck on extracting the vendor blobs.

I decided to follow the official guide of extracting the binaries from one of the builds here (they are LOS23 but this should not matter).

I mounted all required images from the archive. then I ran the extract-files.sh script which extracted 2700+ files which is a lot but it could not find some small number of the files, like these for example:

extract-files.sh
...
- system_ext/etc/permissions/wfd-system-ext-privapp-permissions-qti.xml
    !! system_ext/etc/permissions/wfd-system-ext-privapp-permissions-qti.xml: Hash 10dcd4e58f0652d800d48ae5b76e4fab43fda214 does not match 6669d5ee462c981663b8ac573d84d334e4eed96c
...
- system_ext/etc/seccomp_policy/wfdservice.policy
    !! system_ext/etc/seccomp_policy/wfdservice.policy: file not found in source
...
- system_ext/etc/wfdconfigsink.xml
    !! system_ext/etc/wfdconfigsink.xml: Hash cb78df66948314a75080a4161321fb3111a0785a does not match d718bc1ccb3e6e52a0af7bf4de62445c0b083651
...
- vendor/etc/media_codecs.xml
    !! vendor/etc/media_codecs.xml: file not found in source
...
- vendor/etc/seccomp_policy/atfwd@2.0.policy
    !! vendor/etc/seccomp_policy/atfwd@2.0.policy: file not found in source
...
- system_ext/lib/com.qualcomm.qti.wifidisplayhal@1.0.so
    !! system_ext/lib/com.qualcomm.qti.wifidisplayhal@1.0.so: file not found in source
...
- system_ext/lib/libmmosal.so
    !! system_ext/lib/libmmosal.so: file not found in source
  - system_ext/lib/libmmparser_lite.so
    !! system_ext/lib/libmmparser_lite.so: file not found in source
  - system_ext/lib/libmmrtpdecoder.so
    !! system_ext/lib/libmmrtpdecoder.so: file not found in source
  - system_ext/lib/libmmrtpencoder.so
    !! system_ext/lib/libmmrtpencoder.so: file not found in source
  - system_ext/lib/libwfdavenhancements.so
    !! system_ext/lib/libwfdavenhancements.so: file not found in source
  - system_ext/lib/libwfdclient.so
    !! system_ext/lib/libwfdclient.so: file not found in source
  - system_ext/lib/libwfdcommonutils.so
    !! system_ext/lib/libwfdcommonutils.so: file not found in source
  - system_ext/lib/libwfdconfigutils.so
    !! system_ext/lib/libwfdconfigutils.so: file not found in source
  - system_ext/lib/libwfddisplayconfig.so
    !! system_ext/lib/libwfddisplayconfig.so: file not found in source
  - system_ext/lib/libwfdmminterface.so
    !! system_ext/lib/libwfdmminterface.so: file not found in source
  - system_ext/lib/libwfdmmsink.so
    !! system_ext/lib/libwfdmmsink.so: file not found in source
  - system_ext/lib/libwfdmmsrc_system.so
    !! system_ext/lib/libwfdmmsrc_system.so: file not found in source
  - system_ext/lib/libwfdrtsp.so
    !! system_ext/lib/libwfdrtsp.so: file not found in source
  - system_ext/lib/libwfdservice.so
    !! system_ext/lib/libwfdservice.so: file not found in source
  - system_ext/lib/libwfdsinksm.so
    !! system_ext/lib/libwfdsinksm.so: file not found in source
  - system_ext/lib/libwfduibcinterface.so
    !! system_ext/lib/libwfduibcinterface.so: file not found in source
  - system_ext/lib/libwfduibcsink.so
    !! system_ext/lib/libwfduibcsink.so: file not found in source
  - system_ext/lib/libwfduibcsinkinterface.so
    !! system_ext/lib/libwfduibcsinkinterface.so: file not found in source
  - system_ext/lib/libwfduibcsrc.so
    !! system_ext/lib/libwfduibcsrc.so: file not found in source
  - system_ext/lib/libwfduibcsrcinterface.so
    !! system_ext/lib/libwfduibcsrcinterface.so: file not found in source
...
- system_ext/lib/vendor.qti.hardware.wifidisplaysession@1.0.so
    !! system_ext/lib/vendor.qti.hardware.wifidisplaysession@1.0.so: file not found in source
...
- vendor/lib64/libMpeghSwEnc.so
    !! vendor/lib64/libMpeghSwEnc.so: file not found in source
  - vendor/lib64/libOmxAacDec.so
    !! vendor/lib64/libOmxAacDec.so: file not found in source
  - vendor/lib64/libOmxAlacDec.so
    !! vendor/lib64/libOmxAlacDec.so: file not found in source
  - vendor/lib64/libOmxAlacDecSw.so
    !! vendor/lib64/libOmxAlacDecSw.so: file not found in source
  - vendor/lib64/libOmxAmrDec.so
    !! vendor/lib64/libOmxAmrDec.so: file not found in source
  - vendor/lib64/libOmxAmrwbplusDec.so
    !! vendor/lib64/libOmxAmrwbplusDec.so: file not found in source
  - vendor/lib64/libOmxApeDec.so
    !! vendor/lib64/libOmxApeDec.so: file not found in source
  - vendor/lib64/libOmxApeDecSw.so
    !! vendor/lib64/libOmxApeDecSw.so: file not found in source
  - vendor/lib64/libOmxEvrcDec.so
    !! vendor/lib64/libOmxEvrcDec.so: file not found in source
  - vendor/lib64/libOmxG711Dec.so
    !! vendor/lib64/libOmxG711Dec.so: file not found in source
  - vendor/lib64/libOmxMpeghEncSw.so
    !! vendor/lib64/libOmxMpeghEncSw.so: file not found in source
  - vendor/lib64/libOmxQcelp13Dec.so
    !! vendor/lib64/libOmxQcelp13Dec.so: file not found in source
  - vendor/lib64/libOmxWmaDec.so
    !! vendor/lib64/libOmxWmaDec.so: file not found in source

This is a non-exhaustive list of the missing files, full log attached.

Why are those files missing while device/sony/sm8350-common/proprietary-files.txt list them as required? How are the official LOS builds for this device running when those files are missing?

extract-files-log.targz (17.7 KB)

3 Likes

I managed to build and flash LOS23 on the device. So far everything seems to be working fine except the fingerprint reader.

Now I am following the HADK guide. Starting with a lineage-21 android base I have already patched hybris-boot and I am at the step of building hybris-hal and droidmedia but I get a dependency error. Here are my local manifests:

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
  <project path="device/sony/pdx215" name="LineageOS/android_device_sony_pdx215" revision="lineage-21" />
  <project path="kernel/sony/sm8350" name="LineageOS/android_kernel_sony_sm8350" revision="lineage-21" />
  <project path="device/sony/sm8350-common" name="LineageOS/android_device_sony_sm8350-common" revision="lineage-21"/>
  <project path="hardware/sony" name="LineageOS/android_hardware_sony" revision="lineage-21"/>
</manifest>
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
  <remove-project name="mer-hybris/hybris-boot"/>
  <project path="hybris/hybris-boot" name="sailfishos-sony-sagami/hybris-boot" revision="sagami" />
</manifest>

The error log itself says this:

HABUILD_SDK [pdx215] hadk> make -j$(nproc --all) hybris-hal droidmedia
21:29:06 Build sandboxing disabled due to nsjail error.
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=14
LINEAGE_VERSION=21.0-20260111-UNOFFICIAL-pdx215
PRODUCT_INCLUDE_TAGS=com.android.mainline mainline_module_prebuilt_nightly
TARGET_PRODUCT=lineage_pdx215
TARGET_BUILD_VARIANT=userdebug
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-2a-dotprod
TARGET_CPU_VARIANT=cortex-a76
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=cortex-a76
HOST_OS=linux
HOST_OS_EXTRA=Linux-6.17.12-300.fc43.x86_64-x86_64-Ubuntu-20.04.2-LTS
HOST_CROSS_OS=windows
BUILD_ID=AP2A.240905.003
OUT_DIR=out
PRODUCT_SOONG_NAMESPACES=vendor/sony/sm8350-common device/sony/sm8350-common hardware/sony vendor/qcom/opensource/usb/etc device/sony/pdx215 vendor/sony/pdx215 hardw
are/qcom-caf/sm8350 vendor/qcom/opensource/commonsys/display vendor/qcom/opensource/commonsys-intf/display vendor/qcom/opensource/display vendor/qcom/opensource/data
-ipa-cfg-mgr-legacy-um vendor/qcom/opensource/dataservices hardware/qcom-caf/wlan packages/apps/FMRadio/jni/fmr
============================================
[100% 1167/1167] analyzing Android.bp files and generating ninja file at out/soong/build.lineage_pdx215.ninja
FAILED: out/soong/build.lineage_pdx215.ninja
cd "$(dirname "out/host/linux-x86/bin/soong_build")" && BUILDER="$PWD/$(basename "out/host/linux-x86/bin/soong_build")" && cd / && env -i  "$BUILDER"     --top "$TOP
"     --soong_out "out/soong"     --out "out"     --soong_variables out/soong/soong.lineage_pdx215.variables -o out/soong/build.lineage_pdx215.ninja --globListDir li
neage_pdx215 --globFile out/soong/globs-lineage_pdx215.ninja -l out/.module_paths/Android.bp.list --available_env out/soong/soong.environment.available --used_env ou
t/soong/soong.environment.used.lineage_pdx215.build Android.bp
error: vendor/sony/sm8350-common/Android.bp:31815:1: "lowi-server" depends on undefined module "libwpa_client".

This libwpa_client client seems to be missing but when I look at external/wpa_supplicant_8 the code is there. So how do I tell this vendor/sony/sm8350-common module where to find the libwpa_client package?

4 Likes

I’ve an Xperia 1 III (XQ-BC72) and I’d be happy to help, but my programming experience is limited to .NET (slowly learning Rust though). I’ve had a look at the GitHub repos for the other Xperia’s and I’ve no idea of what to do with any of it. :smiley:

I can confirm that everything on the Xperia 1 III works with LineageOS. I’ve been using /e/OS on it for over a year.

3 Likes

I am not sure if you found assistance meanwhile. I can’t really help, only point out the place to look for help, hopefully: In the post Sailfish OS IRC channels moved to oftc.net there are links to the sailfishos-porters channel on telegram and matrix, which I heard are active and helpful