I modded a game, but it doesn't work on...

7VRyuta

New User
7
12/20/19
0
Thread Author
I modded a game called AnimA ARPG. But, for some reason it doesn't work on my phone or in vmos(click me) (installed in my phone). It works on emulator, for example LDPlayer, the emulator I used to test it. I only edit the libil2cpp.so in armeabi-v7a. There's two folder in lib folder inside the game, arm64-v8a and armeabi-v7a. Should both lib.so be edited to make it work on my phone and in vmos? I'm sure I edited the correct address and such, because it works on LDPlayer but doesn't in my phone or in vmos.
 
I modded a game called AnimA ARPG. But, for some reason it doesn't work on my phone or in vmos(click me) (installed in my phone). It works on emulator, for example LDPlayer, the emulator I used to test it. I only edit the libil2cpp.so in armeabi-v7a. There's two folder in lib folder inside the game, arm64-v8a and armeabi-v7a. Should both lib.so be edited to make it work on my phone and in vmos? I'm sure I edited the correct address and such, because it works on LDPlayer but doesn't in my phone or in vmos.
if your device running on arm64 then delete the arm64-v8a and sign the apk .. install then it should work ... or edit the the il2cpp file in arm64-v8a folder ....either should work
 
if your device running on arm64 then delete the arm64-v8a and sign the apk .. install then it should work ... or edit the the il2cpp file in arm64-v8a folder ....either should work
I see.. I will edit the lib again, delete arm64 and sign, then test. Will try it now.
 
Yeah.. It doesn't work. Maybe I edit the wrong thing U w U, I guess on to google infos about arm64-v8a it is.. Thanks for the help tho.
 
Well to begin with, u should ensure u are patching the bytes correctly and you are not messing up the stack, u should also ensure to push/pop (stmfd/ldmfd) any register the caller potentially needs (might not be necessary depends on what and which function you are patching).

Assuming that's all fine, you should do as alex says and try deleting the arm64-v8 folder and just leaving the arm-v7 one, if that still crashes your game then maybe the game enforces to load the arm64-v8 lib if you are on arm64.

If this happens you can either try bypassing that (if it really exists, you can try attaching a debugger and see where it crashes) or just modify the x64 lib, remember you cant use the same instructions you used to patch the x32 lib since now you are working with another architecture (x64 arm in this case, you were working with x32 before).

Just recreate all your instructions from x32 to x64, use ARM To HEX Converter Online (select x64) as a reference to translate the instructions into hex to patch the binary.
 
Just recreate all your instructions from x32 to x64, use ARM To HEX Converter Online (select x64) as a reference to translate the instructions into hex to patch the binary.

Just asking, does...

mov x3, #100
mov x2, #100
add x0, x2, x3
ret

Do anything? Also, stack? push/pop? Like.. ' push {x0, x1} ' something like that?
 
Last edited:
You know what, just ignore the above.. so what I did was, I edit the CritChance inside the game..

stp x29, x30, [sp,#-0x10]!
ldp x29, x30, [sp],#0x10

with this, and some between those two instructions.. I managed to get the 'edit' work. INCREASED CRITCHANCE but, it's not always.

Say, normal apk, lowest 1/10 attacks crit, 3/10 attacks crit, highest.

With the edited one(arm64 lib), lowest 4/10 attacks, highest 6/10 attacks crit hit.

While armv7, ALWAYS CRIT, maybe cuz I add/mov really high value.

"Done, without any some sort of equip/passives in-game that increases crit chance."



So.. how do i add a high value into a register in arm64? I've searched online, none of it helped me understand how to--
 
The problem might be that you are not passing the correct type, there's a difference between passing, let's say, a float or an int, they have different representations in arm, u might be returning an int when you are supposed to return a float and that may or may not cause trouble.

I don't really know what u mean by add a high value into a register in arm64, idk why u are doing a sum when you are setting a value, u can just mov the amount you want and return it, for any instruction you might have a doubt just check the arm infocenter.
 
Ignore that "add a high value into a register in arm64" 😂 IDK WHY I EVEN ASK THAT.

Welp, the thing I'm trying to edit is definitely float, not int. LOLOLOL. I'M SO DUMB.

So.. i have to load a register with a floating-point immediate value? then.. FMOV in A64? I wonder if I can use VMOV.. Can't, right? Hmm.. I don't know how to use FMOV/VMOV or.. even, VLDR.
 
You have two ways here:

- You hook (detour) the function you want to return (that is, make a .so lib with c/c++, code the hook for the function, compile with ndk for x64 targets) and make it return whatever float value you want (you then need to later load that lib into the game with loadlibrary).

- You can make a c style func that returns a float, something like:
C:
float fTest() {
    return 999.f;
};

Compile it with ndk for x64 archs and open the lib you just compiled in ida, find the function and check how it generated the return 999.f, then you just copy those bytes and patch them in the game's lib, note that you can do this method to understand how most things are translated into arm also note that code might differ depending optimization from the compiler.
 
Last edited:
Back
Top Bottom