MCPcopy Index your code
hub / github.com/erfur/linjector-rs

github.com/erfur/linjector-rs @v0.1.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.1.2 ↗ · + Follow
53 symbols 102 edges 8 files 1 documented · 2%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

linjector-rs

Android port of linux_injector. Library injection using /proc/mem, without ptrace. Only aarch64 is supported.

To get an idea of how it works, you can read the blog post.

Usage

Inject code into a running process using /proc/mem

Usage: linjector-cli [OPTIONS] --file <FILE>

Options:
  -p, --pid <PID>
          pid of the target process

  -a, --app-package-name <APP_PACKAGE_NAME>
          target application's package name, (re)start the application and do injection

  -f, --file <FILE>
          path of the library/shellcode to inject

  -i, --injection-type <INJECTION_TYPE>
          type of injection

          [default: raw-dlopen]

          Possible values:
          - raw-dlopen:    Use dlopen to inject a library
          - memfd-dlopen:  Use memfd_create and dlopen to inject a library
          - raw-shellcode: Inject raw shellcode

      --func-sym <FUNC_SYM>
          function to hijack for injection, in the form "lib.so!symbol_name"

      --var-sym <VAR_SYM>
          variable to hijack for injection, in the form "lib.so!symbol_name"

  -d, --debug
          enable debug logs

      --logcat
          print logs to logcat

  -h, --help
          Print help (see a summary with '-h')

  -V, --version
          Print version

Modes

Currently only raw dlopen mode works. Since SELinux doesn't allow calling dlopen on a memfd, memfd dlopen will not work. Shellcode mode is not yet implemented.

Core symbols most depended-on inside this repo

Shape

Method 26
Function 19
Class 5
Enum 3

Languages

Rust100%

Modules by API surface

src/lib.rs16 symbols
src/utils.rs9 symbols
src/remote_mem.rs8 symbols
src/remote_proc.rs6 symbols
src/shellcode.rs5 symbols
src/remote_module.rs4 symbols
bin/cli.rs3 symbols
build.rs2 symbols

For agents

$ claude mcp add linjector-rs \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page