patrol devices command lists all available devices, simulators, and emulators that can be used for running integration tests.
Synopsis
Description
This command provides a simpler, Patrol-aware alternative toflutter devices. It discovers and lists all attached physical devices, running simulators (iOS), and emulators (Android) that are available for testing.
The command is useful for:
- Identifying which devices are available before running tests
- Getting device IDs for use with
patrol test --device - Verifying that your devices are properly connected and recognized
Basic Usage
Output Format
Each device is displayed on a separate line with the following format:- device_name: The human-readable name of the device
- device_id: The unique identifier used to target this device
Using Device IDs
Once you have a device ID from this command, you can use it withpatrol test:
You can specify devices by either their ID or name when using the
--device flag.Examples
Check available devices
No devices found
If no devices are available, you’ll see:1
Device Types
The command detects various types of devices:Android
- Physical Android devices connected via USB
- Android emulators running on your machine
- Remote Android devices (when properly configured)
iOS
- iOS Simulators running on macOS
- Physical iOS devices connected to macOS
- Remote iOS devices (when properly configured)
macOS
- macOS desktop (when available)
Web
- Chrome browser (for web testing)
Troubleshooting
No devices showing up
If expected devices don’t appear: For Android:- Ensure
adbis installed and in your PATH - Check USB debugging is enabled on physical devices
- Verify emulators are running:
adb devices - Check
ANDROID_HOMEenvironment variable is set
- Ensure Xcode is installed on macOS
- Verify simulators are booted:
xcrun simctl list devices - For physical devices, check they’re trusted and connected
- Run
patrol doctorto verify iOS tooling
Checking your environment
Runpatrol doctor to diagnose environment issues:
Exit Codes
- 0: Success - at least one device was found
- 1: No devices found or error occurred
Related Commands
- patrol test - Run tests on a specific device
- patrol doctor - Check your development environment
- patrol develop - Develop tests on a device
Comparison with flutter devices
Whileflutter devices provides comprehensive device information, patrol devices offers:
- Simpler, more focused output
- Faster execution
- Better integration with Patrol commands
- Consistent formatting for automation
Both commands use the same underlying device detection mechanism, so they should show the same devices.