Android MTK 8.1 預製應用 (訊飛輸入法)
阿新 • • 發佈:2018-11-19
以訊飛為例:
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 LOCAL_PREBUILT_JNI_LIBS:= \ @lib/armeabi/libcom_iflytek_inputmethod_mmp.so \ @lib/armeabi/libcom_iflytek_inputmethod_ocr.so \ @lib/armeabi/libcom_iflytek_inputmethod_setting.so \ @lib/armeabi/libcom_iflytek_inputmethod_thirdbkservices.so \ @lib/armeabi/libcom_iflytek_inputmethod_translate.so \ @lib/armeabi/libdexopt.so \ @lib/armeabi/libencdec-jni-v1.so \ @lib/armeabi/liblwl.so \ @lib/armeabi/libMetaVAD-v1.so \ @lib/armeabi/libmsc-v9.so \ @lib/armeabi/libnalsocket.so \ @lib/armeabi/libNativeCrashCollect.so \ @lib/armeabi/libsmartaiwrite-jni-v31.so \ @lib/armeabi/libvadLib-v5.so \ @lib/armeabi/libvipfont.so 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 只需要這四步,就能把應用預製到我們的系統中了