Android Emulator Driver
jumpstarter-driver-androidemulator manages Android emulator lifecycle with
ADB tunneling through Jumpstarter. It provides power control (start/stop) for
the Android emulator and combines it with the ADB driver for device access.
Installation
pip3 install --extra-index-url https://pkg.jumpstarter.dev/simple/ jumpstarter-driver-androidemulator
For the optional Python ADB API:
pip3 install --extra-index-url https://pkg.jumpstarter.dev/simple/ "jumpstarter-driver-androidemulator[python-api]"
Prerequisites
- Android SDK with emulator and platform-tools installed
emulatorandadbavailable on PATH (or specifyemulator_path)- An AVD created via Android Studio or
avdmanager
Quick AVD Setup
# Apple Silicon (arm64)
sdkmanager "system-images;android-35;google_apis;arm64-v8a"
avdmanager create avd -n Pixel_6 -k "system-images;android-35;google_apis;arm64-v8a" -d pixel_6
# Intel/AMD (x86_64)
sdkmanager "system-images;android-35;google_apis;x86_64"
avdmanager create avd -n Pixel_6 -k "system-images;android-35;google_apis;x86_64" -d pixel_6
Configuration
Example exporter configuration:
export:
android:
type: jumpstarter_driver_androidemulator.driver.AndroidEmulator
config:
avd_name: "Pixel_6"
headless: true
console_port: 5554
adb_server_port: 15037
Configuration Parameters
| Parameter | Description | Type | Required | Default |
|---|---|---|---|---|
| avd_name | Name of the Android Virtual Device | str | yes | |
| emulator_path | Path to the emulator executable | str | no | "emulator" |
| headless | Run without a window | bool | no | true |
| console_port | Emulator console port | int | no | 5554 |
| adb_server_port | Port for the custom ADB server | int | no | 15037 |
Usage
CLI
# Power on the emulator
j android power on
# Check ADB devices through the tunnel
j android adb devices
# Run ADB commands
j android adb shell getprop ro.product.model
# Create a persistent ADB tunnel
j android adb tunnel
# Power off the emulator
j android power off
Python API
from jumpstarter.common.utils import serve
from jumpstarter_driver_androidemulator.driver import AndroidEmulator
driver = AndroidEmulator(avd_name="Pixel_6")
with serve(driver) as client:
client.power.on()
# Wait for boot and get an adbutils device
with client.adb_device(timeout=180) as device:
print(device.prop.model)
print(device.shell("pm list packages"))
client.power.off()
Architecture
This is a composite driver with two children:
adb(AdbServerfromjumpstarter-driver-adb): Manages the ADB server and provides TCP tunneling for remote ADB accesspower(AndroidEmulatorPower): Controls the emulator process lifecycle via the standardPowerInterface(on/off/read)
The emulator registers with the custom ADB server on port 15037 (via the
ANDROID_ADB_SERVER_PORT environment variable) to avoid conflicts with any
local ADB server on the standard port 5037.
API Reference
Driver
.. autoclass:: jumpstarter_driver_androidemulator.driver.AndroidEmulator()
:members:
.. autoclass:: jumpstarter_driver_androidemulator.driver.AndroidEmulatorPower()
:members: on, off, read
Client
.. autoclass:: jumpstarter_driver_androidemulator.client.AndroidEmulatorClient()
:members: adb_device
Release files for jumpstarter-driver-androidemulator 0.9.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| jumpstarter_driver_androidemulator-0.9.0.tar.gz | 6.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jumpstarter_driver_androidemulator-0.9.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.8 kB
Release files / jumpstarter_driver_androidemulator-0.9.0.tar.gz
| Download URL | jumpstarter_driver_androidemulator-0.9.0.tar.gz |
|---|---|
| Size | 6.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4acb957d5a719c65d138b855d0bc715a641f60726d3d97c744f7655473053fc6
|
|
BLAKE2b-256 checksum How to use checksums |
4ae7b08bb0f39fec5eeaced4d6f96e9ac1a471bdb4897f0c08543c352c2ab22d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.22
|
Release files / jumpstarter_driver_androidemulator-0.9.0-py3-none-any.whl
| Download URL | jumpstarter_driver_androidemulator-0.9.0-py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bfcdcc5b20f4bdbfb1bb5b90a903a31696ccb0501747cda4ac83bf55710a8f98
|
|
BLAKE2b-256 checksum How to use checksums |
9b736bbf97f16f51042d88418dc6da154716edeb0378fbacb57f47ebe3fc650e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.22
|