Android MTK 8.1 预制应用 (讯飞输入法)

以讯飞为例:

 1. \vendor\mediatek\proprietary\packages\3rd-party 在此目录下新建文件如 iflyIME

 2.在iflyIME中导入讯飞apk  改名为 iflyIME(文件夹名字与apk名字必须相同)
 
 3.添加Android.mk 文件  
     Android.mk:
         LOCAL_PATH := $(call my-dir)

         include $(CLEAR_VARS)
         #Module name should match apk name to be installed
         LOCAL_MODULE := iflyIME
         LOCAL_MODULE_TAGS := optional
         LOCAL_SRC_FILES := $(LOCAL_MODULE).apk
         LOCAL_MODULE_CLASS := APPS
         LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
         LOCAL_CERTIFICATE := PRESIGNED
         #LOCAL_MODULE_PATH := $(TARGET_OUT)/vendor/operator/app
         LOCAL_MULTILIB :=32
        
         
         include $(BUILD_PREBUILT)


  注:如@lib/armeabi/libcom_iflytek_inputmethod_ocr.so \需要用360压缩打开apk 获取  后面需要空格+\ 最后一个不用加 

 4.	在 build/make/target/product/core.mk或device/mediatek/common/device.mk或     device\mediateksample\xxxx\device.mk 中添加PRODUCT_PACKAGES += facebook
     如:device\mediateksample\xxxx\device.mk (xxxx-是分支,根据不同的分支区分项目,android 8.1 在devices下sample中添加)
     
            PRODUCT_PACKAGES += iflyIME
            #PRODUCT_PACKAGES += ServiceController
            #PRODUCT_PACKAGES += TestApp
            # PRODUCT_PACKAGES += TF-OTA

       只需要这四步,就能把应用预制到我们的系统中了

你可能感兴趣的:(Android,MTK)