Android Ptrace Inject for all ABIs and all APIs. Help you inject Shared Library on Android.

Related tags

Kotlin android inject
Overview

Android Ptrace Inject

中文可以参考我的注释内容进行理解
我写的注释相对来说比较全面了

How to build

  • Make sure you have CMake and Ninja in your PATH

  • Edit CMakeLists.txt. Set ANDROID_NDK and CMAKE_TOOLCHAIN_FILE for yourself.

  • If your OS is Windows, read build.sh and make it to be a build.bat.

    Also, don't forget to change CMAKE_RUNTIME_OUTPUT_DIRECTORY and CMAKE_LIBRARY_OUTPUT_DIRECTORY in 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

  • First Inject Succeeded

  • Handle Parameter

  • Handle SELinux

  • Handle Libs

  • Succeed Inject for arm64-v8a

  • Succeed Inject for Android 9 and Android 11

  • Adapt to all Android versions

  • 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

You might also like...
Easy to use cryptographic framework for data protection: secure messaging with forward secrecy and secure data storage. Has unified APIs across 14 platforms.
Easy to use cryptographic framework for data protection: secure messaging with forward secrecy and secure data storage. Has unified APIs across 14 platforms.

Themis provides strong, usable cryptography for busy people General purpose cryptographic library for storage and messaging for iOS (Swift, Obj-C), An

Example mod with Mixin to help you to get started with creating a mod with mixins.

ExampleMixinMod Example mod with Mixin to help you to get started with creating a mod with mixins. For usage of mixins, see here. Also, remember to tu

A collection of small utility functions to make it easier to deal with some otherwise nullable APIs on Android.

requireKTX requireKTX is a collection of small utility functions to make it easier to deal with some otherwise nullable APIs on Android, using the sam

Extension functions over Android's callback-based APIs which allows writing them in a sequential way within coroutines or observe multiple callbacks through kotlin flow.

callback-ktx A lightweight Android library that wraps Android's callback-based APIs into suspending extension functions which allow writing them in a

Mobile Application Dvelopment Practical-12: Working with JSON APIs
Mobile Application Dvelopment Practical-12: Working with JSON APIs

Mobile Application Dvelopment Practical-12: Working with JSON APIs Developed by,

A pair of applications provide a direct means of integrating with one another via application programming interfaces (APIs)

What is a native integration? It's when a pair of applications provide a direct means of integrating with one another via application programming interfaces (APIs). Once integrated, data can flow between the apps and become more readily available to your employees.

 Movie app that receives popular movies and allows the user to search for the specific movie through the Rest API with help of retrofit library &MVVM architecture.
Movie app that receives popular movies and allows the user to search for the specific movie through the Rest API with help of retrofit library &MVVM architecture.

MovieClue Millions of movies, TV shows and people to discover. Explore now Movie app that recieves popular movies and allow the user to search for spe

A nice weather that helps you get all information including: current weather, hourly weather and also forecasts for 16 days
A nice weather that helps you get all information including: current weather, hourly weather and also forecasts for 16 days

WeatherForecast This is an ongoing project where I fetch all the weather data using Retrofit and Kotlin Coroutines over two APIs containing both curre

Flutter NFC Project - A new flutter plugin to help developers looking to use internal hardware inside iOS or Android devices for reading and writing NFC tags
Comments
  • Fixes for x86

    Fixes for x86

    Emulators such as noxplayer use different sdk versions, which made the Injector not work on these platforms. This has been fixed by adding a check for x86.

    opened by reveny 0
Owner
SsageParuders
Here just a lazzy boy ... zZz ~~
SsageParuders
A simple Kotlin multi-platform abstraction around the javax.inject annotations.

Inject A simple Kotlin multi-platform abstraction around the javax.inject annotations. This allows using the annotations in Kotlin common code so that

Christopher 43 Aug 17, 2022
👋 A common toolkit (utils) ⚒️ built to help you further reduce Kotlin boilerplate code and improve development efficiency. Do you think 'kotlin-stdlib' or 'android-ktx' is not sweet enough? You need this! 🍭

Toolkit [ ?? Work in progress ⛏ ?? ??️ ?? ] Snapshot version: repositories { maven("https://s01.oss.sonatype.org/content/repositories/snapshots") }

凛 35 Jul 23, 2022
Koin Annotations - help declare Koin definition in a very fast and intuitive way, and generate all underlying Koin DSL for you

The goal of Koin Annotations project is to help declare Koin definition in a very fast and intuitive way, and generate all underlying Koin DSL for you. The goal is to help developer experience to scale and go fast ?? , thanks to Kotlin Compilers.

insert-koin.io 50 Sep 18, 2022
A simple and easy adapter for RecyclerView. You don't have to make adapters and view holders anymore. Slush will help you.

한국어 No more boilerplate adapters and view holders. Slush will make using RecyclerView easy and fast. The goal of this project is to make RecyclerView,

SeungHyun 26 Sep 13, 2022
D-KMP Architecture official sample: it uses a shared KMP ViewModel and Navigation for Compose and SwiftUI apps.

D-KMP architecture - official sample This is the official sample of the D-KMP architecture, presenting a simple master/detail app, for Android, iOS an

null 576 Sep 29, 2022
Clean MVVM with eliminating the usage of context from view models by introducing hilt for DI and sealed classes for displaying Errors in views using shared flows (one time event), and Stateflow for data

Clean ViewModel with Sealed Classes Following are the purposes of this repo Showing how you can remove the need of context in ViewModels. I. By using

Kashif Mehmood 23 Sep 16, 2022
Shared ViewModel in Kotlin Multiplatform

multiplatform-viewmodel ?? Create shared ViewModel's for shared business logic using our ViewModel base class. Features Uses Jetpack ViewModel on Andr

Double Symmetry 14 Sep 16, 2022
This library is a set of simple wrapper classes that are aimed to help you easily access android device information.

SysInfo Simple, single class wrapper to get device information from an android device. This library provides an easy way to access all the device info

Klejvi Kapaj 6 Aug 26, 2022