yashsingh1/xdaforums huggingface dataset:
[Android] DiamondJohn:
I use the instructions to build an env off ROM githubs. Easiest if you have an official device to start with.
[Android] kongxk:
Hello Jespert, did you fix it?
[Android] Glitch:
Hi, because I simply don't have neither space on my PC nor the skills required to do this and I need android 14 for my tablet, can anyone do it for me? If possible do something like pixel experience or lineage os.

The details of the tablet:

If anyone can do this, pm me a .zip file or just upload it here
[Android] tham.400:
device/lge/bullhead/time-services/Android.mk:14: warning: BUILD_COPY_HEADERS has been deprecated. See https://android.googlesource.com/platform/build/+/master/Changes.md#copy_headers.
[ 63% 122/192] including hardware/qcom/Android.mk ...
FAILED:
hardware/qcom/display/msm8994/libgralloc/Android.mk: error: gralloc.msm8992: LOCAL_CLANG false is no longer supported
In file included from hardware/qcom-caf/wlan/Android.mk:1:
In file included from hardware/qcom/Android.mk:10:
In file included from hardware/qcom/display/Android.mk:10:
In file included from hardware/qcom/display/msm8994/Android.mk:8:
In file included from hardware/qcom/display/msm8994/libgralloc/Android.mk:46:
In file included from build/make/core/shared_library.mk:32:
In file included from build/make/core/shared_library_internal.mk:34:
In file included from build/make/core/dynamic_binary.mk:34:
build/make/core/binary.mk:440: error: done.
00:37:28 ckati failed with: exit status 1

Whenever I build Lineage 21 for Bullhead, this odd error (LOCAL_CLANG false not supported) comes up whilst using the brunch command to build Lineage. What should I do to actually make it successfully build? (am new to building ROMs)
[Android] DiamondJohn:
It's it an official LOS device?

Have you checked for support on telegram?

Just for a test, have you checked the file

hardware/qcom/display/msm8994/libgralloc/Android.mk: error: gralloc.msm8992: LOCAL_CLANG false is no longer supported
In file included from hardware/qcom-caf/wlan/Android.mk

And tried setting LOCAL_CLANG to FALSE
[Android] tham.400:
18:39:48 Warning: high -j26 count compared to 23.5GB of RAM
18:39:48 If you run into segfaults or other errors, try a lower -j value

What is a -j26 count? I can't search online for any results, and what should I set it to with 24GB of RAM?
[Android] quake73:
It is the number of threads used during compilation. As a rule of thumb, it should be set to the number of cores your CPU has.
[Android] tham.400:
How can I set it to 12? (Ryzen 9 5900X)
[Android] quake73:
-j12 :)
[Android] tham.400:
What is the command or file to change this in?
[Android] quake73:
It should be entered when you invoke compilation, for example: m bacon -j12. I don't know how you start the compilation in LOS.
[Android] tham.400:
it appears to be the same (thanks), as the soong ninja file generation happens rapidly, but then it invokes this error:

error: vendor/qcom/opensource/dataservices/rmnetctl/Android.bp:34:1: "librmnetctl" depends on undefined module "qti_kernel_headers".
Module "librmnetctl" is defined in namespace "vendor/qcom/opensource/dataservices" which can read these 2 namespaces: ["vendor/qcom/opensource/dataservices" "."]
Module "qti_kernel_headers" can be found in these namespaces: ["hardware/google/pixel"]
Or did you mean ["device_kernel_headers" "kernel_log_monitor" "libkernel_cmdline" "qti_powerhal_headers"]?
20:16:54 soong bootstrap failed with: exit status 1

#### failed to build some targets (30 seconds) ####
[Android] quake73:
Try to surround the first 2 lines in vendor/qcom/opensource/dataservices/rmnetctl/Android.bp with /* */

like this:

/*soong_namespace {

}*/
[Android] tham.400:
soong_config_module_type {
name: "rmnetctl_cc_defaults",
module_type: "cc_defaults",
config_namespace: "rmnetctl",
bool_variables: [
"old_rmnet_data",
],
properties: [
"cflags",
],
}

cc_library_headers {
name: "librmnetctl_headers",
export_include_dirs: ["inc"],
vendor: true,
}

rmnetctl_cc_defaults {
name: "librmnetctl_defaults",
cflags: [
"-Wall",
"-Werror",
],
header_libs: ["librmnetctl_headers"],
soong_config_variables: {
old_rmnet_data: {
cflags: ["-DUSE_OLD_RMNET_DATA"],
},
},
vendor: true,
}

cc_library_shared {
name: "librmnetctl",
header_libs: [
"qti_kernel_headers",
"device_kernel_headers",
],
defaults: ["librmnetctl_defaults"],
srcs: ["src/librmnetctl.c"],
}

cc_binary {
name: "rmnetcli",
shared_libs: ["librmnetctl"],
defaults: ["librmnetctl_defaults"],
srcs: ["cli/rmnetcli.c"],
}

The Android.bp file within "dataservices" has the soong_namespace thing as you mentioned, I tried that and it didn't work, but the correct Android.bp as listed here is vastly different
[Android] A Cool User:
Android 13 has been made for this device. It is not android 14, but it is something... Here it is.
[Android] quake73:
ok then, go to hardware_google_pixel//kernel_headers/Android.bp

Ok then, in the file hardware_google_pixel/kernel_headers/Android.bp, add:

soong_namespace {

}

at the top (like here: https://github.com/GenesisOS/hardware_google_pixel/blob/utopia/kernel_headers/Android.bp)

sorry, i'm a little rusty... stopped buuilding roms, forgot all the debugging tricks :)
[Android] tham.400:
error: vendor/qcom/opensource/dataservices/rmnetctl/Android.bp:34:1: "librmnetctl" depends on undefined module "qti_kernel_headers".
Module "librmnetctl" is defined in namespace "vendor/qcom/opensource/dataservices" which can read these 2 namespaces: ["vendor/qcom/opensource/dataservices" "."]
Module "qti_kernel_headers" can be found in these namespaces: ["hardware/google/pixel/kernel_headers"]
Or did you mean ["device_kernel_headers" "kernel_log_monitor" "libkernel_cmdline" "qti_powerhal_headers"]?
20:55:11 soong bootstrap failed with: exit status 1

#### failed to build some targets (20 seconds) ####

The error seems to be headed toward the edited bp file within the kernel_headers folder too, I really appreciate your help nonetheless
[Android] quake73:
Ok, now I think I remember how I solved this in the past:

1. delete the kernel_headers folder from hw/google/pixel

2. in your kernel source, there should be a file androidbp, rename it to android.bp (add the dot "."). This file should have a smtg like this: ......library.....name: "qti_kernel_headers",

i also forgot to mention - restore the *.bp files in dataservices to their originals if you did any changes.
[Android] tham.400:
Would the androidbp file be in the root of the device kernel? I don't see it there
[Android] quake73:
yes, smtg like this: https://github.com/LineageOS/android_kernel_samsung_sdm429/blob/lineage-21/Androidbp

where is your device's kernel source? Where did you get it from? It should be in your local manifest
[Android] tham.400:
Nexus 5X Kernel tree

That is where I got my tree from in the local_manifest. This one nor the Lineage kernel tree for bullhead has the androidbp file.
[Android] quake73:
Then i'm almost out of ideas....

delete the damn rmnet folder from dataservices... or the whole vendor/qcom/opensource/dataservices/ folder :)

I was building roms for chinese devices, oneplus, xiaomi.... have never built for google's. Those vendor/qcom folders might not even be needed for nexus.
[Android] tham.400:
You were right, as when I tried removing the unnecessary qualcomm folders I got an error that I never have received beforehand:

error: vendor/lineage/build/soong/Android.bp:24:8: module "generated_kernel_includes": cmd: unknown variable '$(PATH_OVERRIDE_SOONG)'
22:00:55 soong bootstrap failed with: exit status 1

#### failed to build some targets (53 seconds) ####
[Android] quake73:
for that error, cmd: unknown variable '$(PATH_OVERRIDE_SOONG)' in your device tree, in lineage_bullhead.mk, add a line:

LINEAGE_BUILD := bullhead
[Android] tham.400:
Here's a more detailed version even with the extra line:

FAILED: out/soong/build.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" -o out/soong/build.ninja --bazel-mode --globListDir build --globFile out/soong/globs-build.ninja -t -l out/.module_paths/Android.bp.list --available_env out/soong/soong.environment.available --used_env out/soong/soong.environment.used.build Android.bp
error: vendor/lineage/build/soong/Android.bp:24:8: module "generated_kernel_includes": cmd: unknown variable '$(PATH_OVERRIDE_SOONG)'
23:43:29 soong bootstrap failed with: exit status 1

The same error?
[Android] DiamondJohn:
So, I have managed to get past the original issue. Hopefully it may help others.

I am running a Ubuntu 24.04.4 , that was probably originally built 3 years ago, and updated using the installed update software. ALL my additional data are in separate files and loaded as partitions, so I can share/transfer to a new machine without rebuilding the contrents . And that's what I did.

I created a new machine, downloaded and installed the latest ISO (complete 24.04.4), and reattached all the partition's, installed all the software and then tested again. And it got past this step! but it does take 30+min for the one step.

The weird thing is, when I first ran it with success I was still installing software, so only assigned about 19GB as opposed to 24GB (from 32 gb on win11) and forgot to increase and reboot. But it worked. It actually seems to be successful more often with the lower RAM.

What I do notice now, this new instance really takes better advantage of the swap file than the old machine. I think it also runs Python3 as opposed to previous 1 or 2. Something the update process did not manage to, well, update.

It now gets to the main loop of all the steps to build the ROM, however it now fails with a more "normal" error (i'll post below". This error I expect has something to do with the fact I am using a Lineage Device tree to build crDroid.

Spoiler content hidden.
[Android] kamlesh vasnjaliya:
you found any fix for this error?
[Android] DiamondJohn:
I generally found, maybe not a fix to this exact error the following issues with my environment

My OUT partition was running out of disk space. Enlarged, but it was fine for A13

Left some extra headroom of mem before having to swap to swapfile

Sometimes a second build would go better, I am guessing it builds more from CCACHE

echo "Set swappiness to 100%" |& ts '[%Y-%m-%d %H:%M:%S]' | tee -a ${log_file};
cat /proc/sys/vm/swappiness |& ts '[%Y-%m-%d %H:%M:%S]' | tee -a ${log_file};
sudo sysctl vm.swappiness=100 |& ts '[%Y-%m-%d %H:%M:%S]' | tee -a ${log_file};
cat /proc/sys/vm/swappiness |& ts '[%Y-%m-%d %H:%M:%S]' | tee -a ${log_file};

RESERVED=16384;
RESERVED=24576;
#RESERVED=32768;
#RESERVED=40960;
#RESERVED=49152;
echo "Set swap reserved to ${RESERVED}" |& ts '[%Y-%m-%d %H:%M:%S]' | tee -a ${log_file};
cat /proc/sys/vm/admin_reserve_kbytes |& ts '[%Y-%m-%d %H:%M:%S]' | tee -a ${log_file};
sudo sysctl vm.admin_reserve_kbytes=${RESERVED} |& ts '[%Y-%m-%d %H:%M:%S]' | tee -a ${log_file};
cat /proc/sys/vm/admin_reserve_kbytes |& ts '[%Y-%m-%d %H:%M:%S]' | tee -a ${log_file};

So now It mostly goes through without stopping and being even killed from the screen.

And there were some minor source code changes.
[Android] koko-07:
Same error bro. Trying to build rising. Can't find fix.
[Android] DiamondJohn:
what worked for me is a couple of posts above.

[GUIDE][COMPLETE] Android ROM Development From Source To End

Hello Everyone....:D:D Today I will present you all the ultimate guide for ROM development starting from Source to End. This guide will be applicable to all devices. So lets Start :D What is Android? :rolleyes: Android is an...

xdaforums.com
[Android] akhilnarang:
You can use the --reference flag with repo init, as explained in the guide. Only things that are different in temasek from normal cm-12.1 will be downloaded

Or just wait and download temasek's cm12 when its ready
[Android] prince.d.emperor:
Please help !

While syncing I'm getting this error

Fetching projects: 97% (530/546) fatal: The remote end hung up unexpectedly
[Android] tecno789:
got this error :

Fetching project CyanogenMod/android_external_chromium_org

error: RPC failed; result=56, HTTP code = 200

fatal: The remote end hung up unexpectedly

fatal: early EOF

fatal: index-pack failed

error: RPC failed; result=56, HTTP code = 200

fatal: The remote end hung up unexpectedly

fatal: early EOF

fatal: index-pack failed

error: Cannot fetch platform/prebuilts/sdk

Fetching project platform/external/iproute2
[Android] prince.d.emperor:
Me too !

Got the same error :(
[Android] genesixxbf3:
Repo sync again and add -f at the end
[Android] tecno789:
it isn't changing.. stuck on it :crying:
[Android] genesixxbf3:
Stuck? Then wait it's normally downloading files
[Android] tecno789:
stuck.. it doesn't continue to dowload... when appears that line
[Android] genesixxbf3:
It's downloading in the background :) check with a monitor you'll see
[Android] mohit310:
You have to be careful. Checkout the tree which is not working in one directory and then you need to merge the files which are working with that directory Specially the mk and config files

---------- Post added at 04:28 PM ---------- Previous post was at 04:27 PM ----------

Make sure that no antivirus or firewall is blocking
[Android] prince.d.emperor:
Didn't get you !
[Android] OfficerJimLahey:
Hmmm, I didn't know I needed the msm8660-common device tree until I found out that the doubleshot device tree called on it. Merging the two seems counter-productive (as in if that was the case, the trees would have been merged in github already).

But then again, I cannot speak for the original developers organizational skills (maybe he had them merged in his source, but separate on github, for whatever reason). I will take a peek at the mk and config files tonight, see what I can find.

Thanks again.

UDPATE:

Compiling now. :D

There were a couple things holding me back. One was that the lunch menu ("cm_doubleshot-...") was automatically being renamed to something ("carbon_cm_doubleshot-...") Carbon wasn't matching in the device tree. Once I changed the lunch menu makefile to read "carbon_doubleshot-...", I then tackled the next problem.

gsm.mk and phone_full_config.mk couldn't be found (as it was an include in none of the device trees makefiles), but once I checked Carbon's contents, it was safe to change the locations to telephony.mk and phone_config.mk, respectively.

Ran the lunch menu again, as well as the compiler, and that's where everything is sitting right now. Your help is much appreciated :).
[Android] tecno789:
Is there a way to see how much files need to download,?(in GB)
[Android] Hashbang173:
Have you followed the guide here? (You should only have to add the pac_DEVICE.mk and maybe add your device to the vendorsetup.sh)
[Android] OfficerJimLahey:
Okay, I am getting closer, but I still have roadblocks....

host C++: libsqlite3_android <= external/sqlite/android/sqlite3_android.cpp
Copy: /home/joel/carbon/out/target/product/doubleshot/install/bin/persist.sh
Copy: /home/joel/carbon/out/target/product/doubleshot/recovery/root/sbin/choice_fn
Copy: /home/joel/carbon/out/target/product/doubleshot/recovery/root/sbin/power_test
Copy: /home/joel/carbon/out/target/product/doubleshot/recovery/root/sbin/offmode_charging
Copy: /home/joel/carbon/out/target/product/doubleshot/recovery/root/sbin/detect_key
Copy: /home/joel/carbon/out/target/product/doubleshot/recovery/root/sbin/htcbatt
Copy: /home/joel/carbon/out/target/product/doubleshot/recovery/root/init.rc
make: *** No rule to make target 'system/media/bootanimation.zip', needed by '/home/joel/carbon/out/target/product/doubleshot/'. Stop.
make: *** Waiting for unfinished jobs....
Copy: /home/joel/carbon/out/target/product/doubleshot/obj/lib/camera.vendor.msm8660.so
joel@oven:~/carbon$

I couldn't find any bootanimation.zip file, but vendor/carbon/prebuilt/common/ has a bunch of different resolutions (not sure which one I should use as my resolution is 480x800) - do I use 480.zip or 800.zip?

Can I just copy and rename to home/joel/carbon/out/target/product/doubleshot/system/media/bootanimation.zip and continue the make process? Is there a makefile that I am supposed to modify instead?

The closest answer I could find was:

Cannot find that file, the closest there is I could find for Carbon is ndk/build/tools/build-target-prebuilts.sh. Do I run that? And I don't suppose I do a make clean after that, or else I will be starting from the beginning again?

Thanks in advance.
[Android] mohit310:
You don't have the kernel downloaded for your rom. Add that to your local manifest

---------- Post added at 02:04 PM ---------- Previous post was at 02:03 PM ----------

You can cat or vi the script to understand what's it doing..
[Android] OfficerJimLahey:
Thinking out loud...

What the CM's version reads like (cm-10.1/vendor/cm/get-prebuilts):

BASEDIR=`dirname $0`

mkdir -p $BASEDIR/proprietary

# Get Android Terminal Emulator (we use a prebuilt so it can update from the Market)
curl -L -o $BASEDIR/proprietary/Term.apk -O -L http://jackpal.github.com/Android-Terminal-Emulator/downloads/Term.apk
unzip -o -d $BASEDIR/proprietary $BASEDIR/proprietary/Term.apk lib/*

But, when I do "locate prebuilts", I get:

joel@oven:~/carbon$ locate get-prebuilts
/home/joel/carbon/ndk/build/tools/build-target-prebuilts.sh
/home/joel/cm-10.1/ndk/build/tools/build-target-prebuilts.sh
/home/joel/cm-10.1/vendor/cm/get-prebuilts
joel@oven:~/carbon$

CM has its own build-target-prebuilts.sh file, which looks identical to the Carbon counterpart (which also, looks nothing like the file above). So the suggestion I found doesn't apply to CarbonROM.

I need another lead, and the "make: *** No rule to make target 'system/media/bootanimation.zip', needed by" google search term produces too few results (56) to help in that regard.

Maybe I am stuck to "make clean" and try all over again. :(
[Android] mohit310:
Cm11 github has bootanimation.zip file

Check http://github.com/Cyanogenmod

Branch 11.0 download that.

Or download some cm11 theme apk file and unpack the apk and you should have a bootanimation.zip file.

Or you can create one for your rom
[Android] OfficerJimLahey:
Carbon has them:

joel@oven:~/carbon$ ls vendor/carbon/prebuilt/common/bootanimation/
1080.zip 1600.zip 320.zip 480.zip 600.zip 768.zip
1200.zip 240.zip 360.zip 540.zip 720.zip 800.zip
joel@oven:~/carbon$

The question I have is, am I satisfying the makefile by copying 480.zip (or 800.zip, not sure which since my res is 480x800) to /home/joel/carbon/out/target/product/doubleshot/system/media/bootanimation.zip? Or is there a better method?

I will try the former and report back...

UPDATE:

That seemed to work (used 480.zip). Next roadblock:

...
Target buildinfo: /home/joel/carbon/out/target/product/doubleshot/system/build.prop
bootable/recovery/minui/../../../device/htc/doubleshot/recovery/graphics.c:189:5: error: conflicting types for 'gr_text'target StaticLib: libpixelflinger_static (/home/joel/carbon/out/target/product/doubleshot/obj/STATIC_LIBRARIES/libpixelflinger_static_intermediates/libpixelflinger_static.a)

In file included from bootable/recovery/minui/../../../device/htc/doubleshot/recovery/graphics.c:34:0:
bootable/recovery/minui/minui.h:36:5: note: previous declaration of 'gr_text' was here
Install: /home/joel/carbon/out/host/linux-x86/framework/dumpkey.jar
build/core/binary.mk:512: recipe for target '/home/joel/carbon/out/target/product/doubleshot/obj/STATIC_LIBRARIES/libminui_intermediates/../../../device/htc/doubleshot/recovery/graphics.o' failed
make: *** [/home/joel/carbon/out/target/product/doubleshot/obj/STATIC_LIBRARIES/libminui_intermediates/../../../device/htc/doubleshot/recovery/graphics.o] Error 1
make: *** Waiting for unfinished jobs....
Target buildinfo from: device/htc/doubleshot/system.prop
joel@oven:~/carbon$

Will investigate. Three results of that error, seems to be the solution:

I didn't add a recovery (CWM/TWRP) to my repo, didn't think it was necessary. Is this what it wants? Any way to build without recovery (assuming this will build a recovery alongside the ROM, but one is not needed for the other)?

EDIT:

As gr_text was already declared in minui.h (almost exactly, just one more parameter), I commented it out in device/htc/doubleshot/recovery/graphics.c. Shall try that. :)

UPDATE: Nope, forgot that wasn't a variable declaration, rather a function. The compilation eventually broke. Luckily I found a newer Device Tree that doesn't have the bothersome graphics.c file, so now I am starting from scratch again (currently doing the 'repo' thing).

Question before I get too far though, how does /datadata get implemented? How would I go about reversing it before it is mapped? My current device does not have that partition, the ROM identity doesn't have it (as the Doubleshot CM11 doesn't implement it, or even tries to) and I would like to keep it that way. How is the presence of (or lack of) /datadata partition mapping configured?
[Android] ViniciusAlves:
Nice tutorial :fingers-crossed:
[Android] tecno789:
guys, to build an AOKP, have i follow this http://xdaforums.com/showpost.php?p=54118852&postcount=9 ? or simply build? thanks
[Android] OfficerJimLahey:
I didn't realize it at the time, but I had to do this for Carbon. Not sure about AOKP, but probably.

Confirmed it by googling aokp.mk. CM notes have been replaced.

So, for this, you will have to rename cm.mk to aokp.mk, and replace cm with aokp in the contents.

Including replacing:

$(call inherit-product, vendor/cm/config/common_full_phone.mk)

With:

$(call inherit-product, vendor/aokp/config/common_phone.mk)

Want to also add:

# Boot animation
TARGET_SCREEN_HEIGHT := 320
TARGET_SCREEN_WIDTH := 480

Where 320 and 480 is your device's resolution. You could even be as complete as:

# Bootanimation
TARGET_SCREEN_HEIGHT := 320
TARGET_SCREEN_WIDTH := 480
PRODUCT_COPY_FILES += \
vendor/aokp/prebuilt/common/bootanimation/320.zip:system/media/bootanimation.zip

Finally (for now), cm.dependencies becomes aokp.dependencies.

That should provide a good start. Cheers.
[Android] tecno789:
how can i make it? i don't understand so much this part. thanks
[Android] tecno789:
is it building?

arget thumb C++: third_party_WebKit_Source_core_webcore_remaining_gyp <= external/chromium_org/third_party/WebKit/Source/core/inspector/InjectedScript.cpp
target thumb C++: third_party_WebKit_Source_core_webcore_remaining_gyp <= external/chromium_org/third_party/WebKit/Source/core/inspector/InjectedScriptBase.cpp
target thumb C++: third_party_WebKit_Source_core_webcore_remaining_gyp <= external/chromium_org/third_party/WebKit/Source/core/inspector/InjectedScriptCanvasModule.cpp
target thumb C++: third_party_WebKit_Source_core_webcore_remaining_gyp <= external/chromium_org/third_party/WebKit/Source/core/inspector/InjectedScriptHost.cpp
target thumb C++: third_party_WebKit_Source_core_webcore_remaining_gyp <= external/chromium_org/third_party/WebKit/Source/core/inspector/InjectedScriptManager.cpp
target thumb C++: third_party_WebKit_Source_core_webcore_remaining_gyp <= external/chromium_org/third_party/WebKit/Source/core/inspector/InjectedScriptModule.cpp
target thumb C++: third_party_WebKit_Source_core_webcore_remaining_gyp <= external/chromium_org/third_party/WebKit/Source/core/inspector/InspectorApplicationCacheAgent.cpp
target thumb C++: third_party_WebKit_Source_core_webcore_remaining_gyp <= external/chromium_org/third_party/WebKit/Source/core/inspector/InspectorBaseAgent.cpp
target thumb C++: third_party_WebKit_Source_core_webcore_remaining_gyp <= external/chromium_org/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp

it's more than 1 hour....
[Android] OfficerJimLahey:
Looks good so far, the fact that it hasn't thrown you back into the command prompt in the first four hours is good news. :cowboy:

If you get a command prompt, and the last few lines mention "Stop" or "Error", paste in the last screen for analysis.
[Android] tecno789:
four hours?
[Android] OfficerJimLahey:
Yeah, ~14GB takes a long time to compile. Depending on your processing power, 4 hours is a conservative measure. Hang in there.
[Android] tecno789:
yeah, i had 25 gb of aokp sources.... :( it's still processing