Skip to main content

A python module to automate android

Project description

Autodroid

pip install autodroid

-- Usage --

swipe()

swipe(x1, y1, x2, y2, duration) x1, y1, x2, y2 = position, from - to (must be integer). duration = amount of time swiped (in miliseconds not seconds). E.g. swipe(520, 1730, 520, 400, 1000) swipe up, for 1s

tap()

tap(x, y) x, y = position (must be integer). E.g. tap(173, 200)

screenshot()

screenshot() saves to /sdcard/autodroid/screencap

holdtap()

holdtap(x, y, duration) x, y = position (must be integer), duration = amount of time held (in miliseconds) E.g. holdtap(167, 853, 4000)

type()

type(text) text = the text you want to type (must be string). E.g. type("hello world")

checkConnected()

checkConnected() prints the connected device S/N

scrcpy()

scrcpy() starts a session of scrcpy

key()

key(key) text = the key you want to execute

Key Name Alternate Names Key Code
Home 3
Back 4
Recent Apps recent, recents 187
Power pwr 26
Volume Up v_up, vol_up 24
Volume Down v_down, vol_down 25
Mute 164
Media Play mplay, play 85
Wake wakeup 224

E.g.

key("pwr") key combos dont work yet

not recommended to use with 2 devices, havent intergrated 2 devices

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

autodroid-2.0.tar.gz (1.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

autodroid-2.0-py3-none-any.whl (1.7 kB view details)

Uploaded Python 3

File details

Details for the file autodroid-2.0.tar.gz.

File metadata

  • Download URL: autodroid-2.0.tar.gz
  • Upload date:
  • Size: 1.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for autodroid-2.0.tar.gz
Algorithm Hash digest
SHA256 fecc3123856f3831d9d3d7040acd0873aabd3c7b617f3697a951d0ebcb3ef7e7
MD5 88698bb179d376b6651015d03ea99199
BLAKE2b-256 274e7175fc24379fee7cde09264060b7804befdf785b6d311d214f6d4c6a66af

See more details on using hashes here.

File details

Details for the file autodroid-2.0-py3-none-any.whl.

File metadata

  • Download URL: autodroid-2.0-py3-none-any.whl
  • Upload date:
  • Size: 1.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for autodroid-2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2fde68d8c0a7932ee337b3f2dd33d9af502422b00dd3d140339c6aaf2b78e9c5
MD5 ba2d760accf5b94cdb27ec1ef5ec92fc
BLAKE2b-256 6247799fb2631bf3ee11892d4dc5d3a7ff09423a16f1a9c0c7ac1d2de984feca

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page