Repository navigation
Description
The problem
I want this worker to lease only physical Android devices that I've enrolled with simlock device add --platform android . If none is plugged in, an Android lease should fail instead of falling back to booting an emulator.
There doesn't seem to be a way to configure this. The obvious approach is to set the Android limits to zero:
simlock config set capacity.config.limits.android.maxDevices 0
simlock config set capacity.config.limits.android.maxRunning 0
Both values are rejected because the resource strategy validates them with positiveInteger, which requires a value of 1 or more (core/capacity/strategies/resource/index.js and core/validation.js). The fixed strategy uses the same validator. Zero might not be the right tool anyway: I don't know whether these limits also count physical devices. If they do, setting them to 0 would block the physical phones too.
Use case
I test on real Android hardware and never want an emulator on this machine. Emulators use a lot of RAM (the default budget is 4 GiB per device), and a test that silently runs on an emulator when I expected a phone gives misleading results. When no phone is connected, I'd rather get a clear NO_DEVICE_AVAILABLE error so I know to plug one in.
I often just ask the agent to test using simlock, I don't want it to boot a emulator whenever I forgot to specifically ask for a physical phone.
Proposal
Add a per-platform setting that turns off virtual devices but keeps enrolled physical devices leasable. For example:
simlock config set drivers.android.virtualDevices false
With this setting:
- an Android lease is served only by an enrolled physical device, and fails with NO_DEVICE_AVAILABLE when none is connected and free (or waits when the request uses --wait);
- the worker never creates or boots an emulator, the warm pool skips Android (reserveRunning, learned targets), and downloads never fetches Android system images;
- the worker's capabilities report physical Android only, so the gateway doesn't route emulator requests to it.
The iOS side could get the same switch, which would cover a "physical iPhones only" setup too.
As an alternative, allowing 0 for android.maxDevices/maxRunning would also work, but only if those limits apply to virtual devices alone, and that should be documented.
Environment
- simlock 0.4.0
- macOS 26.7.1
- mode: worker connected to a gateway, capacity strategy resource
Who runs into this
me, personally while trying to make local mini device farm
What you would like to happen
No response
Anything else
No response
Activity
V3RON commentedon Nov 16, 2026
Being specified in #1588. This issue stays open until that feature ships.
Written by an agent.