Command-line interface

The winedroid binary is a single command-line tool:

winedroid [--verbose] [--trace <categories>] <command> [args]

Running it with no arguments prints the usage summary.

Run an APK

The default command: pass an APK path and Winedroid installs it into the prefix and launches it as a desktop window.

winedroid /path/to/app.apk

Package management

Install an APK without launching it:

winedroid install /path/to/app.apk

List installed packages, with their launch activity, source APK, and size:

winedroid list

Launch an already-installed package by package name:

winedroid launch com.example.app

Uninstall a package:

winedroid uninstall com.example.app

Diagnostics

Inspect an APK (manifest, resources, DEX, native libraries) without installing it:

winedroid inspect /path/to/app.apk

Check that the host satisfies the runtime prerequisites:

winedroid runtime-check

Probe host ART availability:

winedroid art-probe

Execute a single DEX method from an APK directly (runtime debugging):

winedroid dex-run /path/to/app.apk com.example.Foo bar

Global options

Global options come before the command. Option parsing stops at the first non-option argument, or at a literal --.

  • --verbose, -v — enable all trace output.
  • --trace <categories> (also --trace=<categories>) — enable a comma-separated list of trace categories, e.g. --trace ui,click,render. Common categories: ui, click, bounds, render, perf, all. Trace output goes to stderr as [winedroid:<category>] lines; perf prints a timing summary at exit.

The prefix

Like Wine, state lives in a prefix. It defaults to ~/.winedroid/default, and WINEDROID_PREFIX points it anywhere else (the same way WINEPREFIX works):

  • <prefix>/apps/<package> — installed package artifacts.
  • <prefix>/storage — the shared emulated external storage volume (the guest /storage/emulated/0), with the standard public directories (Download, Documents, DCIM, ...) and per-app Android/data/<package> directories. Apps only ever see this volume, never the real host home directory.

Point WINEDROID_PREFIX at a scratch directory to get a throwaway prefix:

env WINEDROID_PREFIX=/private/tmp/winedroid-scratch winedroid /path/to/app.apk

Environment variables

Variables the runtime honors:

VariableEffect
WINEDROID_PREFIX=<dir>Prefix root for installs and app data (default ~/.winedroid/default).
WINEDROID_MISSING_PRIMITIVE_LOG=<path>Write every missing primitive a run hit (with hit counts and the first error detail) at exit; a summary also prints on stdout.
WINEDROID_TRACESame as --trace.
WINEDROID_DEX_TRACE=1Per-instruction DEX trace.
WINEDROID_RENDER_DUMP_PNG=<path>Dump the final frame as a PNG.
WINEDROID_UI_DUMP=<path>Dump the active surface as a readable text tree with bounds and clickable flags.
WINEDROID_WINDOW_AUTOCLOSE_MS=<ms>Close the app window after N ms.
WINEDROID_WINDOW_AUTOCLICK_TARGETSInject clicks after launch: point:<x>:<y>,view:<resource-id>,...
WINEDROID_AUTOMATION_SCRIPT=<file>Run a timed input script — see Automation.
WINEDROID_AUTOMATION_LOG=<csv>Write a per-step latency log for the automation script.
WINEDROID_AUTOMATION_INTERACTIVE=1Allow real mouse/keyboard input during automation; without it such input is ignored so stray clicks cannot corrupt a run.
WINEDROID_HEADLESS=1Run without any window — for servers and CI. The full automation harness (script, autoclick, screenshot, dumps, autoclose) works unchanged — see Headless mode.