Greetings,
unfortunatelly there is absolutely no custom rom available for the 5 V.
I tried to build lineageOS but I lack so much knowledge and I find it pretty hard, especially for someone who is a total noob in building a custom rom like myself…
The Phone is pretty much perfect for me because of the sd-card, fingerprint on home button, display etc.
My device is the pdx237 XQ-DE54
I would even donate a good amount! I rather spend my money on a foundation that is pro-privacy than selling all my data to an anti-privacy company like google!
Thanks for your reply. No I haven’t tried it, might give it a shot.
I saw the pdx234 (XQ-DQ72) which is the Xperia 1 V is officially supported by lineageOS and downloaded all sources from it and tried to adapt pdx237 from pdx234 device trees (GitHub - LineageOS/android_device_sony_pdx234) and also (GitHub - LineageOS/android_kernel_sony_sm8550).
After these changes I ran extract-files.sh, but it gave me errors that the commands are not found or something like that. I know I made mistakes somewhere but again, I’m a total noob so I don’t really know where the problem was
Edit:
I completely reinstalled ubuntu again and synced lineageos-21 successfully and downloaded pdx234 specific device tree.
When I try to use aospdtgen, I get the message down below.
I installed python3 with sudo apt-get install python-is-python3
My python version is when i type this command python --version
Python 3.12.3
$ pip install aospdtgen
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.12/README.venv for more information.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
I installed aospdtgen with pipx install aospdtgen
Now i’m stuck in what to do next and how to actually use aospdtgen because its not clear to me
OK, that would be fine if you intended to build pdx234 as a dummy run – seems a good idea to demonstrate to yourself that you have a good working environment. (Adding for clarification, the purpose of the device tree is to populate roomservice.xml in .repo/local_manifests/)
First impression, looking at that error, when you started your “new device tree” project I would assume that you start a new folder away from your LineageOS build ?
Did you manage to find a source of the pdx237 stock ROM?
I think the instruction was pip3 install aospdtgen
Yea when i type in pip3 install aospdtgen, it gave me the same error as above.
But I came across to this site:
and then found this one:
Now I don’t know if that would support the work
Edit:
Okay I managed to somehow use aospdtgen now
What would be the next step and how do I actually use this tool?
And does the dump of the website above matter or help it?
I really don’t know how to work with this tool.
I cloned the dump given in the website above and made it into a .zip file.
then I used dumpyara and I got a new folder with “working” inside the dumpyara folder.
I typed in terminal and got this.
python3 -m aospdtgen -o dump_path /home/on15/dumpyara/working/pdx237
Android device tree generator
Version 1.1.1
[INFO] Figuring out partitions scheme
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/home/on15/.local/lib/python3.12/site-packages/aospdtgen/__main__.py", line 11, in <module>
main()
File "/home/on15/.local/lib/python3.12/site-packages/aospdtgen/main.py", line 31, in main
dump = DeviceTree(args.dump_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/on15/.local/lib/python3.12/site-packages/aospdtgen/device_tree.py", line 36, in __init__
self.partitions = Partitions(self.path)
^^^^^^^^^^^^^^^^^^^^^
File "/home/on15/.local/lib/python3.12/site-packages/sebaubuntu_libs/libandroid/partitions/partitions.py", line 27, in __init__
assert PartitionModel.SYSTEM in self.partitions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError
So now I just tried to generate the device tree with aospdtgen, I inserted the boot.img into the dumped folder and got an output. With that I moved it to the lineage/vendor/sony folder and change the files inside the pdx234 folder and renamed everything for my pdx237 device. inside the sm-8550-commong folder I also add the device specific name and saved it.
then i just tried to compile it and got this:
[100% 1167/1167] analyzing Android.bp files and generating ninja file at out/soong/build.lineage_pdx237.ninj
FAILED: out/soong/build.lineage_pdx237.ninja
cd "$(dirname "out/host/linux-x86/bin/soong_build")" && BUILDER="$PWD/$(basename "out/host/linux-x86/bin/soo
ng_build")" && cd / && env -i "$BUILDER" --top "$TOP" --soong_out "out/soong" --out "out" -
-soong_variables out/soong/soong.lineage_pdx237.variables -o out/soong/build.lineage_pdx237.ninja --globList
Dir lineage_pdx237 --globFile out/soong/globs-lineage_pdx237.ninja -l out/.module_paths/Android.bp.list --av
ailable_env out/soong/soong.environment.available --used_env out/soong/soong.environment.used.lineage_pdx237
.build Android.bp
Killed
20:13:49 soong bootstrap failed with: exit status 1
ninja: build stopped: subcommand failed.
#### failed to build some targets (03:55 (mm:ss)) ####
This device is now included in the Sony Open Devices Program. It might be useful to start by usig their documentation to first build AOSP for this device. But note the comment at the bottom of that page:
Note: Both devices are in their early stage of development and there are still multiple functions that need to be implemented.
Well done for trying @xShottaZx ! I have not used aospdtgen before. I did have a quick run though late last night but got no useful result. My comments below are therefore based that and “What I might try next” !
I did not manage so far to collect a copy of Android Dumps / sony / pdx237 · GitLab it is marked “protected” I got no complete download and could not login.
This source appears to be a ROM dump already (but it is unknown if produced as required in instructions by)
Maybe your collected .zip (substituted as pdx237_download or dump_path) would produce a different result like this ? (you might experiment with the .zip or the extracted contents).
I don’t know your previous experience with ROM building so I hesitate to give entry level tips … but …
(The resulting build is no use to you but you might do this just to prove you have a working build environment for LineageOS. Also you probably already noticed LineageOS is at Android 14 (U), while /e/OS is not ready for that yet at Android 13(T), so you would not be able to move onto /e/OS till “end of summer”, but you could further experiment with https://github.com/lineageos4microg.)
Maybe this thread, [Walkthrough] device.xml for local_manifests will throw light on the device tree and the need for it for an unsupported device but not for a supported device. (Notice that the device tree is not mentioned in the Lineage build instructions for the supported device pdx234.)
Liberating a new phone is no easy job, congratulations on where you got (even if it seems disappointing so far !).
Better than my suggestions … follow @Petefoth’s suggestion and build AOSP, here vendor blobs are already supplied, no need for extract.files.sh. The output of this build could be quite interesting to you. (You might during the course of this look for a stock ROM for your phone so that you have a known path to return if your build installs but is unsatisfactory for daily use. Might be found here ? Xperia Stock ROM - Database of Sony Xperia Firmware)
Thank you for the useful information. And I appreciate all the help from you guys so far!
Okay I will try build AOSP again first. But I need to completely reinstall ubuntu because I have broken my build enviroment and could not repo sync AOSP…
One other qestion is, when I do repo sync (doesn’t matter if LOS or AOSP) after a while ubuntu crashes, closes every task and I need to login again (as if I do a reboot of the system)
What can be the problem? I’m on Ubuntu 24.04 LTS.
I go step by step with their instructions everything is up-to-date and do a repo sync -c -j4
I notice that Sony AOSP build instructions | Developer World only asks for Ubuntu 20.04 LTS and Lineage (for pdx234) says “these instructions are only tested using Ubuntu 20.04 LTS, so we recommend going with that.”
I had to work around early build difficulties (kernel I think) with Debian 12.
You could change to -j 1 to see how much does it slow things down; for repo sync my download speed is always the throttle, 3.5 - 4.5 G/hour. With my nproc=8 and 32G RAM I did my latest recorded repo sync at -j 5; often use 3 or 1 though!
If you do try that, note that the latest LineageOS for microG build for this device failed a couple of hours ago. I haven’t had a chance to investigate the build failure yet. I hope it’s transitory but if you try a build and it fails, it may not be your fault
and this time ubuntu didnt crash, so I assume it was the version of ubuntu that really has to be 20.04…
but where it kind of fails is the this part:
source build/envsetup.sh && lunch
On their website they say: " 2. When prompted, pick the number corresponding to your device in the list displayed and press enter."
But all I get is this
~/android$ source build/envsetup.sh && lunch
including vendor/qcom/opensource/core-utils/vendorsetup.sh
You're building on Linux
Warning: Cannot display lunch menu.
Note: You can invoke lunch with an explicit target:
usage: lunch [target]
Which would you like? [aosp_cf_x86_64_phone-trunk_staging-eng]
Pick from common choices above (e.g. 13) or specify your own (e.g. aosp_barbet-trunk_staging-eng): In file included from build/make/core/config.mk:380:
In file included from build/make/core/envsetup.mk:51:
build/make/core/release_config.mk:145: error: No release config found for TARGET_RELEASE: trunk_staging. Available releases are: ap2a.
21:04:56 dumpvars failed with: exit status 1
on15@51NO:~/android$ export TARGET_RELEASE=ap2a
on15@51NO:~/android$ build_build_var_cache
on15@51NO:~/android$ lunch
You're building on Linux
Lunch menu .. Here are the common combinations:
1. aosp_akita-trunk_staging-userdebug
2. aosp_arm-trunk_staging-eng
3. aosp_arm64-trunk_staging-eng
4. aosp_bluejay-trunk_staging-userdebug
5. aosp_cf_arm64_auto-trunk_staging-userdebug
6. aosp_cf_arm64_phone-trunk_staging-userdebug
7. aosp_cf_riscv64_phone-trunk_staging-userdebug
8. aosp_cf_x86_64_auto-trunk_staging-userdebug
9. aosp_cf_x86_64_auto_mdnd-trunk_staging-userdebug
10. aosp_cf_x86_64_foldable-trunk_staging-userdebug
11. aosp_cf_x86_64_only_phone_hsum-trunk_staging-userdebug
12. aosp_cf_x86_64_pc-trunk_staging-userdebug
13. aosp_cf_x86_64_phone-trunk_staging-userdebug
14. aosp_cf_x86_64_tv-trunk_staging-userdebug
15. aosp_cf_x86_phone-trunk_staging-userdebug
16. aosp_cf_x86_tv-trunk_staging-userdebug
17. aosp_husky-trunk_staging-userdebug
18. aosp_oriole-trunk_staging-userdebug
19. aosp_raven-trunk_staging-userdebug
20. aosp_ripcurrent-trunk_staging-userdebug
21. aosp_shiba-trunk_staging-userdebug
22. aosp_slider-trunk_staging-userdebug
23. aosp_whitefin-trunk_staging-userdebug
24. aosp_x86-trunk_staging-eng
25. aosp_x86_64-trunk_staging-eng
26. aosp_xqas52-eng
27. aosp_xqas52-userdebug
28. aosp_xqat51-eng
29. aosp_xqat51-userdebug
30. aosp_xqat52-eng
31. aosp_xqat52-userdebug
32. aosp_xqau51-eng
33. aosp_xqau51-userdebug
34. aosp_xqau52-eng
35. aosp_xqau52-userdebug
36. aosp_xqbc52-eng
37. aosp_xqbc52-userdebug
38. aosp_xqbq52-eng
39. aosp_xqbq52-userdebug
40. aosp_xqbt52-eng
41. aosp_xqbt52-userdebug
42. aosp_xqcc54-eng
43. aosp_xqcc54-userdebug
44. aosp_xqcq54-eng
45. aosp_xqcq54-userdebug
46. aosp_xqct54-eng
47. aosp_xqct54-userdebug
48. aosp_xqdc54-eng
49. aosp_xqdc54-userdebug
50. aosp_xqde54-eng
51. aosp_xqde54-userdebug
52. aosp_xqdq54-eng
53. aosp_xqdq54-userdebug
Which would you like? [aosp_cf_x86_64_phone-trunk_staging-eng]
Pick from common choices above (e.g. 13) or specify your own (e.g. aosp_barbet-trunk_staging-eng): 50
Invalid lunch combo: aosp_xqde54-eng
Valid combos must be of the form <product>-<release>-<variant>
I pick 50. aosp_xqde54-eng, but it fails so I add ap2a before the -eng
lunch aosp_xqde54-ap2a-eng
It’s selected and the rest i get is this where at the end it just fails
on15@51NO:~/android$ lunch aosp_xqde54-ap2a-eng
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=14
PRODUCT_INCLUDE_TAGS=com.android.mainline mainline_module_prebuilt_nightly
TARGET_PRODUCT=aosp_xqde54
TARGET_BUILD_VARIANT=eng
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=generic
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.15.0-113-generic-x86_64-Ubuntu-20.04.6-LTS
HOST_CROSS_OS=windows
BUILD_ID=AP2A.240605.024
OUT_DIR=out
============================================
on15@51NO:~/android$ make
21:09:22 ************************************************************
21:09:22 You are building on a machine with 15.4GB of RAM
21:09:22
21:09:22 The minimum required amount of free memory is around 16GB,
21:09:22 and even with that, some configurations may not work.
21:09:22
21:09:22 If you run into segfaults or other errors, try reducing your
21:09:22 -j value.
21:09:22 ************************************************************
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=14
PRODUCT_INCLUDE_TAGS=com.android.mainline mainline_module_prebuilt_nightly
TARGET_PRODUCT=aosp_xqde54
TARGET_BUILD_VARIANT=eng
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=generic
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.15.0-113-generic-x86_64-Ubuntu-20.04.6-LTS
HOST_CROSS_OS=windows
BUILD_ID=AP2A.240605.024
OUT_DIR=out
============================================
[100% 1/1] analyzing Android.bp files and generating ninja file at out/soong/bui
FAILED: out/soong/build.aosp_xqde54.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/soo
ng/soong.aosp_xqde54.variables -o out/soong/build.aosp_xqde54.ninja --globListDi
r aosp_xqde54 --globFile out/soong/globs-aosp_xqde54.ninja -l out/.module_paths/
Android.bp.list --available_env out/soong/soong.environment.available --used_env
out/soong/soong.environment.used.aosp_xqde54.build Android.bp
error: device/sony/common/hardware/health/Android.bp:1:1: "android.hardware.heal
th@2.0-service.sony" depends on undefined module "android.hardware.health@2.0-im
pl".
Or did you mean ["android.hardware.health@2.1-impl"]?
error: device/sony/common/hardware/health/Android.bp:1:1: "android.hardware.heal
th@2.0-service.sony" depends on undefined module "libhealthservice".
Or did you mean ["libartservice"]?
error: device/sony/common/hardware/health/Android.bp:1:1: "android.hardware.heal
th@2.0-service.sony" depends on undefined module "libhealthstoragedefault".
Or did you mean ["healthfitness-ui-statsd"]?
fatal errors encountered
21:09:35 soong bootstrap failed with: exit status 1
#### failed to build some targets (14 seconds) ####
#!/bin/bash
# Copyright (c) 2018, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE US
export QTI_BUILDTOOLS_DIR=$(dirname ${BASH_SOURCE[0]})
so if I enter the lunch option above I can do
make
and it checks the Android.bp but some device/sony/common/hardware/health/Android.bp:1:1: thingy as above leads to errors.
My first reaction, with my first coffee is that repo sync did not complete.
Did you keep a trace of all the early steps, any chance of any error before repo sync?
If you run repo sync now does it report complete?
So it seems to me that Sony are calling the device xqde54 although pdx237 appears in device.xml. Just my own AOSP newbie question, can you see where xqde54 is set as an alias for pdx237?
The latest Android 14.0.0-r50 revision made changes to the build process and configuration. They are deprecating certain releases and features of Android T and older (13). It will default to Android (U) specific Build IDs.
If you’re unsure about your device’s lunch options, refer to its product makefile.
Yes I did everything exactly carefully like its written in their build guide. There were no errors and I got repo synced succefully message. Yea thats the thread I have the lunch commands from where I can see all the options listed after that.
When I get home I will continue experimenting.
My guess is, that my device pdx237 is only meant for android 13 aosp builds. Because the api level is 34 for 14, and I’ve red somewhere in a file that something with 33, but I could be wrong.
Need to check that out next
Edit: Okay so in here there are the lunch options
But when i enter one of these in terminal, it says this:
Invalid lunch combo: aosp_xqde54-eng
Valid combos must be of the form <product>-<release>-<variant>
So thats why I added ap2a as like this aosp_xqde54-ap2a-eng
And when i do anything else besides ap2aI get this error:
build/make/core/release_config.mk:145: error: No release config found for TARGET_RELEASE: ap1a. Available releases are: ap2a.
17:02:52 dumpvars failed with: exit status 1
So ap2a works, but it can’t make it.
There has to be something faulty on sony’s behalf, or because android 14.
I can’t build for ANY device i’ve tested it on several ones and nothing worked.
Maybe I will try android 13 to see if thats the problem
Okay!
There is a bug as stated in several bug reports on their github. They all have the same issue.
Thats means I have to go back and try to build lineageos first. That will be hard though