android template, install your app on its Android 14 with adb, and then tap
the screen and take screenshots from the command line while you watch the phone in the dashboard.
Android runs as a container on the machine’s own Linux kernel, with no emulator and no nested VM.
The machine also has everything agent-browser has: Docker, Node.js, Python, and the desktop.
1
Create an Android machine
Create a machine from the Android is up about 20 seconds after the machine starts.
android template. Use the default size or larger, because Android
uses 1 to 2 GiB of memory while it runs.2
Wait for Android to boot
Right after a create or a fork, The command prints nothing. When it returns, Android has booted.
adb devices is empty until Android has booted. This command
waits in the machine until Android reports sys.boot_completed, so run it before you use adb.3
Install your app
Copy your app’s APK into the machine. In this step, Then install the APK on Android with adb, which runs in the machine.
app-debug.apk stands for your own APK,
and push puts it in the machine’s home.adb install prints its result when the install ends.4
Drive and test the app
Open a shell in the machine, so that you can run the adb commands of this step there.First check that adb sees the phone. The list shows it as You can then send input to the phone. This command taps the screen at x 360 and y 640.To see the result of the tap, take a screenshot of the phone. This command saves the
screenshot to
emulator-5554 or as
127.0.0.1:5555.screen.png in the machine.5
See the phone
Open the machine in the dashboard and choose the Computer tab. The phone is the Android
window on the desktop, and it takes clicks and typing. An agent drives the phone the same way,
with the desktop API or with
adb shell input, as Computer use
shows.The free plan creates from , so
android works on every plan.Limits of the android template
- No Google Play or Google services. Install apps with
adb install. Apps that need Google services for sign-in, maps, or push do not fully work. - x86_64 only. Apps that ship only ARM native code do not run, because there is no ARM translation. Apps with no native code, or with x86_64 libraries, run.
- Software rendering. It is fine for app testing and UI automation, and slow for games and heavy 3D.
adb lists nothing
adb lists nothing
If Do not connect while
adb devices still lists nothing after Android has booted, connect adb to the phone once.emulator-5554 is listed. When the same phone is listed twice,
adb shell asks which one to use.Pause, idle pause, and fork
Pause, idle pause, and fork
Pause and resume, and idle pause and wake, keep the same running Android, so apps, their state,
and the clock carry on. A fork copies Android’s data, which is the installed apps and their
data, and boots its own Android from it about 20 seconds later. Apps that were running are not
carried over to the fork.
Secrets and HTTPS in Android apps
Secrets and HTTPS in Android apps
A proxy Secret makes the machine’s outbound proxy intercept HTTPS to the
Secret’s hosts, or to every host when the Secret allows
--host '*'. Android trusts the
machine’s proxy CA automatically, after every start, resume, and fork, so apps in Android
reach those hosts with no setup.Apps that pin certificates, or that trust only their own CAs, still fail on intercepted
hosts. Give each proxy Secret the exact hosts it needs with --host, and the proxy leaves
every other host alone.Free Android's memory
Free Android's memory
When you do not need Android for a while, you can stop it in the machine to free its memory.To keep Android off across restarts, also disable its service.
Computer use
Screenshots, clicks, and keys from your code.
Run many agents in parallel
Copy a set-up phone into several machines.