First build attempt

Trying to follow steps to build A15 e/os for mi439:

finding several issues:

  1. in extract blobs section:

It is not mentioned exactly where the “extract-files.sh” come from. In the main doc it has:

“and that you are in the /srv/e/src//device// folder”

however, that directory was created EMPTY just one step above in 4 (mkdir -p)

in the detailed extract doc it has:

https://doc.e.foundation/os/advanced/extracting-proprietary-blobs
After you have mounted the image(s), move to the root directory of the sources of your device and run extract-files.sh as follows:

system and vendor loop mounted OK:

$ df -Th system system/vendor
Filesystem     Type  Size  Used Avail Use% Mounted on
/dev/loop0     ext4  1.7G  1.6G   67M  96% /work/ROMs/A15pineblob/system
/dev/loop1     ext4  729M  688M   26M  97% /work/ROMs/A15pineblob/system/vendor

but where is the “root directory of the sources of the device” ? AI says “Yes, the docker run command will automatically pull the device tree and the kernel source” so, need to run docker run first? before can extract vendor blobs ?

main build steps are:

Step 1 install docker, 2 get docker image, 3 get device code (mi439), step 4, create srv directories..and step 5 extract blobs, but where do we get sources and specific to device?

Before i discovered that A15 already exists/built here:

https://images.ecloud.global/community/Mi439/

Pulled this:

repo init -u https://gitlab.e.foundation/e/os/android.git` -b a15 --git-lfs`

and:

repo sync -c --force-sync --no-clone-bundle --no-tags -j16

Syncing: 100% (1147/1147), done in 11.747s
Finalizing sync state…
Checking for bloat: 100% (98/98), done in 0.358s
repo sync has finished successfully.

So, searching the 170GB of data:

$ find . -name 'extract-files.sh'
./tools/extract-utils/templates/multi-device/device/extract-files.sh
./tools/extract-utils/templates/multi-device/common/extract-files.sh
./tools/extract-utils/templates/single-device/extract-files.sh

finds these, but they are templates, not device specific.

Started with this dev page:

Info about Xiaomi Redmi 7A / 8 / 8A / 8A Dual - Mi439 but not sure what is missing to run a test build..

second issue:

  1. In the extract section “sudo rm system/vendor” that is already a directory in my case, so resulted in an error, suggest to add -f and -p on the subsuequent mkdir :slight_smile:

  2. decided to skip the blobs for a moment, and continue with doc…which says:

List of tags to use for BRANCH_NAME is available at ``https://gitlab.e.foundation/e/os/releases/-/tags``.

results in “404: Page not found” so, how to get list of valid tags ?

4. When trying to find the correct url or valid tag; found it is not possible to register on the gitlab without “work email” ??

trying to use yahoo/personal email…

even if blobs are resolved, not sure which branch to put in :slight_smile: :slight_smile: maybe just a15 like in the repo/init or is there qpr2 ?

  1. Continued to docker run and got:
>> [Mon Jul 20 11:30:48 UTC 2026] Branch:  a15
>> [Mon Jul 20 11:30:48 UTC 2026] Devices: mi439,
fatal: detected dubious ownership in repository at '/srv/src/A15/vendor/lineage'
To add an exception for this directory, call:

        git config --global --add safe.directory /srv/src/A15/vendor/lineage
fatal: detected dubious ownership in repository at '/srv/src/A15/vendor/lineage'
To add an exception for this directory, call:

        git config --global --add safe.directory /srv/src/A15/vendor/lineage

AI is suggesting to add these to the run cmd, but not sure why it’s not on the official guide?

noticed that the docker run creates a A15 subdirectory to the branch, so mapped the top “src” and the pulled repo in below it as A15:

$ cd /work/ROMs/e/src
$ du -shc A15
171G    A15
171G    total

docker run \
-v "/work/ROMs/e/src:/srv/src" \
-v "/work/ROMs/e/zips:/srv/zips" \
-v "/work/ROMs/e/logs:/srv/logs" \
-v "/work/ram-ccache:/srv/ccache" \
-e "BRANCH_NAME=a15" \
-e "DEVICE_LIST=mi439" \
-e "REPO=https://gitlab.e.foundation/e/os/releases.git" \
registry.gitlab.e.foundation:5000/e/os/docker-lineage-cicd:community

6. Finally, is there a quick guide/blog to customizing, i.e. change basic things like default apps, ringtones or what not ? Built matrixx rom, w/o docker so know a bit what’s going on, but just not seeing how the device tree is pulled and integrated ..

Appreciate any tips to get started.

1 Like

There are some current issues explored over the weekend Why are the source code releases not available anymore? – deals with the current tags problem plus some more general discussion.

Docker makes it difficult to see what’s happening, so alternatives were explored.
Ultimate how-to guide: Unofficial Builds using repo style for using lineage or other aosp sources that are not supported by /e/OS

The existence of Mi439 · lineage-19.1 · The Muppets / proprietary_vendor_xiaomi · GitLab means that one can avoid the need for extract.sh.

Are you used to building LineageOS? /e/OS handles Git LFS differently.

Sadly the forum is “protecting” against “bots” but in fact blocks humans, by having to wait an hour between messages :slight_smile: so even PM slows down and cannot respond in timely manner, so limited with reply hence writing the full picture as much as possible.

Incredible how such a promising project e/OS is having so many BASIC issues that many cannot figure out.. it shouldn’t be that hard. hopefully this can be changed, without having to re-explain to newcomers - if they follow basic guide, things should work, or at least not fail with old/known issues :slight_smile: :slight_smile:

OK, to the point:

Regarding “#5” above, AI suggested adding “-e “GIT_CONFIG_PARAMETERS=‘safe.directory=*’” \” and in resolved that issue,

then failed with:

/root/build.sh: line 87: DEVICE_LIST_V4.1.1-A15: invalid variable name

found many references in forum, this is bash in build.sh saying “.” and ”-” are illegal identifiers.

Sorry for totally Naive question.. Why do people need to re-discover this still? isn’t it known that tags have “.” and “-” for many years ? is this some kind of a TEST if we (newcomers) can figure things out? or “read the forum” ?

The AI got to this misguided direction and with certainty and long explanations!:

-e 'DEVICE_LIST_V4_1_A15=mi439' \
-e "USER_ID=1000" \
-e "BRANCH_NAME=v4_1_a15" \
-e "DEVICE=mi439" \
-e "DEVICE_LIST=mi439" \
-e "REPO=https://gitlab.e.foundation/e/os/android.git" \
-e "GIT_CONFIG_PARAMETERS='safe.directory=*'" \

yet still docker/run: ERROR: Failed to initialize repository

No luck, reading more found:

there it says one has to over-write the /root/build.sh (inside the docker)

so.. again, a) why is this not done on the docker side? what’s the idea of docker if it is broken?

b) where does one find the community build.sh ?

Not trivial, at all.. each gitlab access it asks for login, and no way to register without “work” email..

Are you worthy?…. Lets TEST it!!

after some time found the url:

https://gitlab.e.foundation/e/os/docker-lineage-cicd/-/raw/master/build-community.sh

Now what? ah, right, the “solution” gave the “diff”, so, we write that into a patch file:

# cat > patch.1
diff --git a/build-community.sh b/build-community2.sh
index 5d3c5e6..bf7d217 100644
--- a/build-community.sh
+++ b/build-community2.sh
@@ -41,7 +41,7 @@ fi
 # Treat DEVICE_LIST as DEVICE_LIST_<first_branch>
 first_branch=$(cut -d ',' -f 1 <<<"$BRANCH_NAME")
 if [ -n "$DEVICE_LIST" ]; then
-  device_list_first_branch="DEVICE_LIST_$(sed 's/.*-\([a-zA-Z]*\)$/\1/' <<<$first_branch)"
+  device_list_first_branch="DEVICE_LIST_$(sed 's/.*-\([a-zA-Z0-9]*\)$/\1/' <<<$first_branch)"
   device_list_first_branch=${device_list_first_branch^^}
   read $device_list_first_branch <<<"$DEVICE_LIST,${!device_list_first_branch}"
 fi
@@ -80,7 +80,7 @@ if [ "$LOCAL_MIRROR" = true ]; then
 fi
 
 for branch in ${BRANCH_NAME//,/ }; do
-  branch_dir=$(sed 's/.*-\([a-zA-Z]*\)$/\1/' <<<$branch)
+  branch_dir=$(sed 's/.*-\([a-zA-Z0-9]*\)$/\1/' <<<$branch)
   branch_dir=${branch_dir^^}
   device_list_cur_branch="DEVICE_LIST_$branch_dir"
   devices=${!device_list_cur_branch}

Then apply the patch to original file:

# patch build-community.sh < patch.1 
patching file build-community.sh
Hunk #1 succeeded at 43 (offset 2 lines).
Hunk #2 succeeded at 82 (offset 2 lines).

ok, regex/diffs looks like post from 2025:

# diff build-community.sh build-community.sh.orig 
46c46
<   device_list_first_branch="DEVICE_LIST_$(sed 's/.*-\([a-zA-Z0-9]*\)$/\1/' <<<$first_branch)"
---
>   device_list_first_branch="DEVICE_LIST_$(sed 's/.*-\([a-zA-Z]*\)$/\1/' <<<$first_branch)"
85c85
<   branch_dir=$(sed 's/.*-\([a-zA-Z0-9]*\)$/\1/' <<<$branch)
---
>   branch_dir=$(sed 's/.*-\([a-zA-Z]*\)$/\1/' <<<$branch)

now edit the docker run to map the patched build.sh:

-v "/work/ROMs/build-community.sh:/root/build.sh" \
-e "USER_ID=1000" \
-e "BRANCH_NAME=v4.1-a15" \
-e "DEVICE=mi439" \
-e "DEVICE_LIST=mi439" \
-e "REPO=https://gitlab.e.foundation/e/os/android.git" \
-e "GIT_CONFIG_PARAMETERS='safe.directory=*'" \

run docker gets:

Running: yes | repo init -u “https://gitlab.e.foundation/e/os/android.git” -b “v4.1-a15”

and….

Copying ‘/srv/local_manifests/*.xml’ to '.repo/local_manifests/

Syncing branch repository

GREAT !!!

but, wait, the directory name mismatches..

renamed the directory to match:

/work/ROMs/e/src# du -shc V4_1_A15/
173G V4_1_A15/
173G total

but that is totally wrong, it seems to create A15 directory.. so stopped it renamed to A15 and rerun..

FINALLY, some progress :slight_smile:

What I’m saying, it shouldn’t be that way… I’m willing to donate time to fix that, shouldn’t take too much to update the docker image to have a corrected build.sh given it’s been like that since at least a year :slight_smile:

although not sure it IS doing anything useful, the repo is growing but not sure why since it was synched before the build started,

# du -shc .
191G    .
191G    total

Now continuing in previous reply:

regarding:

“The existence of Mi439 · lineage-19.1 · The Muppets / proprietary_vendor_xiaomi · GitLab means that one can avoid the need for extract.sh"

does that mean that i can skip the loop mounting system/vendor completely? Thats good news!!

Thanks for the ultimate guide link, a bit too much details for first build. will look later.. I didn’t anticipate docker build would be so time consuming…

anyways, managed to make some progress, build is running, and i’ll flash one of the pre-built to see how it looks like!

Just to be sure, not complaining, just trying to bring to attention, and cause some positive change to everyone, not just those who can “figure it out” and are “worthy” :slight_smile: The importance of the effort should transcend any communication issues.. hey, I’m blocked from replying for the next hour or so :slight_smile: :slight_smile:

will update as build progresses…

Stormy.

The 1hr time is up, so can write another message :slight_smile: :slight_smile: Lovely I bet the bots really suffer from that :slight_smile: :slight_smile: - not sure this should be directed towards proven humans, but i guess I’m outdated.. on what is new/old or human is :slight_smile:

Oh dear!!! oh dear…synched repo had 170GB, now after few hours of docker/run, it doubled:

/work/ROMs/e/src/A15# du -shc .
387G    .
387G    total

lets see what’s taking space:

# du -s * |sort -k 1n |tail -5
2472912 frameworks
2859144 packages
17209788        external
58701888        prebuilts
141306004       vendor

vendor? so large? what?

# du -shc vendor/*| sort -k2
137G    total
31M     vendor/amlogic
2.5M    vendor/apn
70M     vendor/askey
2.2G    vendor/asus
347M    vendor/ayn
1.3M    vendor/codeaurora
24M     vendor/crowdin
24M     vendor/eos
452M    vendor/essential
2.6G    vendor/fairphone
12M     vendor/freebox
898M    vendor/fxtec
28G     vendor/google
870M    vendor/lenovo
3.1G    vendor/lge
70M     vendor/lineage
17G     vendor/motorola
468K    vendor/nintendo
1.5G    vendor/nokia
899M    vendor/nothing
1.9G    vendor/nubia
399M    vendor/nvidia
33G     vendor/oneplus
1.3G    vendor/osom
18M     vendor/qcom
895M    vendor/razer
3.2G    vendor/realme
5.1G    vendor/samsung
504M    vendor/shift
555M    vendor/smartisan
5.6G    vendor/sony
432M    vendor/vsmart
28G     vendor/xiaomi

The actual device is only:

388M vendor/xiaomi/Mi439

why all the rest? no idea.

the run script is:

-v "/work/ROMs/build-community.sh:/root/build.sh" \
-e "USER_ID=1000" \
-e "BRANCH_NAME=v4.1-a15" \
-e "DEVICE=mi439" \
-e "DEVICE_LIST=mi439" \
-e "REPO=https://gitlab.e.foundation/e/os/android.git" \
-e "GIT_CONFIG_PARAMETERS='safe.directory=*'" \
registry.gitlab.e.foundation:5000/e/os/docker-lineage-cicd:community

hmm.. maybe lower case mi439 vs. the Mi439? or both device and device_list ?

nothing useful in docker logs.. stopped, and re-run with Mi439 until someone can shed light..

why would a single device pull all vendor data? any tips welcomed.

i.e. how to pull just Mi439, how to clean up w/o having to re-download everything :slight_smile:

If anyone built mi439 on A15 recently, would LOVE to hear/join forces.

Stormy.

After 6~hours it finally finished sync, to an amazing:

# du -shc e/src 
443G    e/src
443G    total

of which vendor is 165GB!!! does anyone know at least how to limit the repo size?

the build top looks like this:

>> [Mon Jul 20 22:05:01 UTC 2026] Starting build for Mi439, v4.1-a15 branch
>> [Mon Jul 20 22:05:01 UTC 2026] ANDROID_JACK_VM_ARGS=-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4G
22:22:29 Build sandboxing disabled due to nsjail error.
Running product configuration...
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=15
LINEAGE_VERSION=4.1.1-a15-20260720-UNOFFICIAL-Mi439
PRODUCT_SOURCE_ROOT_DIRS=-vendor/nvidia/common -device/nvidia/tegra-common/vendor -vendor/nvidia/shield -device/nvidia/shield-common/vendor
TARGET_PRODUCT=lineage_Mi439
TARGET_BUILD_VARIANT=userdebug
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=cortex-a53
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=cortex-a53
HOST_OS=linux
HOST_OS_EXTRA=Linux-6.17.0-1028-oem-x86_64-Ubuntu-24.04.4-LTS
HOST_CROSS_OS=windows
BUILD_ID=BP1A.250505.005
OUT_DIR=out
WITH_SU=false
PRODUCT_SOONG_NAMESPACES=vendor/qcom/opensource/usb/etc device/xiaomi/mithorium-common vendor/xiaomi/mithorium-common device/xiaomi/Mi439 vendor/xiaomi/Mi439 hardware/qcom-caf/msm8953 hardware/qcom-caf/bootctrl 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/thermal-legacy-um hardware/qcom-caf/wlan
============================================
[100% 1/1] bootstrap blueprint
Running globs...
[  1% 2/131] compile out/host/linux-x86/bin/go/blueprint-gobtools/pkg/github.com/google/blueprint/gobtools.a
[  2% 3/131] compile out/host/linux-x86/bin/go/blueprint-optional/pkg/github.com/google/blueprint/optional.a

again, the goal is A17 for mi439 (pine china and global).. bottom failed:

[ 95% 125/131] compile out/host/linux-x86/bin/go/soong-apex/pkg/android/soong/apex.a
[ 96% 126/131] compile out/host/linux-x86/bin/go/soong-art/pkg/android/soong/art.a
[ 96% 127/131] compile out/host/linux-x86/bin/go/soong-sdk/pkg/android/soong/sdk.a
[ 97% 128/131] compile out/host/linux-x86/bin/go/soong_build/obj/soong_build.a
[ 98% 129/131] link out/host/linux-x86/bin/go/soong_build/obj/soong_build
[ 99% 130/131] cp out/host/linux-x86/bin/soong_build
[100% 131/131] analyzing Android.bp files and generating ninja file at out/soong/build.lineage_Mi439.ninja
FAILED: out/soong/build.lineage_Mi439.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_Mi439.variables -o out/soong/build.lineage_Mi439.ninja -l out/.module_paths/Android.bp.list --available_env out/soong/soong.environment.available --used_env out/soong/soong.environment.used.lineage_Mi439.build Android.bp
error: vendor/xiaomi/ursa/Android.bp:5:1: module "soong_namespace": namespace hardware/xiaomi does not exist; Some necessary modules may have been skipped by Soong. Check if PRODUCT_SOURCE_ROOT_DIRS is pruning necessary Android.bp files.
error: vendor/motorola/exynos9610-common/Android.bp:5:1: module "soong_namespace": namespace device/motorola/exynos9610-common does not exist; Some necessary modules may have been skipped by Soong. Check if PRODUCT_SOURCE_ROOT_DIRS is pruning necessary Android.bp files.

boy, it seems like it is trying to build it for ALL devices ? and just failing on random devices??

incredible, what would cause to pull so much, just motorola:

/work/ROMs/e/src/A15/vendor# ls motorola/
bangkk   bronco   denver             fogo   kiev            nairo   rhode          sm6375-common  troika
bathena  capri    devon              fogos  lake            nash    rhodep         sm7250-common  tundra
beckham  caprip   dubai              guam   messi           nio     river          sm7325-common  xpeng
berlin   cebu     eqs                guamp  miami           ocean   rtwo           sm8250-common
berlna   channel  evert              hawao  milanf          payton  sdm632-common  sm8475-common
borneo   chef     exynos9610-common  kane   msm8998-common  pstar   sm6225-common  sm8550-common

tried rm -rf, re-run and yeah, sync re-downloads all these, and.. fails :slight_smile:

Any tips welcomed, or how to better engage the relevant folks.

eager to help!

Hi @stormyos this is replying to your “overnight” post, rather than what you just added :slight_smile:

I am not really up for debugging docker. If you want to build by script, you must read the script and dockerfile especially if you start patching.

-v "/work/ROMs/build-community.sh:/root/build.sh" \

This comment is speculative and contaminated by poor memory but

at the time it looked like this fix was needed because the community script was not yet updated. If using docker perhaps it will be worth to compare dates of commits to the scripts.

Results may also be affected by whatever is the reason for

It did a repo sync for unwanted files .. but it is actually failing (before build) at this:

Thanks for the reply! appreciate it!!

I’m very much eager to help, yet:

  1. cannot register on the e/os gitlab using yahoo email, it says:

“1 error prohibited this user from being saved:

  • Email is not allowed. Please use your regular email address. Check with your administrator.”

What is exactly “regular email” supposed to be :slight_smile: :slight_smile: :slight_smile: :slight_smile: ?

  1. As for the repo sync, yeah, tell me about it :slight_smile: MOST is unneeded, the question, how can something like this happen in a totally controlled/docker environment given the user provided pretty simple input, and even so went to sync ahead of time :slight_smile: I’ll try to change config and re-run until more useful tips come.

  2. As for the build failure, well, that Android.bp failure at 131/131 is due to the many VENDOR failures right below it:

[ 99% 130/131] cp out/host/linux-x86/bin/soong_build
[100% 131/131] analyzing Android.bp files and generating ninja file at out/soong/build.lineage_Mi439.ninja
FAILED: out/soong/build.lineage_Mi439.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_Mi439.variables -o out/soong/build.lineage_Mi439.ninja -l out/.module_paths/Android.bp.list --available_env out/soong/soong.environment.available --used_env out/soong/soong.environment.used.lineage_Mi439.build Android.bp
error: vendor/oneplus/enchilada/Android.bp:5:1: module "soong_namespace": namespace hardware/oneplus does not exist; Some necessary modules may have been skipped by Soong. Check if PRODUCT_SOURCE_ROOT_DIRS is pruning necessary Android.bp files.
error: vendor/motorola/kane/Android.bp:5:1: module "soong_namespace": namespace device/motorola/exynos9610-common does not exist; Some necessary modules may have been skipped by Soong. Check if PRODUCT_SOURCE_ROOT_DIRS is pruning necessary Android.bp files.

notice how it wants to build for MOTOROLA and.. what is it there? “namespace hardware/oneplus does not exist;” oneplus? how so? if docker run is only mentioning mi439 or Mi439 (any1 knows which is “better” / correct for the docker to match the gitlab which i saw as Mi439)?

  1. in e/logs/Mi439/eos-4.1.1-20260721-UNOFFICIAL-Mi439.log found:

[Tue Jul 21 05:44:23 UTC 2026] Unable to find lineage_-target_files-20260721.zip

but, that comes AFTER the initial failures shown above with all vendors..

I think first thing is to remove all unneeded vendors..

  1. Now that build started once, we finally HAVE the ‘extract-files.sh’ under device-tree, so, decided to give that a try :slight_smile: :slight_smile: not to over clutter the message, but given it’s first-impressions, here it is, given:
df -Th /work/ROMs/A15pineblob/system /work/ROMs/A15pineblob/system/vendor
Filesystem     Type  Size  Used Avail Use% Mounted on
/dev/loop0     ext4  1.7G  1.6G   67M  96% /work/ROMs/A15pineblob/system
/dev/loop1     ext4  729M  688M   26M  97% /work/ROMs/A15pineblob/system/vendor

now run the script, if i got it right?

cd /work/ROMs/e/src/A15/device/xiaomi/Mi439
./extract-files.sh /work/ROMs/A15pineblob/system

produces a LOT of permissions errors like:

Cleaning output directory (./../../xiaomi/mithorium-common/../../../vendor/xiaomi/mithorium-common/proprietary)..
mv: cannot remove './../../xiaomi/mithorium-common/../../../vendor/xiaomi/mithorium-common/proprietary/product/app/PowerOffAlarm/PowerOffAlarm.apk': Permission denied
mv: cannot remove './../../xiaomi/mithorium-common/../../../vendor/xiaomi/mithorium-common/proprietary/product/priv-app/HotwordEnrollmentOKGoogleHEXAGON_WIDEBAND/HotwordEnrollmentOKGoogleHEXAGON_WIDEBAND.apk': Permission denied
mv: cannot remove './../../xiaomi/mithorium-common/../../../vendor/xiaomi/mithorium-common/proprietary/product/priv-app/HotwordEnrollmentXGoogleHEXAGON_WIDEBAND/HotwordEnrollmentXGoogleHEXAGON_WIDEBAND.apk': Permission denied
mv: cannot remove './../../xiaomi/mithorium-common/../../../vendor/xiaomi/mithorium-common/proprietary/product/etc/permissions/vendor.qti.hardware.data.connection-V1.1-java.xml': Permission denied

so, maybe docker turned things to root, add ‘sudo’ and get lots of:

  - system_ext/etc/permissions/com.android.hotwordenrollment.common.util.xml
    !! system_ext/etc/permissions/com.android.hotwordenrollment.common.util.xml: file not found in source
  - product/priv-app/HotwordEnrollmentOKGoogleHEXAGON_WIDEBAND/HotwordEnrollmentOKGoogleHEXAGON_WIDEBAND.apk
    !! product/priv-app/HotwordEnrollmentOKGoogleHEXAGON_WIDEBAND/HotwordEnrollmentOKGoogleHEXAGON_WIDEBAND.apk: file not found in source
  - product/priv-app/HotwordEnrollmentXGoogleHEXAGON_WIDEBAND/HotwordEnrollmentXGoogleHEXAGON_WIDEBAND.apk
    !! product/priv-app/HotwordEnrollmentXGoogleHEXAGON_WIDEBAND/HotwordEnrollmentXGoogleHEXAGON_WIDEBAND.apk: file not found in source
  - system_ext/framework/com.android.hotwordenrollment.common.util.jar
    !! system_ext/framework/com.android.hotwordenrollment.common.util.jar: file not found in source

and later:

    !! system_ext/framework/vendor.qti.ims.callcapability-V1.0-java.jar: file not found in source
  - system_ext/framework/vendor.qti.ims.callinfo-V1.0-java.jar
    !! system_ext/framework/vendor.qti.ims.callinfo-V1.0-java.jar: file not found in source
  - system_ext/framework/vendor.qti.ims.factory-V1.0-java.jar
    !! system_ext/framework/vendor.qti.ims.factory-V1.0-java.jar: file not found in source
  - system_ext/framework/vendor.qti.ims.factory-V1.1-java.jar
    !! system_ext/framework/vendor.qti.ims.factory-V1.1-java.jar: file not found in source
  - system_ext/framework/vendor.qti.ims.rcsconfig-V1.0-java.jar
    !! system_ext/framework/vendor.qti.ims.rcsconfig-V1.0-java.jar: file not found in source
  - system_ext/framework/vendor.qti.ims.rcsconfig-V1.1-java.jar
    !! system_ext/framework/vendor.qti.ims.rcsconfig-V1.1-java.jar: file not found in source
  - system_ext/framework/vendor.qti.ims.rcsconfig-V2.0-java.jar
    !! system_ext/framework/vendor.qti.ims.rcsconfig-V2.0-java.jar: file not found in source
  - system_ext/framework/vendor.qti.ims.rcsconfig-V2.1-java.jar
    !! system_ext/framework/vendor.qti.ims.rcsconfig-V2.1-java.jar: file not found in source

it also has some nice output, but not sure what to expect :slight_smile: if this is “normal” :slight_smile:

cannot open any issues since no e/os gitlab account…(cannot register using yahoo email) a bit funny…

Thanks for any tips…

Forget Docker and switch to the traditionnal way of building android

1 Like

ok.. now need to find a good guide.. will start with Roland’s post sent earlier (2024..)

  1. first, found what was pulling all the vendor stuff, this huge xml!! i think docker /run added it!
$ ls -ln .repo/local_manifests/
total 64
-rw-r--r-- 1 1000 1000   121 Jul 21 08:42 proprietary_gitlab.xml
-rw-r--r-- 1 1000 1000 54178 Jul 21 08:42 proprietary.xml
-rw-r--r-- 1 1000 1000   394 Jul 21 08:43 roomservice.xml

moved to side and try to prune ?:

repo sync -d --force-sync --prune

removed a lot! with some errors, so manual rm -rf and re-run.. now down to 280GB (freshly synced was ~170GB), then run:

repo gc --repack

took it down to 200GB.. more like it.. started running few errors:

FAILED: 
build/make/core/main.mk:1117: warning:  device/xiaomi/Mi439/lineage_Mi439.mk includes non-existent modules in PRODUCT_PACKAGES
Offending entries:
com.android.ranging

Tried many things like RELEASE_RANGING_STACK=“” but didn’t work..

eventually only this ALLOW_MISSING_DEPENDENCIES=true let it pass, now running:

Friends,

Too bad docker can’t “just do it” would be really nice if all “build issues” would be 100% debugged, but somehow i doubt that is possible in the near future and on such vast set of devices that e/os is engaged with..

Anyways, get a jvm crash and tools optimization, also cannot understand why despite init told to go after a15 only:

repo init -u https://gitlab.e.foundation/e/os/android.git -b v4.1-a15 --git-lfs

and passing:

mka bacon RELEASE_PLATFORM_VERSION=15

we see “Baklava” on the output, which might be NOT good!

============================================
PLATFORM_VERSION_CODENAME=Baklava
PLATFORM_VERSION=Baklava
LINEAGE_VERSION=4.1.1-a15-20260721-UNOFFICIAL-Mi439
TARGET_PRODUCT=lineage_Mi439
TARGET_BUILD_VARIANT=userdebug
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=cortex-a53
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=cortex-a53
HOST_OS=linux
HOST_OS_EXTRA=Linux-6.17.0-1028-oem-x86_64-Ubuntu-24.04.4-LTS
HOST_CROSS_OS=windows
BUILD_ID=BP1A.250505.005
OUT_DIR=out
PRODUCT_SOONG_NAMESPACES=vendor/qcom/opensource/usb/etc device/xiaomi/mithorium-common vendor/xiaomi/mithorium-common device/xiaomi/Mi439 vendor/xiaomi/Mi439 hardware/qcom-caf/msm8953 hardware/qcom-caf/bootctrl 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/thermal-legacy-um hardware/qcom-caf/wlan

Is this expected in this framework or it should be A15, and how to fix that?

when running breakfast it does show A15 (coming from dev tree i think), but once lunch or mka bacon is run, it jumps to a16/baklava..

This is what it looks like thus far, avoid jvm crash:

unset JAVA_TOOL_OPTIONS
unset ANDROID_JACK_VM_ARGS
export _JAVA_OPTIONS=“-Xms8g -Xmx16g -XX:-TieredCompilation -XX:ReservedCodeCacheSize=512m -XX:+UseG1GC”

Avoid optimization on tools:

export WITHO_HOST_DALVIK=false
export DISABLE_HOST_OPTIMIZATION=true

Avoid optimization on target:

export DISABLE_LTO=true
export NO_PGO_PROFILE=true
export WITHOUT_TARGET_LTO=true

the optimization failures looked like:

prebuilts/clang/host/linux-x86/clang-r536225/bin/clang++.real+0x6a2c5b3)clang++: error: clang frontend command failed with exit code 139 (use -v to see invocation)Android (12701618, +pgo, +bolt, +lto, +mlgo, based on r536225) clang version 19.0.1 

most of progress from prior notes on builting Matrixx and some AI-assist, so if there is any e/OS specifics, please let know.

will write it all nice once final ZIP/ROM is there :slight_smile:

ok, seems these flags got past above failures:

[ 16% 31146/186765] //art/runtime:libart-runtime clang++ native/java_lang_StringFactory.cc [arm apex31]
[ 16% 31147/186765] //art/runtime:libart-runtime clang++ native/java_lang_Class.cc [arm apex31]

still appreciate any input on the A15/A16 issue why baklava is coming from lunch :slight_smile:

oh, and no rate limited anymore :slight_smile: :slight_smile: :slight_smile: good thing I’m a human or so i think…

Ok, good news, after another ~10hours of pretty intense AI-back-forth, it’s built

Package Complete: out/target/product/Mi439/e-4.1.1-a15-20260722-UNOFFICIAL-Mi439.zip

have not booted/tested, but that’s secondary :slight_smile:

Learned a LOT.. funny how AI gets carried away into some areas, then backtracks, learned a lot from all these mistakes, more so than if solution was given on the spot; eventually fed right questions, it was pretty amazing in shortening debug cycle/time!

Sorry for earlier posts, i was kinda worried, wait, how could it be that Docker/run is not working :slight_smile: Well.. there are MANY issues, mostly disable optimization, arm/1MB branch and so on..

Thanks for giving the green-light to build natively, made a huge improvement in debug cycle, possibly all these w/a could be integrated into docker, but it would take an effort to explain developers..

After testing and clean/rebuild from SCRATCH w/o a single stop, will write a short summary, might help others.. follow up want to add ksu-next but lets not get ahead of ourselves..

Funny how like in the movies very last failure was at 99% :slight_smile: :slight_smile:

[ 99% 197579/197649 1h17m1s remaining] //system/core/init:libinit_host clang++ keychords.cpp [linux_glibc]
FAILED: out/soong/.intermediates/system/core/init/libinit_host/linux_glibc_x86_64_static/obj/system/core/i
nit/keychords.o

It’s all taken care of just was funny timing…

If anyone has similar device or any general tips, glad to hear.

Stormy.

1 Like

A bit scary to realize just how fragile the building framework has gotten..

After countless restarts (Ubuntu 24.0..4.4) managed to build A15 for 3 older devices:

out.3/target/product/Mi439/e-4.1.1-a15-20260725-UNOFFICIAL-Mi439.zip
out.3/target/product/rova/e-4.1.1-a15-20260725-UNOFFICIAL-rova.zip
out.3/target/product/sakura/e-4.1.1-a15-20260725-UNOFFICIAL-sakura.zip

however, I’m really interested in repeatability/consistency, etc. a ROM is not the point, need a working / dependable framework..

So, after make clean, ccache -C; took 10’s and 10’s of re-attempts, GC crashes, Java/clang/++/JIT, you NAME it (same as initial run).. AI Kept feeding fake or outdated parameters, pathetic (won’t post so as not to “spread” the “definitive” fixes) or claiming there is not enough memory, even though shown it’s a 96GB/AMD, still very useful tool to those who know how to use, like any OTHER tool :slight_smile:

With all due-respect - a LOT of respect to Roland(!), the guide:

https://community.e.foundation/t/ultimate-how-to-guide-unofficial-builds-using-repo-style-for-using-lineage-or-other-aosp-sources-that-are-not-supported-by-e-os/63908

is nice, but too specific to that time, and that device, referencing ANDROID_JACK_VM_ARGS from way back, not to be found at all on the A15 tree..

Found just how insane the sandboxing is, which is all GREAT, IF it worked :slight_smile: here is a SHORT list of cores :slight_smile: :slight_smile: there were many more types of failures many pleading the user to “please file a bug”,as they ship a fixed compiler in prebuilt/tree, wow.. how badly QA’ed ?

Sun 2026-07-26 00:30:15 IDT 2743672 1000 1000 SIGABRT present  /work/ROMs/e/src/A15/prebuilts/clang/host/linux-x86/clang-r53622>
Sun 2026-07-26 08:47:19 IDT 2983620 1000 1000 SIGABRT present  /work/ROMs/e/src/A15/prebuilts/jdk/jdk21/linux-x86/bin/javac    >
Sun 2026-07-26 14:12:59 IDT 1045176 1000 1000 SIGABRT present  /work/ROMs/e/src/A15/prebuilts/clang/host/linux-x86/clang-r53622>
Sun 2026-07-26 14:57:49 IDT 1323216 1000 1000 SIGABRT present  /work/ROMs/e/src/A15/prebuilts/jdk/jdk21/linux-x86/bin/java     >
Sun 2026-07-26 15:17:11 IDT 1382325 1000 1000 SIGSEGV present  /work/ROMs/e/src/A15/prebuilts/clang/host/linux-x86/clang-r53622>
Sun 2026-07-26 15:20:51 IDT 1384888 1000 1000 SIGABRT present  /work/ROMs/e/src/A15/prebuilts/clang/host/linux-x86/clang-r53622>
Sun 2026-07-26 20:02:08 IDT 3632143 1000 1000 SIGSEGV present  /work/ROMs/e/src/A15/prebuilts/build-tools/linux-x86/bin/ckati  >
Sun 2026-07-26 23:30:26 IDT 1590881 1000 1000 SIGSEGV present  /work/ROMs/e/src/A15/prebuilts/clang/host/linux-x86/clang-r53622>
Mon 2026-07-27 08:40:25 IDT 2343270 1000 1000 SIGABRT present  /work/ROMs/e/src/A15/prebuilts/jdk/jdk21/linux-x86/bin/javac    >
Mon 2026-07-27 09:54:14 IDT 2709617 1000 1000 SIGABRT present  /work/ROMs/e/src/A15/prebuilts/jdk/jdk21/linux-x86/bin/java     >
Mon 2026-07-27 17:07:49 IDT  255436 1000 1000 SIGABRT present  /work/ROMs/e/src/A15/prebuilts/jdk/jdk21/linux-x86/bin/java     >
Mon 2026-07-27 21:23:38 IDT 1586063 1000 1000 SIGABRT present  /work/ROMs/e/src/A15/prebuilts/jdk/jdk21/linux-x86/bin/java     >
Mon 2026-07-27 23:10:26 IDT 2580733 1000 1000 SIGABRT present  /work/ROMs/e/src/A15/prebuilts/jdk/jdk21/linux-x86/bin/java     >
Tue 2026-07-28 03:24:50 IDT 3598966 1000 1000 SIGABRT present  /work/ROMs/e/src/A15/prebuilts/jdk/jdk21/linux-x86/bin/java     >

I suspect this is a systemic AOSP issue and not something specific with e/OS tree/repos?

Question: are these A15 builds running “out of the box” for EVERYONE except me ? :slight_smile: :slight_smile: :slight_smile: :slight_smile:

One more “rant”, then a suggestion:

I always laughed at “open source” movement, yeah, it’s open alright, but many of the more complex/projects the critical/important/juicy stuff is left out - to those “worthy” :slight_smile:

Like our grandmother gave all the “BEST” recopies, but nothing EVER came like she did, as she always kept the “secret” sauce :slight_smile: to herself..

How about this?

Any ROM/release should come with:

  • All local_manifests/*.xml
  • run_build.sh script, with ALL commands, shells, etc used to drive it.
  • All mods to BoardConfig.mk, and similar, Android.bp, and similar :slight_smile:
  • Bonus: full build logfile. ./run_build.sh |& tee run_build1.log

It’s possible this is already done in some cases(?), not sure, very new here..

Will continue to make progress, and stop, when:

run_build.sh && make clean && ccache -C && ./run_build.sh

run smoothly, without any crashes and produce “identical” (timestamps excepted) ROMs.

is that an UNATTAINABLE DREAM? or others think it IS possible after all ? I bet many already have that it’s just not widely shared ?

Yeah, I know one can “limp along” and bypass each crash and eventually get a ROM, the question, why does it need to crash 10-20 times for each device? we should be busy fixing code, adjusting things, rather than fixing compiler/jit/java/clang, etc. issues :slight_smile:

Again, sorry if this is just “me” :slight_smile:

Once it works will share the above bits so others can validate/enjoy on their end, and maybe be “worthy” too :slight_smile:

Good luck!

1 Like

basically follow:

and do not use LOS repos but /e/OS one:

repo init -u e / os / android · GitLab -b a15 --git-lfs --no-clone-bundle

repo sync

You need then also the vendor files from:

1 Like

right, following that guide as well as one on e/OS for 7A..
Lets be clear, after a LOT (a lot) of failures and effort, did get a ROM, and phone booted and things appear working, but… re-build, same/similar failures.. machine/hardware is very stable, no kernel panics, or any OOM, etc.

Each test running:

m clean ; ccache -C ; rm -rf out

tried with two different init (repo)

# repo init -u https://gitlab.e.foundation/e/os/android.git -b a15 --git-lfs
# repo init -u https://gitlab.e.foundation/e/os/android.git -b v4.1-a15 --git-lfs

the –no-clone-bundle appears on the repo/sync.

now tried with your suggestion:

 time repo init -u https://gitlab.e.foundation/e/os/android.git -b a15 --git-lfs --no-clone-bundle 
repo: reusing existing repo client checkout in /work/ROMs/e/src/A15
warning: Changing --git-lfs settings will only affect new project checkouts.
         Existing projects will require manual updates.
repo has been initialized in /work/ROMs/e/src/A15

and:

$ time repo sync -c --no-clone-bundle -j16 
Syncing: 100% (1166/1166), done in 26.233s
Finalizing sync state...
Checking for bloat: 100% (103/103), done in 0.401s
repo sync has finished successfully.

real    0m28.176s
user    0m22.975s
sys     0m35.372s

Started a build, highly doubt that re-sync will fix/change anything, what is observed is much deeper.

I really wanted to avoid that (posting files that do not [yet] work) but lets try, can u spot any issues with the manifest files (after all repo sync is only as good as these xmls):slight_smile:

cat proprietary.xml
<?xml version="1.0" encoding="UTF-8"?>
<manifest>

  <!-- Vsmart MSM8953 -->
  <project name="TheMuppets/proprietary_vendor_vsmart_casuarina" path="vendor/vsmart/casuarina" groups="muppets,muppets_casuarina" clone-depth="1" />

  <!-- Xiaomi MSM8937 & SDM439 -->
  <project name="TheMuppets/proprietary_vendor_xiaomi_mithorium-common" path="vendor/xiaomi/mithorium-common" groups="muppets,muppets_Mi439,muppets_Mi8917,muppets_Mi8937" clone-depth="1" />
  <project name="TheMuppets/proprietary_vendor_xiaomi_Mi439" path="vendor/xiaomi/Mi439" groups="muppets,muppets_Mi439" clone-depth="1" />
  <project name="TheMuppets/proprietary_vendor_xiaomi_Mi8917" path="vendor/xiaomi/Mi8917" groups="muppets,muppets_Mi8917" clone-depth="1" />
  <project name="TheMuppets/proprietary_vendor_xiaomi_Mi8937" path="vendor/xiaomi/Mi8937" groups="muppets,muppets_Mi8937" clone-depth="1" />

</manifest>

and the mi439 specifics:

$ cat roomservice.xml 
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
  <project path="device/xiaomi/Mi439" remote="github" name="LineageOS/android_device_xiaomi_Mi439" />
  <project path="device/xiaomi/mithorium-common" remote="github" name="LineageOS/android_device_xiaomi_mithorium-common" />
  <project path="kernel/xiaomi/msm8937" remote="github" name="LineageOS/android_kernel_xiaomi_msm8937" />
  <project path="hardware/sony/timekeep" remote="github" name="LineageOS/android_hardware_sony_timekeep" />
</manifest>

Do I need to add BRANCH for lineage22.2 ? or would the init -a15 is enough to tell it to pick right bits for all?

Failed on first try, just to get an idea:

https://pastebin.com/S8e4x350

if this is so highly-sandboxed, etc. all-included, how come it’s so fragile :slight_smile: ?

AI says to drop O1 on system/hardware/interfaces/media/Android.bp which sounds promising, is that right path? then once build is stable try to revert flags and provide feedback to maintainers?

OR: no1 cares about A15, all is on main/a16+ :slight_smile:

Not needed, there is a file (i currently have no PC access to verify) i think in /vendor/e/ where the correspondance is done when your build call AOSP, LOS, or /e/OS source branch name format

Thanks, quick update, builds are still ongoing, a LOT of failures, in the 10s - mostly optimization, (reduce from O3 to O2 or O1/O0..) disable LTO, etc. has not ran a single time fully, but getting there. Got several ROMs built, but, non loaded..

The community ROM flashes clean, and boots too, but mine fail to load due to lack of space ?

[  208.178841] [liblp] Partition system will resize from 0 bytes to 1835900928 bytes
[  208.179015] [liblp] Partition vendor will resize from 0 bytes to 779526144 bytes
[  208.179182] [liblp] Partition product will resize from 0 bytes to 2160861184 bytes
[  208.179345] [liblp] Partition odm will resize from 0 bytes to 44183552 bytes
[  208.179522] [liblp] Partition system_ext is part of group mi439_dynpart which does not have enough space free (613965824 requested, 4820471808 used out of 4827643904)
[  208.179564] Failed to resize partition system_ext to size 613965824.
[  208.179633] script aborted: assert failed: update_dynamic_partitions(package_extract_file("dynamic_partitions_op_list"), package_extract_file("unsparse_super_empty.img"))

AI is recommending to increase size, but, in boardconfig.mk it has things like:

BOARD_SUPER_PARTITION_SIZE := $(shell expr $(BOARD_SUPER_PARTITION_CUST_DEVICE_SIZE) + $(BOARD_SUPER_PARTITION_SYSTEM_DEVICE_SIZE) + $(BOARD_SUPER_PARTITION_VENDOR_DEVICE_SIZE) )

shouldn’t it calculate that already? I truly am too naive to understand why in age of so-called “open source” this has to be so complex :slight_smile: for a given hardware (device) and Android version on so-called hermetic build system :slight_smile: :slight_smile:

Another strange/artifact is that the e/OS recovery (4.2) that is built has BLUE for the selected line, but BLACK for ALL other lines, which makes it impossible to read/see any other option.

Suspect this is some rendering issue, I’ve not changed much in Boardconfig.mk, and the manifest is posted.. Can the folks who built the community provide the manifest/device tree and full build script (and log) so folks who want to help/learn can shorten the “learning curve” (re-discovery time)..

Once i get a working rom, will post all notes, so far do not want to post things that are not fully working, but there IS a LOT of progress and learning - Thanks to the AI, it doesn’t get tired :slight_smile:

suggests a LOT of crap, but over all, highly useful, wouldn’t be possible (tried this few years ago, and it was very hard, folks were not sharing or spoke down to those who were not “worthy” )

Thanks for any tips, will update later..

compared fstab.qcom from community ROM (extracted from boot.img) to one in on build tree, they are identical, maybe the disabling of optimization is increasing sizes.. and maybe when building on SLOWer machines or with fewer jobs less concurrency and less failures, not sure.. will continue to learn/understand.. Would love to meet a builder/developer who shares such treasures :slight_smile: