Mopro Device Management
This skill helps users manage simulators, emulators, and physical devices for testing mopro apps.
When to Use
- User wants to run their app on a simulator/emulator
- User needs to list available devices
- User asks about deploying to a physical device
- User encounters simulator/emulator issues
Related Skills
- mopro-app: For building the app to deploy
- mopro-test: For running tests on devices
Actions
List Devices
Show all available simulators, emulators, and connected physical devices.
Run the unified device listing script:
bash scripts/list-devices.sh
Run from the skill directory. The script outputs a JSON array to parse and present.
Or check platforms individually:
# iOS simulators
xcrun simctl list devices available
# Android emulators
$ANDROID_HOME/emulator/emulator -list-avds
# Connected physical devices (Android)
adb devices
# Flutter devices
flutter devices
Start Simulator/Emulator
Before starting, confirm with the user:
About to boot <device_name>. This may take a moment. Proceed?
iOS Simulator:
# List available simulators
xcrun simctl list devices available
# Boot a specific simulator (non-blocking)
xcrun simctl boot "iPhone 16"
After booting, verify the simulator is ready:
xcrun simctl list devices booted
Do NOT use open -a Simulator — it blocks the agent indefinitely.
Use xcrun simctl boot instead, which returns immediately.
Android Emulator:
# List available AVDs
$ANDROID_HOME/emulator/emulator -list-avds
Start the emulator using run_in_background=true (do NOT use shell &):
$ANDROID_HOME/emulator/emulator -avd <avd_name>
After starting, verify the emulator is ready:
adb wait-for-device
adb shell getprop sys.boot_completed
# Returns "1" when fully booted
If no AVD exists, guide the user to create one in Android Studio: Tools > Device Manager > Create Device.
Run App on Device
iOS (Xcode):
# Build and run on simulator
xcodebuild -project MyApp.xcodeproj \
-scheme MyApp \
-destination 'platform=iOS Simulator,name=iPhone 16' \
build
# Or open in Xcode and press Cmd+R
open MyApp.xcodeproj
Android (Gradle):
# Install and run on connected device/emulator
./gradlew installDebug
adb shell am start -n com.example.myapp/.MainActivity
Flutter:
flutter run # Auto-selects device
flutter run -d <device_id> # Specific device
flutter run -d chrome # Web
React Native:
npm run ios # iOS simulator
npm run android # Android emulator
Deploy to Physical Device
iOS Physical Device:
- Connect device via USB or WiFi
- Open project in Xcode
- Select the device from the device dropdown
- Configure signing: Signing & Capabilities > Team
- Build and run (Cmd+R)
Android Physical Device:
- Enable Developer Options on the device
- Enable USB Debugging
- Connect via USB
- Verify connection:
adb devices - Install:
./gradlew installDebugorflutter run
Troubleshooting
"No devices found"
- iOS: Check Xcode is installed, simulators are downloaded
- Android: Verify
ANDROID_HOMEis set, emulator images are installed - Physical: Check USB connection, USB debugging enabled
"Unable to boot simulator"
# Reset a stuck simulator
xcrun simctl shutdown all
xcrun simctl erase all # WARNING: erases all simulator data
"emulator: command not found"
Add Android emulator to PATH:
export PATH="$PATH:$ANDROID_HOME/emulator"
"adb: command not found"
Add platform-tools to PATH:
export PATH="$PATH:$ANDROID_HOME/platform-tools"
Slow emulator
- Enable hardware acceleration (HAXM on Intel, Hypervisor on ARM)
- Use x86_64 system images for Android emulator
- Allocate more RAM to the emulator in AVD settings
iOS app crashes on device but works on simulator
- Check architecture: device needs
aarch64-apple-ios, simulator needsaarch64-apple-ios-sim - Check signing configuration
- Check that circuit assets are in the app bundle