Emulator & simulator detection
final result = await DeviceShield.checkEmulator();Android signals
Section titled “Android signals”| Signal | Condition |
|---|---|
fingerprint |
Build.FINGERPRINT starts with generic or unknown |
model |
Build.MODEL contains google_sdk, Emulator or Android SDK built for |
manufacturer |
Build.MANUFACTURER contains Genymotion |
hardware |
Build.HARDWARE contains goldfish, ranchu or vbox |
product |
Build.PRODUCT contains sdk, vbox86p or emulator |
brand_device |
Both Build.BRAND and Build.DEVICE start with generic |
qemu_pipe |
/dev/socket/qemud or /dev/qemu_pipe exists |
qemu_pipe is strong. The six build-property signals are medium, so any two
of them together mean detected. The stock Android emulator (API 37, verified)
fires hardware and product.
These are build-property heuristics. They catch the stock Android emulator and Genymotion reliably. Custom emulators that rewrite build properties may not be detected.
iOS signal
Section titled “iOS signal”| Signal | Condition |
|---|---|
simulator_target |
The app was compiled for the Simulator (targetEnvironment(simulator)) |
This is exact rather than heuristic: it’s decided at compile time, so it’s strong on the Simulator and never fires on a device.