Skip to content

Connectors

HmnDev-Tech edited this page Sep 30, 2026 · 2 revisions

Shizuku Connectors

Shevery Connectors hands out the exact server-start command to authorized activator apps (launchers, automation tools, NFC triggers) — so they can boot the Shevery server — and gates every incoming automation action.

Where the toggle lives

Settings → Automation → Shevery Connectors (previously a Laboratory item). It is off by default; enabling it shows a warning dialog, because with connectors on any app that knows the command or the auth token can start/stop the server.

The same flag (shizuku_connector_enabled, stored in Shevery's preferences) gates two things:

  1. the content://moe.shizuku.privileged.api.connector provider — queries are refused while connectors are off,
  2. the com.hamondev.shevery.tasker.PluginReceiver — Locale/Tasker plugin actions and the four direct com.hamondev.shevery.action.* broadcasts are rejected (RESULT_CANCELED) before touching the server.

The Home screen View intents sheet shows the live state: Connectors Active or Connectors Disabled (Intents Inactive), with a shortcut to the Automation settings.

How an activator uses it

  1. Query the provider; it returns a cursor with command = Starter.internalCommand.
  2. Execute that command with shell privileges (root or ADB context the activator already has).
  3. The server starts; Shevery picks it up via the state machine (STARTING → RUNNING).

The provider command itself needs no token — it is only reachable when connectors are enabled. Direct control broadcasts are a separate path: they need connectors on and the secret auth token (-e auth <token>), see Tasker Plugin.

Example (Kotlin)

val cursor = contentResolver.query(
    Uri.parse("content://moe.shizuku.privileged.api.connector"),
    null, null, null, null
)
cursor?.use {
    if (it.moveToFirst()) {
        val command = it.getString(0)
        // run `command` in your privileged shell
    }
}

Example (shell)

CMD=$(content query --uri content://moe.shizuku.privileged.api.connector --projection command | sed -n 's/.*command=//p')
sh -c "$CMD"

Full spec lives in docs/shizuku-connectors.md in the repo. Intent reference: Intents.

Clone this wiki locally