I was trying to add an APK in AOSP version 10 as system application. I have followed the procedure mentioned in almost different links which is here Add apk in AOSP but nothing worked. The process mentioned in this link and the steps I followed are:
- Put my Apk in
Aosp_root/packages/apps/my-app-folder/my-app.apk
- Write
Android.mk
ofmy-app.apk
in/my-app-folder
Code of Android.mk
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE := Signal
LOCAL_CERTIFICATE := platform
LOCAL_SRC_FILES := Signal-website-universal-release-4.55.8.apk
LOCAL_MODULE_CLASS := APPS
LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
include $(BUILD_PREBUILT)
- Then in step 3 to add
PRODUCT_PACKAGES
incore.mk
orcommon.mk
I could not find both specified files (core.mk
orcommon.mk
) in specified directory (build/target/products
). But I foundgsi-common.mk
file inbuild/target/product
folder and foundPRODUCT_PACKAGES
in this file and added directory of my-app in it.
here is code of gsi-common.mk
.
`PRODUCT_PACKAGES += \
messaging \
PhotoTable \
WAPPushManager \
WallpaperPicker \
Signal \`
- After rebuilding AOSP for
aosp-root
and flashing it on device nothing has changed,my-app.apk
was not added. Then i usedmm
command inpackages/apps
directory and it builtmy-app.apk
and it was added inaosp_root/out/target/product/taimen/system/app
. After it I run make snod command to re-generate system image and it was created. When I flashed this image in my Pixel device it stucks on Google logo and also shows operating system is corrupt before it shows google logo.
Can you tell me what I am missing or which step is wrong ?