Build gradle system app as part of AOSP build

后端 未结 1 1095
生来不讨喜
生来不讨喜 2021-02-01 23:38

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

相关标签:
1条回答
  • 2021-02-01 23:55

    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

    0 讨论(0)
提交回复
热议问题