How thedjchi/shizuku works
Project type and purpose
• This is an Android multi-module, open-source system tool (not a typical web or full-stack app). Its goal is to let ordinary Android apps call protected system APIs by proxying their Binder IPC through a privileged “Shizuku Server” process that runs under root or ADB credentials.
File-structure analysis
• Top-level Gradle modules:
• api – definitions of the public API for client apps (Binder wrapper interfaces)
• common – shared utilities and manifest stubs used by other modules
• manager – the Android UI app where users install/configure Shizuku, handle pairing, view status, and launch server via ADB or root
• server – the standalone service (with Java/Kotlin and JNI/C++ code) that runs as root/ADB, implements a Binder endpoint, forwards transactions to the system server, and returns results
• shell – an optional module offering a shell-based launcher and integration for scripts
• starter – a tiny broadcast-receiver / service module to auto-start Shizuku on boot or on demand
• Each module has its own AndroidManifest, build.gradle, source folders, and—for server—native JNI code under jni/.
Key insights from README
• Shizuku works by launching a root/ADB process (the server) that registers a Binder service.
• Client apps use moe.shizuku.* API to bind to that service.
• The server uses transactRemote() to forward calls into the Android system server (e.g., PackageManagerService).
• There is pairing logic (ADB pairing tutorial) and permission checks for hidden APIs.