Hello.
I'm working on a clean build from branch android-5.1.0_r5 AOSP. All working fine , successfully built and running on device.
Now I am trying to add prebuilt APKs to the build as follows.
1) I created separate folders for my apps at $ANDROID_BUILD_TOP/packages/apps/
For instance:
$ANDROID_BUILD_TOP/packages/apps/MyApp
2) Then created inside the new folder, an Android.mk as follows:
LOCAL_MODULE := MyApp
LOCAL_MODULE_OWNER := MyAppOwner
LOCAL_SRC_FILES := MyApp.apk
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
LOCAL_MODULE_CLASS := APPS
LOCAL_MODULE_PATH := $(TARGET_OUT)/system/priv-app/MyApp/
LOCAL_CERTIFICATE := platform
include $(BUILD_PREBUILT)
Note: also replaced this
LOCAL_MODULE_PATH := $(TARGET_OUT)/system/priv-app/MyApp/
with:
LOCAL_MODULE_PATH := $(TARGET_OUT)/system/app/MyApp/
Question: Does the build system needs something different in order for me to assemble the build with my APK inside /system/priv-app directory instead of /system/app ?
3) Copied the referred MyApp.apk to the same folder.
4) Edited my $ANDROID_BUILD_TOP/device/<product>/<target>/aosp_<device>.mk by adding to
PRODUCT_PACKAGES += \
...
MyApp
5) Issued make systemimage (also tried the whole make -jN). Then the build system worked on the app by making all the necessary compilation ahead and the stopped successfully. Despite of that, no APK was found inside $OUT/system/app/MyApp/ nor $OUT/system/priv-app/MyApp/ in case. Flashed the newly created $OUT/system.img using fastboot with no avail.
What am I missing here?
Regards,