androiddriver

package
v0.1.0-rc.20 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package androiddriver exposes the prebuilt UiAutomator driver APKs as an embedded filesystem, so the Tales binary can install them on a device without the Android SDK being present.

Unlike the Apple driver — whose Swift source is embedded and compiled on first use, because building it needs Xcode which every iOS host already has — the Android driver ships as built artifacts. Requiring the Android SDK just to *run* a test would be a steep toll for a single-binary tool, so the APKs are built once, committed, and embedded. `make check-android-driver-fresh` guards against them drifting from the Kotlin source.

Index

Constants

View Source
const (
	AppAPKName  = "tales-driver.apk"
	TestAPKName = "tales-driver-test.apk"
	// SentinelName holds the SHA-256 of the Kotlin sources the committed
	// APKs were built from.
	SentinelName = "source.sha256"
)

File names of the two APKs. The app APK is an empty shell that owns the driver's package and permissions; the test APK carries the instrumentation that actually serves the driver.

View Source
const PrebuiltRoot = "prebuilt"

PrebuiltRoot is the directory holding the committed artifacts inside the embedded filesystem.

Variables

View Source
var ErrNotBuilt = errors.New("the Android driver APKs are not embedded in this build")

ErrNotBuilt reports that the driver APKs are absent from the binary. This happens in a working tree where the driver has never been built; a released binary always carries them.

Functions

func APK

func APK(name string) ([]byte, error)

APK returns the bytes of one embedded APK by file name.

func Available

func Available() bool

Available reports whether this binary carries usable driver APKs.

func FS

func FS() fs.FS

FS returns the embedded filesystem. Artifacts live under PrebuiltRoot.

func SourceHash

func SourceHash() (string, error)

SourceHash returns the recorded hash of the Kotlin sources the embedded APKs were built from. It identifies a driver build, and feeds the on-device install cache key so a device is not reinstalled on every run.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL