priv_kit library

Flutter bindings for the Priv Kit Android runtime (priv-core).

Start with PrivKit.startRoot or PrivKit.startAdb, then follow PrivKit.serverState to observe the connection.

Classes

PrivAdbAuthorizationCheckResult
Outcome of an ADB authorization check.
PrivAdbAuthorizationRequestResult
Outcome of an interactive ADB authorization request.
PrivAdbConnectionOptions
Connection options for an ADB start.
PrivAdbIdentityInfo
ADB identity of this app, including the public key fingerprint.
PrivAdbPairingCheckResult
Outcome of a pairing-state check.
PrivAdbPairingResult
Outcome of a Wireless Debugging pairing attempt.
PrivAdbTcpResult
Outcome of an ADB TCP control command (adb tcpip, stop, restart).
PrivAdbWirelessDebuggingControlStatus
Capability snapshot for managing Wireless Debugging.
PrivCommand
Describes a non-interactive process to start in the connected server.
PrivCommandEvent
A single event emitted while consuming a command as a stream.
PrivCommandResult
Captured output and exit status of a finished command.
PrivExternalStartupBridgeOptions
Options for running the native starter command through a Binder bridge.
PrivExternalStartupOptions
Options for running the native starter command in the current process.
PrivKit
Dart entry point of the Priv Kit plugin.
PrivKitErrorCode
Error codes reported by the Android implementation.
PrivRuntimeConfig
Owner-death reconnect policy, mirroring priv.kit.core.PrivilegeConfig.
PrivServerInfo
Identifies one connected Privileged Server process.
PrivStartupLogLine
One line emitted by the Privileged Server startup pipeline.

Enums

PrivAdbAuthorizationEndReason
Why an authorization request ended.
PrivAdbAuthorizationStatus
Authorization state of an ADB connection.
PrivAdbPairingCheckStatus
Status of a pairing check.
PrivAdbWirelessDebuggingControl
How the runtime may manage the Wireless Debugging setting while starting.

Extensions

PrivAdbAuthorizationCheckResultPatterns on PrivAdbAuthorizationCheckResult
Adds pattern-matching-related methods to PrivAdbAuthorizationCheckResult.
PrivAdbAuthorizationRequestResultPatterns on PrivAdbAuthorizationRequestResult
Adds pattern-matching-related methods to PrivAdbAuthorizationRequestResult.
PrivAdbConnectionOptionsPatterns on PrivAdbConnectionOptions
Adds pattern-matching-related methods to PrivAdbConnectionOptions.
PrivAdbIdentityInfoPatterns on PrivAdbIdentityInfo
Adds pattern-matching-related methods to PrivAdbIdentityInfo.
PrivAdbPairingCheckResultPatterns on PrivAdbPairingCheckResult
Adds pattern-matching-related methods to PrivAdbPairingCheckResult.
PrivAdbPairingResultPatterns on PrivAdbPairingResult
Adds pattern-matching-related methods to PrivAdbPairingResult.
PrivAdbTcpResultPatterns on PrivAdbTcpResult
Adds pattern-matching-related methods to PrivAdbTcpResult.
PrivAdbWirelessDebuggingControlStatusPatterns on PrivAdbWirelessDebuggingControlStatus
Adds pattern-matching-related methods to PrivAdbWirelessDebuggingControlStatus.
PrivCommandEventPatterns on PrivCommandEvent
Adds pattern-matching-related methods to PrivCommandEvent.
PrivCommandResultPatterns on PrivCommandResult
Adds pattern-matching-related methods to PrivCommandResult.
PrivExternalStartupBridgeOptionsPatterns on PrivExternalStartupBridgeOptions
Adds pattern-matching-related methods to PrivExternalStartupBridgeOptions.
PrivExternalStartupOptionsPatterns on PrivExternalStartupOptions
Adds pattern-matching-related methods to PrivExternalStartupOptions.
PrivRuntimeConfigPatterns on PrivRuntimeConfig
Adds pattern-matching-related methods to PrivRuntimeConfig.
PrivServerInfoPatterns on PrivServerInfo
Adds pattern-matching-related methods to PrivServerInfo.
PrivStartupLogLinePatterns on PrivStartupLogLine
Adds pattern-matching-related methods to PrivStartupLogLine.

Constants

noCommandTimeout → const int
Pass as timeoutMillis to disable the execution deadline entirely.
privilegeAdbDefaultTcpPort → const int
Default static ADB TCP port used by Priv Kit.
privilegeCommandDefaultMaxBytesPerStream → const int
Default per-stream capture limit of PrivCommandResult, 1 MiB.
privilegeCommandDefaultTimeoutMillis → const int
Default execution timeout, in milliseconds, counted from the moment the remote process starts. New output does not reset the countdown.
privilegeDefaultActiveReconnectOnOwnerDeath → const bool
Default for PrivRuntimeConfig.activeReconnectOnOwnerDeath.
privilegeDefaultFollowDeathDelayMillis → const int
Default time the server stays alive while waiting for the owner to reconnect: 10 minutes.
privilegePermissionDenied → const int
Android PackageManager.PERMISSION_DENIED.
privilegePermissionGranted → const int
Android PackageManager.PERMISSION_GRANTED.

Functions

parseCommandEvent(Map map) → PrivCommandEvent
Decodes one event received over the command channel.

Exceptions / Errors

PrivKitException
A typed error raised by the priv_kit plugin.