预装.so
include $(CLEAR_VARS)
LOCAL_MODULE := lib.so
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)
LOCAL_SRC_FILES := libs/$(LOCAL_MODULE)
OVERRIDE_BUILT_MODULE_PATH := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)
include $(BUILD_PREBUILT)
预装第三方apk的Android.mk
LOCAL_PATH :=$(call my-dir)
#----------------------------------------------------------------
# Google apps
#----------------------------------------------------------------
google-apks := $(patsubst $(LOCAL_PATH)/%,%,$(wildcard $(LOCAL_PATH)/*.apk))
$(info google-apks Files: $(google-apks))
$(foreach m, $(google-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 include $(BUILD_PREBUILT)) \
$(eval m := ) \
)
Reference:
http://w263235.s114-5.myverydz.com/forum.php?mod=viewthread&tid=30
http://blog.csdn.net/gaoguoxin2/article/details/7880222
http://www.kandroid.org/online-pdk/guide/build_cookbook.html