AndroidPtraceInject
                                
                                 AndroidPtraceInject copied to clipboard
                                
                                    AndroidPtraceInject copied to clipboard
                            
                            
                            
                        Android Ptrace Inject for all ABIs and all APIs. Help you inject Shared Library on Android.
Android Ptrace Inject
中文可以参考我的注释内容进行理解
我写的注释相对来说比较全面了
How to build
- 
Make sure you have CMakeandNinjain your PATH
- 
Edit CMakeLists.txt. Set ANDROID_NDKandCMAKE_TOOLCHAIN_FILEfor yourself.
- 
If your OS is Windows, read build.shand make it to be abuild.bat.Also, don't forget to change CMAKE_RUNTIME_OUTPUT_DIRECTORYandCMAKE_LIBRARY_OUTPUT_DIRECTORYin Windows styles.
- 
If you want to build all ABIs, u can annotation ANDROID_ABI on CMakeLists.txt, and run build.sh git clone https://github.com/SsageParuders/AndroidPtraceInject.git cd AndroidPtraceInject mkdir build chmod +x build.sh ./build.sh
- 
Or you can don't run build.sh and don't annotation ANDROID_ABI on CMakeLists.txt. git clone https://github.com/SsageParuders/AndroidPtraceInject.git cd AndroidPtraceInject mkdir build cd build cmake .. -G Ninja cmake --build .
How to use
# Here are the parameters of the Inject command line tool:
#   Some parameters are optional.
#   -p process 's pid <-- optional
#   -n process 's package name <-- optional
#   -f whether to start App <-- optional
#   ---- //  /data/local/tmp/Inject -f -n XXX <-- error
#   ---- //  cd /data/local/tmp && ./Inject -f -n XXX <-- right
#   -so so path for injection <-- mandatory
#   -symbols specify a symbol in so <-- optional
# For examples:
cd /data/local/tmp && ./Inject -f -n bin.mt.plus -so /data/local/tmp/libHook.so -symbols hello
TODO LIST
Finished
- 
[x] First Inject Succeeded 
- 
[x] Handle Parameter 
- 
[x] Handle SELinux 
- 
[x] Handle Libs 
- 
[x] Succeed Inject for arm64-v8a 
- 
[x] Succeed Inject for Android 9 and Android 11 
- 
[x] Adapt to all Android versions 
- 
[x] Succeed Inject for x86 
Future
- 
[ ] Fix bugs for armeabi-v7a 
- 
[ ] Adapt to the ABIs of each device, such as armeabi-v7a and x86_64 
Credits
Adrill By mustime
SharkInject By bigGreenPeople
androidinject By mergerly
TinyInjector By shunix