一、添加到Removeable中(可卸载)
1. 在 alps/device/Amobile/A_101/device.mk 文件中添加改APK: OPera_MINI 名字
# add third parth removable apk
PRODUCT_PACKAGES += \
FaceBook \
MXPlayer \
Hungamaplay \
OPera_MINI \
Exceloemstub \
Pptoemstub \
BeautyPlusMe \
Dailyhunt \
VuLiv \
eyewatchbasic \
Saavn \
Wordoemstub
2.在alps/vendor/mediatek/proprietary/packages/3rd-party/removable/A_apps/ 添加该APK的一个文件夹OPera_MINI
alps/vendor/mediatek/proprietary/packages/3rd-party/removable/iball_apps/OPera_MINI
3.并在该文件夹中添加对于的Apk文件和Android.mk文件
alps/vendor/mediatek/proprietary/packages/3rd-party/removable/A_apps/OPera_MINI/Android.mk
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
# Module name should match apk name to be installed
LOCAL_MODULE := OPera_MINI
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
include $(BUILD_PREBUILT)
4.还有apk文件
alps/vendor/mediatek/proprietary/packages/3rd-party/removable/A_apps/OPera_MINI/OPera_MINI.apk
二、添加到build_in中(不可卸载) 第一种,不需要so包的情况
1.首先,在alps/device/Amobile/A_101/ProjectConfig.mk 文件中,添加上对应的开关
MIKI_BUILD_IN_A_BROWSER_APP=yes
2.在 alps/vendor/mediatek/proprietary/packages/3rd-party/build-in/ 中创建该APK的文件夹 :A_Browser
alps/vendor/mediatek/proprietary/packages/3rd-party/build-in/A_Browser
3.在文件夹中添加上对应Android.mk文件
alps/vendor/mediatek/proprietary/packages/3rd-party/build-in/A_Browser/Android.mk
#
# Miki Prebuilt package
#
ifeq ($(MIKI_BUILD_IN_A_BROWSER_APP),yes)
LOCAL_PATH := $(call my-dir)
#
# include sub dir makefile
#
include $(call all-subdir-makefiles)
endif
4.添加上apk文件夹
alps/vendor/mediatek/proprietary/packages/3rd-party/build-in/A_Browser/apk
5.在文件夹中添加对应的Android.mk的文件
alps/vendor/mediatek/proprietary/packages/3rd-party/build-in/A_Browser/apk/Android.mk
LOCAL_PATH :=$(call my-dir)
all-apks := $(patsubst $(LOCAL_PATH)/%,%,$(wildcard $(LOCAL_PATH)/*.apk))
$(info All APK Files: $(all-apks))
$(foreach tm,$(all-apks), \
$(eval rm_file := $(wildcard $(TARGET_OUT)/app/$(tm))) \
$(if $(rm_file),$(shell rm -rf $(rm_file)),) \
)
$(foreach m, $(all-apks), \
$(eval include $(CLEAR_VARS)) \
$(eval m := $(strip $(notdir $(m)))) \
$(eval LOCAL_MODULE := $(patsubst %.apk,%,$(m))) \
$(eval LOCAL_MODULE_TAGS := optional) \
$(eval LOCAL_MODULE_CLASS := APPS) \
$(eval LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)) \
$(eval LOCAL_CERTIFICATE := PRESIGNED) \
$(eval LOCAL_SRC_FILES := $(m)) \
$(eval $(ALL_PREBUILT):$(LOCAL_MODULE)) \
$(eval include $(BUILD_PREBUILT)) \
$(eval m := ) \
)
6.在apk文件夹中添加对应的apk文件
alps/vendor/mediatek/proprietary/packages/3rd-party/build-in/A_Browser/apk/BrowseriBall.apk
三、添加到build_in中(不可卸载) 第二种,需要so包的情况
1.在
alps/device/Amobile/A_101/ProjectConfig.mk 文件中添加对应的开关
A_BUILD_IN_CLEARMASTER_APP=yes
----------
2.在 alps/vendor/mediatek/proprietary/packages/3rd-party/build-in/目录下添加对应的APK的文件夹
alps/vendor/mediatek/proprietary/packages/3rd-party/build-in/A_CleanMaster
----------
3. 在 A_CleanMaster 文件夹下创建对应的Android.mk文件
alps/vendor/mediatek/proprietary/packages/3rd-party/build-in/A_CleanMaster/Android.mk
#
# Miki Prebuilt package
#
ifeq ($(A_BUILD_IN_CLEARMASTER_APP),yes)
LOCAL_PATH := $(call my-dir)
#
# include sub dir makefile
#
include $(call all-subdir-makefiles)
endif #ifeq ($(IBALL_BUILD_IN_CLEARMASTER_APP),yes)
----------
4.在 alps/vendor/mediatek/proprietary/packages/3rd-party/build-in/A_CleanMaster文件夹中添加对应的apk文件夹
alps/vendor/mediatek/proprietary/packages/3rd-party/build-in/A_CleanMaster/apk
----------
5.在
alps/vendor/mediatek/proprietary/packages/3rd-party/build-in/A_CleanMaster/apk 文件夹下添加对应的Android.mk文件
alps/vendor/mediatek/proprietary/packages/3rd-party/build-in/A_CleanMaster/apk/Android.mk
LOCAL_PATH :=$(call my-dir)
all-apks := $(patsubst $(LOCAL_PATH)/%,%,$(wildcard $(LOCAL_PATH)/*.apk))
$(info All APK Files: $(all-apks))
$(foreach tm,$(all-apks), \
$(eval rm_file := $(wildcard $(TARGET_OUT)/app/$(tm))) \
$(if $(rm_file),$(shell rm -rf $(rm_file)),) \
)
$(foreach m, $(all-apks), \
$(eval include $(CLEAR_VARS)) \
$(eval m := $(strip $(notdir $(m)))) \
$(eval LOCAL_MODULE := $(patsubst %.apk,%,$(m))) \
$(eval LOCAL_MODULE_TAGS := optional) \
$(eval LOCAL_MODULE_CLASS := APPS) \
$(eval LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)) \
$(eval LOCAL_CERTIFICATE := PRESIGNED) \
$(eval LOCAL_SRC_FILES := $(m)) \
$(eval $(ALL_PREBUILT):$(LOCAL_MODULE)) \
$(eval include $(BUILD_PREBUILT)) \
$(eval m := ) \
)
----------
6.在 alps/vendor/mediatek/proprietary/packages/3rd-party/build-in/A_CleanMaster/apk文件夹下添加对应的apk文件
alps/vendor/mediatek/proprietary/packages/3rd-party/build-in/A_CleanMaster/apk/com.cleanmaster.mguard_cn.apk
----------
7.在 alps/vendor/mediatek/proprietary/packages/3rd-party/build-in/A_CleanMaster 文件夹下添加对应的libs文件夹
alps/vendor/mediatek/proprietary/packages/3rd-party/build-in/A_CleanMaster/libs
----------
8.在 alps/vendor/mediatek/proprietary/packages/3rd-party/build-in/iBall_CleanMaster/libs 文件夹下添加对应的 Android.mk文件
alps/vendor/mediatek/proprietary/packages/3rd-party/build-in/A_CleanMaster/libs/Android.mk
LOCAL_PATH :=$(call my-dir)
all-libs := $(patsubst $(LOCAL_PATH)/%,%,$(wildcard $(LOCAL_PATH)/*.so))
$(info All libs Files: $(all-libs))
$(foreach tm,$(all-libs), \
$(eval rm_file := $(wildcard $(TARGET_OUT)/lib/$(tm))) \
$(if $(rm_file),$(shell rm -rf $(rm_file)),) \
)
$(foreach m, $(all-libs), \
$(eval include $(CLEAR_VARS)) \
$(eval m := $(strip $(notdir $(m)))) \
$(eval LOCAL_MODULE := $(m)) \
$(eval LOCAL_MODULE_TAGS := optional) \
$(eval LOCAL_MODULE_CLASS := SHARED_LIBRARIES) \
$(eval LOCAL_SRC_FILES := $(m)) \
$(eval $(ALL_PREBUILT):$(LOCAL_MODULE)) \
$(eval include $(BUILD_PREBUILT)) \
$(eval m := ) \
)
----------
9.在 alps/vendor/mediatek/proprietary/packages/3rd-party/build-in/A_CleanMaster/libs 文件夹下添加配套对应的.so库文件
库文件可以通过解压该.apk文件获得
alps/vendor/mediatek/proprietary/packages/3rd-party/build-in/A_CleanMaster/libs/libcleaninject.so
alps/vendor/mediatek/proprietary/packages/3rd-party/build-in/A_CleanMaster/libs/libkcmutil.so
alps/vendor/mediatek/proprietary/packages/3rd-party/build-in/A_CleanMaster/libs/libsyscore.so
----------
注意文件夹的命名,和开关的命名和.mk文件里的对应的名字是否一致。