Incorrect string obtained with VMProtectDecryptStringA on Android ARM64.

Issues related to VMProtect
Post Reply
vmp123712379
Posts: 1
Joined: Mon Nov 03, 2025 4:39 am

Incorrect string obtained with VMProtectDecryptStringA on Android ARM64.

Post by vmp123712379 »

Hello guys. I bought VMProtect Lite for my Android NDK project yesterday. But I found the function VMProtectDecryptStringA can not work.

For example,

1. My code:

const char *str = VMProtectDecryptStringA("MY SECURE STRING");
printf("Decrypted string: %s\n", str);

2. And then I run ndk-build to get a binary file for Android ARM64 Platform

3. Pull the file to VMProtect lite on Windows with default settings

4. 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 <cstdio>

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?
Admin
Site Admin
Posts: 2809
Joined: Mon Aug 21, 2006 8:19 pm
Location: Russia, E-burg
Contact:

Re: Incorrect string obtained with VMProtectDecryptStringA on Android ARM64.

Post by Admin »

Fixed in the 2515 build.
Post Reply