I'm trying to build AOSP for the oneplus one and I keep getting this error when tyring to make:
'out/target/product/bacon/obj/SHARED_LIBRARIES/libcryptfs_hw_intermediates/export_includes', needed by 'out/target/product/bacon/obj/EXECUTABLES/vold_intermediates/import_includes', missing and no known rule to make it.
I already added device/qcom/common and it has a cryptfs folder in it but it's not building it for some reason...
Any ideas?
In the Android.mk file of system/vold, add this:
device/qcom/common/cryptfs_hw
to the common_c_includes.
It not able to find the cryptfs path, so just add the path in your BoardConfig.mk
TARGET_CRYPTFS_HW_PATH := device/qcom/common/cryptfs_hw
Related
i am trying to build grapheneos for pixel 6 with custom bootanimation
i created bootanimation.zip file according to instructions but can't figure out the location to put it in. since the usual location, system/media/bootanimation.zip is giving me an Error:
offending entries: system/media/bootanimation.zip
and the build fails.can anyone help me to understand what i am doing wrong ?
thank you
Here is correct answer:
For changing of animation for emulator x86_64 you need to replace
PRODUCT_COPY_FILES +=
device/generic/goldfish/data/media/test/swirl_136x144_mpeg4.mp4:data/media/0/test/CtsMediaTestCases-1.4/swirl_136x144_mpeg4.mp4
device/generic/goldfish/data/media/test/swirl_132x130_mpeg4.mp4:data/media/0/test/CtsMediaTestCases-1.4/swirl_132x130_mpeg4.mp4
device/generic/goldfish/data/media/test/swirl_130x132_mpeg4.mp4:data/media/0/test/CtsMediaTestCases-1.4/swirl_130x132_mpeg4.mp4
device/generic/goldfish/data/media/test/swirl_144x136_mpeg4.mp4:data/media/0/test/CtsMediaTestCases-1.4/swirl_144x136_mpeg4.mp4
device/generic/goldfish/data/media/test/swirl_128x128_mpeg4.mp4:data/media/0/test/CtsMediaTestCases-1.4/swirl_128x128_mpeg4.mp4 \
to
PRODUCT_COPY_FILES +=
device/generic/goldfish/data/media/test/swirl_136x144_mpeg4.mp4:data/media/0/test/CtsMediaTestCases-1.4/swirl_136x144_mpeg4.mp4
device/generic/goldfish/data/media/test/swirl_132x130_mpeg4.mp4:data/media/0/test/CtsMediaTestCases-1.4/swirl_132x130_mpeg4.mp4
device/generic/goldfish/data/media/test/swirl_130x132_mpeg4.mp4:data/media/0/test/CtsMediaTestCases-1.4/swirl_130x132_mpeg4.mp4
device/generic/goldfish/data/media/test/swirl_144x136_mpeg4.mp4:data/media/0/test/CtsMediaTestCases-1.4/swirl_144x136_mpeg4.mp4
device/generic/goldfish/data/media/test/swirl_128x128_mpeg4.mp4:data/media/0/test/CtsMediaTestCases-1.4/swirl_128x128_mpeg4.mp4
device/generic/goldfish/data/media/bootanimation.zip:$(PRODUCT_OUT)/product/media/bootanimation.zip
device/generic/goldfish/x86_64-vendor.mk
Your bootanimzation.zip needs to be in device/generic/goldfish/data/media
Please take a look here:
https://android.googlesource.com/platform/frameworks/base/+/master/cmds/bootanimation/BootAnimation.cpp
In case of Graphene it uses images from assets by default.
I didn't see your mk file and the output. But I'd suggested to overwrite some output files in your mk file and put your bootanimation to one from locations listed in BootAnimation.cpp via PRODUCT_COPY_FILES.
Something like here:
PRODUCT_COPY_FILES += \ packages/services/Car/car_product/car_ui_portrait/bootanimation/bootanimation.zip:system/media/bootanimation.zip
I have a ndk project in Android Studio, and I want to control the exported symbols by this way:
set (CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} "-Wl,--version-script=D:\ProjectFolder\export_symbols")
or
set (CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} "-Wl,--version-script=export_symbols")
This export_symbols file is put together with CMaleLists.txt.
The problem is that the compiler would report an error during link and complain that: 'error: no such file or directory'.
So the question is how can I tell the compiler where my export_symbols file is? Any suggestion is welcomed. Thanks.
Try to do next:
Find you add_library command. E.g.:
add_library( ${MY_LIBRARY_NAME} SHARED main.cpp )
And right after it add set_target_properties command:
set_target_properties( ${MY_LIBRARY_NAME} PROPERTIES LINK_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../your_version.script)
Here is short info about LINK_DEPENDS.
Solved by adding ${CMAKE_SOURCE_DIR} before the file name.
set (CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} "-Wl,--version-script=" ${CMAKE_SOURCE_DIR} "/export_symbols")
In a Cordova project, I have a file settings.gradle which looks like:
// GENERATED FILE - DO NOT EDIT
include ":"
include ":CordovaLib"
However, manually I want to edit the file and to make it look something like:
// GENERATED FILE - DO NOT EDIT
include ":"
include ":CordovaLib"
include 'manager-A'
project(':manager-A').projectDir = new File('libs/Manager-A')
include 'manager-B'
project(':manager-B').projectDir = new File('libs/Manager-B')
The above script looks good and it can be built successfully using Android studio. However, when I try to execute command line: cordova build android, it cannot be built.
The error is 'manager-A' and 'manager-B' that I manually included earlier cannot be found by the command line. After checking, it turned out that the file that I manually edited was re-generated and it becomes:
// GENERATED FILE - DO NOT EDIT
include ":"
include ":CordovaLib"
I'd like to ask whether it is possible to manually edit the file and that can be built as I explained above using the command line: cordova build android.
Any input is really appreciated!
Yes, I was looking to resolve same problem and found out following solution from this npm cordova-blinkup-plugin's Page. You can edit the settings with as:
1. Open path/to/project/platforms/android/cordova/lib/build.js
2. Edit fs.writeFileSync() function (line 273):
// Write the settings.gradle file.
fs.writeFileSync(path.join(projectPath, 'settings.gradle'),
'// GENERATED FILE - DO NOT EDIT\n' +
'include ":"\n' + settingsGradlePaths.join('') +
'include ":customProject1" +
'include ":customProject2"');
I hope this will help.
Update as suggested in another answer, In newer versions of Cordova you may get file at
/path/to/project/platforms/android/cordova/lib/builders/GradleBuilder.js
I found a better way to add custom include in setting.gradle file.
Make a file project.properties and add the below lines:
target=android-22
android.library.reference.1=CordovaLib
android.library.reference.2=manager-A
android.library.reference.3=manager-B
Now run cordova build android. This will make an entry in your setting.gradle file.
This answers part of the questions of how to include a module. But how to add the libs as below, still need a better way:
project(':manager-A').projectDir = new File('libs/Manager-A')
Can be done with modifying the build.js (Suggested by Sopheak Mongkul). I don't recommend, but it is good till you get a better solution.
An update to #ankibalyan's answer:
I found that function in path/to/project/platforms/android/cordova/lib/builders/GradleBuilder.js, just in case anybody needed it any more :)
I'm trying to build cocos2d-x hello world project using build_native.sh, it shows me some compile errors. it seems that NDK can't find cocos2d-x sources.first it says:
NDK_ROOT = /cygdrive/c/Android-NDK-r4/android-ndk-r4-crystax
COCOS2DX_ROOT = /cygdrive/c/cocos2d-x/cocos2d-cocos2d-x-6e84662/firstapp/proj.android/../..
APP_ROOT = /cygdrive/c/cocos2d-x/cocos2d-cocos2d-x-6e84662/firstapp/proj.android/..
APP_ANDROID_ROOT = /cygdrive/c/cocos2d-x/cocos2d-cocos2d-x-6e84662/firstapp/proj.android
then:
Compile++ thumb: game_shared <= /cygdrive/c/cocos2d-x/cocos2d-cocos2d-x-6e84662/firstapp/proj.android/jni/hellocpp/main.cpp
In file included from /cygdrive/c/cocos2d-x/cocos2d-cocos2d-x-6e84662/firstapp/proj.android/jni/hellocpp/main.cpp:1:
/cygdrive/c/cocos2d-x/cocos2d-cocos2d-x-6e84662/firstapp/proj.android/jni/../../Classes/AppDelegate.h:4:27: error: CCApplication.h: No such file or directory
/cygdrive/c/cocos2d-x/cocos2d-cocos2d-x-6e84662/firstapp/proj.android/jni/hellocpp/main.cpp:2:44: error: platform/android/jni/JniHelper.h: No such file or directory
In file included from /cygdrive/c/cocos2d-x/cocos2d-cocos2d-x-6e84662/firstapp/proj.android/jni/hellocpp/main.cpp:6:
/cygdrive/c/cocos2d-x/cocos2d-cocos2d-x-6e84662/firstapp/proj.android/jni/../../Classes/HelloWorldScene.h:4:21: error: cocos2d.h: No such file or directory
and many more compile errors.
I used cocos2dx website tutorial, I'm using API 10(android 2.3.3) and windows 7 .
can anyone help me?
Try including <Cocos2d-x Root Folder>\cocos2dx\platform\ under Right Click->Properties->C\C++ general->path and symbols-> source folder -> Link Folder It is not able to find CCApplication.h file which could be found under <Cocos2d-x Root Folder>\cocos2dx\platform\android . Hope this helps.
COCOS2DX_ROOT = /cygdrive/c/cocos2d-x/cocos2d-cocos2d-x-6e84662/firstapp/proj.android/../.. make sure that cocos2dx files are available at that location.
Try including Cocos2dx folder in your Android.mk file, the error is telling that it cannot find the source file CCApplication.h which is in the cocos2dx folder.
first import the library of cocos2d-x in the eclicips
path of lib D:\cocos2d-x-2.2\cocos2dx\platform\android
then
Add the library of cocos2d-x in your project.
In buid_native.sh file, around line 55, there is $COCOS2DX_ROOT defined with default path like '../../../', which means it will search COCOS2D_ROOT just relative to its current directory. So have a look at that first.
I am trying to port libtiff on Android. The source version I am using is tiff 4.0.1.
I am building this source inside u1 android OS.
I am getting the below error when I run mmm external/tiff 4.0.1/
In file included from external/tiff-4.0.1/libtiff/tiffiop.h:33,
from external/tiff-4.0.1/libtiff/tif_dirread.c:42:
external/tiff-4.0.1/libtiff/tif_config.h:93:1: warning: "HAVE_MALLOC_H" redefined
In file included from <command-line>:0:
./system/core/include/arch/linux-arm/AndroidConfig.h:221:1: warning: this is the location of the previous definition
In file included from external/tiff-4.0.1/libtiff/tif_dirread.c:42:
external/tiff-4.0.1/libtiff/tiffiop.h:54:21: error: search.h: No such file or directory
I tries searching a lot on internet but could not get the issue.
Can any one provide me just an approx idea what could be wrong or which package is missing.
I resolved this issue finally. I hope this will help someone who is doing this work in future. We just need to remove the lines from libtiff/tiffiop.h where header file is being referenced.That worked for me.
Depending on your libtiff version, you can also just undefine HAVE_SEARCH_H in the config file tif_config.h which will then no longer include <search.h>:
In tif_config.h:
#ifndef ANDROID
/* Define to 1 if you have the <search.h> header file. */
#define HAVE_SEARCH_H 1
#endif