当前位置:   article > 正文

52-Android之内置应用_libcrashpad_handler_trampoline

libcrashpad_handler_trampoline

52-Android之内置应用


平台: Android10 MTK6739

内置不带so库的应用,如:

WhatsApp # WhatsApp是带so库,此处只是举例
build/make/target/product/base_system.mk
PRODUCT_PACKAGES += \
    WhatsApp \
    
vendor/mediatek/proprietary/packages/apps/WhatsApp目录:
vendor/mediatek/proprietary/packages/apps/WhatsApp/Android.mk
vendor/mediatek/proprietary/packages/apps/WhatsApp/WhatsApp.apk

Android.mk文件内容:
###################################
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := WhatsApp
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := APPS
LOCAL_BUILT_MODULE_STEM := package.apk
# PRESIGNED: 表示APK签名使用原来签名,即第三方签名;
# platform: 表示APK使用系统签名, APK获得系统权限 
LOCAL_CERTIFICATE := PRESIGNED 
# 表示编译后APK放在/system/vendor/operator/app目录下面, 用户可以卸载, 如果不加这句, 则会放在/system/app/下面, 用户不可以卸载
LOCAL_MODULE_PATH := $(TARGET_OUT)/vendor/operator/app
LOCAL_DEX_PREOPT := false
LOCAL_MODULE_TARGET_ARCH := arm
LOCAL_SRC_FILES_arm := $(LOCAL_MODULE).apk
include $(BUILD_PREBUILT)
######################################
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27

内置带so库的应用,如:

Opera
build/make/target/product/base_system.mk
PRODUCT_PACKAGES += \
    Opera \
    
vendor/mediatek/proprietary/packages/apps/Opera 目录:
vendor/mediatek/proprietary/packages/apps/Opera/Android.mk
vendor/mediatek/proprietary/packages/apps/Opera/Opera.apk
vendor/mediatek/proprietary/packages/apps/Opera/libchrome_crashpad_handler.so
vendor/mediatek/proprietary/packages/apps/Opera/libcrashpad_handler_trampoline.so
vendor/mediatek/proprietary/packages/apps/Opera/libopera.so

Android.mk文件内容:
###################################
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := Opera
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := APPS
LOCAL_BUILT_MODULE_STEM := package.apk
LOCAL_CERTIFICATE := PRESIGNED
LOCAL_DEX_PREOPT := false
LOCAL_MODULE_TARGET_ARCH := arm
LOCAL_SRC_FILES_arm := $(LOCAL_MODULE).apk
# SO库的处理
LOCAL_PREBUILT_JNI_LIBS:= \
    libchrome_crashpad_handler.so \
    libcrashpad_handler_trampoline.so \
    libopera.so

include $(BUILD_PREBUILT)
###################################
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32

平台: Android4.4 SPRD SC9820E

内置带so库的应用,如:

SipHome
device/sprd/sharkle/common/common_packages.mk
PRODUCT_PACKAGES += \
    libpj_opensl_dev \
    libpjsipjni \
    libstlport_shared \ 
    SipHome \

packages/apps/SipHome目录:
packages/apps/SipHome/Android.mk
packages/apps/SipHome/源码
packages/apps/SipHome/libs/armeabi-v7a/libpj_opensl_dev.so
packages/apps/SipHome/libs/armeabi-v7a/libpjsipjni.so
packages/apps/SipHome/libs/armeabi-v7a/libstlport_shared.so

Android.mk文件内容:
###################################
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
LOCAL_AAPT_FLAGS := --auto-add-overlay
LOCAL_AAPT_FLAGS += --extra-packages android.support.v4
LOCAL_AAPT_FLAGS += --extra-packages com.csipsimple
LOCAL_SRC_FILES := \
     $(call all-java-files-under, src)  
LOCAL_SRC_FILES += $(call all-Iaidl-files-under, src/com/csipsimple/api)
LOCAL_SRC_FILES += $(call all-Iaidl-files-under, src/android/app/sip)
LOCAL_JNI_SHARED_LIBRARIES :=  \
        libpj_opensl_dev \
        libpjsipjni \
        libstlport_shared 
LOCAL_PACKAGE_NAME := SipHome
LOCAL_CERTIFICATE := platform
LOCAL_PROGUARD_ENABLED := disabled
include $(wildcard vendor/sprd/platform/frameworks/support/ActionBarSherlock/apply_actionbar_sherlock.mk)
include $(wildcard vendor/sprd/platform/frameworks/support/featurebar/apply_featurebar.mk)
include $(BUILD_PACKAGE)

#====================================================
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
LOCAL_MODULE_SUFFIX := .so
LOCAL_MODULE := libpj_opensl_dev
LOCAL_SRC_FILES := libs/armeabi-v7a/$(LOCAL_MODULE).so
LOCAL_MODULE_PATH := $(TARGET_OUT)/lib
LOCAL_MULTILIB := 32
include $(BUILD_PREBUILT)
#====================================================

#====================================================
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
LOCAL_MODULE_SUFFIX := .so
LOCAL_MODULE := libpjsipjni
LOCAL_SRC_FILES := libs/armeabi-v7a/$(LOCAL_MODULE).so
LOCAL_MODULE_PATH := $(TARGET_OUT)/lib
LOCAL_MULTILIB := 32
include $(BUILD_PREBUILT)

#====================================================
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
LOCAL_MODULE_SUFFIX := .so
LOCAL_MODULE := libstlport_shared
LOCAL_SRC_FILES := libs/armeabi-v7a/$(LOCAL_MODULE).so
LOCAL_MODULE_PATH := $(TARGET_OUT)/lib
LOCAL_MULTILIB := 32
include $(BUILD_PREBUILT)
###################################
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/weixin_40725706/article/detail/143197
推荐阅读