Hey code4hacker after ios, could you port it to android? Would be awesome if you could
I dont have an android device and therefore cant test it there. However, android modding is so easy that there's really no need for a library like libstubhook. Only one feature of it is even applicable to the android version. The rest is already possible because the android version has public exported symbols.
Hooking a C++ method of a specific subclass if it doesnt reimplement the method. Basically, without this technique, my sprinting mod would've been impossible.By the way, some sample code using libstubhook might answer some questions: https://github.com/C0deH4cker/libstubhook-examples
Hooking a C++ method of a specific subclass if it doesnt reimplement the method. Basically, without this technique, my sprinting mod would've been impossible.
i can understand the code partially, but i am completely unfamiliar with it. guess i'd better start learning... have any tips/guides/places i can go to learn how to understand enough c++(i'm guessing) to be able to understand and create mods for libstubhook and the like?
i can understand the code partially, but i am completely unfamiliar with it. guess i'd better start learning... have any tips/guides/places i can go to learn how to understand enough c++(i'm guessing) to be able to understand and create mods for libstubhook and the like?
Lol that is pure C, but it uses a lot of crazy preprocessor macros to make the code look cleaner. It's very hard to explain that code, but you'll need to know your way around IDA for sure. Also, you should learn to use Mobile Substrate to write both Objective-C hooks and normal C hooks before trying this.
For beginners, the file to look at is sandgravel.c, because thats the one I commented the heck out of.
I have android. Does that mean I won't be able to use libstubhook? I really want to. C0deh4cker, could you possibly rewrite some portions so us android users can use it? Thank you.
Lol that is pure C, but it uses a lot of crazy preprocessor macros to make the code look cleaner. It's very hard to explain that code, but you'll need to know your way around IDA for sure. Also, you should learn to use Mobile Substrate to write both Objective-C hooks and normal C hooks before trying this.
For beginners, the file to look at is sandgravel.c, because thats the one I commented the heck out of.
I'm pretty sure I understand what the code does in all three examples, but how do you figure out what the functions do and their addresses? I have been looking at the functions (in ida) at the addresses in explosivearrow.c and I can't figure out how you know what they do in-game.
Edit: possibly hook them and log when they are called?
I'm pretty sure I understand what the code does in all three examples, but how do you figure out what the functions do and their addresses? I have been looking at the functions (in ida) at the addresses in explosivearrow.c and I can't figure out how you know what they do in-game.
Edit: possibly hook them and log when they are called?
The android version is not stripped, meaning function names are contained in there. I load up both versions of MCPE in IDA and try to match up functions between the two versions. If i find a function which seems to do the same thing as a named android function, i match the name up to the address. Usually the name itself is enough to know what to hook or use. Since it is C++ code, the function names are mangled. However, this actually helps out a lot since the mangled name stores details of how the function is called (parameter types). Unfortunately, the mangled name does not store the return type, so that must be determined by manually interpreting the function and sometimes just making guesses.
If im unsure as to what a specific function does, ill either hook it and log it or attach to it with GDB and inspect it there.
I dont have an android device and therefore cant test it there. However, android modding is so easy that there's really no need for a library like libstubhook. Only one feature of it is even applicable to the android version. The rest is already possible because the android version has public exported symbols.
Check out my iOS Mods!
Hooking a C++ method of a specific subclass if it doesnt reimplement the method. Basically, without this technique, my sprinting mod would've been impossible.By the way, some sample code using libstubhook might answer some questions: https://github.com/C0deH4cker/libstubhook-examples
Check out my iOS Mods!
Oh, fantastic!
i can understand the code partially, but i am completely unfamiliar with it. guess i'd better start learning... have any tips/guides/places i can go to learn how to understand enough c++(i'm guessing) to be able to understand and create mods for libstubhook and the like?
Lol that is pure C, but it uses a lot of crazy preprocessor macros to make the code look cleaner. It's very hard to explain that code, but you'll need to know your way around IDA for sure. Also, you should learn to use Mobile Substrate to write both Objective-C hooks and normal C hooks before trying this.
For beginners, the file to look at is sandgravel.c, because thats the one I commented the heck out of.
Check out my iOS Mods!
I'm pretty sure I understand what the code does in all three examples, but how do you figure out what the functions do and their addresses? I have been looking at the functions (in ida) at the addresses in explosivearrow.c and I can't figure out how you know what they do in-game.
Edit: possibly hook them and log when they are called?
The android version is not stripped, meaning function names are contained in there. I load up both versions of MCPE in IDA and try to match up functions between the two versions. If i find a function which seems to do the same thing as a named android function, i match the name up to the address. Usually the name itself is enough to know what to hook or use. Since it is C++ code, the function names are mangled. However, this actually helps out a lot since the mangled name stores details of how the function is called (parameter types). Unfortunately, the mangled name does not store the return type, so that must be determined by manually interpreting the function and sometimes just making guesses.
If im unsure as to what a specific function does, ill either hook it and log it or attach to it with GDB and inspect it there.
Check out my iOS Mods!
that is what i take from it.
Cydia.
BigBoss.
Of course you must first set your filter to Developer.
Check out my iOS Mods!
I think Treebl would beat you to it