Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
A

AndKittyInjector

> 编程语言
Open source

Inject a shared library into a process using ptrace

353 stars0 likes3 views
WebsiteGitHub

About

Inject a shared library into a process using ptrace

AndKittyInjector

AndKittyInjector is a modern ptrace-based Android shared-library injector, built on top of KittyMemoryEx.

Requires C++17 or newer. Inject from /data on Android.

Support

  • Tested on Android 5.0 ~ 17
  • ABI arm, arm64, x86, x86_64
  • Inject emulated arm64 & arm32 via libhoudini.so or libndk_translation.so
  • Inject multiple libs at once
  • Bypass android linker namespace restrictions
  • memfd dlopen support
  • Watch app launch and inject
  • Auto launch app and inject
  • Inject on dlopen breakpoint, or on a specific `` breakpoint
  • Inject & unload lib after entry point execution
  • Hide lib segments from /maps
  • Hide lib from native or emulated linker solist (dladdr & dl_iterate_phdr)
  • Randomize ELF header

How to use

Make sure to chmod +x or 755 the pushed binary.

…

One of --pid or --package is required. --libs accepts one or more paths and each is injected in order.

Examples

…

Embedding as a library

KittyInjector can be used directly instead of through the CLI, e.g. from your own tool:

…

inject_elf_config_t also exposes beforeEntryPoint / afterEntryPoint callbacks (invoked around the remote JNI_OnLoad call) if you need to run code between attach and detach.

Notes

  • Do not start a thread in the library constructor — use JNI_OnLoad instead:
cpp
extern "C" jint JNIEXPORT JNI_OnLoad(JavaVM* vm, void *key)
{
    // key 1337 is passed by the injector to confirm this call came from it.
    if (key != (void*)1337)
        return JNI_VERSION_1_6;

    KITTY_LOGI("JNI_OnLoad called by injector.");

    JNIEnv *env = nullptr;
    if (vm->GetEnv((void**)&env, JNI_VERSION_1_6) == JNI_OK)
    {
        KITTY_LOGI("JavaEnv: %p.", env);
        // ...
    }

    std::thread(thread_function).detach();

    return JNI_VERSION_1_6;
}
  • When using --launch or --watch to inject as soon as the target app launches, you may also need --bp-ld / --bp-sym or --delay, especially when injecting into an emulated (cross-ISA) library.
  • If injection fails, the target app will be force-stopped.

Compile

  • Make sure NDK, CMake, and MAKE are installed and added to your OS's environment path.
  • Set NDK_HOME to point to your NDK folder.
bash
git clone --recursive https://github.com/MJx0/AndKittyInjector.git
cd AndKittyInjector/AndKittyInjector
./build.sh # or build.bat on Windows

--recursive is required for KittyMemoryEx.

Credits

arminject

injectvm-binderjack

TinyInjector

am_proc_start

ReZygisk

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C++androidinjectorlinuxptrace

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言