SheveryGitHub

Fork of Shizukuby HmnDev-TechApache-2.0

Shevery

Same mechanism as Shizuku: you start shizuku_server with root or ADB, and authorized apps receive a binder to call system APIs with its privileges. On top of that, this fork targets SDK 37, ships a Compose manager, integrates a 10-step Comput AI shell planner, acts as a Device Owner & Dhizuku v1/v2 provider, runs ADB modules, and can rewrite its own package ID on the device.

Package id is com.hamondev.shevery (or a random com.<8chars>.<8chars> in Stealth builds). Uninstall the official Shizuku manager before installing: both declare the same moe.shizuku.privileged.api provider authorities and conflict.

Binder IPC TopologyUID 2000 (shell)
BOOTSTRAPlibshizukuBINDER HUBIShizuku5s WatchdogTARGETsystem_server
Entry point
AdbPairingService + AdbStartWorker (TLS SPAKE2)
Provider authority
moe.shizuku.privileged.api
  • +transactRemote() with shell permissions (WRITE_SECURE_SETTINGS, PACKAGE_USAGE_STATS)
  • +cmd connectivity set-chain3-enabled true (eBPF per-UID firewall)
  • +dpm set-device-owner com.hamondev.shevery/... (if no accounts present)

Restricted to permissions listed in AOSP packages/Shell/AndroidManifest.xml. Cannot mount overlays or read arbitrary /data/data directories.

Interactive schematic of the three privilege paths implemented in moe.shizuku.manager and rikka.shizuku.server.
compileSdk / targetSdk
37
Android 17 (buildToolsVersion 37.0.0 in root build.gradle).
minSdk
24
Android 7.0. Stealth generator requires API 29+; eBPF firewall requires API 30+.
Flavors & stubs
2+2
standard & stealth flavors, plus embedded shevery-stub.apk and shevery-dhizuku-stub.apk.
current release
14.4.0
versionCode 44, published 2026-10-17. Built from api_version_name 14.4.0.
01

What changed in 14.3 and 14.4

Shevery 14.4.0 (versionCode 44) was published on 17 October 2026. Summarised directly from the repository commits and pull requests; each card links to the source diff.

  • 14.4: per-app Shizuku privileges, About drill-in screens, agent chat history

    Tapping an app in Application Management opens a detail screen with a Shizuku Privileges group — access switch, session-only grant and one switch per dangerous permission granted or revoked through Shizuku. Settings -> About now drills into a Contributors and Credits screen and a Recommendations screen, and the Comput agent persists chat history so a previous conversation can be continued. Server version bumped to 14.4 (versionCode 44).

    Reference feb7ebaaReference 953fa7f1Reference 4f84b3a7

  • Watchdog checks the binder before acting on a stale heartbeat

    WatchdogManager.kt previously treated a 60 s overdue timestamp as a dead server even while the binder was still responsive. Commit ecd465a (PR #279) calls Shizuku.pingBinder() first: if the binder answers, it refreshes beat() and returns instead of restarting a healthy server on a fixed schedule.

    Reference ecd465aReference PR #279

  • On-device Stealth APK rewriter & stub manifest fix

    StealthApkGenerator.kt embeds assets/shevery-stealth.apk compiled with com.stealthp.lacehold (21 chars) and swaps it in-place across AndroidManifest.xml, resources.arsc, and classes*.dex in both US-ASCII and UTF-16LE. PR #268 fixed the Shizuku compatibility stub crash by using fully qualified component class names.

    Reference PR #268Reference 2b6b6f7

  • Comput AI Agent & Commandium

    ComputAgent.kt plans up to MAX_STEPS_HARD = 10 steps of SHELL (IShizukuService.newProcess) or MODULE_SERVICE actions against 7 OpenAI-compatible provider presets plus custom URLs, gated by secure, turbo, or custom approval modes.

    Reference 078a1e3

  • Device Owner, 5 DPM scopes & Dhizuku v1/v2

    DeviceOwnerManager.kt and DhizukuProvider.kt implement 1-tap DPM activation through Shizuku, five per-app delegation scopes, ownership transfer via DevicePolicyManager.transferOwnership(), and a 5-second countdown before deactivation.

    Reference PR #270

  • Foreground USB debugging hiding & Chain3 firewall

    PR #269 added UsbDebuggingHideService.kt (polls top package every 1 s via PACKAGE_USAGE_STATS and sets ADB_ENABLED = 0 while a target app is visible) and NetworkFirewallManager.kt (toggles Android 11+ eBPF connectivity chain3 per package without a VPN service).

    Reference PR #269

  • Android 16+ resource tables & aapt2 collapse guard

    PR #267 keeps resources.arsc uncompressed (noCompress += 'arsc') and skips collapseFlavoredReleaseResourceNames if the intermediate .ap_ path differs across AGP versions, keeping release APKs installable on Android 16 and 17.

    Reference PR #267

  • Server-side Watchdog & monitor notification shield

    rikka.shizuku.server.Watchdog posts a 5 s heartbeat on the server main looper, checks freshness every 60 s, and holds linkToDeath on package, activity, user, and appops. Commit 1d9154b (PR #277) replaced the monitor notification icon with a dedicated shield drawable.

    Reference 1d9154bReference PR #277

02

Stealth byte-swap, Stubs & Android17Compat

Standard builds embed assets/shevery-stealth.apk, shevery-stub.apk, and shevery-dhizuku-stub.apk. Pick a mechanism below to inspect how the code actually works—including an unfixed reflection bug in Android17Compat.java.

StealthApkGenerator.kt — fixed 21-char template replaced in ASCII & UTF-16LE

const val TEMPLATE_PACKAGE = "com.stealthp.lacehold" // 21 bytes
val generatedPackage = "com.k8m2x9qp.r4v7n1tw" // 21 bytes (com.<8>.<8>)

// Rewritten across AndroidManifest.xml, resources.arsc, classes*.dex:
replaceBytes(data, oldPkgAscii, newPkgAscii)
replaceBytes(data, oldPkgUtf16Le, newPkgUtf16Le)
patchDexHeader(dexBytes) // SHA-1 [12..32] + Adler32 [8..12]

Generator output

MediaStore.Downloads · v1 JAR signed

Because neither the package ID (21 chars) nor the space-padded launcher label (14 chars, "System Toolkit") changes byte length, string-pool offsets in resources.arsc stay valid without parsing AXML.

Why Stealth is a replacement, not a second app

Both flavors in manager/build.gradle keep the same Shizuku ContentProvider authorities so client apps still receive privileged binders. Because Android forbids duplicate provider authorities on one device, you must uninstall normal Shevery before installing the generated APK from Downloads/.

What Android17Compat.java actually does

When PermissionManagerApis throws or returns denied, Android17Compat reflects over IPermissionManager$Stub and IPackageManager$Stub. Its invokeDynamic helper guesses extra parameters by count ("default", 0, "shizuku"), and swaps the two String parameters in checkPermission. Read Android17Compat.java.

03

Server & manager Watchdog

Shevery runs two separate watchdog loops ported from NightDog: one inside shizuku_server (Watchdog.java) and one in the manager (WatchdogManager.kt). The bars below are computed from the constants in Watchdog.java: 2 s initial delay, then 5 s doubling to a 60 s cap across 10 attempts.

#4recovered after 37s

  1. 2sAttempt 1, failed.
  2. 5sAttempt 2, failed.
  3. 10sAttempt 3, failed.
  4. 20sAttempt 4, ok.
  5. 40sAttempt 5, skipped.
  6. 1m 00sAttempt 6, skipped.
  7. 1m 00sAttempt 7, skipped.
  8. 1m 00sAttempt 8, skipped.
  9. 1m 00sAttempt 9, skipped.
  10. 1m 00sAttempt 10, skipped.
  • Server main thread (5 s beat / 60 s timeout)

    Inside Watchdog.java, beatRunnable posts to the server main handler every 5_000 ms. A separate watchdog HandlerThread checks every 60_000 ms; if overdue, it calls Process.killProcess(myPid()).

  • System service linkToDeath (4 services)

    Watchdog.java attaches linkToDeath to package, activity, user, and appops (unlike Nightzuku, permissionmgr is not linked here), plus pingBinder() on every 60 s poll.

  • Manager WatchdogManager (PR #279 fix)

    Polls every 60_000 ms with MIN_RESTART_INTERVAL_MS = 15_000L. Always verifies Shizuku.pingBinder() before restarting via the last launch mode (root, adb, or dhizuku).

04

Comput AI Agent & Commandium

Integrated into the Comput terminal tab (ComputScreen.kt and ComputAgent.kt). Requests a structured JSON plan of up to MAX_STEPS_HARD = 10 steps from an OpenAI-compatible chat completion endpoint and executes each step with configurable approval gates.

ComputAgent.kt — JSON plan contract (MAX_STEPS_HARD = 10)

{
  "steps": [
    {
      "type": "shell",
      "target": "cmd package list packages -d",
      "comment": "List currently disabled packages via toybox/cmd"
    },
    {
      "type": "module_service",
      "target": "my-module",
      "comment": "Run service.sh of an installed ADB module"
    }
  ]
}
  • Secure (default)

    Prompts before every SHELL and MODULE_SERVICE step: Allow, Edit & Allow (overrideTarget), Deny, or Allow always.

  • Turbo

    Executes all planned steps sequentially without pausing for user confirmation, then generates a localized summary.

  • Custom

    Caps plan length to 3, 5 (default), or 10 steps and toggles confirmation separately for shell vs. module services.

Built-in provider presets (AiProviderPresets.kt)

Uses user-supplied API keys against OpenAI-compatible /chat/completions endpoints. Also powers one-shot command generation in CommandiumSheet.kt and error explanations in AiExplainUtil.kt.

  • OpenRouter (default)
  • OpenAI
  • DeepSeek
  • Groq
  • Mistral
  • Google Gemini
  • xAI
  • Custom URL

Execution boundaries

SHELL steps run via IShizukuService.newProcess(["sh", "-c", cmd]). The system prompt explicitly forbids desktop Linux binaries absent from Android's toybox environment (apt, systemctl, iptables) and restricts module_service to installed modules where hasService == true.

05

ADB modules & catalog

ZIP packages stored under /data/user/0/<package>/files/adb_modules/<id> and executed through the active server. Started via ADB, scripts get ADB shell privileges; started via root, they get root. It is a script runner with a local WebUI (ModuleJsBridge.kt), not a Magisk or KernelSU overlay: no mount hooks and no /data/adb/modules compatibility.

module.prop

id=my-module
name=My Module
version=1.0
versionCode=1
author=Author
description=Short module description
usesShellBridge=true   # required for window.Shizuku in WebUI

action.sh

#!/system/bin/sh
echo "module=$SHIZUKU_MODULE_ID"
echo "mode=$SHIZUKU_MODULE_MODE"   # safe | custom | full
echo "trusted=$SHIZUKU_MODULE_TRUSTED"
id
  • Safe mode

    Manual actions only.

  • Full access

    Allows stronger module behaviour. Per-module Full Trust also exists.

  • Background actions

    Must be enabled before any service.sh runs.

GitHub catalog

Searches GitHub repositories tagged topic:shevery-modules that contain a valid module.prop. Installs from repository sources (SourceZipBuilder.kt) or from a release ZIP. Cached locally for 6 hours. Max 4 modules per author, HmnDev-Tech exempt. Without a token GitHub allows 60 requests per hour (5,000/hr with a PAT).

The GitHub token (ghp_ / github_pat_) is stored in plain SharedPreferences, not encrypted. docs/github-catalog.md calls it a trade-off for emulator compatibility. Use a fine-grained token with no scopes beyond public read.

Install & runtime limits

  • 2048 ZIP entries
  • 200 MB extracted
  • 64 KB output kept per stream
  • 120 s script timeout (exit 124)
06

Device Owner, Lab utilities & Tasker

Privileged subsystems bundled into the manager beyond standard Shizuku binder dispatch. Every command and class name below comes directly from docs/device-owner.md, docs/lab-and-extras.md, and docs/tasker-plugin.md.

  • # 1-tap or ADB activation

    dpm set-device-owner com.hamondev.shevery/moe.shizuku.manager.receiver.SheveryDeviceAdminReceiver

    # 5 Delegated DPM scopes

    delegation-app-restrictions

    delegation-block-uninstall

    delegation-permission-grant

    delegation-package-access

    delegation-enable-system-app

    Device Owner & Dhizuku Provider

    Exposes DhizukuProvider (IDhizuku v1 & v2) with Strict Whitelist Mode, DPM-assisted wireless ADB toggling, and transferOwnership() to hand off Device Owner without wiping.

  • # Per-app eBPF Firewall (API 30+)

    cmd connectivity set-chain3-enabled true

    cmd connectivity set-package-networking-enabled false <pkg>

    # USB Debugging Hide (1s poll)

    settings put global adb_enabled 0

    # Restores previous state on app exit

    Chain3 Firewall, USB Hide & A11y Pinning

    Blocks per-package networking via Android's eBPF chain3 (no VPN slot used), hides ADB_ENABLED while selected apps are in the foreground, and re-enables pinned AccessibilityServices if killed.

  • # Token-authenticated broadcast

    am broadcast -a com.hamondev.shevery.action.START_SERVER -p com.hamondev.shevery -e auth <token>

    # LPE Activator ContentProvider

    content://moe.shizuku.privileged.api.connector

    Tasker Plugin, Intents & Connectors

    Ships a :tasker module (4 actions + Server is running state condition) and PluginReceiver for MacroDroid/ADB. Both require shizuku_connector_enabled.

07

Limits and caveats

What you should know before installing. Taken directly from the repository docs and source files, not guessed.

  • Conflicts with official Shizuku (and with its own Stealth copy)

    com.hamondev.shevery and every generated Stealth APK declare the moe.shizuku.privileged.api ContentProvider authority. Android blocks side-by-side installation with INSTALL_FAILED_CONFLICTING_PROVIDER. Uninstall Shizuku before installing Shevery, and uninstall standard Shevery before installing a Stealth APK.

  • Android17Compat reflection swaps String args and passes "default"

    In Android17Compat.java (lines 121 and 253), when PermissionManagerApis.checkPermission falls back to reflection, invokeDynamic passes (packageName, permissionName, "default", userId). On Android 15+ IPermissionManager expects (permissionName, packageName, "default:0", userId).

  • Stealth APK drops v2/v3 signing blocks for v1 JAR signing

    StealthApkGenerator.kt strips existing META-INF signature files during the in-place byte swap and signs CERT.RSA with a freshly generated 2048-bit RSA keypair using v1 JAR signing. Stale APK Signature Scheme v2/v3 blocks are dropped on rebuild.

  • Comput Agent is a 10-step shell & module planner, not a UI tapper

    ComputAgent.kt plans up to MAX_STEPS_HARD = 10 steps of SHELL (toybox commands via IShizukuService.newProcess) or MODULE_SERVICE (AdbModuleManager). It does not inspect accessibility trees or inject touch gestures.

  • GitHub Catalog token is stored in plain SharedPreferences

    TokenStore.kt saves the ghp_ / github_pat_ personal access token unencrypted (documented in docs/github-catalog.md as an emulator compatibility trade-off). Any root process or app backup can read it.

  • ADB modules are script runners, not systemless overlays

    Modules extract to /data/user/0/<pkg>/files/adb_modules/<id>. There are no mount hooks, no Magisk or KernelSU /data/adb/modules compatibility, and each script execution times out after 120 seconds (exit code 124).

  • Connectors expose the server startup command when enabled

    Off by default. Turning on shizuku_connector_enabled in Settings -> Automation exposes content://moe.shizuku.privileged.api.connector so local privilege-escalation activators can query the raw server start command.

  • Internal Java/Kotlin packages remain upstream

    Only the applicationId (com.hamondev.shevery) and receiver action prefixes changed. Source packages remain moe.shizuku.manager.* and rikka.shizuku.server.*, and the native starter is still built with CMake + BoringSSL + libcxx.

08

Build and docs

Building standardDebug or standardRelease automatically compiles the stealth flavor first and copies shevery-stealth.apk into the standard APK's assets. In Android Studio enable “Always install with package manager” so shizuku_server uses the latest code.

shell

git clone --recurse-submodules https://github.com/HmnDev-Tech/shevery.git
cd shevery

# Debug build (bundles shevery-stealth.apk, shevery-stub.apk & rish dex)
./gradlew :manager:assembleStandardDebug

# Or build the standalone Stealth flavor directly
./gradlew :manager:assembleStealthRelease
AGP
9.4.0-alpha07
Gradle
9.7.0-rc-2
Kotlin
2.4.20-Beta2
Compose BOM
2026.06.01
material3
1.5.0-alpha25
NDK
29.0.14206865
C++ / Crypto
CMake 3.22.1 · BoringSSL
JDK target
21