Giter Club home page Giter Club logo

pyavd's Introduction

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.get_devices()
    
# Declare a package and name
package = "system-images;android-32;google_apis;x86_64"

name = "Hello from pyavd"

# Create a avd with the declared variables and a chosen device
avd = pyavd.create_avd("code", 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()

pyavd's People

Contributors

flojomojo avatar melodyears avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.