System Requirements and Dependencies

Install platform and feature dependencies, diagnose missing tools with ansight doctor, and verify audio and network-conditioning readiness.

Ansight can run with a small baseline installation. Extra tools are needed only for the features that use them. ansight doctor inspects the current machine and distinguishes required checks from optional capabilities. Audio and network conditioning also have readiness checks for the selected live session.

The distributed CLI is self-contained. Running ansight does not require a system .NET runtime, DOTNET_ROOT, or dotnet on PATH. The .NET SDK and diagnostic tools are optional dependencies used only by the beta .NET profiling workflows. On Linux, self-contained still relies on the operating system’s normal native runtime libraries, including glibc, ICU, OpenSSL, and zlib. Extremely minimal container images may omit them.

CLI-first. The Ansight CLI is self-contained. Platform SDKs and feature tools extend it; they are not prerequisites for starting the host.

For a minimal Linux container, use Microsoft’s .NET runtime-dependencies image as the base; it contains native prerequisites but not the .NET runtime:

FROM mcr.microsoft.com/dotnet/runtime-deps:10.0
COPY ansight /usr/local/bin/ansight
RUN chmod +x /usr/local/bin/ansight && ansight --version

Add the Android SDK, ADB/emulator, Node.js, Appium, and the required Appium driver to that image only when the runner needs Android UI automation.

ansight doctor
ansight doctor --json

Use the text output for setup. Use --json in scripts or support bundles; its versioned ansight.doctor/v1 result includes every check, whether it is required, its status, message, resolved path, a justification explaining the Ansight capability it supports, and brief installInstructions.

Choose your setup and verify it

Run Doctor from the user account and launcher that run the resident host. Install the tools for your target, then rerun Doctor with that same environment. Doctor diagnoses dependencies; it does not install them. The optional Android setup command can install missing Android components on Linux x64.

WorkflowInstallation and configurationVerification
Workspace tasks, triggers, and custom sanitizersNode.js visible to the hostansight doctor --require tool.node
iOS SimulatorFull Xcode and a compatible Simulator runtimeansight doctor --require device.ios --require device.ios.simulator-hid
Physical iOSFull Xcode, device trust, and Appium/XCUITest with WebDriverAgent signing for UI automationansight doctor; then verify the target’s external session
Android EmulatorSDK/ADB, emulator and AVDansight doctor --target android-emulator
Physical AndroidSDK/ADB, USB debugging, and device authorizationadb devices, then ansight doctor --target android-device
Virtual microphone inputiOS or Android audio setupansight audio capabilities --session <live-session-id> --json
Network conditioningmitmproxy 12.2.3 on macOS, with a running virtual targetansight device network capabilities --session <live-session-id> --json

Repeated --require options make the named checks mandatory. An amber result can be normal for unrelated optional features. For audio and network conditioning, also inspect the session check’s available and reason fields; a successful command exit alone is insufficient. These commands inspect readiness without injecting audio or changing traffic.

If a feature or check is missing, compare ansight --version with ansight host status --json. A resident host can still be running an earlier build after the CLI on PATH has been updated. See Update the CLI.

Full system-state report

Use --full for a programmatic inventory of the current system:

ansight doctor --full --json
ansight doctor --full --json --output system-report.json

The ansight.system-report/v1 result includes OS and hardware, Ansight versions and install details, dependencies and platform tooling, host configuration, known apps and devices, installed agent executables, and existing Ansight skill versions and checksums. It reads declared skill versions where available and computes SHA-256 over their files. Unknown versions stay unknown; comparison with the current bundled skills is included when a baseline exists.

Each section reports its collection status. Missing tools, offline devices, timeouts and unreadable files remain visible in the result. A generated report returns success even when incomplete: inspect isComplete, sections and findings in scripts. --require applies only to the quick health check.

Full collection reads existing state and runs version/discovery probes. It does not install tools, modify skills, create credential stores, boot devices or upload the report. --output saves JSON; omit --json for a text view on stdout. Inventory covers Ansight-relevant tools and locations rather than every OS package. Desktop agent bundle discovery currently covers macOS; CLI agent discovery also covers Windows and Linux.

Secret metadata is excluded unless explicitly requested:

ansight doctor --full --include-secret-metadata --json

That flag includes Ansight secret aliases, app scopes, recorded revision IDs, update times and configuration status where available. Values and hashes of secret values are never included. Environment secrets have no known revision. Without the flag the section is not-requested, and aliases and counts are not collected. --json, --output and verbosity do not enable secret metadata.

Baseline requirements

These checks must pass for Doctor to report a healthy host.

RequirementWhy Ansight needs itWhat Doctor checks
Writable data directoryStores host state, sessions, captures, Trends history, and local configuration.The directory exists or can be created, and a write/delete probe succeeds.
Protected credential storageProtects account credentials and test secrets.An OS vault is active, or the encrypted file store has a valid externally protected key and safe permissions.

The default credential provider is the macOS Keychain, Linux Secret Service, or Windows DPAPI where available. A headless machine without an OS vault must use the protected file store with a master key supplied through a configured key file, a systemd credential, or ANSIGHT_SECRET_MASTER_KEY. Do not keep the key beside the encrypted store or grant group/other access to it on Unix.

Linux credential setup and unattended hosts

Linux support depends on the host environment, not only the distribution name. A usable Secret Service needs secret-tool, a user D-Bus session, and an accessible vault. ansight config credentials and ordinary doctor verify a temporary store/read/delete operation rather than trusting the presence of the executable. The temporary entry contains random probe data, never account credentials. doctor --full retains its separate, read-only report behavior.

For interactive setup, run:

ansight config credentials

If Secret Service is unavailable, setup asks for an existing externally protected key file. Provision the key separately through your administrator or secret manager: it must contain a base64-encoded 32-byte key, be readable by the host user, and have owner-only Unix permissions (0400 or 0600). Keep it outside the encrypted store directory. Setup does not generate, copy, overwrite, or rotate master keys. A key file’s location alone does not provide external protection; secure its storage and backup separately from the encrypted data.

For a persistent headless VM, use a key source that will remain available after reboot, and configure it explicitly:

ansight config credentials --key-file /protected/ansight/master-key --non-interactive
ansight config get credential-provider
ansight config get secret-key-file
ansight doctor --credentials-only

Only provider and file references are saved in cli-settings.json under the CLI data directory. Terminal commands and the resident host load the same defaults; existing encrypted data must authenticate with the supplied key before setup saves anything. Re-running setup preserves saved references and existing keys. Changing providers or rotating a key requires a deliberate migration, not another setup run. Explicit command options and environment credential sources override saved defaults. Unset ANSIGHT_SECRET_MASTER_KEY before configuring persistent key-file defaults. For CI, environment-supplied keys and systemd credentials remain supported without saving their secret values; use doctor --credentials-only to validate them.

The shell installer accepts --secret-key-file <path> and performs credential setup before account login. It reports binary installation, credential readiness, required checks, authentication, and Android readiness separately. Required failures return a nonzero exit code; --no-setup explicitly installs files and reports readiness without requiring a configured host.

Generated systemd user services read the same saved settings and run a credential check before host startup. The installer also checks credentials in a transient systemd user service before enabling startup. An unlocked desktop vault may not remain available after logout: use an external key for unattended operation. The installer offers systemd user lingering for logout and boot persistence; without it, the service follows the user session. For managed services, an administrator can enable it with loginctl enable-linger <username>. Custom service units are preserved. The host user’s key path must remain accessible independently of .bashrc or an interactive login.

Android VM readiness

Ansight first discovers existing Android installations from explicit overrides, ANDROID_SDK_ROOT / ANDROID_HOME, PATH, and standard user SDK folders. It also looks for SDK roots behind adb, emulator, sdkmanager, or avdmanager on PATH, following executable symlinks. On Linux, additional candidates include /usr/lib/android-sdk, /usr/local/lib/android/sdk, /opt/android-sdk, and /opt/android/sdk. The emulator beside the selected ADB installation takes priority. Discovery does not download packages or modify existing SDKs or AVDs; Doctor validates the discovered tools before reporting readiness.

Choose the intended workflow explicitly:

# Physical device or emulator reachable through ADB; no local KVM/image requirement.
ansight doctor --target android-device

# Emulator running inside this host or VM.
ansight doctor --target android-emulator

The external-target check requires ADB and at least one connected, authorized target. The local-emulator check requires ADB, the emulator executable, an AVD referencing an installed system image, and successful emulator -accel-check. Linux also checks that the current user can open /dev/kvm for reading and writing. A VM may require nested virtualization enabled on its outer host and membership in the kvm group. When acceleration is unavailable, use an external Android target instead.

Pass --android-target android-device or --android-target android-emulator to the shell installer to require that workflow’s checks. These are prerequisite checks: they do not boot an app or prove screenshot capture and input work. Local iOS checks are marked not applicable on Linux; explicitly requiring an unsupported check fails.

Optional setup fallback

Automatic discovery remains the normal path. If components are missing, the optional setup command can provision them on Linux x64:

# Preview existing tools, missing packages, sizes, and licenses without changing files.
ansight setup android --dry-run --json

# Install missing ADB tools, or reuse an existing installation.
ansight setup android

# Add local emulator tools and, only if needed, a baseline AVD.
ansight setup android --target android-emulator

Setup uses an existing SDK when it finds one. --sdk-root <path> selects another SDK or a new destination. The validated SDK path is saved for subsequent CLI and host processes; inspect it with ansight config get android-sdk-root. Explicit ADB options and Android environment settings take precedence over the saved path.

The emulator fallback requires Linux x64, usable KVM, at least 4 GiB RAM, adequate free disk space (at least 8 GiB), and JDK 17 or newer. It checks these prerequisites before package downloads. Existing emulator acceleration is checked before any installation; a newly installed emulator is checked before downloading its system image. Setup reports Java or KVM prerequisites rather than changing system packages, virtualization settings, or group membership.

Missing ADB tools come from Google’s official platform-tools archive. Emulator setup reuses existing sdkmanager / avdmanager tools, or bootstraps command-line tools version 19.0. This compatibility path supports an explicit Android 35 Google APIs x86_64 baseline, named ansight-api35 by default. Use --avd-name <name> to choose another name. An existing valid AVD is reused; existing AVDs are never forced overwritten. Google’s newer Android CLI remains available separately; setup does not install or configure its agent integrations.

Before applying changes, setup shows the packages and download sizes and asks for confirmation and license acceptance. --yes skips only the installation prompt. For unattended setup, review the licenses in the dry-run JSON first, then explicitly accept them:

ansight setup android --target android-emulator --yes --accept-android-licenses

Downloads use Google’s HTTPS repository and its published archive checksums. Bootstrap archives are extracted into staging directories before installation; existing package directories are preserved. Setup validates the resulting tools and reports tool readiness separately from target connectivity. A successful ADB installation does not require a device to be plugged in. Booting an app and testing screenshots/input remain separate authenticated product operations.

The shell installer offers this fallback when an explicitly selected Android workflow is unavailable. --setup-android requests it directly, defaulting to ADB; combine it with --android-target android-emulator for local emulator setup. Use --accept-android-licenses separately for unattended installer runs. Ordinary installation and --yes alone do not silently opt into Android downloads. --setup-android and --no-setup cannot be combined.

Credential setup is also available as ansight setup credentials, an alias of ansight config credentials. Both setup targets work before account login.

Feature-specific dependencies

Missing tools covered by optional Doctor checks produce an amber result. Ansight still works, but the corresponding feature is unavailable or reduced. Audio routes and network conditioning additionally need the session checks below. The order below reflects how much of the general mobile workflow each dependency unlocks. A tool for a platform you do not target is not important for that machine.

PriorityDependencyNeeded forDoctor check or setup
1Android SDK and ADBAndroid device discovery, app lifecycle, logs, screenshots, location, and input. Beta feature: Android Perfetto profiling.Default SDK roots are ~/Library/Android/sdk on macOS, ~/Android/Sdk on Linux, and %LOCALAPPDATA%\Android\Sdk on Windows; ADB is beneath platform-tools. Override with ANSIGHT_ADB_PATH or --adb-path.
2Full Xcode installationiOS Simulator discovery/lifecycle through xcrun simctl, and physical-device lifecycle through xcrun devicectl. Beta feature: iOS Instruments profiling.Default: /Applications/Xcode.app/Contents/Developer, with /usr/bin/xcrun. Override with ANSIGHT_XCODE_PATH or --xcode-path.
3Android EmulatorListing and starting Android virtual devices.Default: <Android SDK>/emulator/emulator on macOS/Linux or emulator.exe on Windows. The SDK root follows ADB resolution.
4Node.jsTrusted workspace tasks, triggers, and custom sanitizers written in JavaScript or TypeScript.Default: an executable named node on PATH. Common paths are /opt/homebrew/bin/node, /usr/local/bin/node, /usr/bin/node, and %ProgramFiles%\nodejs\node.exe. Override the host with --node-path or ANSIGHT_NODE_PATH.
5SkiaSharp native runtimeScreenshot evidence, image comparison, and screenshot-backed UI actions.Default: bundled with the installed Ansight CLI version. On macOS, libSkiaSharp.dylib is beside ansight; Linux and Windows native assets are carried by the self-contained CLI bundle.
6Tesseract OCRLocal screenshot text detection and PII redaction.Default: tesseract or tesseract.exe on PATH; common paths are Homebrew’s bin, /usr/bin/tesseract, and C:\Program Files\Tesseract-OCR\tesseract.exe. Override with ANSIGHT_TESSERACT_PATH.
7scrcpy and its matching serverAndroid video tooling; live WebRTC streaming currently requires macOS.Bundled with the Windows CLI under tools/scrcpy. Elsewhere, found on PATH or in Homebrew’s bin; keep the matching server installed.
8dotnet-traceBeta feature: Capturing .NET diagnostic traces from supplied application artifacts.Default global-tool path: ~/.dotnet/tools/dotnet-trace on macOS/Linux or %USERPROFILE%\.dotnet\tools\dotnet-trace.exe on Windows. It must be on PATH.
9dotnet-dsrouterBeta feature: Routing .NET diagnostics for supported device workflows.Default global-tool path: ~/.dotnet/tools/dotnet-dsrouter on macOS/Linux or %USERPROFILE%\.dotnet\tools\dotnet-dsrouter.exe on Windows. It must be on PATH.
10Appium CLI and XCUITest driverUI input on physical iOS devices.Default: appium on npm’s global executable path; the driver is managed beneath Appium’s home, normally ~/.appium. Both are inspected through the Appium CLI.
11Running Appium serverThe physical-iOS input session itself.Default endpoint: http://127.0.0.1:4723/. Override with ANSIGHT_APPIUM_SERVER_URL.
12BlackHole 2ch and macOS AccessibilityMicrophone fixture input on iOS Simulator.Doctor checks permission.accessibility and device.ios.audio.blackhole; audio capabilities verifies the selected session’s route and microphone readiness.
13Android Emulator audio endpointMicrophone fixture input on Android Emulator.The running emulator needs an authenticated audio gRPC endpoint and active guest microphone, with host microphone input disabled. Check with audio capabilities.
14mitmproxy 12.2.3TCP network conditioning on a virtual target hosted by macOS.Executable: mitmdump on PATH, /opt/homebrew/bin, or /usr/local/bin; override with an absolute ANSIGHT_MITMDUMP_PATH. Use device network capabilities; the quick Doctor check does not check mitmproxy.

Headless device targets

Device-launching commands show native windows by default. Use --headless on the command to skip Simulator.app on iOS or start an Android emulator with -no-window. This does not remove the platform requirements: iOS still needs macOS and full Xcode with a compatible simulator runtime, and Android still needs an installed emulator and AVD. Existing windows are not closed. See headless device launches.

Install dependencies in priority order

Android SDK and ADB

Install the Android SDK through Google’s Android Studio. During first-run setup, or later under Tools > SDK Manager > SDK Tools, install Android SDK Platform-Tools. That package supplies adb. Note the Android SDK location shown by SDK Manager.

For a command-line-only Android SDK that already has sdkmanager, install the same component with:

sdkmanager "platform-tools"

Add the SDK’s platform-tools directory to PATH, set ANSIGHT_ADB_PATH to the SDK or adb executable, or pass its location directly:

adb version
adb devices
ansight doctor --adb-path /absolute/path/to/android-sdk

Expected default SDK and ADB paths:

PlatformSDK rootADB executable
macOS~/Library/Android/sdk~/Library/Android/sdk/platform-tools/adb
Linux~/Android/Sdk~/Android/Sdk/platform-tools/adb
Windows%LOCALAPPDATA%\Android\Sdk%LOCALAPPDATA%\Android\Sdk\platform-tools\adb.exe

Doctor checks an explicit --adb-path or ANSIGHT_ADB_PATH first, followed by ANDROID_SDK_ROOT, ANDROID_HOME, PATH, and then these conventional roots. An explicit value may point to the executable, platform-tools, or the SDK root.

See Google’s SDK Manager guide and sdkmanager reference for headless installations.

Full Xcode installation

Install Xcode from the Mac App Store or the Apple Developer downloads site, then launch it once to finish component installation and accept its licence. Ansight needs the full Xcode installation for Simulator and devicectl; the standalone Command Line Tools package is not sufficient for those workflows.

Select the intended Xcode and finish its first-run setup:

sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -runFirstLaunch
xcodebuild -version
xcrun simctl list devices
xcrun devicectl list devices
ansight doctor --xcode-path /Applications/Xcode.app

If Xcode lives elsewhere, pass its .app path with --xcode-path or set ANSIGHT_XCODE_PATH. See Apple’s command-line tools documentation.

The expected default application path is /Applications/Xcode.app, which normalizes to /Applications/Xcode.app/Contents/Developer. Ansight invokes /usr/bin/xcrun; Simulator tooling normally resolves to /Applications/Xcode.app/Contents/Developer/usr/bin/simctl, while physical device commands resolve through xcrun devicectl. Doctor also honors DEVELOPER_DIR, the directory selected by /usr/bin/xcode-select -p, /Applications/Xcode-beta.app, and other /Applications/Xcode*.app installs.

Simulator input and native preview discover SimulatorKit.framework in the selected Xcode’s Contents/Developer/Library/PrivateFrameworks directory, then in Contents/SharedFrameworks. This supports both framework layouts without adding symlinks or changing another Xcode installation. A failed load reports each attempted path and its loader error. Restart the resident host after changing Xcode so it does not retain frameworks from the previous installation.

Simulator input selects its transport from the loaded CoreSimulator version. CoreSimulator 1155.4 and later require the Xcode 27 DTUHID channel for finger, keyboard, and hardware-button input. Earlier versions retain Indigo input. CoreSimulator is shared across Xcode installations, so installing Xcode 27 can also change the transport needed when Xcode 26 is selected. Pencil input on the Xcode 27 path uses an included helper inside the target simulator; keep it beside the CLI’s native libraries when copying an installation.

An interrupted connection or acknowledgement timeout fails the input command without replaying the gesture. Receipt is uncertain after a timeout: inspect the target app and restart the input session before continuing.

When opening a Simulator window, Ansight uses that Xcode’s Simulator.app if present. If the selected Xcode instead provides Contents/Applications/DeviceHub.app, Ansight opens the exact device through Device Hub’s device URL. It does not launch a Simulator app from a different Xcode installation. Headless runs do not need either window application.

The device.ios.simulator-hid Doctor check verifies that the framework and required APIs load; it does not send input to a device. Before relying on a new Xcode/runtime combination, verify a visible finger action and Home-button action on the exact target, then check Pencil events and drawing output if needed. For keyboard input, focus an editable field and confirm text insertion. A successful input command is not evidence that the app observed it. See Pencil input verification.

Android Emulator

In Google’s Android Studio, open SDK Manager > SDK Tools, install Android Emulator, then open Device Manager and create an Android Virtual Device with a system image suitable for the app. This is the simplest way to install all related pieces together.

With a configured command-line SDK, install the emulator package and confirm that at least one AVD exists:

sdkmanager "emulator"
emulator -version
emulator -list-avds

Creating an AVD also requires a system image. Follow Google’s virtual-device guide to choose and install one.

The expected executable is <Android SDK>/emulator/emulator on macOS and Linux, or <Android SDK>\emulator\emulator.exe on Windows. With the conventional SDK roots above, that is:

  • macOS: ~/Library/Android/sdk/emulator/emulator
  • Linux: ~/Android/Sdk/emulator/emulator
  • Windows: %LOCALAPPDATA%\Android\Sdk\emulator\emulator.exe

Ansight first derives the SDK root from the resolved platform-tools/adb[.exe], then checks ANDROID_SDK_ROOT, ANDROID_HOME, PATH, and the conventional platform roots.

Node.js

Install a supported LTS release from the official Node.js download page. Use the installer for the current OS, or an existing version manager that makes the selected node executable visible to the host process.

node --version
npm --version
ansight doctor

Doctor checks PATH. When starting the host, --node-path /absolute/path/to/node selects a specific runtime for trusted workspace modules.

There is no separate fixed Doctor path: Doctor expects an executable named node on PATH. Common installation paths are /opt/homebrew/bin/node on Apple Silicon Homebrew, /usr/local/bin/node on Intel Homebrew, /usr/bin/node for Linux system packages, and %ProgramFiles%\nodejs\node.exe on Windows. Version managers use their own per-user path and must expose it to the shell or service that starts Ansight. The host also accepts ANSIGHT_NODE_PATH or --node-path for an exact executable.

SkiaSharp native runtime

The supported SkiaSharp native library is bundled with the platform-specific Ansight CLI distribution; there is no separate global package to install. A failure normally means the CLI archive is incomplete or its OS/CPU architecture does not match the machine.

Reinstall the correct Ansight CLI build, then verify it:

ansight doctor

There is no external SkiaSharp installation path to configure. Under the standard macOS/Linux installer, the active CLI payload is ~/.local/share/ansight/cli/versions/<version>-<build>-<rid>/; macOS keeps libSkiaSharp.dylib beside ansight in that directory. The Linux and Windows self-contained executables carry their native asset in the CLI bundle and the .NET runtime manages its extraction. On Windows, the versioned payload root is %LOCALAPPDATA%\Ansight\cli-install\versions\<version>-<build>-<rid>\.

Do not install a random libSkiaSharp beside the executable. If a correctly matched, freshly installed CLI still reports native.skia as unavailable, include ansight doctor --json output in a support report.

Tesseract OCR

Install the executable for the current platform:

# macOS with Homebrew
brew install tesseract

# Debian or Ubuntu
sudo apt update
sudo apt install tesseract-ocr

# Windows with WinGet
winget install UB-Mannheim.TesseractOCR

Then restart the shell and verify:

tesseract --version
ansight doctor

If it is intentionally outside PATH, set ANSIGHT_TESSERACT_PATH to the executable. See the Tesseract installation guide.

Doctor otherwise expects tesseract (tesseract.exe on Windows) on PATH. Typical paths are /opt/homebrew/bin/tesseract on Apple Silicon Homebrew, /usr/local/bin/tesseract on Intel Homebrew, /usr/bin/tesseract for Linux packages, and C:\Program Files\Tesseract-OCR\tesseract.exe for the common Windows installer. If the Windows installer does not add that directory to PATH, point ANSIGHT_TESSERACT_PATH at the executable explicitly.

scrcpy and its matching server

The local player’s Android screenshot control and basic input use emulator gRPC or ADB and do not require scrcpy. On Windows and Linux, this screenshot mode works independently of the macOS-native live WebRTC video bridge. See Device Preview.

Windows CLI packages include scrcpy 3.3.1, its matching Android server, and the required DLLs under tools/scrcpy beside ansight.exe. No separate scrcpy installation or PATH change is needed. Keep the entire CLI installation directory when moving it. The Windows ARM64 CLI currently bundles the x64 scrcpy distribution and requires Windows 11’s x64 emulation to run it.

Ansight prefers an explicitly configured executable, then its private bundle, then PATH. It validates the bundled files and client version before use and always pairs the bundle with its own server; SCRCPY_SERVER_PATH applies only to external installations. If the bundle is incomplete or corrupted, reinstall the CLI. A valid external installation can also serve as a fallback.

The bundle supplies the scrcpy dependency. Windows screenshot control still uses ADB or emulator gRPC, and bundling does not enable the macOS-native WebRTC bridge. Install the Android SDK/ADB for device discovery and emulator control.

On macOS and Linux, install scrcpy as one complete distribution so the client executable and scrcpy-server remain the same version:

# macOS with Homebrew
brew install scrcpy

# Optional Windows fallback for a source build or custom installation
winget install --exact Genymobile.scrcpy

For Linux, use the current package or static archive described in the official scrcpy Linux guide. Avoid copying only the executable from another installation.

Run ansight doctor to validate the selected executable and server. The private Windows copy is not added to PATH, so a bare scrcpy --version may find another installation or no command at all.

Doctor finds the server beside standard package-manager installations. Set SCRCPY_SERVER_PATH only when using a custom layout, and point it to the server from the same release as the executable. The official scrcpy repository is the authoritative download source.

After the private bundle, Doctor checks PATH, then the common macOS Homebrew paths /opt/homebrew/bin/scrcpy and /usr/local/bin/scrcpy. Linux packages normally install /usr/bin/scrcpy; Windows package managers must expose scrcpy.exe on PATH.

For an external matching server, Ansight first checks SCRCPY_SERVER_PATH, then beside the executable and at <prefix>/share/scrcpy/scrcpy-server. It also checks these exact conventional paths:

  • /opt/homebrew/share/scrcpy/scrcpy-server
  • /usr/local/share/scrcpy/scrcpy-server
  • /usr/share/scrcpy/scrcpy-server

For an external custom layout, set SCRCPY_SERVER_PATH if the server is neither beside the executable nor in one of those locations.

Windows packages retain upstream licenses and corresponding source archives under tools/scrcpy/licenses and tools/scrcpy/sources. Local release builds download checksum-pinned inputs. Build hosts can set ANSIGHT_SCRCPY_CACHE_DIRECTORY to a prepopulated directory for offline reuse; cached inputs receive the same checksum verification.

.NET SDK

Beta feature dependencies. The .NET SDK installation environment, dotnet-trace, and dotnet-dsrouter guidance below supports the experimental ansight profile dotnet command family.

The self-contained Ansight CLI does not require a .NET SDK or dotnet on PATH. Full Doctor reports query installed SDKs and runtimes when dotnet is available. Build your .app, .apk, or .ipa outside Ansight. You may still use an SDK outside Ansight to produce the artifact or to install the diagnostic tools below.

dotnet-trace

Install dotnet-trace using your preferred .NET tool installation environment:

dotnet tool install --global dotnet-trace
dotnet-trace --version
ansight doctor

If the command is not found after installation, restart the shell and make sure the .NET global-tools directory is on PATH: $HOME/.dotnet/tools on macOS and Linux, or %USERPROFILE%\.dotnet\tools on Windows. See Microsoft’s dotnet-trace documentation.

The expected executable is $HOME/.dotnet/tools/dotnet-trace on macOS/Linux or %USERPROFILE%\.dotnet\tools\dotnet-trace.exe on Windows. Doctor resolves the command from PATH; there is no separate Ansight path override.

dotnet-dsrouter

Install dotnet-dsrouter when profiling sandboxed .NET mobile processes:

dotnet tool install --global dotnet-dsrouter
dotnet-dsrouter --version
ansight doctor

It uses the same global-tools PATH rules as dotnet-trace. See Microsoft’s dotnet-dsrouter documentation.

The expected executable is $HOME/.dotnet/tools/dotnet-dsrouter on macOS/Linux or %USERPROFILE%\.dotnet\tools\dotnet-dsrouter.exe on Windows. Doctor resolves the command from PATH; there is no separate Ansight path override.

Appium CLI and XCUITest driver

This dependency is only for physical-iOS input. Install Node.js first, then install Appium through npm and add the XCUITest driver:

npm install --global appium
appium driver install xcuitest
appium --version
appium driver list --installed
ansight doctor

Follow the Appium installation guide and XCUITest driver installation guide for WebDriverAgent signing, Developer Mode, and device trust.

Doctor expects appium (appium.cmd or appium.exe on Windows) on PATH. Its exact path is npm-prefix dependent: common global locations are /usr/local/bin/appium, a version-manager-specific bin/appium, and %APPDATA%\npm\appium.cmd. Appium manages installed extensions beneath its own home, normally ~/.appium; Ansight does not infer or open the driver directory. Instead, it runs appium driver list --installed --json and requires an installed xcuitest driver.

Running Appium server

Installing Appium does not start it. Open a persistent terminal and run:

appium

Leave that process running while using physical-iOS input. In another terminal, verify that Doctor can reach it:

ansight doctor

The default endpoint is http://127.0.0.1:4723/. If Appium listens elsewhere, set ANSIGHT_APPIUM_SERVER_URL to its absolute HTTP or HTTPS URL before starting Ansight or running Doctor.

For a physical iPhone, supply WebDriverAgent signing to the Ansight host through ANSIGHT_APPIUM_XCODE_TEAM_ID and, when needed, ANSIGHT_APPIUM_XCODE_SIGNING_ID, ANSIGHT_APPIUM_WDA_BUNDLE_ID, or ANSIGHT_APPIUM_XCODE_CONFIG_FILE. Set them before starting the host. The phone must be included in the WDA provisioning profile; an arbitrary self-signed bundle cannot replace Apple developer signing. Doctor confirms that Appium and its driver are available, while a device session verifies WDA signing and launch. See physical iPhone external capture.

This dependency has no filesystem path. The expected default network location is http://127.0.0.1:4723/, and Doctor probes its /status endpoint. When the server uses a base path, include it in ANSIGHT_APPIUM_SERVER_URL, for example http://127.0.0.1:4723/wd/hub.

Microphone audio input

Microphone fixture input supports iOS Simulator and Android Emulator with an SDK-connected app. Physical devices are unsupported. Install the platform tools above first, then complete the setup for the selected virtual device.

iOS Simulator audio

Install the BlackHole 2ch driver and complete its administrator and reboot prompts:

brew install --cask blackhole-2ch

In System Settings > Privacy & Security > Accessibility, enable the application that launches the Ansight host, such as Terminal, iTerm, or your IDE. Run the following from that launcher:

ansight doctor --require permission.accessibility --require device.ios.audio.blackhole

Boot exactly one iOS Simulator, open its window, and select BlackHole 2ch under I/O > Audio Input (called Sound Input in some Xcode versions). Keep the Mac’s system audio defaults unchanged. The app also needs microphone permission and an active recording flow. Follow the one-time setup and before-each-run checklist for host restarts and route verification.

Android Emulator audio

Use a running local emulator with an authenticated audio gRPC endpoint. Ansight discovers its endpoint and token from the emulator’s discovery record. In Extended controls > Microphone, disable Virtual microphone uses host audio input. Grant the app’s microphone permission and start its normal recording flow. This provider uses the emulator audio endpoint; BlackHole is specific to the iOS setup.

Check platform readiness with ansight doctor --target android-emulator, then follow the Android audio setup for endpoint, authentication, and emulator-version limitations.

Verify the selected audio session

With the SDK-connected app recording, run:

ansight session list --connected --json
ansight audio capabilities --session <live-session-id> --json

Require available: true before injection. If it is false, use reason and the audio troubleshooting table to resolve missing permissions, an unverified input route, unavailable emulator authentication, or an idle microphone. This check does not play a fixture or prove that the app captured it; verify the app’s recording or transcript after injection.

Network conditioning with mitmproxy

Ansight’s current network conditioner requires macOS, a running iOS Simulator or Android Emulator, and mitmproxy 12.2.3. Task API calls also require SDK mode. Physical devices and Linux/Windows hosts are unsupported by this conditioner. It shapes TCP traffic while preserving encrypted TLS; installing a CA certificate is unnecessary.

Download and unpack the 12.2.3 macOS build from the official mitmproxy downloads into a stable directory. The mitmproxy installation guide also covers package installation, but Ansight’s current readiness check requires that exact version. Verify the executable you intend the host to use:

export ANSIGHT_MITMDUMP_PATH="/absolute/path/to/mitmdump"
"$ANSIGHT_MITMDUMP_PATH" --version

Replace the path with the extracted executable; the output must report Mitmproxy: 12.2.3. Set the variable in the environment that starts the resident host. For an already-running host, restart it from that environment after current runs finish. Without an override, Ansight searches PATH, /opt/homebrew/bin, and /usr/local/bin.

The quick ansight doctor check does not check mitmproxy. doctor --full includes its executable/version inventory; use the selected-session preflight to check the required version and running target:

ansight device network capabilities --session <live-session-id> --json

Inspect available and reason. The check does not apply network conditions or establish capture routing. On first use, macOS may ask you to approve mitmproxy’s Network Extension under System Settings > General > Login Items & Extensions > Network Extensions. Complete that approval, then retry the readiness check and the intended operation.

SymptomAction
mitmdump is missingInstall the macOS build and check the host’s PATH or absolute ANSIGHT_MITMDUMP_PATH; a shell-only setting does not update a running host.
Required-version errorVerify the selected executable reports Mitmproxy: 12.2.3; another installation may be taking precedence.
Waiting for Network Extension approval or local capture never becomes readyComplete the macOS extension approval and retry the operation.
Target process cannot resolveBoot the selected virtual device and launch the app; verify the session targets that device and App ID.
Conditions apply but counters remain zeroGenerate fresh TCP traffic, check destination-port filters, and use a LAN address for a local fixture. macOS local capture bypasses loopback destinations; UDP/QUIC is not shaped.

routingVerified remains false in the preflight result. After applying a condition, inspect ansight device network get --lease <lease-id> --json and the app’s behavior. iOS capture targets the selected app process; Android capture includes all apps in the selected emulator. See the task network-conditioning reference for bounded leases, verification, and cleanup.

Read the traffic light

ResultMeaningExit behavior
GreenEvery required and optional check passed.Success.
AmberBaseline requirements passed, but one or more optional capabilities are unavailable.Success.
RedAt least one required check failed.Returns the capability-unavailable exit code.

An amber result is normal when the machine does not target every platform. For example, a Linux automation host can be healthy without Apple device tooling, and an iOS-only developer does not need the Android SDK.

Diagnose a non-default host

Use the same paths and credential configuration that the real host will use:

ansight doctor \
  --data-dir /path/to/ansight-data \
  --secret-store-file /protected/secrets.json \
  --secret-key-file /protected/ansight.key \
  --adb-path /path/to/android-sdk \
  --xcode-path /Applications/Xcode.app

The resolved paths appear in Doctor output. If a host is started by a service, run Doctor in that service’s user and environment: interactive shells often have a different PATH, credential vault, and systemd credential directory.

Security note for Node.js

Node.js repository modules run as the current OS user and are not an operating system sandbox. Only enable modules from repositories you trust. See Workspace Execution Security for the process model, environment filtering, timeouts, output bounds, and trust gates.