android.mk

How to add extra permission to a prebuilt application (no source code) in AOSP

流过昼夜 提交于 2019-11-30 23:39:02
I have an application that doesn't have a specific android permission(for example android.permission.CHANGE_CONFIGURATION ). I don't have its source code. I'm working on an AOSP. I prebuilt this application like: Put APK in /device/model/apps/HERE Add these snippet codes in Android.mk: define PREBUILT_templateByMe LOCAL_MODULE := $(1) LOCAL_MODULE_CLASS := APPS LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX) LOCAL_CERTIFICATE := PRESIGNED LOCAL_SRC_FILES := $$(LOCAL_MODULE).apk LOCAL_REQUIRED_MODULES := $(2) include $(BUILD_PREBUILT) endef define PREBUILT_APP_templateByMe include $$

UnsatisfiedLinkError when calling C++ method in C++ file from Java file

别来无恙 提交于 2019-11-30 09:44:33
问题 It looks like it is the popular problem, And I still not find out the solution. package name : app.cloudstringers Java file : Completed.java static { try { System.loadLibrary("ffmpeg"); } catch (UnsatisfiedLinkError e) { Log.d("", "Error : " + e.toString()); } } // Define native method public native int getString(); @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.page_completed); // Call native method Log.d("", "" +

aar support in Android.mk

谁说胖子不能爱 提交于 2019-11-28 18:59:12
I am doing android custom ROM development now. the build system of aosp is based on Android.mk, But I want to include some aar libraries, is it possible to include aar libaries in Android.mk ? You should add following blocks into your Android.mk LOCAL_STATIC_JAVA_AAR_LIBRARIES:= <aar alias> . . . include $(BUILD_PACKAGE) include $(CLEAR_VARS) LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := <aar alias>:libs/<lib file>.aar include $(BUILD_MULTI_PREBUILT) Please also be aware of satisfy minSdkVersion required by library into your manifest file. Kostiantyn Luzan's answer has a problem. After compile, the