Skip to content

Instantly share code, notes, and snippets.

@irf266
Last active June 21, 2024 21:36
Show Gist options
  • Save irf266/f2a2d2737a0cb43635c03c61a196ac6b to your computer and use it in GitHub Desktop.
Save irf266/f2a2d2737a0cb43635c03c61a196ac6b to your computer and use it in GitHub Desktop.
troubleshooting-rom-build-erros

Common Android build errors

Here are a list of build errors and their solutions that I've encountered since I started building custom ROMs. Execute these commands at the root of ROM folder.

I hope this will help others in fixing their build mistakes.

VINT compatibility check failed

Use compatible trees. For example, do not use Android 11 trees for building Android 12.

FAILED: /home/user/android/out/target/product/device_codename/dtb.img

Use proton-clang instead of pre-included clang.

git clone https://github.com/kdrag0n/proton-clang prebuilts/clang/host/linux-x86/clang-proton --depth=1

Change TARGET_KERNEL_CLANG_VERSION := XXXXXX in BoardConfigCommon.mk to TARGET_KERNEL_CLANG_VERSION := proton or include it if it's not there yet.

aarch64-linux-android-gcc: No such file or directory

To fix, clone related files from another repo.

First, remove the directory with:

rm -rf prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9

Then, clone the new repo with

git clone https://github.com/LineageOS/android_prebuilts_gcc_linux-x86_aarch64_aarch64-linux-android-4.9 -b lineage-19.0 prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9

Change the branch according to Android version.

Error occured during OTA: Sum of sizes in qti_dynamic_partitions_partition_list is X, which is greater than qti_dynamic_partitions_size (Y)

This might occur when building with GApps, including MiuiCam/ANXCamera or other extra stuff. To resolve, change BOARD_QTI_DYNAMIC_PARTITIONS_SIZE := Y to BOARD_QTI_DYNAMIC_PARTITIONS_SIZE := X in BoardConfigCommon.mk.

Missing resources from org.lineageos.settings.

This error happens when including something (most likely XiaomiParts) that depends on the module. Simply include the module with:

git clone https://github.com/lineageos/android\_packages\_resources\_devicesettings packages/resources/devicesettings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment