Skip to content

ADB Modules

Hmn-Dev edited this page Sep 16, 2026 · 1 revision

ADB modules

ADB modules are Shevery's analogue of Magisk modules — without Magisk: no mount hooks, no zygote. A module is a ZIP that Shevery unpacks into its private adb_modules/ directory and runs via the Shizuku server (sh), with policy gates (see Module policy).

ZIP layout

my.module/
  module.prop        # metadata (required, at ZIP root)
  action.sh          # runs on tap ("Run action"), optional
  service.sh         # background service script, optional, policy-gated
  webui/index.html   # local WebUI, optional
  banner.*           # banner image, optional

module.prop

id=my.module
name=My Module
version=1.0
versionCode=1
author=you
description=What it does
  • id: [A-Za-z][A-Za-z0-9._-]{1,63}. Absolute paths and .. are rejected.
  • Optional: banner, webui, action, updateJson, url.

Scripts

  • action.sh — runs when you tap the module's action button. Streaming output, 120 s timeout, output trimmed to 64 KB; the last run log is kept per module.
  • service.sh — long-running service; requires the background-action policy (off unless you allow it).
  • Both get SHIZUKU_MODULE_* environment variables (module id, dir, version…).

WebUI

webui/index.html opens in an in-app WebView served from file://<webRoot>. A JS bridge (ModuleJsBridge: getModuleInfo, runShell, …) is exposed only if the module declares it and passes the trust/policy checks; every shell command from the page goes through the recommand review dialog first.

Install safety limits

  • max 2048 ZIP entries, max 200 MB extracted, max 256 KB per script,
  • per-module install mutex + staging dir (.*.installing, cleaned on failure),
  • path traversal protection (ensureInside), scripts marked executable on install,
  • enable/disable via a disable marker file (no re-install needed).

updateJson

For self-updates, point updateJson at a JSON file (see Publishing a module). The updater compares versionCode (or semantic versions) against updateJson → catalog → GitHub latest release, in that order.

Full contract: docs/adb-modules-api.md; author walkthrough: docs/adb-modules-guide.md.

Clone this wiki locally