AnsweredAssumed Answered

How to pack and pre-install a Prebuilt APK?

Question asked by Tsung-Fang Tu on Mar 19, 2014
Latest reply on Jan 24, 2018 by Tony Lee

Hi All,

 

    Our project is based on Andorid ICS(i.MX6 Solo). All hardware/software development is almost done and now we are preparing to finalize the firmware image for mp.

 

    However, we are stuck in packing and pre-installing a Prebuilt APK which is provided by a software partner. After making whole BSP, we can see the APK file is existing in /myandroid/out/target/product/sabresd_6dq/data/app folder, but NOT in the installed-files.txt, neither in the system.img.

 

    Below is the content of the Android.mk:

 

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE := myAPP

LOCAL_SRC_FILES := $(LOCAL_MODULE).apk

LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)

LOCAL_MODULE_CLASS := APPS

LOCAL_CERTIFICATE := PRESIGNED

#LOCAL_MODULE_PATH := $(TARGET_OUT)/app

LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)

LOCAL_MODULE_TAGS := optional

include $(BUILD_PREBUILT)

 

    And we have added below into /myandroid/devices/fsl/imx6/imx6.mk:

 

PRODUCT_PACKAGES += \

    myAPP

 

    The same APK file can be manually installed after enabling Android setup->security->unknown source, not sure if we should enable this feature by default, if so, how can we do it in Android BSP?

 

    And due to the privilege reason, we cannot put the APK into /system/app level. All opinions and comments are more than welcome.

 

    BTW, we are going to apply the same on another product line which is based on Andorid 4.3 (i.MX6 Sololite), please also kind advise us if the configuration is different for ICS and JB!

 

    Thanks in advance!

 

-tftu

Outcomes