Skip to content

mickyloo/python-adb

 
 

Repository files navigation

python-adb

Coverage Status Build Status

This repository contains a pure-python implementation of the ADB and Fastboot protocols, using libusb1 for USB communications.

This is a complete replacement and rearchitecture of the Android project's ADB and fastboot code

This code is mainly targeted to users that need to communicate with Android devices in an automated fashion, such as in automated testing. It does not have a daemon between the client and the device, and therefore does not support multiple simultaneous commands to the same device. It does support any number of devices and never communicates with a device that it wasn't intended to, unlike the Android project's ADB.

Using with Emulator

This is a stripped down version of the upstream repo with USBHandler and signing removed. Only support for TCPHandle remains. The additional dependencies are also removed making it easier to install on Windows environment.

It is meant to be used with AmiDUOS emulator Lollipop version.

from adb.adb_commands import AdbCommands

device = AdbCommands.ConnectDevice(serial='localhost:5565')
device.Shell('echo 1')
device.Shell('screencap -p')

History

1.0.0

  • Initial version

1.1.0

  • Added TcpHandle (jameyhicks)
  • Various timing and other changes (alusco)

About

Python ADB + Fastboot implementation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%