Architecture
October 17, 2025 · View on GitHub
Stoic is IPC and RPC for debugging. It trades security for flexibility. Don't run it in production.
Instead of requiring a pre-established server, Stoic injects a server into running processes via JVMTI (you can use the app-sdk for non-debuggable apps). Instead of calling predefined functions, you send code to execute.
Communication is bidirectional and multiplexed—stdin/stdout/stderr work normally. You get access to JVMTI debugging APIs.
Laptop | Android Process
+---------+ | +---------+
| host | <------|------> | target |
+---------+ | +---------+
Your laptop is a client that talks to the server (injected into the app).
Running a Plugin
- Inject server into target process
- Server signals ready
- Host sends StartPlugin request (plugin name + timestamp)
- If plugin missing, host sends LoadPlugin with APK contents
- Multiplexed I/O flows (stdin/stdout/stderr)
- Plugin finishes, sends PluginFinished
- Server stays alive for faster subsequent runs
Injection
Uses JVMTI's attach-agent (docs). Works on non-rooted devices via run-as.
Communication
Unix domain sockets. Android won't let shell and package users talk directly,
but adb forward allows our laptop to talk directly to the package:
adb forward tcp:0 localabstract:/stoic/...