Android Native Build Issue error while building apk - IDEs, Libraries, & Programming Tools

Hello I Imorted a Github source code of Telegram. But when I am trying to build the apk then I got thwo type of error-
First is - External Native Build Issues which contain below details-
Build command failed.
Error while executing process C:\Users\The\AppData\Local\Android\Sdk\ndk-bundle\ndk-build.cmd with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=C:\Users\The\Desktop\ProjectXYZ\Appcode1\TMessagesProj\jni\Android.mk NDK_APPLICATION_MK=C:\Users\The\Desktop\ProjectXYZ\Appcode1\TMessagesProj\jni\Application.mk APP_ABI=armeabi-v7a NDK_ALL_ABIS=armeabi-v7a NDK_DEBUG=0 APP_PLATFORM=android-23 NDK_OUT=C:/Users/The/Desktop/ProjectXYZ/Appcode1/TMessagesProj/build/intermediates/ndkBuild/armv7_SDK23/release/obj NDK_LIBS_OUT=C:\Users\The\Desktop\ProjectXYZ\Appcode1\TMessagesProj\build\intermediates\ndkBuild\armv7_SDK23\release\lib NDK_APPLICATION_MK:=jni/Application.mk APP_PLATFORM:=android-14 APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n}
Android NDK: ERROR:C:\Users\The\Desktop\ProjectXYZ\Appcode1\TMessagesProj\jni\Android.mk:WebRtcAec: LOCAL_SRC_FILES points to a missing file
Android NDK: Check that C:/Users/The/Desktop/ProjectXYZ/Appcode1/TMessagesProj/jni/./libtgvoip/external/libWebRtcAec_android_armeabi-v7a.a exists or that its path is correct
process_begin: CreateProcess(NULL, "", ...) failed.
Click to expand...
Click to collapse
Second error pointed to toward file- <b>C:\Users\The\AppData\Local\Android\sdk\ndk-bundle\build\core\prebuilt-library.mk</b> which contains this -
Error44, 0) *** Android NDK: Aborting. Stop.
Open File
Click to expand...
Click to collapse
I am using latest android studio and source can be found from here- GitHub/DrKLO/Telegram

Related

How to build busybox from sources?

I'm trying to build busybox from sources.
I use last NDK as toolchain.
I started building it from original sources checked out from official busybox's git. Some small fixes with includes/declarations and stuff. Didn't finish fixing these problems.
And found out that cyanogenmod already has it with fixes I made for my build, but wrapped in __BIONIC__ define.
I decided to build it from cyanogenmod git (http://github.com/cyanogen/android_external_busybox) cause it looks like it already solved all that small build problems.
But I can't invoke make properly.
It has Android.mk, If I invoke usual
Code:
make ARCH=arm CROSS_COMPILE="arm-eabi-" CFLAGS="-I/home/astar/android/android-ndk-r4/build/platforms/android-8/arch-arm/usr/include"
it doesn't use Android.mk makefile and fails with those small problems.
But if I invoke it with -f Android.mk It fails with error
Code:
$ make ARCH=arm CROSS_COMPILE="arm-eabi-" CFLAGS="-I/home/astar/android/android-ndk-r4/build/platforms/android-8/arch-arm/usr/include" -f Android.mk
cat: /busybox-full.sources: No such file or directory
make: *** CC=cc: No such file or directory. Stop.
cat: /busybox-full.links: No such file or directory
cat: /busybox-minimal.sources: No such file or directory
make: *** CC=cc: No such file or directory. Stop.
looking inside Android.mk i think, that it fails with setting LOCAL_PATH. Setting it manually inside Android.mk doesn't help.
Can anyone point me to proper guide/howto?
How do You build busybox?
I have really little knowledge about building parts of Android system, but I think that you can't build it using makefile directly. When you are building Android system, then building process begins with some initialization, macros are defined, etc. and then makefiles of subprojects are called. This is why you get errors - you run makefile of busybox directly, but building process isn't initialized properly.
On the other hand NDK does this initialization when you are building native application, but you don't use NDK properly. NDK apps aren't build using regular make command.
There's three build systems for android:
SDK - Java
NDK - C/C++
android-sources - unixy stuff
You might need the android-sources rather than NDK to build busybox. To do that you'll need to download the sources then source the build/envsetup.sh then run "mm" in the directory that has your Android.mk
I have some instructions here (for dropbear, not busybox, but should be similar):
http://teslacoilsw.com/dropbear
Check the Building section.
[email protected] said:
I have some instructions here (for dropbear, not busybox, but should be similar):
http://teslacoilsw.com/dropbear
Check the Building section.
Click to expand...
Click to collapse
Thank you very much. It is the magic I was looking for (crap, I spent 10 hours trying to find out how to do it):
Code:
export TOP=/path/to/android-sources
source "$TOP/build/envsetup.sh"
mm
I managed to build AOSP with java 1.6. Check this patch if you're interested in.
I tried to build cm's busybox with AOSP but it fails (I expected that). Currently I'm getting cm sources. Hope that it'll be ok.
Do you know if I have to build whole tree before external utils (=busybox)? Cause when I tried to do it before aosp build it failed with make dependencies.

[Q] Problems building CM 10.2

I have been trying to build CM 10.2 all day and now keep getting errors while it is building. Here are the last few lines I am getting during the build before it stops. I am using Ubuntu 12.04 to build with.
Export includes file: external/strace/Android.mk -- /home/mike/android/system/out/target/product/mako/obj/EXECUTABLES/strace_intermediates/export_includes
Notice file: external/strace/NOTICE -- /home/mike/android/system/out/target/product/mako/obj/NOTICE_FILES/src//system/xbin/strace.txt
Import includes file: /home/mike/android/system/out/target/product/mako/obj/EXECUTABLES/vim_intermediates/import_includes
Export includes file: external/vim/src/Android.mk -- /home/mike/android/system/out/target/product/mako/obj/EXECUTABLES/vim_intermediates/export_includes
make: *** No rule to make target `vendor/lge/mako/proprietary/etc/DxHDCP.cfg', needed by `/home/mike/android/system/out/target/product/mako/system/etc/DxHDCP.cfg'. Stop.
make: *** Waiting for unfinished jobs....
Click to expand...
Click to collapse
Anyone have any ideas what my problem is?
mikeric said:
I have been trying to build CM 10.2 all day and now keep getting errors while it is building. Here are the last few lines I am getting during the build before it stops. I am using Ubuntu 12.04 to build with.
Anyone have any ideas what my problem is?
Click to expand...
Click to collapse
I think you don't have the proprietary blobs.
From http://wiki.cyanogenmod.org/w/Build_for_mako#Extract_proprietary_blobs
Now ensure that your Nexus 4 is connected to your computer via the USB cable and that you are in the ~/android/system/device/lge/mako directory (you can cd ~/android/system/device/lge/mako if necessary). Then run the extract-files.sh script:
$ ./extract-files.sh
You should see the proprietary files (aka “blobs”) get pulled from the device and moved to the right place in the vendor directory. If you see errors about adb being unable to pull the files, adb may not be in the path of execution. If this is the case, see the adb page for suggestions for dealing with "command not found" errors.
eris23 said:
I think you don't have the proprietary blobs.
From http://wiki.cyanogenmod.org/w/Build_for_mako#Extract_proprietary_blobs
Now ensure that your Nexus 4 is connected to your computer via the USB cable and that you are in the ~/android/system/device/lge/mako directory (you can cd ~/android/system/device/lge/mako if necessary). Then run the extract-files.sh script:
$ ./extract-files.sh
You should see the proprietary files (aka “blobs”) get pulled from the device and moved to the right place in the vendor directory. If you see errors about adb being unable to pull the files, adb may not be in the path of execution. If this is the case, see the adb page for suggestions for dealing with "command not found" errors.
Click to expand...
Click to collapse
I redid the proprietary files and now I am getting it to run for a while then getting this at the end while building. While it is extracting the proprietary blobs I am getting a lot of errors, but not adb errors.
target thumb C: openvpn <= external/openvpn/android.c
make: *** No rule to make target `vendor/lge/mako/proprietary/etc/DxHDCP.cfg', needed by `/home/mike/android/system/out/target/product/mako/system/etc/DxHDCP.cfg'. Stop.
make: *** Waiting for unfinished jobs....
In file included from external/openvpn/misc.h:30:0,
from external/openvpn/android.c:8:
external/openvpn/integer.h: In function 'index_verify':
external/openvpn/integer.h:106:5: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
external/openvpn/android.c: In function 'env_set_add_android':
external/openvpn/android.c:29:18: warning: initialization discards 'const' qualifier from pointer target type [enabled by default]
external/openvpn/android.c:25:9: warning: unused variable 'and_env_value' [-Wunused-variable]
Click to expand...
Click to collapse
Does anyone have any suggestions?
Sent from my Nexus 4 using Tapatalk 4
Is your n4 already running cm10.2?
If not the blobs would be wrong and some are named different in cm10.1
Edit: try to extract the missing file from an official nightly
Sent from my Nexus 4 using xda premium
OK I'll try that, thanks for the suggestion
Sent from my Nexus 4 using Tapatalk 4
I am running cm10.2 nightly 8/15 and tried to pull the proprietary blobs and kept getting all these errors. If I try and build it still wont. This is just a few of the errors.
cannot create '../../../vendor/lge/mako/proprietary/vendor/firmware/keymaster/keymaster.b00': Permission denied
cannot create '../../../vendor/lge/mako/proprietary/vendor/firmware/keymaster/keymaster.b01': Permission denied
cannot create '../../../vendor/lge/mako/proprietary/vendor/firmware/keymaster/keymaster.b02': Permission denied
cannot create '../../../vendor/lge/mako/proprietary/vendor/firmware/keymaster/keymaster.b03': Permission denied
cannot create '../../../vendor/lge/mako/proprietary/vendor/firmware/keymaster/keymaster.mdt': Permission denied
cannot create '../../../vendor/lge/mako/proprietary/vendor/lib/libdrmdecrypt.so': Permission denied
cannot create '../../../vendor/lge/mako/proprietary/vendor/lib/libWVStreamControlAPI_L1.so': Permission denied
cannot create '../../../vendor/lge/mako/proprietary/vendor/lib/libwvm.so': Permission denied
cannot create '../../../vendor/lge/mako/proprietary/vendor/lib/libwvdrm_L1.so': Permission denied
cannot create '../../../vendor/lge/mako/proprietary/vendor/lib/drm/libdrmwvmplugin.so': Permission denied
Click to expand...
Click to collapse
Looks like you messed up the permissions in your build env ...
Repo sync -d
Might solve this
Sent from my Nexus 4 using xda premium

Firefox OS Porting to Motorola G

I and my friend are trying to port Firefox OS on Motorola G device. Because of our lack of experience in the field, we are stuck. Mozilla's documentation is not that helpful and we don't know at the moment how to continue.
What we did:
- created manifest xml for the device, based on unofficial cyanogenmod for Moto G.
- synced all sources
- added manually prebuilt kernel.
- tried to build everything but it doesn't build, of course, we don't know why.
The error seem to be:
Code:
make: *** No rule to make target `out/target/product/xt1032/obj/SHARED_LIBRARIES/libwpa_client_intermediates/export_includes', needed by `out/target/product/xt1032/obj/SHARED_LIBRARIES/libhardware_legacy_intermediates/import_includes'. Stop.
Welcome to the forums !
coldSense said:
I and my friend are trying to port Firefox OS on Motorola G device. Because of our lack of experience in the field, we are stuck. Mozilla's documentation is not that helpful and we don't know at the moment how to continue.
What we did:
- created manifest xml for the device, based on unofficial cyanogenmod for Moto G.
- synced all sources
- added manually prebuilt kernel.
- tried to build everything but it doesn't build, of course, we don't know why.
The error seem to be:
Code:
make: *** No rule to make target `out/target/product/xt1032/obj/SHARED_LIBRARIES/libwpa_client_intermediates/export_includes', needed by `out/target/product/xt1032/obj/SHARED_LIBRARIES/libhardware_legacy_intermediates/import_includes'. Stop.
Click to expand...
Click to collapse
Now I haven't been on these forums long but I'd like to say congrats on ur first post ! ;0 That error
Code:
make: *** No rule to make target `out/target/product/xt1032/obj/SHARED_LIBRARIES/libwpa_client_intermediates/export_includes', needed by `out/target/product/xt1032/obj/SHARED_LIBRARIES/libhardware_legacy_intermediates/import_includes'. Stop.
means there is no target to build the path. I need more info. What compiler are you using. Or are you just using the command prompt?What's the custom kernel, you could try using CM #2 Unoffical However that'd only work if ur Moto G is currently running android with CWM (to flash the kernel when u build it) Can u link to the mozilla post, I didn't bookmark it and I can be bothered to google it Can u send me what you've done so far pls. Thanks
Or are you just using the command prompt?
Click to expand...
Click to collapse
Yes, I'm using terminal to compile everything. Actually a specialized script for that purpose. Environment versions are:
g++ - 4.6
gcc - 4.6
Actually I'm using this guide .
Yes, I use Clockwork but before that there is building problem. Anyway, the link for porting is this.
The kernel I got is from here.
Admittedly, I know jack **** about android development, but I was under the impression that Firefox OS was based on an ICS kernel? I don't think the CM11 kernel works.
coldSense said:
Yes, I'm using terminal to compile everything. Actually a specialized script for that purpose. Environment versions are:
g++ - 4.6
gcc - 4.6
Actually I'm using this guide .
Yes, I use Clockwork but before that there is building problem. Anyway, the link for porting is this.
The kernel I got is from here.
Click to expand...
Click to collapse
Never seen that error before. Know wat it means tho. Have u tried complieing with Xcode (mac) or another 3rd part app ?
Apph3x said:
Never seen that error before. Know wat it means tho. Have u tried complieing with Xcode (mac) or another 3rd part app ?
Click to expand...
Click to collapse
No. I don't have and don't use mac computers, at least for now. I did this in Linux. It seems that it just doesn't read kernel/ directory or just ignores it.
Yeah
coldSense said:
No. I don't have and don't use mac computers, at least for now. I did this in Linux. It seems that it just doesn't read kernel/ directory or just ignores it.
Click to expand...
Click to collapse
It's like its invisible....
I solved (apparently) that problem by modifying variable TARGET_KERNEL_SOURCE (device/motorola/msm8226-common/BoardConfigCommon.mk) to be absolute path but now I have another error
Code:
make: *** No rule to make target `out/host/linux-x86/bin/acp', needed by `out/debug/host/linux-x86/bin/validatekeymaps'. Stop.
@coldSense
Try this way please
Code:
rm -rf out
rm -rf objdir-gecko
./build.sh gecko
then run
Code:
./build.sh gaia
and copy file from <build_path>/gaia/profile/webapps to <build_path>/out/project/<device_name>/system/b2g/webapps
Then replace all file from out/target/<product>/system to /system of AOSP ROM
then edit ramdisk follow https://developer.mozilla.org/en-US/Firefox_OS/Porting
and flash boot.img and /system you were edit to your Motolola G
Try this way please
Any luck with this? I might try myself, but curious if you can update.
Hi everyone !
I'm currently tryaing to build Firefox OS on own device.
I have this error :
Code:
$ lunch
You're building on Linux
Lunch menu... pick a combo:
1. aosp_arm-eng
2. aosp_x86-eng
3. aosp_mips-eng
4. vbox_x86-eng
5. cm_falcon-userdebug
6. mini_armv7a_neon-userdebug
Which would you like? [aosp_arm-eng] full_falcon
build/core/product_config.mk:222: *** Can not locate config makefile for product "falcon". Arrêt.
** Don't have a product spec for: 'full_falcon'
** Do you have the right repo manifest?
Could someone help me ?
Thanks a lot !
feherneoh said:
try full_falcon instead
Click to expand...
Click to collapse
Code:
$ lunch
You're building on Linux
Lunch menu... pick a combo:
1. aosp_arm-eng
2. aosp_x86-eng
3. aosp_mips-eng
4. vbox_x86-eng
5. cm_falcon-userdebug
6. mini_armv7a_neon-userdebug
Which would you like? [aosp_arm-eng] full_falcon
Invalid lunch combo: full_falcon
OR
Code:
$ ./build.sh full_falcon
including device/motorola/falcon/vendorsetup.sh
including device/generic/armv7-a-neon/vendorsetup.sh
build/core/product_config.mk:222: *** Can not locate config makefile for product "full_flo". Arrêt.
** Don't have a product spec for: 'full_flo'
** Do you have the right repo manifest?
> Build failed! <
Build with |./build.sh -j1| for better messages
If all else fails, use |rm -rf objdir-gecko| to clobber gecko and |rm -rf out| to clobber everything else.
A modification in device/motorola/falcon/vendorsetup.sh maybe ?
UPDATE :
Modifying vendorsetup.sh like this
add_lunch_combo full_falcon-eng
Can somebody explain me how to use a prebuilt kernel to build that please ?
Thank You
I have this error ... (in french)
Code:
No private recovery resources for TARGET_DEVICE falcon
make: *** Pas de règle pour fabriquer la cible « out/target/product/falcon/kernel », nécessaire pour « prebuilt ». Arrêt.
make: *** Attente des tâches non terminées....
h2o64 said:
Can somebody explain me how to use a prebuilt kernel to build that please ?
Thank You
I have this error ... (in french)
Code:
No private recovery resources for TARGET_DEVICE falcon
make: *** Pas de règle pour fabriquer la cible « out/target/product/falcon/kernel », nécessaire pour « prebuilt ». Arrêt.
make: *** Attente des tâches non terminées....
Click to expand...
Click to collapse
You can try to create the folder falcon-kernel inside device/motorola/ and put into it your kernel image.
In device/motorola/(your model) create the file AndroidBoard.mk and put inside:
ifeq ($(TARGET_PREBUILT_KERNEL),)
TARGET_PREBUILT_KERNEL := device/motorola/falcon-kernel/kernel
endif
Than try to rebuild.

[Q] [HELP] Can't build Cyanogenmod

Hey everyone, hope someone can help
When I run the command "breakfast hlte"
I get:
Syncing repository to retrieve project.
Fetching project CyanogenMod/android_device_samsung_hlte
Repository synced!
Looking for dependencies
Done
build/core/product_config.mk:238: *** _nic.PRODUCTS.[[device/samsung/hlte/cm.mk]]: "device/samsung/msm8960-common/msm8960.mk" does not exist. Stop.
** Don't have a product spec for: 'cm_hlte'
** Do you have the right repo manifest?
[email protected]:~/android/system$
Click to expand...
Click to collapse
Also, if I proceed and try to extract the proprietry blobs with "extract-files.sh" I get:
Extracting /system/etc/firmware/a330_pfp.fw ...
37 KB/s (2212 bytes in 0.058s)
Extracting /system/etc/firmware/a330_pm4.fw ...
91 KB/s (9220 bytes in 0.098s)
Extracting /system/vendor/lib/libmm-color-convertor.so ...
87 KB/s (9308 bytes in 0.103s)
Extracting /system/lib/cdma/libsec-ril.so ...
remote object '/system/lib/cdma/libsec-ril.so' does not exist
Click to expand...
Click to collapse
Any help would be appreciated
EDIT: the line where it fails is pointing the wrong place :/ I found it in root explorer so I'll see what I can do
EDIT: fixed the cdma/libsec-ril.so
but now it's complaining it can't find a gsm version...
Use the blobs from the GitHub repo TheMuppets/proprietary_vendor_samsung/tree/cm-11.0/hlte. Unfortunately I can't post a direct link due to onerous XDA restrictions on new user's posts. I am having the same problem with not being able to extract all the propietary blobs from my Note 3 device.
CW03 said:
Hey everyone, hope someone can help
When I run the command "breakfast hlte"
I get:
Also, if I proceed and try to extract the proprietry blobs with "extract-files.sh" I get:
Any help would be appreciated
EDIT: the line where it fails is pointing the wrong place :/ I found it in root explorer so I'll see what I can do
EDIT: fixed the cdma/libsec-ril.so
but now it's complaining it can't find a gsm version...
Click to expand...
Click to collapse
Did you ever get this figured out? I am trying to build right now and am having the same problem. I got the blobs from that github repository, and am still running into this same error.
[email protected]:~/android/system$ breakfast hlte
including vendor/cm/vendorsetup.sh
build/core/product_config.mk:238: *** _nic.PRODUCTS.[[device/samsung/hlte/cm.mk]]: "device/samsung/msm8960-common/msm8960.mk" does not exist. Stop.
Device hlte not found. Attempting to retrieve device repository from CyanogenMod Github (http://github.com/CyanogenMod).
Found repository: android_device_samsung_hlte
Default revision: cm-11.0
Checking branch info
CyanogenMod/android_device_samsung_hlte already exists
Syncing repository to retrieve project.
Fetching project CyanogenMod/android_device_samsung_hlte
Repository synced!
Looking for dependencies
Done
build/core/product_config.mk:238: *** _nic.PRODUCTS.[[device/samsung/hlte/cm.mk]]: "device/samsung/msm8960-common/msm8960.mk" does not exist. Stop.
** Don't have a product spec for: 'cm_hlte'
** Do you have the right repo manifest?
[email protected]:~/android/system$
Click to expand...
Click to collapse
iamdanhenry said:
Did you ever get this figured out? I am trying to build right now and am having the same problem. I got the blobs from that github repository, and am still running into this same error.
Click to expand...
Click to collapse
Do you have device/samsung/msm8960-common/msm8960.mk? If you did used "lunch", it should add this repo (and a few others) to your .repo/local_manifests/roomservice.xml. The repos are defined in device/samsung/hlte/cm.dependencies, which should already be there.
If it doesn't fetch the repos automatically, you can do this with "repo sync".
For the proprietary blobs, you only need to add the samsung repo from TheMuppets github to your .repo/local_manifests/whatever.xml and "repo sync" to pull it in. No need to try to extract anything from your device.
jisoo said:
Do you have device/samsung/msm8960-common/msm8960.mk? If you did used "lunch", it should add this repo (and a few others) to your .repo/local_manifests/roomservice.xml. The repos are defined in device/samsung/hlte/cm.dependencies, which should already be there.
If it doesn't fetch the repos automatically, you can do this with "repo sync".
For the proprietary blobs, you only need to add the samsung repo from TheMuppets github to your .repo/local_manifests/whatever.xml and "repo sync" to pull it in. No need to try to extract anything from your device.
Click to expand...
Click to collapse
After I posted I went and downloaded msm8960-common repository and extracted it into the build directory, it then got the same error for some qualcomm libraries that were missing so I downloaded those as well. I then added the proprietary files from the "TheMuppets" repo.
It would appear things are going better now, but still can't build because of some errors with the kernel not being there. I am going to go download the kernel source and try to get it figured out. If I can't I will make a new thread.
Thank you for your help!

Kernel compilation error '"aarch64-linux-android-gcc" is not allowed to be used.'

Kernel compilation error '"aarch64-linux-android-gcc" is not allowed to be used.'
I'm building the kernel with LineageOS 17.1 / Android 10 r31 however the build process errors out during kernel compilation.
Specifically with:
Code:
"aarch64-linux-android-gcc" is not allowed to be used. See https://android.googlesource.com/platform/build/+/master/Changes.md#PATH_Tools for more information.
make[3]: *** [/home/saltoin/android/lineageos-17.1/kernel/samsung/universal8895/scripts/Makefile.build:153: scripts/mod/devicetable-offsets.s] Error 1
Following the link says that any host tools in PATH won't be allowed to be used during compilation. However, `aarch64-linux-android-gcc` is not from my path but supplied by the build tools. Unless I'm mistaken in that assumption.
Regardless, exporting TEMPORARY_DISABLE_PATH_RESTRICTIONS=true allows aarch64-linux-android-gcc.
Unless I'm missing something, I don't believe I should be getting this error.
Thoughts?
Hello there, have you found any solution?
TEMPORARY_DISABLE_PATH_RESTRICTIONS=true doesn't work in the config file. What do you mean by export? Thanks in advance for help.
Build System Changes for Android.mk Writers
As a temporary measure, you can set TEMPORARY_DISABLE_PATH_RESTRICTIONS=true in your environment to temporarily turn off the error checks and allow any tool to be used (with logging).

Categories

Resources