mydogsocute
Platinian
Hello, I've gone through a majority of the tutorials, the ones I was able to find, and I seem to still be struggling with making a simple mod for il2cpp games. Not sure which part I'm messing up on, so I'll give a run down on what I'm doing to see if anyone could point out my mistakes! (I'm trying this on an emulator running 64 bit so the game is ARM64. I just finished reading G-Bo's entry on Hex Codes in ARM64.)
The gaming I'm trying to mod seems very simple. It's called Idle RPG Adventure Hero, it's got a small player base of 50k players and it uses il2cpp as mentioned above.
Firstly, I use APK Tool Easy to unpack the apk, not required I don't believe as I can just drag out the required files, modify them, then resign with APK Tool Easy. After I unpack the apk I'm grabbing the globalmetadata and the largest .so file in the lib, "libil2cpp.so". I use an IL2CPP Dumper to get the dumps.cs file, but I mainly use the Dummy dll files for looking around in dnspy. In the 64 bit version of the game I get the following offset for _hp on the EnemyCtr (EnemyController or EnemyCharacter, I'm assuming.) They use a getter for it so the method is called get__hp.
(P.s. I tried doing this with the 32 bit version of the game, but it only supports Android 9+ so it will instantly crash while booting.)
After getting the offset for the _hp getter, I open hxd and press Shift + G to access the address inside of the "libil2cpp.so" file. Once I find the address I am replacing it with this, which I found on G-Bo's post about Hex Codes:
I input the hex starting at the beginning of the offset for the _hp getter. Once I finish I drag the "libil2cpp.so" file back into the apk using WinRaR to replace the normal one. I then use APK Tool Easy to resign the app and then load it into LDPlayer9 on a 64 bit Android 9 Instance. The app runs correctly without any issues, and I've even checked the apk inside once on the emulator. I've tried multiple things such as deleting the lib for 32 bit and it still doesn't change anything inside of the app. If anyone has any ideas please help me out. Just started learning a little bit back and have a little experience with cheat engine and c# modding on unity games for pc. Thank you.
If I'm missing any info that is required for assistance please just let me know and I can provide you with a step-by-step of what I did. I tried to include as much as possible in this post. Hopefully I didn't forget any steps!
The gaming I'm trying to mod seems very simple. It's called Idle RPG Adventure Hero, it's got a small player base of 50k players and it uses il2cpp as mentioned above.
Firstly, I use APK Tool Easy to unpack the apk, not required I don't believe as I can just drag out the required files, modify them, then resign with APK Tool Easy. After I unpack the apk I'm grabbing the globalmetadata and the largest .so file in the lib, "libil2cpp.so". I use an IL2CPP Dumper to get the dumps.cs file, but I mainly use the Dummy dll files for looking around in dnspy. In the 64 bit version of the game I get the following offset for _hp on the EnemyCtr (EnemyController or EnemyCharacter, I'm assuming.) They use a getter for it so the method is called get__hp.
Code:
[CompilerGenerated]
// RVA: 0x146ABB4 Offset: 0x1469BB4 VA: 0x146ABB4
public float get__hp() { }
(P.s. I tried doing this with the 32 bit version of the game, but it only supports Android 9+ so it will instantly crash while booting.)
After getting the offset for the _hp getter, I open hxd and press Shift + G to access the address inside of the "libil2cpp.so" file. Once I find the address I am replacing it with this, which I found on G-Bo's post about Hex Codes:
Code:
ARM:
MOV X0, #1
ret
HEX:
20 00 80 D2 C0 03 5F D6
I input the hex starting at the beginning of the offset for the _hp getter. Once I finish I drag the "libil2cpp.so" file back into the apk using WinRaR to replace the normal one. I then use APK Tool Easy to resign the app and then load it into LDPlayer9 on a 64 bit Android 9 Instance. The app runs correctly without any issues, and I've even checked the apk inside once on the emulator. I've tried multiple things such as deleting the lib for 32 bit and it still doesn't change anything inside of the app. If anyone has any ideas please help me out. Just started learning a little bit back and have a little experience with cheat engine and c# modding on unity games for pc. Thank you.
If I'm missing any info that is required for assistance please just let me know and I can provide you with a step-by-step of what I did. I tried to include as much as possible in this post. Hopefully I didn't forget any steps!