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 milliseconds not seconds)

Example:

swipe(520, 1730, 520, 400, 1000)

tap()

tap(x, y) x, y = position (must be integer)

Example:

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 milliseconds)

Example:

holdtap(167, 853, 4000)

type()

type(text) text = the text you want to type (must be string)

Example:

type("hello world")

checkConnected()

checkConnected() prints the connected device S/N

scrcpy()

scrcpy() starts a session of scrcpy

key()

key(key) executes a key event

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

Example:

key("pwr")

Not recommended to use

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.1.tar.gz (1.8 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.1-py3-none-any.whl (1.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for autodroid-2.1.tar.gz
Algorithm Hash digest
SHA256 f18ebcc2af5502dce79a8f93a982f5fc5cad35c7b65de663586f96719a08d1ef
MD5 5d41f9de4bcda0dad3128796ab1460c3
BLAKE2b-256 9ff3fcc958ad0975cbe8e951cc473cba78702bcf9f9d5d741319f7c5b9f13d04

See more details on using hashes here.

File details

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

File metadata

  • Download URL: autodroid-2.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1e432051b5fc2728fa519dee2a2e18c3ecec5360a653460b8f581a9fdced5fc4
MD5 9ec376cfd924b002d02c62541fe5357c
BLAKE2b-256 2895975fa1955e8957d2429c11a000061e8011badd1b6f8a171fd93d8eabbdda

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