Skip to content

A python wrapper for the avdmanager command line tool

License

Notifications You must be signed in to change notification settings

Flojomojo/pyavd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pyavd

A python wrapper for the avdmanager and emulator command line tool

Pyavd is a wrapper for the avdmanager from google and the commonly used emulator from google. You can create, manage and start Android Virtual Devices (AVDs) using python.

Requirements

  • currently only linux is officially supported, but windows/macos might work as well
  • installed android-sdk

Example

from time import sleep
import pyavd

# If the emulator/avdmanager executables are not in the path, include the following
#pyavd.pyavd.avd_cmd = "/path/to/avdmanager"
#pyavd.pyavd.emulator_cmd = "/path/to/emulator"

# Get all the avaliable devices
devices = pyavd.Device.get_devices()
    
# Declare a package and name
package = "system-images;android-32;google_apis;x86"

name = "created_with_pyavd"

# Create a avd with the declared variables and a chosen device
avd = pyavd.AVD.create(name, package, devices[22])

# Use a custom config
custom_config = "-no-snapshot"

# Start it in detached mode
p = avd.start(detach=True, config=custom_config)

sleep(10)

# After 10 seconds stop it again and delete it
avd.stop()

avd.delete()

About

A python wrapper for the avdmanager command line tool

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages