FAQs and Common Error while building Custom ROMs. - Android Q&A, Help & Troubleshooting
Disclaimer:
Code:
All these FAQs and Solutions are taken from my knowledge and experience if anything wrong please point out so I can correct it.And feel free to add more FAQs and Errors from your side
Disclaimer: All these FAQs and Solutions are taken from my knowledge and experience if anything wrong please point out so I can correct it.And feel free to add more FAQs and Errors from your side
FAQ #1 : Easiest way to setup build environment ?
Answer: Their is a script will will make all the work easy by @akhilnarang
Steps to be followed:
Code:
git clone https://github.com/akhilnarang/scripts
cd scripts
bash setup/<name of script>
FAQ #2: Which is the best distro to build custom rom?
Answer: I will always recommend to use Ubuntu 14.04
Download Link : DOWNLOAD NOW
FAQ #3:If I have low internet speed how to sync sources that too 60Gb and all?
Answer: Use Google cloud Platform which is the best because internet speed syncs source within half an hour build speed max 2hour first build then less than 30mins
FAQ #4: Is any programming language required to study while building ROMs?
Answer: Absolutely No since for making roms from source you just require BASIC English thats it and few logic how does fuctions work etc.
FAQ #5: I have MacBook can I built on it since it is having BASH terminal?
Answer:Sure you don't need to install another distro inbuilt Mac OS is enough.
FAQ #6: While building it stopped what to do ?
Answer: Simplest way is copy whole data and paste in any IDE and search for "FAILED:" line and read it understand what made wrong then google how to fix it,Few common errors and their fixed are their below just bookmark if you need.
FAQ #7:I Googled still not found a solution how to fix it ?
Answer: Their are many ways ask on XDA else you get contact with developer of that rom message him and resolve it.
FAQ #8: Is there any full tutorial for NOOB users ?
Answer:
1 [[GUIDE][COMPLETE] Android ROM Development From Source To End
2 [GUIDE]A Noob Guide On Building Your Own Custom Kernel (ARM & MTK) (ARM64 coming)
3 [GUIDE][COMPLETE]How to build ROM with Google Cloud
FAQ #9: What is Cherry-picking is please explain?
Answer: It is actually taking a feature of one rom and then add to your rom by giving proper credits to author etc.There is a good tutorial for doing this refer to this
How to apply patches to the source ?.This will surely help you a lot.
FAQ #10: Is there any place where I can get full details of rom files folders etc ?
Answer: Yes there is an awesome post explaining everything.
[GUIDE] Understanding the Android Source Code
FAQ #11: I have one commit which is commit but I need to add proper author to it what to do?
Answer:
git commit --amend --author="NAME "
This will add author to last commit
FAQ #12: I have done changes I need to overwrite the commit its not allowing asking for pull and retry like that.
Answer: do same git push command just add " -f " tag so it overwrites the git.
for e.g.: " git push GitHub 7x -f "instead of "git push GitHub 7x "
FAQ #13: Any Simple way to resolve conflicts while cherry-picking ?
Answer: The best way is to use search tool and search for ">>>","<<<","===" remove, add keep both depending on code.Second Method is by using GitHub as search.
FAQ #14: Is there any simpler way to check cherry-picked correctly or not since building whole ROM takes time.
Answer: Build only the required package to check if it worked correctly then build Rom as whole .For e.g. you made changes to kernel and device tree in that case just use time mka boot image rather than time mka bacon.
FAQ #15:How to remove snap camera from building?
Answer:Remove Snap from BoardConfig and use zip contents and manifest to see what permissions to do, use PRODUCT_COPY_FILES command
FAQ #16: How is flashable ZIP of kernels made ?
Answer:Android zips have updater-script which is programmed in edifier,You basically need to make a flashable zip which would write boot.img into /dev/block/bla/bla/boot.
FAQ #17: Should I dexpreopt my builds?
Answer: Not necessary it is just first boot speeding up and take extra size around 100mb more.
FAQ #18: What does boot.img contain?
Answer: it has kernel and ramdisk
FAQ #19 What are BLOBS?
Answer: Blobs are vendor files and prebuilt libs which are found in system, importing them is copy paste + the mk file, It's usually found in /system/vendor and /system/lib.
Common Errors:
All these erros I mention are faced by me and solution which I did is written along.
#1:
libwpa_qmi_eap_proxy_
intermediates/export_includes', needed by '/home/vibhoothiiaanand/nuclea/out/target/product/oneplus2/obj/EXECUTABLE
S/wpa_supplicant_intermediates/import_includes', missing and no known rule to make it
make: *** [ninja_wrapper] Error 1
Solution:
First check wheather your vendor repo is broken or not or is it included or not if not clone it from correct source.
Clone wpa supplicant ,wpa_supplicant8 from lineageos and retry it
#2:Build is successful but its not booting what to do?
Solution: Make another build with permissive by adding
"androidboot.selinux=permissive" to BoardConfig.mk it should work.
#3:I have synced device tree but device is not showing in breakfast nor lunch menu
Solution:
1.first change romname.mk file to your rom name ,for e.g. you synced Du tree and trying to make nitrogen rom so mv du.mk nitrogen.mk.
2.Change vendorsetup.sh make appropriate name of device name with rom.
3.Change .dependencies name to rom name for e.g.. du.dependencies make it nitrogen.dependencies
4.Make AndroidProducts.mk and call device.mk from it.
Will show you how things are done.
Oneplus2 device tree modded for supporting VertexOS: Vertex-fy
Oneplus2 device tree modded for supporting Candy Rom :Candify
there will be so much commits like this just git search then your good to go.
This must be general case for most of the rom and devices just refer this.
#4:
ninja: error: '/home/vibhoothiiaanand/nitrogen/out/target/product/oneplus2/obj/SHARED_LIBRARIES/libqdutils_intermediates/export_includes', needed by '/home/vibhoo
thiiaanand/nitrogen/out/target/product/oneplus2/obj/SHARED_LIBRARIES/libsurfaceflinger_intermediates/import_includes', missing and no known rule to make it
make: *** [ninja_wrapper] Error 1
Solution:
this is common error and its due to missing hardware BLOBs so to fix this there are few things to clone
these files are to cross checked if not clone from lineage
hardware/qcom/display
hardware/qcom/display-caf
hardware/qcom/audio
hardware/qcom/audio-caf
hardware/qcom/media
hardware/qcom/media-caf
hardware/qcom/bootctrl
hardware/qcom/bt
hardware/qcom/bt-caf
hardware/qcom/camera
hardware/qcom/gps
hardware/qcom/wlan
hardware/qcom/wlan-caf
hardware/qcom/keymaster
and for cloning I will show you how its done for Oneplus2
git clone https://github.com/LineageOS/android_hardware_qcom_display.git -b cm-14.1 hardware/qcom/display/msm8994
git clone https://github.com/LineageOS/android_hardware_qcom_audio.git -b cm-14.1 hardware/qcom/audio/msm8994
git clone https://github.com/LineageOS/android_hardware_qcom_media.git -b cm-14.1 hardware/qcom/media/msm8994 git clone https://github.com/LineageOS/android_hardware_qcom_display.git -b cm-14.1-caf-8994 hardware/qcom/display-caf/msm8994
git clone https://github.com/LineageOS/android_hardware_qcom_audio.git -b cm-14.1-caf-8994 hardware/qcom/audio-caf/msm8994
git clone https://github.com/LineageOS/android_hardware_qcom_media.git -b cm-14.1-caf-8994 hardware/qcom/media-caf/msm8994
#5
device/generic/goldfish/data/etc/apns-conf.xml', needed by '/home/vibhoothiiaanand/nitrogen/out/target/product/oneplus2/system/etc/apns-conf.xml',
missing and no known rule to make it.
Solution:
just clone generic/goldfish from google since its old AF in lineage source
git clone https://android.googlesource.com/device/generic/goldfish device/generic/goldfish
#6
frameworks/native/build/phone-xxxhdpi-4096-dalvik-heap.mk" does not exist. Stop.
Solution:
Fix is just cherry-pick this commit
https://github.com/CyanogenMod/andr...mmit/6500d428ce816ffa0ba099221a4987ad7bfcb4ab
Done it must be fixed
#7
ERROR: couldn't find ro.product.model in build.prop
Solution:
This is not that common but this happens while compiling
fix is cherry-pick this commit
https://github.com/AICP/build/commit/df574f3e6ae115425b2c25e5b5e6772503ca0f65
#8
Model number unknown.
Solution:
Go to device tree and open init/init*.cpp make device name and instead of std::string device = property_get("ro..device"); change to std::string device = property_get("ro.product.device");
#9
Deleting obsolete path /home/vibhoothiiaanand/vertex/device/oneplus/oneplus2
Deleting obsolete path /home/vibhoothiiaanand/vertex/device/oppo/common
Deleting obsolete path /home/vibhoothiiaanand/vertex/kernel/oneplus/msm8894
Deleting obsolete path /home/vibhoothiiaanand/vertex/vendor/oneplus
Solution:
this is due to not declaring repos in local manifest
#10 Broken gestures
for this two things must be noted kernel and device common must match the node names in case of oneplus2
in kernel: drivers/input/touchscreen/synaptics_driver_s3320.c and configpanel/src/com/cyanogenmod/settings/device/utils/Constants.java should match node declaration values
#11 Dex2oated errors
it usually look like this
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
For this easy fix is disabling dexpreopt
#12 ninja: error: '/home/vibhoothiiaanand/vertex/out/target/common/obj/JAVA_LIBRARIES/rcscommon_intermediates/javalib.jar', needed by '/home/vibhoothiiaanand/vertex/out/target/product/oneplus2/dex_bootjars/system/framework/arm64/boot.art', missing and no known rule to make it
make: *** [ninja_wrapper] Error 1
make: Leaving directory `/home/vibhoothiiaanand/vertex'
For me this happened while building vertex for that I removed telephony entry from android_vendor_vertex/config/common.mk
#13 /out/target/product/oneplus2/obj/SHARED_LIBRARIES/libdhcpcd_intermediates/export_includes', needed by '/home/coolmohammad98/cr/out/target/product/oneplus2/obj/EXECUTABLES/ipacm_intermediates/
Solution
For this clone https://github.com/lineageos/android_external_libnfnetlink and then your good to go
Credit:
Special Thanks to @MZO
?
I was trying to build a rom for the h830 but i got this error similar to number 12 if you could help me out
make: *** No rule to make target '/home/melwyn/du/out/target/common/obj/JAVA_LIBRARIES/tcmiface_intermediates/javalib.jar', needed by '/home/melwyn/du/out/target/product/h830/dex_bootjars/system/framework/arm64/boot.art'. Stop.
make: *** Waiting for unfinished jobs....
host C: libssl_static-host_32 <= external/boringssl/src/ssl/tls_record.c
Full log https://pastebin.com/XftevYy2
Even if it takes a lot of time, can we build a ROM with 2GB RAM with patience ?
I am building hexagon rom for mi max 2
I got this error plea help me. How to fix this?
Any other troubleshooting tips on why a build won't boot?
FAILED: /home/abhivarma362/pix/out/soong/build.ninja
/home/abhivarma362/pix/out/soong/.bootstrap/bin/soong_build -t -l /home/abhivarma362/pix/out/.module_paths/Android.bp.list -b /home/abhivarma362/pix/out/soong -n /home/abhivarma362/pix/out -d /home/abhivarma362/pix/out/soong/build.ninja.d -o /home/abhivarma362/pix/out/soong/build.ninja Android.bp
error: system/bt/include/Android.bp:1:1: module "avrcp_headers" variant "linux_glibc_x86_64": source path oneplus/oneplus2/sepolicy/bluetooth does not exist
error: system/bt/types/Android.bp:9:1: module "libbluetooth-types" variant "linux_glibc_x86_64_static": source path oneplus/oneplus2/sepolicy/bluetooth does not exist
error: system/bt/types/Android.bp:9:1: module "libbluetooth-types" variant "linux_glibc_x86_64_static": source path oneplus/oneplus2/sepolicy/bluetooth does not exist
error: system/bt/packet/base/Android.bp:1:1: module "lib-bt-packets-base" variant "linux_glibc_x86_64_static": source path oneplus/oneplus2/sepolicy/bluetooth does not exist
ninja: build stopped: subcommand failed.
15:21:48 soong bootstrap failed with: exit status 1
what is this
Hello respected developers,
I loved the rom viper Os on my redmi 4a. I'm very enthusiastic and inspired by viper os to develop it for my other devices too. But first I tried to build the rom for my redmi 4a because i wanted to test the success of my building. I would like to inform you that i have gone through every process of establishing environment to reposync all learnig from aosp document and manifests on the viper os github and even downloaded device tree,vendor and kernel as from hayeki's git hub . and i made neccessary edits to androidproducts.mk , lineage_rolex.mk to naming viper_rolex.mk and setting device path.
And finally i proceeded by :
./build-envsetup.sh
lunch viper_rolex-userdebug
mka poison
The build process then followed for about 5 hrs and i was hopefully waiting close success but alas! I came up with a error given this way:
Warning: Stripped invalid locals information from 2 methods.
In /home/shrawan/Desktop/workon_viper/out/soong/.intermediates/frameworks/base/packages/EasterEgg/EasterEgg/android_common/combined/EasterEgg.jar:kotlin/collections/SlidingWindowKt$windowedIterator$1.class:
Methods with invalid locals information:
java.lang.Object kotlin.collections.SlidingWindowKt$windowedIterator$1.doResume(java.lang.Object, java.lang.Throwable)
In /home/shrawan/Desktop/workon_viper/out/soong/.intermediates/frameworks/base/packages/EasterEgg/EasterEgg/android_common/combined/EasterEgg.jar:kotlin/sequences/SequencesKt___SequencesKt$zipWithNext$2.class:
Methods with invalid locals information:
java.lang.Object kotlin.sequences.SequencesKt___SequencesKt$zipWithNext$2.doResume(java.lang.Object, java.lang.Throwable)
Some warnings are typically a sign of using an outdated Java toolchain. To fix, recompile the source with an updated toolchain.
[ 82% 60970/74331] build /home/shrawan...icy_tests_intermediates/sepolicy_tests
FAILED: /home/shrawan/Desktop/workon_viper/out/target/product/rolex/obj/ETC/sepolicy_tests_intermediates/sepolicy_tests
/bin/bash -c "(/home/shrawan/Desktop/workon_viper/out/host/linux-x86/bin/sepolicy_tests -l /home/shrawan/Desktop/workon_viper/out/host/linux-x86/lib64/libsepolwrap.so -f /home/shrawan/Desktop/workon_viper/out/target/product/rolex/obj/ETC/plat_file_contexts_intermediates/plat_file_contexts -f /home/shrawan/Desktop/workon_viper/out/target/product/rolex/obj/ETC/vendor_file_contexts_intermediates/vendor_file_contexts -p /home/shrawan/Desktop/workon_viper/out/target/product/rolex/obj/ETC/sepolicy_intermediates/sepolicy ) && (touch /home/shrawan/Desktop/workon_viper/out/target/product/rolex/obj/ETC/sepolicy_tests_intermediates/sepolicy_tests )"
The following types on /data/ must be associated with the "core_data_file_type" attribute: netmgrd_data_file
[ 82% 60975/74331] //bionic/libc:commo...ioner preprocess include [linux_glibc]
warning: attempted to generate guard with empty availability: obsoleted = 23
warning: attempted to generate guard with empty availability: obsoleted = 21
ninja: build stopped: subcommand failed.
11:58:35 ninja failed with: exit status 1
#### failed to build some targets (04:38:04 (hh:mm:ss)) ####
I did a enough of the search in and out of the forum but i couldn't able to know what problem is this and i dont have any idea how to solve this. Please give me some light on what problem is this and guide me where should i be looking to solve. I have a great enthusiasm of learning but this problem solution isn't available or discussed properly in any place or maybe i didn't find the place where to look. Please help me on this[/QUOTE]
#AbitathaRoy said:
Even if it takes a lot of time, can we build a ROM with 2GB RAM with patience ?
Click to expand...
Click to collapse
you mean for a device with 2 GB ram ? or meant your building computer's ram...well if you meant for your computer then you can create a swap partition of about 4-6GB and linux will use it as virtual ram
I encountered the same problem
abhijiths362 said:
FAILED: /home/abhivarma362/pix/out/soong/build.ninja
/home/abhivarma362/pix/out/soong/.bootstrap/bin/soong_build -t -l /home/abhivarma362/pix/out/.module_paths/Android.bp.list -b /home/abhivarma362/pix/out/soong -n /home/abhivarma362/pix/out -d /home/abhivarma362/pix/out/soong/build.ninja.d -o /home/abhivarma362/pix/out/soong/build.ninja Android.bp
error: system/bt/include/Android.bp:1:1: module "avrcp_headers" variant "linux_glibc_x86_64": source path oneplus/oneplus2/sepolicy/bluetooth does not exist
error: system/bt/types/Android.bp:9:1: module "libbluetooth-types" variant "linux_glibc_x86_64_static": source path oneplus/oneplus2/sepolicy/bluetooth does not exist
error: system/bt/types/Android.bp:9:1: module "libbluetooth-types" variant "linux_glibc_x86_64_static": source path oneplus/oneplus2/sepolicy/bluetooth does not exist
error: system/bt/packet/base/Android.bp:1:1: module "lib-bt-packets-base" variant "linux_glibc_x86_64_static": source path oneplus/oneplus2/sepolicy/bluetooth does not exist
ninja: build stopped: subcommand failed.
15:21:48 soong bootstrap failed with: exit status 1
what is this
Click to expand...
Click to collapse
Do you have resolved it? I find bluetooth-types appearance in moudle_info.json. I want to delete it, but I don't know what has auto generate the module_info .
azwane said:
Hello respected developers,
I loved the rom viper Os on my redmi 4a. I'm very enthusiastic and inspired by viper os to develop it for my other devices too. But first I tried to build the rom for my redmi 4a because i wanted to test the success of my building. I would like to inform you that i have gone through every process of establishing environment to reposync all learnig from aosp document and manifests on the viper os github and even downloaded device tree,vendor and kernel as from hayeki's git hub . and i made neccessary edits to androidproducts.mk , lineage_rolex.mk to naming viper_rolex.mk and setting device path.
And finally i proceeded by :
./build-envsetup.sh
lunch viper_rolex-userdebug
mka poison
The build process then followed for about 5 hrs and i was hopefully waiting close success but alas! I came up with a error given this way:
Warning: Stripped invalid locals information from 2 methods.
In /home/shrawan/Desktop/workon_viper/out/soong/.intermediates/frameworks/base/packages/EasterEgg/EasterEgg/android_common/combined/EasterEgg.jar:kotlin/collections/SlidingWindowKt$windowedIterator$1.class:
Methods with invalid locals information:
java.lang.Object kotlin.collections.SlidingWindowKt$windowedIterator$1.doResume(java.lang.Object, java.lang.Throwable)
In /home/shrawan/Desktop/workon_viper/out/soong/.intermediates/frameworks/base/packages/EasterEgg/EasterEgg/android_common/combined/EasterEgg.jar:kotlin/sequences/SequencesKt___SequencesKt$zipWithNext$2.class:
Methods with invalid locals information:
java.lang.Object kotlin.sequences.SequencesKt___SequencesKt$zipWithNext$2.doResume(java.lang.Object, java.lang.Throwable)
Some warnings are typically a sign of using an outdated Java toolchain. To fix, recompile the source with an updated toolchain.
[ 82% 60970/74331] build /home/shrawan...icy_tests_intermediates/sepolicy_tests
FAILED: /home/shrawan/Desktop/workon_viper/out/target/product/rolex/obj/ETC/sepolicy_tests_intermediates/sepolicy_tests
/bin/bash -c "(/home/shrawan/Desktop/workon_viper/out/host/linux-x86/bin/sepolicy_tests -l /home/shrawan/Desktop/workon_viper/out/host/linux-x86/lib64/libsepolwrap.so -f /home/shrawan/Desktop/workon_viper/out/target/product/rolex/obj/ETC/plat_file_contexts_intermediates/plat_file_contexts -f /home/shrawan/Desktop/workon_viper/out/target/product/rolex/obj/ETC/vendor_file_contexts_intermediates/vendor_file_contexts -p /home/shrawan/Desktop/workon_viper/out/target/product/rolex/obj/ETC/sepolicy_intermediates/sepolicy ) && (touch /home/shrawan/Desktop/workon_viper/out/target/product/rolex/obj/ETC/sepolicy_tests_intermediates/sepolicy_tests )"
The following types on /data/ must be associated with the "core_data_file_type" attribute: netmgrd_data_file
[ 82% 60975/74331] //bionic/libc:commo...ioner preprocess include [linux_glibc]
warning: attempted to generate guard with empty availability: obsoleted = 23
warning: attempted to generate guard with empty availability: obsoleted = 21
ninja: build stopped: subcommand failed.
11:58:35 ninja failed with: exit status 1
#### failed to build some targets (04:38:04 (hh:mm:ss)) ####
I did a enough of the search in and out of the forum but i couldn't able to know what problem is this and i dont have any idea how to solve this. Please give me some light on what problem is this and guide me where should i be looking to solve. I have a great enthusiasm of learning but this problem solution isn't available or discussed properly in any place or maybe i didn't find the place where to look. Please help me on this
Click to expand...
Click to collapse
[/QUOTE]
I guess something is wrong with your sepolicy rules
Go to device/xiaomi/rolex/sepolicy folder
and look at file_contexts file
(also check /device/xiaomi/*-common folder
if you have any for your device)
compare it with other developers/maintainers device tree
also To be safe look at whole folder
thank you i will be looking it
azwane said:
I guess something is wrong with your sepolicy rules
Go to device/xiaomi/rolex/sepolicy folder
and look at file_contexts file
(also check /device/xiaomi/*-common folder
if you have any for your device)
compare it with other developers/maintainers device tree
also To be safe look at whole folder
Click to expand...
Click to collapse
[/QUOTE]
????
hello I have this problem, I tried 2 roms and had the same error if you can help me: [100% 1/1] /home/waynee/android/evox/out/soong/.minibootstrap/minibp /home/wayne
FAILED: /home/waynee/android/evox/out/soong/.bootstrap/build.ninja
/home/waynee/android/evox/out/soong/.minibootstrap/minibp -t -l /home/waynee/android/evox/out/.module_paths/Android.bp.list -b /home/waynee/android/evox/out/soong -n /home/waynee/android/evox/out -d /home/waynee/android/evox/out/soong/.bootstrap/build.ninja.d -globFile /home/waynee/android/evox/out/soong/.minibootstrap/build-globs.ninja -o /home/waynee/android/evox/out/soong/.bootstrap/build.ninja Android.bp
error: vendor/evolutionx/build/soong/Android.bp:1:1: module "soong-aosp" already defined
vendor/aosp/build/soong/Android.bp:1:1 <-- previous definition here
error: vendor/evolutionx/build/soong/Android.bp:9:1: module "soong-custom-generator" already defined
vendor/aosp/build/soong/Android.bp:9:1 <-- previous definition here
09:13:44 soong minibootstrap failed with: exit status 1
ninja: Entering directory `.'
ninja: error: '/.txt', needed by '/home/me/android/lineage/out/target/common/obj/PACKAGING/checkpublicapi-cm-last-timestamp', missing and no known rule to make it
make: *** [build/core/ninja.mk:152: ninja_wrapper] Error 1
[email protected]:~/android/lineage$
someone plz point me in the right direction I have been trying to build this OS for almost a month... and so far I've made it to 1%... barely...
do you was find solution for Soong issues ?
Related
Kernel compile error
Hello everyone. I have just started taking interest in the android world and have started to learn how to compile kernels. I own a SAMSUNG GALAXY S2 I9100G. I have downloaded the aosp kernel source for my mobile from the cyanogenmod's github. And followed guides to compile. (i was able to compile a stock kernel but am having problems in compilling an aosp kernel ) I follow these commands:- 1. Make cyanogenmod_i9100g_defconfig 2. Make menuconfig 3. Make -j4 And this is the error i get Code: /home/incarnation95/Downloads/arm-2011.03/bin/arm-none-eabi-ld: cannot open linker script file /arch/arm/mach-omap2/sec_omap.lds: No such file or directory make[1]: *** [arch/arm/mach-omap2/mailbox_mach.o] Error 1 make: *** [arch/arm/mach-omap2] Error 2 Can anyone help mr figure out where the problem might be? I did search 4-5 times before posting here but didnt find any solution. Thanks in advance
Was chatting with incarnation95 offline, on resolving this issue, so here's for the benefit of others facing this same problem . Go and open up the Makefile.sec , for my case the absolute path was : /home/currway/kernelmod/fuss132/arch/arm/mach-omap2# vi Makefile.sec In the content , find this line below and edit it to have the absolute path instead , so that sec_omap.lds can be references correctly: dflags-$(CONFIG_MACH_OMAP4_SAMSUNG) += \ -T /home/currway/kernelmod/fuss132/arch/arm/mach-omap2/sec_omap.lds
[Q] Make dist build from AOKP source
Hello there, I am trying to build a custom ROM for Samsung P3113 based on AOKP source on the jb branch. I was able to make "unofficial" release using "brunch aokp_p3113". However, when I attempted to make a distribution release, the "make -j4 dist" failed. The following are the commands I used: . build/envsetup.sh lunch aokp_p3113-userdebug make -j4 dist I got the following error messages: device/moto/stingray/recovery/recovery_ui.cpp:22:20: fatal error: device.h: No such file or directory compilation terminated. make: *** [out/target/product/p3113/obj/STATIC_LIBRARIES/librecovery_ui_stingray_intermediates/recovery_ui.o] Error 1 Can someone help? By the way, I don't need to build OTA package.
Found root cause Found the root cause - All the three header files needed by recovery_ui.cpp are missing. To workaround, I excluded the stingray recovery from the make, and the problem solved. Hopefully, someone in the AOKP team will add the missing files to repository.
✦✦✦ [GUIDE] Build LineageOS ✦ How To use Github ✦✦✦
{ "lightbox_close": "Close", "lightbox_next": "Next", "lightbox_previous": "Previous", "lightbox_error": "The requested content cannot be loaded. Please try again later.", "lightbox_start_slideshow": "Start slideshow", "lightbox_stop_slideshow": "Stop slideshow", "lightbox_full_screen": "Full screen", "lightbox_thumbnails": "Thumbnails", "lightbox_download": "Download", "lightbox_share": "Share", "lightbox_zoom": "Zoom", "lightbox_new_window": "New window", "lightbox_toggle_sidebar": "Toggle sidebar" } How-to Build LineageOS Introduction These instructions will hopefully assist you to start with a stock device, unlock the bootloader (if necessary), and then download the required tools as well as the very latest source code for LineageOS (based on Google’s Android operating system) for your device. Using these, you can build both LineageOS and LineageOS Recovery image from source code, and then install them both to your device. It is difficult to say how much experience is necessary to follow these instructions. While this guide is certainly not for the very very very uninitiated, these steps shouldn’t require a PhD in software development either. Some readers will have no difficulty and breeze through the steps easily. Others may struggle over the most basic operation. Because people’s experiences, backgrounds, and intuitions differ, it may be a good idea to read through just to ascertain whether you feel comfortable or are getting over your head. Remember, you assume all risk of trying this, but you will reap the rewards! It’s pretty satisfying to boot into a fresh operating system you baked at home . And once you’re an Android-building ninja, there will be no more need to wait for “nightly” builds from anyone. You will have at your fingertips the skills to build a full operating system from code to a running device, whenever you want. Where you go from there– maybe you’ll add a feature, fix a bug, add a translation, or use what you’ve learned to build a new app or port to a new device– or maybe you’ll never build again– it’s all really up to you. What you’ll need * A device (supported by LineageOS) * A relatively recent 64-bit computer (Linux, OS X, or Windows) with a reasonable amount of RAM and about 100 GB of free storage (more if you enable ccache or build for multiple devices). The less RAM you have, the longer the build will take (aim for 8 GB or more). Using SSDs results in considerably faster build times than traditional hard drives. * A USB cable compatible with the OnePlus One (typically micro USB) * A decent internet connection & reliable electricity * Some familiarity with basic Android operation and terminology. It would help if you’ve installed custom roms on other devices and are familiar with recovery. It may also be useful to know some basic command line concepts such as cd for “change directory”, the concept of directory hierarchies, that in Linux they are separated by /. etc. Summary 1. Install SDK 2. Install build packages 3. Java 4. Create the directories 5. Install the repo command 6. Initialize the LineageOS source repository 7. Download the source code 8.Prepare the device-specific code 9. Extract proprietary blobs 10. Turn on caching to speed up build 11. Configure jack 12. Start the build 13. Install the build Build LineageOS and LineageOS Recovery 1. Install SDK If you haven’t previously installed adb and fastboot, you can download them from Google. Extract it using: Code: unzip platform-tools-latest-linux.zip -d ~ Now we have to add adb and fastboot to our path. Open ~/.profile and add the following: Code: # add Android SDK platform tools to path if [ -d "$HOME/platform-tools" ] ; then PATH="$HOME/platform-tools:$PATH" fi Then, run this to update your environment. Code: source ~/.profile 2. Install build packages Several packages are needed to build LineageOS. You can install these using your distribution’s package manager. You’ll need: Code: bc bison build-essential ccache curl flex g++-multilib gcc-multilib git gnupg gperf imagemagick lib32ncurses5-dev lib32readline-dev lib32z1-dev liblz4-tool libncurses5-dev libsdl1.2-dev libssl-dev libwxgtk3.0-dev libxml2 libxml2-utils lzop pngcrush rsync schedtool squashfs-tools xsltproc zip zlib1g-dev For Ubuntu versions older than 16.04 (xenial), substitute: libwxgtk3.0-dev → libwxgtk2.8-dev 3. Java Different versions of LineageOS require different JDK (Java Development Kit) versions. LineageOS 11.0-13.0: OpenJDK 1.7 (install openjdk-7-jdk)* LineageOS 14.1: OpenJDK 1.8 (install openjdk-8-jdk) * Ubuntu 16.04 and newer do not have OpenJDK 1.7 in the standard package repositories. See Ask Ubuntu question How do I install openjdk 7 on Ubuntu 16.04 or higher Note that the suggestion to use PPA openjdk-r is outdated (the PPA has never updated their offering of openjdk-7-jdk, so it lacks security fixes); skip that answer even if it is the most upvoted. 4. Create the directories You’ll need to set up some directories in your build environment. To create them: Code: $ mkdir -p ~/bin $ mkdir -p ~/android/system 5. Install the repo command Enter the following to download the repo binary and make it executable (runnable): Code: $ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo $ chmod a+x ~/bin/repo Put the ~/bin directory in your path of execution In recent versions of Ubuntu, ~/bin should already be in your PATH. You can check this by opening ~/.profile with a text editor and verifying the following code exists (add it if it is missing): Code: # set PATH so it includes user's private bin if it exists if [ -d "$HOME/bin" ] ; then PATH="$HOME/bin:$PATH" fi Then, use this to update your environment. Code: source ~/.profile 6. Initialise the LineageOS source repository Enter the following to initialize the repository: Code: $ cd ~/android/system $ repo init -u https://github.com/LineageOS/android.git -b lineage-16.0 7. Download the source code To start the download of the source code to your computer: Code: $ repo sync The Lineage manifests include a sensible default configuration for repo, which we strongly suggest you use (i.e. don’t add any options to sync). For reference, our default values are -j 4 and -c. The -j 4 part means that there will be four simultaneous threads/connections. If you experience problems syncing, you can lower this to -j 3 or -j 2. -c will ask repo to pull in only the current branch, instead of the entire LineageOS history. 8. Prepare the device-specific code After the source downloads, ensure you’re in the root of the source code (cd ~/android/system), then type: You have to change DEVICE with the codename of your device (for example: Oneplus ONE codename is bacon) Code: $ source build/envsetup.sh $ breakfast "DEVICE" This will download your device’s device specific configuration and kernel. Important: Some maintainers require a vendor directory to be populated before breakfast will succeed. If you receive an error here about vendor makefiles, jump down to Extract proprietary blobs. The first portion of breakfast should have succeded, and after completing you can rerun breakfast 9. Extract proprietary blobs Method 1 Now ensure your device is connected to your computer via the USB cable, with ADB and root enabled, and that you are in the ~/android/system/device/your_device/codename folder. Then run the extract-files.sh script: Code: $ ./extract-files.sh The blobs should be pulled into the ~/android/system/vendor/your_device folder. If you see “command not found” errors, adb may need to be placed in ~/bin. Method 2 (Recomended) Search for your device blobs on TheMuppets or Donkeycoiote and add them to local manifest 10. Turn on caching to speed up build You can speed up subsequent builds by running: Code: $ export USE_CCACHE=1 And adding that line to your ~/.bashrc file. Then, specify the maximum amount of disk space you want cache to use by typing this from the top of your Android tree: Code: $ prebuilts/misc/linux-x86/ccache/ccache -M 50.0G Where 50G corresponds to 50GB of cache. This needs to be run once. Anywhere from 25GB-100GB will result in very noticeably increased build speeds (for instance, a typical 1hr build time can be reduced to 20min). If you’re only building for one device, 25GB-50GB is fine. If you plan to build for several devices that do not share the same kernel source, aim for 75GB-100GB. This space will be permanently occupied on your drive, so take this into consideration. See more information about ccache on Google’s Android build environment initialization page. 11. Configure jack Jack is the new Java compiler used from Lineage 14. It is known to run out of memory Simple fix is to run this command: Code: $ export JACK_SERVER_VM_ARGUMENTS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4096m" Adding that command to your ~/.bashrc file will automatically configure Jack to allocate a sufficient amount of memory. If this doesn't help, you can reduce the number of Jacks to 1 in config.properties $HOME/.jack-server/config.properties jack.server.max-service=1 12. Start the build Time to start building! Now, type: Code: $ croot $ brunch [COLOR="red"]device[/COLOR] Remember, device is the codename for your device The build should begin. 13. Install the build Assuming the build completed without errors (it will be obvious when it finishes), type the following in the terminal window the build ran in: Code: $ cd $OUT There you’ll find all the files that were created. The two files we’re interested in are: recovery.img, which is the LineageOS recovery image. lineage-14.1-build_date-UNOFFICIAL-device.zip, which is the LineageOS installer package. Success! So… what’s next? You’ve done it! Welcome to the elite club of self-builders. You’ve built your operating system from scratch, from the ground up. You are the master/mistress of your domain… and hopefully you’ve learned a bit on the way and had some fun too. Now, what to do next? You can jump to next section of this guide to understand how Github works and how to pick some commits from other developers/teams to improve your custom ROM This guide was taken from Official LineageOS wiki and all credits goes to LineageOS Maintainers
What is Github and how to use it GitHub is a code hosting platform for version control and collaboration. It lets you and others work together on projects from anywhere. It is a powerful tool with many features available and here i´m going to talk about how you can use it to help you build and customize your "Custom ROM" Summary 1. Repositories 2. How to add/remove repositories 3. How to add/remove remotes 4. Repository Fork 1. Repositories Now that you have built custom lineage from source to your device, you can explore deeper and see how things work and change them according to your needs. First we are going to se what is inside .repo folder Code: cd ~/working_dir/.repo ls It will show you something similar to this: Inside the .repo folder are the necessary "manifest files" that tell the repo sync command what to include or remove from our project when synchronizing with the source Open manifest.xml Code: gedit ~/working_dir/.repo/manifest.xml Inside that file you have all information about which repositories belongs to source. These are the base repositories to build LineageOS. Inside ~/working_dir/.repo/local_manifests/roomservice.xml you can see the repositories needed to build for your specific device. This file is created after breakfast device step and includes, besides others, device tree and kernel. 2. How to add/remove repositories Lets take a look at how we use roomservice.xml to add/remove repo's from our project, i will use Oneplus ONE device tree for example Code: <project name="LineageOS/android_device_oneplus_bacon" path="device/oneplus/bacon" remote="github" revision="cm-14.1" /> * project name="LineageOS/android_device_oneplus_bacon Name of repository (without https://github.com) * path="device/oneplus/bacon" Here is where the files will reside in our working directory * remote="github" Is the for remote we are using, in this case is github (see below how to add/remove remotes to your project) * revision="cm-14.1" Revision is the branch we want to sync Image: 3. How to add/remove remotes Code: <remote fetch="https://github.com" name="github" /> * remote fetch="https://github.com Url for remote you want to add to your project (in this case, we are working with github) * name="github" This is the name for remote Now that you understand the concept of repository, you can "fork" one and start making your changes and keep it up to date with LineageOS source. For that, you need a Github Account. 4. Repository Fork In this example, i will fork Oneplus ONE device tree 1. Create Github Account 2. Go to https://github.com/LineageOS/android_device_oneplus_bacon and tap on Fork button. After that you can see that repository on you Github account Image: 3. Now that you have "forked" one repository, you need to edit ~/working_dir/.repo/local_manifests/roomservice.xml and change the default location to your location on your github.[/SIZE] Image: This is the basic steps you need to understand how to use Github to keep your code saved and updated. On next section, i will tell you how use Git so you can work on your project and start to pick some cool commits from others projects.
Reserved
Reserved
Hello , Thanks for your tutorial. It was very well explained. I have a question in the step: "Prepare the device-specific code". The last available branche of my device at https://github.com/LineageOS/android_device_samsung_treltexx/tree/cm-13.0, is the cm-13.0 version, Should I tell which of the options on the device? $ Source build / envsetup.sh $ Breakfast "[COLOR =" Red] Samsung Galaxy Note 4 (Exynos) or treltexx [/ COLOR] Another question: since the last branche is from cm-13.0, if I follow your tutorial, will it compile a, lineage 14.1 rom? Or CYanogenmod 13.0? Thank you
John Jefferson said: Hello , Thanks for your tutorial. It was very well explained. I have a question in the step: "Prepare the device-specific code". The last available branche of my device at https://github.com/LineageOS/android_device_samsung_treltexx/tree/cm-13.0, is the cm-13.0 version, Should I tell which of the options on the device? $ Source build / envsetup.sh $ Breakfast "[COLOR =" Red] Samsung Galaxy Note 4 (Exynos) or treltexx [/ COLOR] Another question: since the last branche is from cm-13.0, if I follow your tutorial, will it compile a, lineage 14.1 rom? Or CYanogenmod 13.0? Thank you Click to expand... Click to collapse Since your device tree doesn't have 14.1 branch you have to sync Lineage 13.0 branch Code: repo init -u https://github.com/LineageOS/android.git -b cm-13.0 After that you have to sync your especific device repos Code: $ source build/envsetup.sh $ breakfast treltexx
A3 2017 Hi , I have Galaxy A3 2017 I got to point of breakfast and I cound download files for my phone. What I have to do if I want to have Lineage OS Nuggat in my phone. I hate original rom :-{ breakfast a3y17lte including vendor/cm/vendorsetup.sh build/core/product_config.mk:249: *** Can not locate config makefile for product "lineage_a3y17lte". Stop. build/core/product_config.mk:249: *** Can not locate config makefile for product "cm_a3y17lte". Stop. build/core/product_config.mk:249: *** Can not locate config makefile for product "lineage_a3y17lte". Stop. Device a3y17lte not found. Attempting to retrieve device repository from LineageOS Github Repository for a3y17lte not found in the LineageOS Github repository list. If this is in error, you may need to manually add it to your local_manifests/roomservice.xml. build/core/product_config.mk:249: *** Can not locate config makefile for product "lineage_a3y17lte". Stop. build/core/product_config.mk:249: *** Can not locate config makefile for product "lineage_a3y17lte". Stop. ** Don't have a product spec for: 'lineage_a3y17lte' ** Do you have the right repo manifest? Is that mean that I have to wait for support from LineageOS dvlpr team <? Roman
roman01110 said: ** Don't have a product spec for: 'lineage_a3y17lte' ** Do you have the right repo manifest? Is that mean that I have to wait for support from LineageOS dvlpr team <? Roman Click to expand... Click to collapse Yes
Thanks for the great post! I have two questions to ask: 1. How to change LINEAGE_VERSION? Currently when performing brunch I've got Code: LINEAGE_VERSION=14.1-20170311-UNOFFICIAL-oneplus3 and I wish to change it to Code: LINEAGE_VERSION=14.1-20170311-HAZUKI-oneplus3 to distinguish my personal modified build. 2. When I wish to sync again to obtain latest commits, how far should I go back? Is performing "repo sync" and then "brunch oneplus3" already good enough? Do I need to perform "make clean" or something similar? Thanks in advance!
I'm trying to build this for my galaxy s5 and I'm using that same guide to the letter and I'm just getting errors. And all those packages listed in op don't work either. I also get an error when extracting proprietary blobs. The extracting isn't the error it's that all the files aren't found in source code at all?!? I'm splitting bloody atoms trying to figure this crap out. Any help at all??
Hazuki Amamiya said: Thanks for the great post! I have two questions to ask: 1. How to change LINEAGE_VERSION? Currently when performing brunch I've got Code: LINEAGE_VERSION=14.1-20170311-UNOFFICIAL-oneplus3 and I wish to change it to Code: LINEAGE_VERSION=14.1-20170311-HAZUKI-oneplus3 to distinguish my personal modified build. 2. When I wish to sync again to obtain latest commits, how far should I go back? Is performing "repo sync" and then "brunch oneplus3" already good enough? Do I need to perform "make clean" or something similar? Thanks in advance! Click to expand... Click to collapse 1. In order to add some code to your build, you have to get familiar with git/GitHub. I'm preparing my next chapter to talk about it 2. Yes, you have to "make clean" everytime before build thatsupnow said: I'm trying to build this for my galaxy s5 and I'm using that same guide to the letter and I'm just getting errors. And all those packages listed in op don't work either. I also get an error when extracting proprietary blobs. The extracting isn't the error it's that all the files aren't found in source code at all?!? I'm splitting bloody atoms trying to figure this crap out. Any help at all?? Click to expand... Click to collapse You have to show all your errors and all your steps in order to get help!
I'm using the exact same directions in the OP. No different order exactly the same order only for my specific device. The first pic is when I extract the proprietary blobs from the lineage ROM zip. The second pic is after trying to build it I get the ninja wrapper error 1 at the end. Oh and I'm running ubuntu 16.10 on VirtualBox. And my build environment was setup step by step off the android website
thatsupnow said: I'm using the exact same directions in the OP. No different order exactly the same order only for my specific device. The first pic is when I extract the proprietary blobs from the lineage ROM zip. The second pic is after trying to build it I get the ninja wrapper error 1 at the end. Oh and I'm running ubuntu 16.10 on VirtualBox. And my build environment was setup step by step off the android website Click to expand... Click to collapse Why did you run: " ./extract-files.sh ~/original"
FSadino said: * A relatively recent 64-bit computer (Linux, OS X, or Windows) with a reasonable amount of RAM and about 100 GB of free storage (more if you enable ccache or build for multiple devices). The less RAM you have, the longer the build will take (aim for 8 GB or more). Using SSDs results in considerably faster build times than traditional hard drives. Click to expand... Click to collapse Can you tell me, where the space is nescessary in the file-sytem on a linux-PC? Of course /home needs much space, as the build is done there, but where else?
JamBax said: Can you tell me, where the space is nescessary in the file-sytem on a linux-PC? Of course /home needs much space, as the build is done there, but where else? Click to expand... Click to collapse It depends on which Linux distribution you install. Usually between 10Gb/15Gb should be enough for file system partition "/"
FSadino said: It depends on which Linux distribution you install. Usually between 10Gb/15Gb should be enough for file system partition "/" Click to expand... Click to collapse It is kubuntu 16.04.02, so this means all the hard disk space will be for /home filesystem, correct? Another question, where is the space for the cache, for i can't see any parameter. edit ok, looks like the cache is located at /home/..ccache, is there a possibility to move this location? Could it be, that java 8 can be used for 13.0 also? I did not install java 7, but was able to build a working lineage 13.0.
JamBax said: It is kubuntu 16.04.02, so this means all the hard disk space will be for /home filesystem, correct? Click to expand... Click to collapse You have to make root partition for system (/) with 10Gb/15Gb and home partition (/home) with the remaining disk space. Another question, where is the space for the cache, for i can't see any parameter. edit ok, looks like the cache is located at /home/..ccache, is there a possibility to move this location? Click to expand... Click to collapse Search on Google "how export ccache to other location" Could it be, that java 8 can be used for 13.0 also? I did not install java 7, but was able to build a working lineage 13.0. Click to expand... Click to collapse Yes
I have a question. I repo synced lineage 13. The build was successful but doesn't boot. I am building for Moto E surnia. I breakfast surnia it didn't ask for vendor files but built correctly. What could be wrong? The kernel log doesn't tell me too much. It's frustrating. All my previous builds booted up before.( I compiled DU for the surnia) Also use the same environment to build Twrp recoveries. I am downloading lineage 14 to try again. Maybe someone can point me in the right path please
Hi, I am building klte version of CrdroidAndroid ( a LineageOS based ROM) on a ubuntu 16.04 LTS VM. I am getting the following error. I am not sure what to do here. I have been cleaning the build folder and ccache and trying to build. I keep ending at this error. Any help to solve this issue is greatly appreciated. ---------------------------------- /usr/bin/x86_64-linux-gnu-ld: /home/sadanand/crdroid/android/system/out/host/linux-x86/obj/SHARED_LIBRARIES/libart_intermediates/base/allocator.o: relocation R_X86_64_PC32 against protected symbol `_ZN3art18g_malloc_allocatorE' can not be used when making a shared object /usr/bin/x86_64-linux-gnu-ld: final link failed: Bad value clang++: error: linker command failed with exit code 1 (use -v to see invocation) ------------------------------ Thanks
[email protected] said: I have a question. I repo synced lineage 13. The build was successful but doesn't boot. I am building for Moto E surnia. I breakfast surnia it didn't ask for vendor files but built correctly. What could be wrong? The kernel log doesn't tell me too much. It's frustrating. All my previous builds booted up before.( I compiled DU for the surnia) Also use the same environment to build Twrp recoveries. I am downloading lineage 14 to try again. Maybe someone can point me in the right path please Click to expand... Click to collapse Try build with vendor files sada23 said: Hi, I am building klte version of CrdroidAndroid ( a LineageOS based ROM) on a ubuntu 16.04 LTS VM. I am getting the following error. I am not sure what to do here. I have been cleaning the build folder and ccache and trying to build. I keep ending at this error. Any help to solve this issue is greatly appreciated. ---------------------------------- /usr/bin/x86_64-linux-gnu-ld: /home/sadanand/crdroid/android/system/out/host/linux-x86/obj/SHARED_LIBRARIES/libart_intermediates/base/allocator.o: relocation R_X86_64_PC32 against protected symbol `_ZN3art18g_malloc_allocatorE' can not be used when making a shared object /usr/bin/x86_64-linux-gnu-ld: final link failed: Bad value clang++: error: linker command failed with exit code 1 (use -v to see invocation) ------------------------------ Thanks Click to expand... Click to collapse Try to use GCC 4.9 or if you already using it try update to GCC 5
Encountering error while building
I am a novice and trying to build master branch for Google Pixel since few days. Every time I am encountering error, such as [ 58% 572/975] including system/sepolicy/Android.mk ... system/sepolicy/Android.mk:79: warning: BOARD_SEPOLICY_VERS not specified, assuming current platform version [100% 975/975] writing build rules ... FAILED: build/make/core/Makefile:28: error: overriding commands for target `out/target/product/sailfish/system/lib/libclcore_neon.bc', previously defined at build/make/core/base_rules.mk:414 20:51:27 ckati failed with: exit status 1 Following are the steps I have used in latest build attempt: Downloaded the source code using following command: repo init -u https://android.googlesource.com/platform/manifest Downloaded following binaries: Pixel binaries for Android (PPR2.181005.003) from https://developers.google.com/android/drivers Extracted the binaries in working directory source build/envsetup.sh lunch aosp_sailfish-user time make -j24 Since I have new working directory and downloaded the source code in it, therefore I did not run make clobber command. I have also used make clobber during previous build attempts. I have also tried with make -j4, however, same error remains. Android documentation says "You can download official binaries for the supported devices running tagged AOSP release branches from Google's drivers. These binaries add access to additional hardware capabilities with non-open source code. To build the AOSP master branch, use the Binaries Preview instead. When building the master branch for a device, use the binaries for the most recent numbered release or with the most recent date.". Therefore, I have also tried with preview binaries . Am I doing anything wrong here? I am not sure about my choice of binaries. Pleas help!
lineageos 16
build fails with the following error [ 69% 65628/93948] //vendor/lineage/build/soong:generated_kernel_includes generate FAILED: /home/skoar/android/lineageos/out/soong/.intermediates/vendor/lineage/build/soong/generated_kernel_includes/gen/.dummy_dep /home/skoar/android/lineageos/out/soong/host/linux-x86/bin/sbox --sandbox-path /home/skoar/android/lineageos/out/soong/.temp --output-root /home/skoar/android/lineageos/out/soong/.intermediates/vendor/lineage/build/soong/generated_kernel_includes/gen --copy-all-output -c 'make -j CFLAGS_MODULE="-fno-pic" -C O=__SBOX_OUT_DIR__ ARCH=arm64 CROSS_COMPILE="/usr/bin/ccache aarch64-linux-androidkernel-" CROSS_COMPILE_ARM32="arm-linux-androideabi-" headers_install' && touch /home/skoar/android/lineageos/out/soong/.intermediates/vendor/lineage/build/soong/generated_kernel_includes/gen/.dummy_dep make: *** O=/home/skoar/android/lineageos/out/soong/.temp/sbox985711399: No such file or directory. Stop. sbox command (make -j CFLAGS_MODULE="-fno-pic" -C O=/home/skoar/android/lineageos/out/soong/.temp/sbox985711399 ARCH=arm64 CROSS_COMPILE="/usr/bin/ccache aarch64-linux-androidkernel-" CROSS_COMPILE_ARM32="arm-linux-androideabi-" headers_install) failed with err "exit status 2" [ 69% 65635/93948] //frameworks/base:gen-platform-proto-constants generate ninja: build stopped: subcommand failed. 11:35:26 ninja failed with: exit status 1 p.s. I'm using prebuilt kernel
Three questions: 1. What device are you building for? 2. Does your device have any working Pie ROM? 3. Did you make the changes in the source needed for using the pre-built kernel? Nitin
nitin.chobhe said: Three questions: 1. What device are you building for? 2. Does your device have any working Pie ROM? 3. Did you make the changes in the source needed for using the pre-built kernel? Nitin Click to expand... Click to collapse 1. Lenovo tab4 10 (X304L) 2. No I'm trying to do a bringup 3. Yes added TARGET_PREBUILT_KERNEL in boardconfig and added the required PRODUCT_COPY_FILES in device.mk
skoar said: 1. Lenovo tab4 10 (X304L) 2. No I'm trying to do a bringup 3. Yes added TARGET_PREBUILT_KERNEL in boardconfig and added the required PRODUCT_COPY_FILES in device.mk Click to expand... Click to collapse Ok! As far as I understand it, adding just the TARGET_PREBUILT_KERNEL in boardconfig and a change in device make file will not help you. Lineage team (and other ROMs) has done a lot of changes (thousands of commits) in the android/build (and some other) repos as can be seen here: https://github.com/LineageOS/android_build/commits/lineage-16.0/core/Makefile So, I would suggest you to build the kernel inline; that would save a lot of your efforts. Nitin