Adding a new APK to the build in /system/app
In the AOSP root add the folder:
<aosp root>/package/app/< yourappfolder >
Then inside this folder add:
empty Android.mk
< yourapp.apk >
The android make file should have the reference to your apk, add this to your Android.mk:
Code: Select all
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE := < your app folder name >
LOCAL_CERTIFICATE := < desired key >
LOCAL_SRC_FILES := < app apk filename >
LOCAL_MODULE_CLASS := APPS
LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
include $(BUILD_PREBUILT)
Create an entry in the commons.mk (usually in build/target/product) for your apk add the line (check where all the others are)
PRODUCT_PACKAGES += < what you have defined in LOCAL_MODULE, it should be your app folder name >
READ THIS:
If you wish to install the APK in /data/app you will need to add the following the line to Android.mk before line include $(BUILD_PREBUILT)
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)