Platinmods MemoryPatch is a C++ library or template for External Hex Patching into Process Memory which only work for Android 7 and higher. The original source is from ZMemory, but i changed most of the code to make it work like KittyMemory.
This example patches a method replace values and restore value, example apk from Il2Cpp Exploitation POC is used.
#include "Platinmods/PlatinmodsMemoryPatch.h"
int main() {
pid_t pid = Platinmods::getPid("com.Acessor.Il2CppPOC");
Platinmods::MemoryPatch patch1 = Platinmods::MemoryPatch(pid, "libil2cpp.so", "0x524E24", "7F 08 A0 E3 1E FF 2F E1");
// Write Modified Hex
bool result = patch1.Modify();
if (result) {
printf("Offset patches successfully!\n");
} else {
printf("Patch failed\n");
}
// Restore Original Hex
patch1.Restore();
return 0;
}