Sony Xperia 5 V

Tried it out, I still can’t compile it. This time it doesnt give me any logs and cancels the process.

At this point I thank you for your help but I give up, its a request thread not a tutorial or “how can I build aosp thread”.
I hope there is someone that can build /e/OS or at least LOS for xperia 5 v sometime in the future but until then i have to shut it down and use my old s10e…

Of course and thank you for taking it as far as you have done!

You sparked my interest as you OP included

… not often we see this level of enterprise! :sunny:

I have a aosp build on the go, I have had to deal with [R] TimeKeep: Replace `SystemProperties` private API with `sysprop` definition by MarijnS95 · Pull Request #28 · sonyxperiadev/timekeep · GitHub as well as hardware/health from Post #19 but still another issue prevents completion.

If I get anywhere near to liberating the phone for some variant of Lineage, I will update the thread … thank you again.

1 Like

I’m also interested in this device and built AOSP 13 OK following the Sony guides. 14 has the same problems as @aibd .

Keeping an eye on XDA just in case anything pops up there.

I would like to find some good info for what is possible/not possible for building unofficial roms where there is no LOS release exisitng. I’d be grateful for any help with this.

Another thing. I can’t find answers as to whether Sony supports bootloader relocking* on this device and how long the device is supported with Sony updates.

EDIT * Concensus seems to be relocking possible but only on stock firmware.

By the way, I found this:

1 Like

I just found that today; it is the work of @xShottaZx. I guess I misunderstood the progress reported earlier in this thread.

Here are the bookmarks I have collected over the past few days.

This Gsmarena page seems to suggest the Xperia 5 V is not so different from Xperia 1 V.
gsmarena Compare Sony Xperia 5 V with Sony Xperia 1 V

The following link (commits) seems to show the initial workup for the Lineage pdx234 – seemingly manually “lifted” from the device tree for pdx215 pdx234: Initial tree convertion, so it seems reasonable that a Lineage pdx237 device tree can be “lifted” from the Lineage pdx234.

2 Likes

Yes it is actually my “fork”. It’s nothing else than just replace pdx234 with pdx237 and xqdq72 with xqde54… But turned out that it actually didnt work because I’m assuming that I need the manifest files specificly from the 5V in order to compile it for LOS. Then followed every step given in their build guide but failed. And even then, I think if it worked it would be a buggy rom and fixing a ROM like that is something where I would be totally lost :smiley:
I appreciate you guys!

Yeah the only difference of the 1V and 5V as far as I know is the additional camera and display size/resolution. Everything else seems to be the same. They even share the same official OTA package names which is currently 67.1.A.2.264. Other devices have other namings…

2 Likes

Well I have dumped my AOSP build in favour of LineageOS and I will see if I can get some progress with your fork @xShottaZx and share back here any manifest which I find I need.

1 Like

I hesitated to link this “playlist” of 5 hours of YT but I have found that @AlakaLinuxUser covers a lot of the ground which I think would work here, that is “rewriting one device tree for another” (as already done by xShottaZx) https://www.youtube.com/playlist?list=PLRJ9-cX1yE1nnhWBrZtuVz5YC2OPfQVVp.

@AlaskaLinuxUser also keeps a Gitlab repository of Adavanced Building Device From Scratch.

2 Likes

Works for me !

In an build environment where lineage-21.0-20240724-UNOFFICIAL-pdx234.zip builds ok.

I used the successful pdx234-device.xml (that is roomservice.xml + addition of TheMuppets to provide pdx234 proprietary vendor) from .repo/local_manifests to write a new “first pass” pdx237-device.xml.

pdx237-device.xml
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
  <!-- Action 1. Replace LineageOS_pdx234 with m113e55ml_pdx237 and link to https://github.com/m113e55ml/android_device_sony_pdx237
  <project path="device/sony/pdx234" remote="github" name="LineageOS/android_device_sony_pdx234" revision="lineage-21" /> -->
  <remote  name="m113e55ml" fetch="https://github.com" />
  <project path="device/sony/pdx237" remote="m113e55ml" name="m113e55ml/android_device_sony_pdx237" revision="lineage-21" />

  <!-- First pass:
  From https://github.com/LineageOS/android_device_sony_sm8550-common/blob/lineage-21/lineage.dependencies
  The dependencies shown are:
  "repository": "android_hardware_sony",					"target_path": "hardware/sony"
  "repository": "android_kernel_sony_sm8550",				"target_path": "kernel/sony/sm8550"
  "repository": "android_kernel_sony_sm8550-devicetrees",	"target_path": "kernel/sony/sm8550-devicetrees"
  "repository": "android_kernel_sony_sm8550-modules",		"target_path": "kernel/sony/sm8550-modules"
   No action. The above direct to the 4 lines below. Assume, as these depend on common, we are not likely to have to adjust them for a first run. -->
  
  <project path="device/sony/sm8550-common" remote="github" name="LineageOS/android_device_sony_sm8550-common" revision="lineage-21" />
  <project path="hardware/sony" remote="github" name="LineageOS/android_hardware_sony" revision="lineage-21" />
  <project path="kernel/sony/sm8550" remote="github" name="LineageOS/android_kernel_sony_sm8550" revision="lineage-21" />
  <project path="kernel/sony/sm8550-devicetrees" remote="github" name="LineageOS/android_kernel_sony_sm8550-devicetrees" revision="lineage-21" />
  <project path="kernel/sony/sm8550-modules" remote="github" name="LineageOS/android_kernel_sony_sm8550-modules" revision="lineage-21" />
  <!-- First pass no action. Assume sony_sm8550-common* will "just work" -->
  <remote  name="TheMuppets" fetch="https://github.com" />
  <project path="vendor/sony/sm8550-common" remote="TheMuppets" name="TheMuppets/proprietary_vendor_sony_sm8550-common" revision="lineage-21" clone-depth="1" />

   <!-- Omit this "original" proprietary_pdx234 line.
   Second pass, ./extract-files.sh will be required to populate vendor/sony/pdx237
  <project path="vendor/sony/pdx234" remote="TheMuppets" name="TheMuppets/proprietary_vendor_sony_pdx234" revision="lineage-21" /> -->
</manifest>

Clean the environment and start again:

$ repo sync -c -j 1 --fail-fast
repo sync has finished successfully.
$ source build/envsetup.sh
$ breakfast pdx237

“Successful” to the first error

device/sony/pdx237/device.mk:54: error:  vendor/sony/pdx237/pdx237-vendor.mk does not exist..

True, indeed vendor/sony/pdx237 does not exist.

These are present

device/sony/pdx237
device/sony/sm8550-common
vendor/sony/sm8550-common/

Ready now to extract vendor with extract-files.sh (if I had the device!)

I would say that your fork is worthy; the build process may well throw errors if there is still work to do.

1 Like

You can also try to use this vendor files:

1 Like

Thanks for that @ronnz98, adding it allows a build to start. It turns out @HurtCopain also has GitHub - HurtCopain/device_sony_pdx237 … but I didn’t find lineage_pdx237 there.

So a build got to

[ 92% 14579/15682] Building dtb.img

With some quite complex errors for instance

WARNING! Could not apply msm-id = <(536, 131072) (519, 131072) (519, 65536) (536, 65536)>; board-id = <(33619969, 0)>; [out/target/product/pdx237/obj/DTB_OBJ/arch/arm64/boot/dts/vendor/qcom/mm/kalama-mm-cdp-nfc-overlay.dtbo] to any devicetrees
WARNING! Could not apply msm-id = <(536, 131072) (519, 131072) (519, 65536) (536, 65536)>; board-id = <(16842760, 0)>; [out/target/product/pdx237/obj/DTB_OBJ/arch/arm64/boot/dts/vendor/qcom/mm/kalama-mm-mtp-nfc-overlay.dtbo] to any devicetrees
...
ufdt_apply_overlay out/target/product/pdx237/obj/DTB_OBJ/out/kalama-v2-base.dtb out/target/product/pdx237/obj/DTB_OBJ/out/kalama-yodo-pdx234_generic-overlay-v2-nfc-qrd-sde-display-pdx234-v2-ese-rd-mm-qrd-somc-audio-pdx234-camera-sensor-pdx234.dtbo /dev/null
10:38:33 ninja may be stuck, check /home/iain/Android_lineage_pdx234/out/soong.log for list of running processes.
this pdx237-device.xml
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
  <remote  name="HurtCopain" fetch="https://github.com" />
  <remote  name="m113e55ml" fetch="https://github.com" />
  <remote  name="TheMuppets" fetch="https://github.com" />
  <project path="device/sony/pdx237" remote="m113e55ml" name="m113e55ml/android_device_sony_pdx237" revision="lineage-21" />
  <project path="device/sony/sm8550-common" remote="github" name="LineageOS/android_device_sony_sm8550-common" revision="lineage-21" />
  <project path="hardware/sony" remote="github" name="LineageOS/android_hardware_sony" revision="lineage-21" />
  <project path="kernel/sony/sm8550" remote="github" name="LineageOS/android_kernel_sony_sm8550" revision="lineage-21" />
  <project path="kernel/sony/sm8550-devicetrees" remote="github" name="LineageOS/android_kernel_sony_sm8550-devicetrees" revision="lineage-21" />
  <project path="kernel/sony/sm8550-modules" remote="github" name="LineageOS/android_kernel_sony_sm8550-modules" revision="lineage-21" />
  <project path="vendor/sony/pdx237" remote="HurtCopain" name="HurtCopain/vendor_sony_pdx237" revision="pdx237" /> -->
  <project path="vendor/sony/sm8550-common" remote="TheMuppets" name="TheMuppets/proprietary_vendor_sony_sm8550-common" revision="lineage-21" clone-depth="1" />
</manifest>
1 Like

Should there be a brave tester for an eng build off the latest quoted pdx237-device.xml it is available here.
:warning:

These images are reported not booting. Please only test if you are sure of recovering your phone to stock, and you think perhaps you could recover a log (probably unlikely).

Non booting ROM

recover a log (probably unlikely).

I think it is unlikely that one can achieve adb root under these conditions.

adb root
adb pull /cache/recovery/last_log ~/tmp/last_log

or

cd /cache/recovery
ls

lineage-21.0-20240727-UNOFFICIAL-pdx237.zip

with sha256sum 0741e7892ef1e33b1ad99cd217dd3682bbf05cc23424968e2ddfccd5addf6dce

and

recovery.img
with sha256sum 311085aa851be838fe034898e5df8c3ace0ecf93dc6f7b908f954ee732a30ea5

Please use Install LineageOS on pdx234 | LineageOS Wiki as an install guide. Apologies that one will need to use a technique like this [Walkthrough] Extract eRecovery and boot images using payload-dumper-go to get the following “secondary” .img

boot.img
dtbo.img
vbmeta.img
vendor_boot.img

Next time I will try to pack them in a .zip.

I must congratulate you @xShottaZx in producing this device tree. :smiley: I will hope to send you a pull request if I can add any changes in the event this doesn’t boot first time. The highest priority is to provide an up to date device/sony/pdx237/proprietary-files.txt; learning to use generate-blob-lists.sh.

1 Like

Failing to get a recovery booted.
Same as a similar build I had run to completion a couple of days ago.

There is no installation guide or tips for this device yet. Assuming Xperia 1 V being very similar we can refer to the LOS install guide for that where is says:
Warning: This platform requires additional partitions to be flashed for recovery to work properly, the process to do so is described below”

Tried all that twice, restoring device afterwards so that it will boot.

Other guides on XDA for the Xperia 1 V take a slightly different approach (not flashing vbmeta.img) and no one has taken issue with that.

So I’ve tried all that twice also, restoring device afterwards so that it will boot.

2 Likes

Wow, thank you very much for your work so far!
I tried to flash it and followed the steps.
I was on stock android with the latest firmware.
Flashed the 4 extracted .img files with fastboot and also recovery.
But it doesn’t boot.
The only time I can get it to boot into recovery is when I only flash the recovery.img file without the other 4 .img files. I sideloaded the ROM and rebooted it again and it won’t boot.
I am trying different methods now, but so far I have no luck

1 Like

Yes, I’ve notice that also. It changes to the other slot as per normal installation but no booting activity.
I used the copy partitions step , but at the wrong time so had to try again. No luck.

I’m going to try making sure I’ve got stock 14 latest on this slot to see if it helps.

But generally not confident with the builds…sadly.

2 Likes

Thank you both @xShottaZx and @chrisrg so much for trying and for your feedback.

1 Like

This is an interesting observation (it is something I should try to follow up if I had the device). Loosely speaking recovery contains a map for install of the ROM. I think that where advance flashing of other partitions is required this is because “recovery’s map” would be wrong without “good ones”, so the sideload cannot work.

However might the recovery be working sufficiently to reveal a log?

A long shot, but even a partially working recovery might give a clue to why recovery builds (partially), but other partitions are “wrong”.

Hi, that was some time ago now and I see no July ROM?, but did that resolve?

Do you think there is a possibility that there was any connection with this Sony change? CommonConfig: add BUILD_BROKEN_INCORRECT_PARTITION_IMAGES · sonyxperiadev/device-sony-common@8445bd6 · GitHub.

CommonConfig: add BUILD_BROKEN_INCORRECT_PARTITION_IMAGES
change needed on Android 14 to be able to handle symlinks.

No - that was the last time I tried to build for this device. I normally retry failed builds at the end of a build run, but I didn’t do it for this device. I’ve kicked off a new build, which I would expect to pass, as the last few official LOS builds have succeeded. LineageOS Downloads

No - I think the LOS developers will have fixed that, and that’s not the error message I saw when I briefly looked in the build log file.

LATER:
I’ve looked at the log file again and the build failed due to an OOM error when building Setup Wizard - see this post

If the retried build fails with the same error I’ll have to think of another tick to fix it

1 Like

LATER STILL:
The retried pdx234 build succeeded, and is now available at pdx234

Only for information IF it helps.

Because I am currently not using the 5V I turned my brain off and just tried to flash the recovery and sideloaded the LOS rom to it from the pdx234. Recovery booted up without even flashing the other .img files. Obviously while in the recovery it says xqdq72. But sideloading the ROM was succesfull, but would not boot up like before. So no difference. Same with sideloading the partitions.zip file.