yashsingh1/xdaforums huggingface dataset:
[Android] M.Tullius:
No problem, I'm just looking for something I can reproduce.

Since I can build AOSP, I suspect these other ROMs either require some other dependence (which they never state) or are broken.

Lineage seems unoffical for my device atm, but I can experiment with other devices.

Also, AOSP states that Java is not required to build, as they provide their own version, which makes me think it is not my problem, but I'm not yet sure.
[Android] DiamondJohn:
If the same occurred to myself, I would personally look at it the opposite way. I would assume that the fact that AOSP includes Java, but other ROMs are failing, then I would take that as AOSP hiding the fact that there is an issue with my environment. As such, if I expected to build anything other than AOSP, I would need to fix the actual issue with my environment, that AOSP is hiding,.Just think, others are building the other ROM without your issue, so either the 10s to 1000s of others are using a broken env (that actually works...), or its only you (with it explicitly telling you something is broken). The odds are not in your favor.

As for testing with lineage, if you have the download capacity and time, I personally found the webchat channel a godsend in building for the first time.
[Android] spookcity138:
Not really much to add that wasn't already said better. I will just add this from an arch users perspective:

Install the lineageos-devel and aosp-devel packages if you haven't already. This will greatly improve the chance that it's not related to your build environment... And it really should be all you need.

My default Java version for building Android 9 and 10 is OpenJDK 13. Never had issues with it.
[Android] PsychicGirl:
Hy I'm building lineage os 14.1 for SM-J250F

Samsung Galaxy J2 Pro 2018 (SM-J250F) but im not going to giveup .. so I'm started to build roms my self .. fixed some build errors and successfully compiled but it stuck on Samsung logo(no bootanimation) also took pstore logs but it only store recovery logs .. sir can you please help to make it boot? Can u kindly tell me what changes i need to do in sources to make it boot? Or can u fix the issue in my tree? Please I'm hoping your feedback

Source android base : Android 7.1.1

Tried compilation : Lineage OS 14.1

I cant post my tree links due to new account please pm
[Android] DiamondJohn:
last_kmsg is normally the first place to look when having boot issues.
[Android] PsychicGirl:
How should i get it?
[Android] M.Tullius:
Indeed I have those packages, and accordinig to lineageos people python2 is not needed anymore and java is built in, so those should not be a problem. I must also mention that when I do 'brunch', I get a couple of 'Build sandboxing disabled due to nsjail error.' messages, but I'm not sure it is relevant.

My build script is

repo init -u git://github.com/LineageOS/android.git -b lineage-17.1
mkdir .repo/local_manifests
cp ../roomservice.xml .repo/local_manifests/
repo sync -j13
source build/envsetup.sh
brunch lineage_willow-userdebug > b3out.log

where roomservice.xml is

<manifest>
<project path="device/xiaomi/willow" name="Xiaomi-trinket-dev/android_device_xiaomi_willow" remote="github" revision="lineage-17.1" />
<project path="device/xiaomi/sm6125-common" name="Xiaomi-trinket-dev/android_device_xiaomi_sm6125-common" remote="github" revision="lineage-17.1" />
<project path="kernel/xiaomi/sm6125" name="Xiaomi-trinket-dev/android_kernel_xiaomi_sm6125" remote="github" revision="lineage-17.1" />
<project path="vendor/xiaomi/willow" name="Xiaomi-trinket-dev/vendor_xiaomi_willow" remote="github" revision="lineage-17.1" />
<project path="vendor/xiaomi/sm6125-common" name="Xiaomi-trinket-dev/vendor_xiaomi_sm6125-common" remote="github" revision="lineage-17.1" />
</manifest>

If the logic makes sense to you, and you have some free space on your machine, can you try my build script and see whether it fails for you as well? Unless you see some right away that I'm missing something or making some mistake..

Thanks.
[Android] spookcity138:
Sure,I already have the LOS17.1 sources on my laptop, so this is no issue. If I've the time I'll try later when I'm home and let you know the result.

Also, yes python 3 works without issue when building Android 10. I need to use a virtual wrapper when building Android 9 and below however.
[Android] M.Tullius:
Cool, many thanks.
[Android] spookcity138:
OK,so straight to it before giving you more info. I was able to successfully build LOS 17.1 for your device with no issues at all. I did not use your script exactly.

repo init -u git://github.com/LineageOS/android.git -b lineage-17.1 - I did not use this. I already had the sources. If you plan to call this script multiple times there is no need for this.

mkdir .repo/local_manifests - I simply created the roomservice.xml file within /.repo/local_manifests with all of the repos you provided. Really no need to do this if you are calling this script more than once either. Once you have the roomservice.xml it will sync when you sync the lineage sources.

cp ../roomservice.xml .repo/local_manifests/ - Same I already created this in the step above

So in the end I simply used a script with these steps.

repo sync -j13
source build/envsetup.sh
brunch lineage_willow-userdebug [STRIKE]> b3out.log[/STRIKE] I just prefer the output in my shell. This is certainly not an issue.

If you are still unable to build then it must be your system. If you have the 2 packages from the AUR that I previously mentioned ( aosp-devel,lineageos-devel) then its a bit confusing. Perhaps make sure your JAVA_HOME is set in your bashrc (or zsh related export file like I use) Honestly not sure if that matters,but I have always set this.

Hope I was able to provide you some insight.
[Android] M.Tullius:
Thank you for your help!

What you suggest makes sense.

It turns out that one needs a ttf font in order to avoid that java error :), so I installed ttf-dejavu, and I'm now able to successfully build. (Since it was a minimal installation on my machine, I did not have any font installed, just ssh into it.)

For future reference, it may be worth pointing out that neither python2 nor java are actually needed (java is provided now by lineage).
[Android] spookcity138:
Great, glad I could be of some help and glad you got it all sorted!

Good to know about java and Python 2. Although I use java for other things as well. Python 2 is being deprecated now anyway.
[Android] zizoux7:
FAILED: out/soong/.intermediates/lineage-sdk/org.lineageos.platform.internal/android_common/gen/aidl/lineage-sdk/sdk/src/java/lineageos/app/IProfileManager.java
out/soong/host/linux-x86/bin/aidl -dout/soong/.intermediates/lineage-sdk/org.lineageos.platform.internal/android_common/gen/aidl/lineage-sdk/sdk/src/java/lineageos/app/IProfileManager.java.d -Iframeworks/base/core/java -Iframeworks/base/graphics/java -Iframeworks/base/location/java -Iframeworks/base/lowpan/java -Iframeworks/base/media/java -Iframeworks/base/media/apex/java -Iframeworks/base/media/mca/effect/java -Iframeworks/base/media/mca/filterfw/java -Iframeworks/base/media/mca/filterpacks/java -Iframeworks/base/drm/java -Iframeworks/base/opengl/java -Iframeworks/base/sax/java -Iframeworks/base/telecomm/java -Iframeworks/base/telephony/java -Iframeworks/base/wifi/java -Iframeworks/base/keystore/java -Iframeworks/base/rs/java -Ilineage-sdk/sdk/src/java -Ilineage-sdk lineage-sdk/sdk/src/java/lineageos/app/IProfileManager.aidl out/soong/.intermediates/lineage-sdk/org.lineageos.platform.internal/android_common/gen/aidl/lineage-sdk/sdk/src/java/lineageos/app/IProfileManager.java
ERROR: android.app.NotificationGroup: couldn't find import for class android.app.NotificationGroup

What do I need to do?
[Android] riteshrk.aec:
how do we make proprietary-files.txt for a phone whose device tree is not available?
[Android] Dev-X:
Hello, everytime I try to run . build/envsetup.sh, It says "ccache found and CCACHE_EXEC has been set to : /usr/bin/ccache" and nothing happens.
[Android] spookcity138:
Not an error or issue. It's just detecting your ccache. If you don't want to use ccache you can run - export CCACHE_DISABLE=1. This will disabled it in your current shell.
[Android] Dev-X:
it says:

-: command not found
[Android] spookcity138:
Still not gonna be an issue unless you want to use ccache. If you do I'd imagine you just need to install it. Most people on here seem to use Ubuntu or similar. I do not, so I can't help much with installation, but it should be easy. You can build without ccache though. It's not a problem at all.

Do a Google search for ccache if you don't understand it's purpose.
[Android] Dev-X:
Thanks for your help. I'm newbie :angel:

-I'm using Ubuntu 18.04 LTS and I did what the guide says exactly.

-I'm trying to build Resurrection Remix Pie for my j7xelte.

-I have done sudo apt-get update / sudo apt-get upgrade

-I have initiated the repo and synced it.

-Installed the sources of my device. (Kernel, vendor, device)

-I used this command to install ccache: sudo apt install ccache

-And how can I build it without ccache?
[Android] spookcity138:
No problem.Always glad to try to help. You can use the export CCACHE_DISABLE=1 command to disable it in your current shell. Whether or not ccache is enabled or not is not going to have an effect on your build as far as succeeding or not. It will only speed up subsequent builds (The initial build will be slower)

If this is your first time building a ROM. I say just build it. Don't worry about ccache at all and you can look into this later.
[Android] Dev-X:
How can I disable it? I typed export CCACHE_DISABLE=1 but it didn't work. I still get same error
[Android] spookcity138:
Hmm,interesting. I don't know then. I disable ccache when I build for certain devices by doing this and it works on Arch Linux. I imagined it'd be the same for Ubuntu. You can try to add CCACHE_DISABLE=1 to your bashrc (or zshrc) and then source it by running source .bashrc (or .zshrc) then open a new terminal.

Other than that I'm not sure. Perhaps it's looking for your ccache in the wrong place. You'd have to search these things if that doesn't work though because like I said,I don't use Ubuntu.
[Android] NepoRood:
Asking because you didn't mention it in your "steps", did you install all the required packages?

sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev libgl1-mesa-dev libxml2-utils xsltproc unzip
[Android] DiamondJohn:
I took advantage of this opportunity to compare your list against the list I logged as what I installed for my current build environment; which I built back in the days of Oreo. FYI: I have built LOS based (Havoc-OS) Oreo, (Havoc-OS) Pie and (crDroid) Android 10 with this environment. This comparison results in the following:

View attachment 4985711

I prefer individual lines as historically (at least) one has failed, and individual lines make it easier to correct the line and continue on:

sudo apt-get install bc;
sudo apt-get install bison;
sudo apt-get install build-essential;
sudo apt-get install ccache;
sudo apt-get install curl;
sudo apt-get install flex;
sudo apt-get install g++-multilib;
sudo apt-get install gcc-multilib;
sudo apt-get install git;
sudo apt-get install gnupg;
sudo apt-get install gperf;
sudo apt-get install imagemagick;
sudo apt-get install lib32ncurses5-dev;
sudo apt-get install lib32readline-dev;
sudo apt-get install lib32z1-dev;
sudo apt-get install liblz4-tool;
sudo apt-get install libncurses5-dev;
sudo apt-get install libsdl1.2-dev;
sudo apt-get install libssl-dev;
sudo apt-get install libwxgtk3.0-dev;
sudo apt-get install libxml2;
sudo apt-get install libxml2-utils;
sudo apt-get install lzop;
sudo apt-get install pngcrush;
sudo apt-get install rsync;
sudo apt-get install schedtool;
sudo apt-get install squashfs-tools;
sudo apt-get install xsltproc;
sudo apt-get install zip;
sudo apt-get install zlib1g-dev;

I am sure my longer list would most probably include additional components that are not required nor used. The interesting thing though, is that the user is having difficulty using ccache, yet it is one of components that appears to not be present in your list; although the user is also explicitly asking how to build not using ccache. I explicitly use ccache.

[MENTION=884845]strix[/MENTION]

Some more from my manual log of what I did to build my environment, which may help, Obviously the paths may need to be changed to match up with what you are using. I put everything off of "$HOME/android", and I explicitly create the path and associate the path with ccache.

...snip...
mkdir -p ~/android/.ccache;

gedit ~/.bashrc
export USE_CCACHE=1;
#export CCACHE_COMPRESS=0;
export CCACHE_DIR=$HOME/android/.ccache;
# echo qwerty | sudo -S mount -t vboxsf Transfer ~/Transfer/;
ccache -M 20G
export ANDROID_JACK_VM_ARGS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx8G"
#export LANG=C
export LC_ALL=C
...snip...

However, from the above, to disable ccache, I would assume that the actual setting is

export USE_CCACHE=0;
[Android] NepoRood:
The list comes straight from the Android source site, was basically a reference, I only mentioned it because the quoted user didn't say anything about installing the packages (these days, you never know)

Keeping it one line is a good way to keep up with what you are installing, any time I've had to do a reinstall, I always miss something, or something is outdated and no longer used, lol

Not exporting any ccache variables should stop it from working, if you don't turn it on, then you don't have to turn it off. I would think anyway.

[MENTION=884845]strix[/MENTION], after you setup the environment (ie: run the command ". build/envsetup.sh"), you have to run the lunch menu, did you do that?

You either have to lunch the device and then use the make command, or, brunch the device.
[Android] knaik95:
Hey, do you still need android_hardware_lineage_lineagehw when building LOS-17.1-based ROMs? There's no lineage-17.1 branch on github.
[Android] vsoma:
You should check this telegram group out xxxxx

---------- Post added at 08:36 AM ---------- Previous post was at 08:29 AM ----------

[/COLOR]Guys, so I've had some experience building, and that was nearly 4 years ago so I pretty much got brainwashed....I've been going through 3 different guides and ultimately compile a super-guide that I can go through once and understand and probably refresh my memory.... I've built for the nexus 6 and im pretty sure that is easier than building for a Samsung Note which i am trying to do now. Please take a look at my knowledge and tell me if I got something wrong.

https://hastebin.com/gunazudiri.shell

I have a few questions

1) In step 5 do we still need to the boot-animation **** with the newer android versions or was that for older androids

2) Im not sure I understand how to setup ccache for android 10 that is mentioned in step 6

3) Am i missing any steps?????
[Android] MADGENIUSGAMER:
Link error

I'm trying to compile Evolution X for Redmi k20 pro and I'm getting these errors

while syncing:

error: Cannot link file make/core to /home/tanuj/evox/build/core

error: Cannot link file make/target to /home/tanuj/evox/build/target

error: Cannot link file make/tools to /home/tanuj/evox/build/tools

While buildiong:

error: build/tools/fs_config/Android.bp:15:1: module "soong-fs_config" already defined

build/make/tools/fs_config/Android.bp:15:1 <-- previous definition here

19:56:10 soong minibootstrap failed with: exit status 1

If I can link these 2 directories my build will compile successfully , and I tried "ln" directory 1 directory2 to try to link them , but it fails. Can someone help please??
[Android] riyan65:
I am trying to build pixel experience but I am getting this error can anyone help me out.
[Android] gipsy.danger:
where is your local manifest, dt and kernel located?
[Android] riyan65:
My local manifest is in .repo

Device tree in device folder

And kernal of the device is in kernal folder.
[Android] robin ck:
Help AOSP Build Error

I am receiving this error.

'out/target/product/device/obj/SHARED_LIBRARIES/libserviceutility_intermediates/export_includes', needed by 'out/target/product/device/obj/SHARED_LIBRARIES/libaudiopolicyservice_intermediates/import_includes', missing and no known rule to make it

any help?:confused::(
[Android] gipsy.danger:
share your dt, kernel and other resources.
[Android] riyan65:
Name of the tree or the location of the tree?
[Android] gipsy.danger:
github links of your resources you are using to build.
[Android] riyan65:
resources i used to build the rom, but got failed.

kernal:-https://github.com/jhenrique09/android_kernel_motorola_msm8937/tree/lineage-15.1

vendor:-https://github.com/Sohamlad7/android_vendor_motorola_cedric

device tree:-https://github.com/jhenrique09/android_device_motorola_cedric
[Android] gipsy.danger:
what version are you trying to build?

also fork these resources in your own github.
[Android] riyan65:
I am trying to build pixel electrode 10 for Cedric.
[Android] gipsy.danger:
the dt is not meant for 10, it was last updated like 2yrs ago.

if you have no prior experience in building then it will be quite difficult to proceed.
[Android] riyan65:
Actually, i am new to this, so I don't know much about building the rom.so I am just following this guild.

As you said the device tree was outdated, I found other one which was updated last 4-5 month back. After trying with new device tree, I got this errors.

Device tree:-https://github.com/Sohamlad7/android_device_motorola_cedric
[Android] gipsy.danger:
is this your github dt?

if not then you can't simply use one dt for all roms.

pe is based in aosp thus you can't directly use a lineage dt.

you need to learn basics before you jump directly to rom building.

there are many guides online on how to port a rom for a specific device.
[Android] riyan65:
Could you give me some guild links. That will helpful to learn how to do it. And thanks for helping

---------- Post added at 11:21 AM ---------- Previous post was at 11:21 AM ----------

Could you give me some guild links. That will helpful to learn how to do it. And thanks for helping.
[Android] zacox123:
Hi all,

I was trying to build by myself this ROM: https://xdaforums.com/redmi-4a/development/rom-redmi-4a-pixel-experience-plus-t4079399

I need that in eng mode, and If I succed in build the classic one I will add some flags in kernel configuration to enable namespacing (I need to run containers inside Android)

I have started by the Pixel Experience (https://github.com/PixelExperience/manifest) + the kernel mentioned in the post

kernel: https://github.com/Thagoo/Triton_kernel_xiaomi_msm8917 in kernel/xiaomi/msm8917

vendor: https://github.com/Thagoo/android10_rolex_vendor_xiaomi in vendor/xiaomi

device: https://github.com/PixelExperience-Devices/device_xiaomi_rolex in device/xiaomi/rolex (it is fetched at lunch aosp_rolex-eng)

during build I got this error:

$ mka bacon -j4
...
FAILED: /home/ato/out/soong/build.ninja
/home/ato/out/soong/.bootstrap/bin/soong_build -t -l /home/ato/out/.module_paths/Android.bp.list -b /home/ato/out/soong -n /home/ato/out -d /home/ato/out/soong/build.ninja.d -globFile /home/ato/out/soong/.bootstrap/build-globs.ninja -o /home/ato/out/soong/build.ninja Android.bp
error: vendor/google/customization/interfaces/wifi_ext/libs/Android.bp:49:1: dependency "vendor.google.wifi_ext@1.0" of "vendor.google.wifi_ext@1.0-service-vendor" missing variant:
arch:android_arm_armv7-a-neon, image:vendor, link:shared, version:
available variants:
link:shared, version:
link:static, version:
error: vendor/google/customization/interfaces/wifi_ext/libs/Android.bp:49:1: dependency "libwifi-pex" of "vendor.google.wifi_ext@1.0-service-vendor" missing variant:
arch:android_arm_armv7-a-neon, image:vendor, link:shared, version:
available variants:
link:shared, version:
link:static, version:
09:00:46 soong bootstrap failed with: exit status 1

Any suggestion?
[Android] AmirHRC:
hello everyone who can tell me what's is this error

iget thi while trying to build derpfest android 10 rom

/bin/bash: out/host/linux-x86/bin/inserkeys.py no such file or directory
[Android] gran_lexu:
Hey guys,

I have been learnirng how to build this weeks before, I have managed to successfully built PA Plus for my device (XIAOMI MI9SE sdm710), but now Im facing a big issue trying to build AOSPA, could anyone help me?

I have been looking for A LOT of info but found nothing:

vendor/qcom/opensource/interfaces/bluetooth_audio/1.0/Android.bp:3:1: failed to find variation "android_arm64_armv8-a_cortex-a75" for module "prebuilt_com.qualcomm.qti.bluetooth_audio@1.0 " needed by "com.qualcomm.qti.bluetooth_audio@1.0"

Thank you!

[
[Android] ParanoidNemo:
Hi all,

getting this while building LineageOS 17.1 for suzu.

I'm a little bit confuse because it seems everything in order to me on the building kernel side (I mean, on aosp Q works without problem and I cannot understand what's wrong here)

following my sources:

device

common

platform

I would like to make the ROM build the kernel if possible instead of building it myself and then using it, but if it's the only solution I'll do it.

Thanks in advance
[Android] quake73:
You need a line in your boardconfig.mk: TARGET_KERNEL_SOURCE := /location where you synced the kernel source/

The build process searches in kernel/sony/suzu but the kernel is not there. Maybe you have TARGET_KERNEL_SOURCE := kernel/sony/suzu but you put the kernel elsewhere? Modify your local manifests and put the kernel in kernel/sony/suzu.
[Android] ParanoidNemo:
That's the part that confuse me, sorry I haven't explained correctly before. The kernel source (kernel-dtb-suzu.gz) are in device/sony/common-kernel (or something like that, i don't remember exactly now) and I've tried to add it to BoardConfig.mk but in that case the building process say that I'm using a prebuilt kernel and that I should avoid it, and then anyway throw the same error. Also in aosp guide for xperia x (suzu) sony said that the source came with a prebuilt kernel but then it as built during the aosp building process. I'm really confused and I don't know where to check if effectively I've a prebuilt kernel or source downloaded.

--EDIT--

solved! There was a conflicting .mk file in the tree that caused the error, removing it made the kernel compile correctly in the default position. Thank you [MENTION=5366380]quake73[/MENTION] for pointing me in the right direction.

Having another problem now, however: the build complete without errors but the generated .zip file is not flashable through TWRP, it gave "Error 7" even if it should not (same tree used for aosp and the zip are flashable). If someone could help me I have uploaded the resulting .zip file here. Note aside: I have already tried to remove the assert for device checking on the updater-script inside the zip but the same error is thrown by TWRP.
[Android] quake73:
Check the recovery log immediately after flashing stops. At the bottom of that log you'll see where and what exactly is wrong with the zip. You can see which step of the flashing process fails.

Getting that log is easy: https://rootzwiki.com/topic/24120-how-to-get-a-log-from-twrp/
[Android] ParanoidNemo:
Thank you again, here the end part of the TWRP log where the error is showed. The strange thing to me is that I've read a updater-script from other ROMS (flash zip that obviously works) and it use the same /tmp/install directory that is indicated in mine as an error. I've to add something before? also why Lineage create a "non-flashable" zip? This doesn't make sense for me, even if surely is my ignorance and not Lineage team fault.
[Android] quake73:
I'll make a blind guess that you don't have an install folder in your .zip file. If that's the case, what I would do, is copy the Install folder from another rom's zip file (which contains that folder) into yours. I'm not sure if it's compatible among roms, the folder contains only 2 files, backup something.