Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ele7enxxh/Android-Inline-Hook
thumb16 thumb32 arm32 inlineHook in Android
https://github.com/ele7enxxh/Android-Inline-Hook
Last synced: 10 days ago
JSON representation
thumb16 thumb32 arm32 inlineHook in Android
- Host: GitHub
- URL: https://github.com/ele7enxxh/Android-Inline-Hook
- Owner: ele7enxxh
- License: apache-2.0
- Created: 2015-11-13T06:45:24.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2020-06-23T01:56:06.000Z (over 4 years ago)
- Last Synced: 2024-07-31T13:14:57.606Z (3 months ago)
- Language: C
- Homepage: http://ele7enxxh.com/Android-Arm-Inline-Hook.html
- Size: 321 KB
- Stars: 1,327
- Watchers: 70
- Forks: 418
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- stars - ele7enxxh/Android-Inline-Hook
- awesome-hacking-lists - ele7enxxh/Android-Inline-Hook - thumb16 thumb32 arm32 inlineHook in Android (C)
README
# Android-Inline-Hook
thumb16 thumb32 arm32 inlineHook# Build
```ndk-build NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=./Android.mk NDK_APPLICATION_MK=./Application.mk```# Example
```C
#include#include "inlineHook.h"
int (*old_puts)(const char *) = NULL;
int new_puts(const char *string)
{
old_puts("inlineHook success");
}int hook()
{
if (registerInlineHook((uint32_t) puts, (uint32_t) new_puts, (uint32_t **) &old_puts) != ELE7EN_OK) {
return -1;
}
if (inlineHook((uint32_t) puts) != ELE7EN_OK) {
return -1;
}return 0;
}int unHook()
{
if (inlineUnHook((uint32_t) puts) != ELE7EN_OK) {
return -1;
}return 0;
}int main()
{
puts("test");
hook();
puts("test");
unHook();
puts("test");
}```
# Contact
If you find any bugs, please contact me([email protected])