Hex editing
IDA Method
Useful information/FAQ
useful codes and hexes:
BX LR (skips entire function, useful for infinite ammo. i.e put bx lr at the start of a function like weapon::removeAmmo(int) )
2 byte code: 70 47
4 byte code: 1E FF 2F E1
NOP (cheat engine users may be familiar with this) skips the code it is placed on ( for example put a NOP instead of mov r0 #2 and it skips the mov r0 #2)
2 byte code: C0 46
4 byte code: 0000A0E1
Branches (branch to another part of the function or a different function)
B (normal branch)
2 byte: ends in E0
4 byte: ends in EA
BEQ (branch if equal, usually a CMP command above it and it branches if EQUAL)
4 byte: ends in 0A
BNE (branch if not equal, again usually a CMP command above)
4 byte: ends in 1A
BGT (branch if greater than, another CMP above it)
4 byte: ends in CA
BLT: (branch less than, CMP above)
4 byte: ends in BA
BL (branch link. branches to another function)
these are really hard to calculate as the hex is different each time. if you can calculate it though the pay-off is great. you can have rocket bullets, always have full health etc
FAQ:
Q: what if my binary only has an ARMv6 option?
A: use ARMv6, they still run on ARMv7 devices
Q: how do i know if my binary is 2 byte or 4 byte?
A: highlight any code and see if 2 bytes or 4 bytes are highlighted in Hex view in IDA
Q: my app crashes, what should I do?
A: you may not have signed properly, sign again and respring. or you may have edited a wrong function causing your app to be unstable
Q: are there any other methods to IDA hacking?
A: hell yeah, I only showed you basic IDA hacking today, there are way more advanced methods which i MAY make a tut for too at some point
Q: My binary's functions are all sub_xxxxx commands, what do I do now?
A: this is where the compiler throws out function names as they are not needed. in IDA press shift+f12 to open the strings window, search for gold or something here instead and double click on one and press ctrl+X to jump to the function (hard to explain in text but i will include this in my more advanced tutorial)