Hello guys. I bought VMProtect Lite for my Android NDK project yesterday. But I found the function VMProtectDecryptStringA can not work.
For example,
- My code:
const char *str = VMProtectDecryptStringA(“MY SECURE STRING”);
printf(“Decrypted string: %s\n”, str);
-
And then I run ndk-build to get a binary file for Android ARM64 Platform
-
Pull the file to VMProtect lite on Windows with default settings
-
Push the protected file to my android phone and run it, what I get is:
Decrypted string: 4Y SECURE STRING
The first letter is missing and replaced with a wrong letter.
My project file architecture:
.
└── jni
├── Android.mk
├── Application.mk
├── include
│ └── VMProtectSDK.h
├── libs
│ └── arm64-v8a
│ └── libVMProtectARM64.so
└── src
└── main.cpp
6 directories, 5 files
Android.mk File:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := vmp_android
LOCAL_SRC_FILES := libs/$(TARGET_ARCH_ABI)/libVMProtectARM64.so
include $(PREBUILT_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := test_module
FILE_LIST := $(shell find $(LOCAL_PATH)/src -name ‘.c’ -o -name '.cpp’)
LOCAL_SRC_FILES := $(FILE_LIST:$(LOCAL_PATH)/%=%)
LOCAL_SHARED_LIBRARIES := vmp_android
include $(BUILD_EXECUTABLE)
Application.mk File:
APP_STL := c++_static
APP_ABI := arm64-v8a
APP_MODULES := test_module
NDK_TOOLCHAIN_VERSION := clang
APP_TOOLCHAIN_VERSION := clang
APP_PLATFORM := android-21
main.cpp:
#include “../include/VMProtectSDK.h”
#include
int main() {
const char *str = VMProtectDecryptStringA(“MY SECURE STRING”);
printf(“Decrypted string: %s\n”, str);
return 0;
}
NDK Version: 27.0.12077973
Running Android Version: Android 14
Do you have any solution on this problem?