CodeGuru CodeGuru - 3 months ago 96
Android Question

Add .apk files in aosp

I need to add some 3rd party apk files to the aosp. Can anyone tell in which folder i should keep these apk files so that when I build the code and image is created it is installed in the emulator.

Its like the system apps are kept in Packages/app folder so need to know where does third party .apk files are kept.


Adding third party APKs to the build is definitely possible.

Also APKs and APPs with source code go to the same place; the package/app folder.

Adding a new APK to the build

In the AOSP root add the folder:

<aosp root>/package/app/< yourappfolder >

Then inside this folder add:

  • empty
  • < yourapp.apk >

The android make file should have the reference to your apk, add this to your

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)


LOCAL_MODULE := < your app folder name >

LOCAL_CERTIFICATE := < desired key >

LOCAL_SRC_FILES := < app apk filename >




Create an entry in the (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 >

Compile the AOSP and you have a brand new app installed on the system.