214 questions
0
votes
0
answers
61
views
Android.bp support required for precompiled .so in System/lib64 and vendor/lib64
I have few precompiled .so files downloaded from one build system into another one, which is required to be pushed as part of System/lib64 and vendor/lib64 for application to work. I am trying to add ...
1
vote
0
answers
130
views
How to change partition size when building an AOSP target
I am trying to build an emulator from AOSP branch android-14.0.0_r45, and the target product is sdk_tablet_arm64-userdebug. This is not shown in lunch menu, but I can still use it in lunch and build ...
0
votes
1
answer
61
views
Add bitbucket artifact as prebuilt to AOSP manifest
Assuming we have a JAR file that is generated with BitBucket Pipelines and is accessible via a URL (ie BB downloads)
What would be the best way to dynamically (based on branch) add the correct jar ...
1
vote
0
answers
114
views
Jacoco code coverage report is showing zero in AOSP junit testing
I am working in AOSP for automotive and in Junit test I can get coverage report using Jacoco but it is zero everytime even after tests successfully run. Please help me on this. I am doing this with ...
0
votes
1
answer
268
views
Set default Launcher in AOSP Source
I have added my launcher along with Launcher3 in AOSP build, On boot up device asks to select default Home app(launcher).
How can I set the my launcher as a default launcher from ASOP source code, so ...
0
votes
0
answers
264
views
Include cmake project in Android.mk
Is there a way to include a cmake file? I'm building something for android, and I've found some dependencies I want to use in my project but they have CMakeList.txt files instead of Android.mk.
https:/...
0
votes
0
answers
527
views
Getting errors with Android.bp when trying to build a static java library
I am looking for a way to build a static jar library from my below definition in Android.bp. I am using Android-12 OS.
// Define the module type
java_library_static {
name: "com.example.foo....
0
votes
1
answer
634
views
Need to convert Android.mk file definition to Android.bp
I am an Android Firmware developer, working with a source of Android 12. I wanted to convert my Android.mk file to Android.bp, with the same definitions in tact in order to build a static jar library.
...
0
votes
1
answer
1k
views
ServiceMode/Android.mk: Specifies both LOCAL_SDK_VERSION (system_current) and LOCAL_PRIVATE_PLATFORM_APIS (true) but should specify only one
I am an Android Firmware developer, working with a source of Android 12. I am facing an issue while I try to build a system application called ServiceMode. I am trying to build this application along ...
1
vote
1
answer
60
views
Why build.gradle which uses Android.mk to build native files compiles them on every build?
I am maintaining a legacy Android project which uses Android.mk build file instead of CMake. Previously the native compilation was done from command line batch files. I changed the build system to use ...
0
votes
1
answer
308
views
error: missing opencv_features2d (STATIC_LIBRARIES android-arm)"
I've created an application to read QR code using OpenCv.
When I try to build it using NDK, everything works well
NDK=/opt/android-ndk-r23c
export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/linux-x86_64
...
1
vote
0
answers
132
views
AOSP: INSTALL_FAILED_OLDER_SDK
I'm facing the below error while installing the apk which is built on the Android-12 version of the AOSP repo and installing this apk on the Android-11 version of the System image
error:
C:\Users\test\...
0
votes
0
answers
587
views
Add an external aar/jar as a shared library
I am having the following Android.mk file for my app which is using aar-release.aar
include $(CLEAR_VARS)
res_dir := res $(LOCAL_PATH)/res
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES += <...>
...
1
vote
1
answer
79
views
Do we need Jack to use Java 8 features to make a build using Android.mk?
I have an Android.mk file and I was trying to make a build for Android 8.1 where I was using RxJava but while building it, I was getting the error
Lambda coming from jar file need their interfaces on ...
1
vote
1
answer
654
views
How to shrink resources and remove unused language resources with Android.mk
I am working on AOSP Settings application which builds properly.
I am trying to build "user build" and have enabled proguard using proguard.flags and disabled jack compilation
...
0
votes
1
answer
46
views
android - simplify src path without hardcode
I would like to remove the hardcode file path from Android.mk.
ifeq ($(TARGET_BUILD_VARIANT),user)
LOCAL_SRC_FILES := ./app/build/outputs/apk/release/app-release.apk
else
LOCAL_SRC_FILES :=...
2
votes
2
answers
1k
views
How to import a .so Library in Android.mk when i build APK
I have this problem: I have to build my app using the Android.mk file and I have to insert the library "libcom_google_ase_Exec.so" inside the final apk, but I can't do it. What I get is an ...
0
votes
0
answers
670
views
Android.mk - Adding external java libraries as maven repositories or prebuilt java libraries
I am trying to make my application compile within AOSP instead of using Gradle within Android Studio. I created an Android.mk file, however, since my application uses Eclipse Paho library, I do not ...
0
votes
1
answer
912
views
Android.mk add binary into /system/bin
I have a binary, with Android.mk as below.
include $(CLEAR_VARS)
LOCAL_MODULE := binary_test
LOCAL_LDLIBS := libs
LOCAL_CFLAGS := -O3 -UNDEBUG
LOCAL_C_INCLUDES += tools/
LOCAL_SRC_FILES := main.c
...
0
votes
1
answer
963
views
How to link libjingle_peerconnection_so.so to a project and call classes from it?
I try to build my jni class with a single line that tries to call webrtc audio processing.
webrtc::AudioProcessing* apm = webrtc::AudioProcessingBuilder().Create();
I also try to link the ...
0
votes
1
answer
2k
views
Difference between system_current and current for the vairable LOCAL_SDK_VERSION in ANDROID.mk?
Our application should be built along with Android build and moved to the system partition.
But we were using hidden api and so we added the variable LOCAL_PRIVATE_PLATFORM_APIS := true
In the current ...
0
votes
1
answer
981
views
Is there a way to set default launcher app in AOSP without excluding other launchers
I'm aware of LOCAL_OVERRIDES_PACKAGES but I would like to set Launcher3 as my default launcher without overwriting another app I have installed.
So I want the app to exist on the system but not be set ...
2
votes
1
answer
1k
views
What are LOCAL_HEADER_LIBRARIES in Android.mk?
While generating a new library we can specify dependencies in Android.mk .For Example there are header dependencies which can be specified in LOCAL_C_INCLUDES, then there are library dependencies like ...
2
votes
2
answers
2k
views
Issue while integrating car-ui-lib
i want to integrate car-ui-lib into my project. i manually create Android.mk in (src/main/jni) file from this google git
After i build my project the android studio create cpp folder and add my ...
0
votes
0
answers
1k
views
when I compile the Android.mk, it comes error couldn't find .so.toc
I want to use libcdrmclient_sw.so to make SHARED_LIBRARIES, and i'll use one func defined in libcdrmclient_sw.so like this
int CDRMC_CheckPolicy(void* sessionHandle, char *destData, unsigned int *...
1
vote
1
answer
704
views
prebuil apks not getting added in aosp build
I am trying to add a prebuilt apk to aosp source but the apk is not geting added.
Android.mk details is like
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
...
0
votes
1
answer
1k
views
How to make AOSP Module with Specified JDK Version?
As when I do complete compile ,some modules use jdk1.9 , some use jdk1.8(because the date 0 bug, it can not compile with jdk1.9).
So how can I specify the special JDK when complete compile for some ...
0
votes
1
answer
438
views
NoSuchMethodError : No virtual method noBackupDirectory : andriodx.work on Android.mk (AOSP App - Android 10)
Getting the following runtime crash when using androidx.work aar on Android.mk. I want to use Android Workmanager in Android 10 AOSP platform app.
11-13 12:47:10.805 6236 6236 E AndroidRuntime: ...
4
votes
2
answers
3k
views
How to use external jar like jsoup library in android framework [AOSP] java files (NOT Android Studio or Java IDE)
I wish to use jsoup library in Android Open Source Project.
For this I did two things:-
Step 1:
Made a directory jsoup in common as follows: [android]prebuilts/misc/common/jsoup/
In this jsoup folder ...
1
vote
1
answer
612
views
AOSP prebuilt aar not added to frameworks
I have a simple aar file I would like to include as a prebuilt library to deploy with the AOSP build. The goal is to deploy the aar file in system/framework so that 3rd party developers can utilise it....
0
votes
1
answer
258
views
How to remove minSdkVersion from AndroidManifest.xml but still be able to build with Make?
I need to be able to build an application with both Gradle (for development) and with Make (for AOSP). Building the app in Android Studio and with Gradle from the command line complains about this ...
0
votes
1
answer
1k
views
How to implement androidx work runtime in android.mk?
I am trying to add a library into my Android.mk file but I could not succeed yet.
There is the implementation of the library in build.gradle file as below;
implementation "androidx.work:work-...
0
votes
1
answer
120
views
how android gradle pass build version to android mk
i have a android project which can build v2,v3 version
productFlavors {
v2 {
versionName "${versionMajor}.${versionMinor}.${versionBuild}"
}
...
0
votes
1
answer
303
views
res folder not loading from .aar library in AOSP
I am working on an AOSP project where I need to use a .aar library with the res folder.
I have added .aar reference in Android.mk file but getting below error while opening the app.
java.lang....
1
vote
1
answer
975
views
undefined reference to '__android_log_print'
I have compiled and ran Android 8 on emulator. I want to view the behavior of ART when installing and opening an application in AOSP. I added this line to dex2aot.cc file:
#include <android/log.h&...
1
vote
1
answer
926
views
How to use constraint-layout during AOSP build without including external .aar and .jar
I'm trying to build my java based android app through building as a module inside AOSP source. My app uses android.support.constraint.ConstraintLayout. But, I didn't find a direct way to include ...
1
vote
1
answer
529
views
any easy way AOSP app development workflow?
i am trying development an app put in aosp source tree.it use aosp built system,and with some native code .it also is an system app.but development workflow is a bit annoying: i am modify my app code ...
0
votes
0
answers
382
views
using prebuilt static/shared libs for my executable: Android makefile
seems this questions is asked couple of times and i have visited all of them and it did not help thus posting here..
objective: making executable using prebuilt libraries(static and shared) staying ...
2
votes
1
answer
815
views
AOSP - error: undefined reference to <function-name> during build
I need another person with good eyes to tell me what I am doing wrong here.
I've had to upgrade the U-boot bootloader on my devices, and naturally I've had to make things fit again. But currently I ...
0
votes
1
answer
491
views
Porting Android Studio Project into AOSP: need Android.mk
All,
I am experimenting with this example.
https://www.truiton.com/2014/11/bound-service-example-android/
It has a service class (as in "extends service") that instantiates a chronometer and ...
2
votes
0
answers
776
views
In Android.mk, how to copy all the files in a directory recursively to out/vendor/ directory
I have a folder structure as following.
sdk
├── 1.txt
├── 2.txt
└── install
├── bin
│ └── 3.txt
└── lib
└── 4.txt
I want to copy all these files to vendor/etc/ using Android.mk....
0
votes
2
answers
673
views
How do I add .cpp included files to the dependencies in android.mk?
In our Android project, we have several tens of C and CPP files which we #include through one container file for the build. The container file is listed in LOCAL_SRC_FILES, since that's what's ...
0
votes
0
answers
294
views
Building AppBarLayout from com.google.android.material with Android.mk
I have a system app that I am building using Android.mk. In my app layout, I want to use AppBarLayout from com.google.android.material. Here is the Android.mk:
LOCAL_PATH := $(call my-dir)
include $(...
1
vote
1
answer
1k
views
I am getting error while ndk build in android.mk file
I am getting error during ndk build. I have only one android.mk file and only one Application.mk file in my project
Android NDK: Trying to define local module 'protobuf' in /home/parag.j/AndroidArm//...
0
votes
1
answer
143
views
how to build 【openSSL-1.0.2u】 for Android,and if possible, how to merge Android Makefile?
when I use 1.1.1d 's build script, encounter some trouble, and how to generate kind of platorm, such as armv8a,armeabi, armv7a,x86..and so on
0
votes
2
answers
1k
views
Add androidx.viewpager2 to android.mk file
Trying to add androidx.viewpager2 to android.mk as below:
LOCAL_STATIC_ANDROID_LIBRARIES += \
androidx.viewpager2_viewpager2
Not able to build code using MMA command and gives below error.
...
0
votes
1
answer
183
views
How to add a custom Module-Description Variable in Android.mk?
I want to access a module description variable (a custom variable) while building an android module i.e. an executable or shared-library or prebuilt and based on its value do some extra processing on ...
3
votes
1
answer
7k
views
Error: SHARED_LIBRARIES missing STATIC_LIBRARIES Android.mk
I have an android application which also has c++ code dependencies.
I want to build this application as system application by compiling with AOSP.
In my android.mk, I have to first import a static ...
0
votes
1
answer
4k
views
How can I sign Android application with AOSP certificate
The context of my issue is the following:
I build AOSP for our hardware device on Linux
Together with the system, I build an APK as a system application
Everything works fine in this setup when I ...
2
votes
1
answer
2k
views
How to get Code Coverage in AOSP Java and Robolectric with Android.mk
I'm writing an Application in AOSP. I need to make a unit test for this app. For this purpose I used robolectric. The app and the test is compiled with make (Android.mk).
I need a code coverage report ...