我在android.mk中遇到了一个问题。它总是告诉我找不到-lsubstrate-dvm和-lsubstrate。我不知道它是什么?有人能告诉我如何解决这个问题吗?这是logcat:
Android NDK:non-system libraries in linker flags: -libsubstrate-dvm -libsubstrate
Android NDK: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
Android NDK: current module
cannot find -libsubstrate-dvm
cannot find -libsubstrate
这是android.mk
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := substrate
LOCAL_SRC_FILES := libsubstrate.so
include $(PREBUILT_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := substrate-dvm
LOCAL_SRC_FILES := libsubstrate-dvm.so
include $(PREBUILT_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := cydiasubstrate.cy
LOCAL_SRC_FILES := cydiasubstrate.cy.cpp
LOCAL_LDLIBS := -llog -L$(LOCAL_PATH) -lsubstrate-dvm -lsubstrate -lz
LOCAL_ARM_MODE := arm
APP_ALLOW_MISSING_DEPS=true
include $(BUILD_SHARED_LIBRARY)
请帮我解决这个问题。
答案 0 :(得分:0)
substrate -dvm是正在构建的模块的名称,它依赖于预构建库,而不是源代码,所以你应该寻找libsubstrate-dvm.so
您可以按照以下链接获取进一步的帮助: https://blog.gdssecurity.com/labs/2014/12/16/hooking-non-public-methods-with-the-ndk-using-mobile-substra.html
包含Substrate库。最简单的方法 这样做是为了导航到'/ sdk / extras / saurikit / cydia_substrate /' 目录并复制'substrate.h'并导航到 '/ sdk / extras / saurikit / cydia_substrate / lib //'目录和副本 'libsubstrate-dvm.so'文件进入项目的jni文件夹。