I have a custom rom based on AOSP and I am working on a system app that is packaged during the rom build just like any other system app.
Is it possible to switch this ap
I didn't find a perfect solution for this. But you can try:
Android.mk:
LOCAL_PATH := $(call my-dir)
$(info $(shell ($(LOCAL_PATH)/gradlew build -p $(LOCAL_PATH)/)) )
$(info $(shell ($(LOCAL_PATH)/finalize.sh $(PRODUCT_OUT))))
finallize.sh:
BASEDIR=$(dirname $0)
PRODUCT_PATH=$1
echo $PRODUCT_PATH
java -Xmx1024m -jar $BASEDIR/../../../out/host/linux-x86/framework/signapk.jar $BASEDIR/../../../build/target/product/security/platform.x509.pem $BASEDIR/../../../build/target/product/security/platform.pk8 $BASEDIR/main/build/outputs/apk/main-normal-release-unsigned.apk $PRODUCT_PATH/system/app/MYAPP.apk
It worked for me