Introducing a new way to review your PRs.

Read the announcement

rikkaapps / shizuku

Using system APIs directly with adb/root privileges from normal apps through a Java process started with app_process.

View on GitHub

12 documents · Updated Nov 16, 2026

overview

Knowledge Base updated: 2026-11-16

Knowledge Base Index

1. Orientation

This repository is the Android Shizuku project: a manager app plus privileged server/bootstrap components that let apps use Shizuku-mediated system APIs. The highest-level flow is: the manager app helps start the Shizuku server through root/ADB/shell bootstrap paths, then the server manages clients, permissions, and binder access.

Main parts:

  • manager/ — Android app UI, settings, startup guidance, wireless ADB pairing, authorization, and app management.
  • server/ — privileged Shizuku daemon/service core, client tracking, config persistence, and user-service handling.
  • starter/ — bootstrap entrypoint used to start the privileged server process.
  • shell/ — shell-side loader for Shizuku shell integration.
  • common/ — shared Android utility library.
  • root Gradle/API wiring — includes local modules plus API subprojects under api or a local API checkout.

Critical state lives primarily in Android-side preferences/config and server config files described in the owning docs: manager settings under the manager app, and server-side Shizuku config under the server daemon.

2. Architecture diagrams

flowchart TD
  subgraph Build[Gradle project]
    Root[settings.gradle / root build]
    Api[api subprojects]
    Common[common library]
  end

  subgraph App[manager app]
    Home[home/settings UI]
    Auth[authorization + app management]
    Wadb[wireless ADB pairing]
    Native[JNI starter helpers]
    Utils[manager utilities/widgets]
  end

  subgraph Privileged[privileged runtime]
    Starter[starter module]
    Shell[shell loader]
    Server[server daemon]
  end

  Root --> Common
  Root --> Api
  Root --> Home
  Root --> Starter
  Root --> Shell
  Root --> Server
  Home --> Auth
  Home --> Wadb
  Home --> Native
  Home --> Starter
  Home --> Shell
  Starter --> Server
  Shell --> Server
  Server --> Api
  Utils --> Home
  Utils --> Auth
flowchart LR
  User[User in manager] --> Home[HomeActivity/start cards]
  Home --> Mode{Start mode}
  Mode --> Root[Root start]
  Mode --> Adb[ADB start]
  Mode --> Wadb[Wireless ADB pairing]
  Wadb --> Pairing[ADB pairing client/service]
  Root --> Starter[starter/native helpers]
  Adb --> Starter
  Pairing --> Starter
  Starter --> Server[Shizuku server]
  Server --> Status[manager status UI]
sequenceDiagram
  participant App as Requesting app
  participant Manager as Manager authorization UI
  participant Server as Shizuku server
  participant Config as Shizuku config

  App->>Server: request Shizuku access
  Server->>Manager: permission request / state query
  Manager->>User: grant or deny UI
  User->>Manager: decision
  Manager->>Server: authorization result
  Server->>Config: persist client permission state
  Server-->>App: allow or deny binder access

3. Glossary

  • Shizuku — the project’s privileged service model that lets apps access selected system APIs through a brokered server.
  • Manager — the Android app under manager/ used to start, monitor, configure, and authorize Shizuku.
  • Server daemon — the privileged runtime under server/ that manages clients, permissions, binders, and user services.
  • Starter — bootstrap code under starter/ and manager starter helpers used to launch the server from root/ADB/shell contexts.
  • Rish — shell integration packaged with the manager and covered by the shell/startup docs.

4. Codebase-wide invariants

  • The repository is a multi-module Gradle Android project: settings.gradle includes :server, :starter, :shell, :manager, :common, and API-related projects mapped under api or a local API directory.
  • Each in-repo Android module has a module build file and manifest under its module root, e.g. manager/build.gradle with manager/…/AndroidManifest.xml, and the same pattern for server/, starter/, shell/, and common/.
  • Manager native code is isolated under manager/src/main/jni/**; non-manager modules in this repo do not have sibling src/main/jni trees in the listed tracked structure.
  • Manager UI resources are centralized under manager/src/main/res/**, while Java/Kotlin app logic lives under manager/src/main/java/moe/shizuku/manager/**.

5. Routing table