Skip to main content

Cerium

Platform PyPI version Wheel Python version License Documentation status

Cerium is an umbrella project encapsulating a variety of tools and libraries enabling android automation.

Cerium's source code is made available under the Apache 2.0 license.

Welcome to Read the Docs for Cerium!

Introduction

Cerium: A Toy for Android Automation

Cerium is an Android automation framework for Python, safe for human consumption.

Behold, the power of Cerium:

>>> from cerium import AndroidDriver
>>> driver = AndroidDriver()
>>> driver.unlock(1997)   # unlock your device by password
>>> driver.auto_connect()   # connect to your device via TCP/IP automatically
Now you can unplug the USB cable, and control your device via WLAN.
>>> driver.view_packgets_list(keyword='tencent')
['com.tencent.mm', 'com.tencent.android.qqdownloader', 'com.tencent.tim']
>>> driver.make_a_call(18268237856)   # call me

Cerium allows you to send organic, grass-fed commands, without the the need for manual labor.

Android Debug Bridge (adb) is a versatile command line tool that lets you communicate with an emulator instance or connected Android-powered device. This project is based on it.

Supported Python Versions

  • Python 3.6+

Supported Platforms

  • Windows 10 (Other platforms have not been tested and are not intended to be supported for the time being officially)

Installation

If you have pip on your system, you can simply install or upgrade cerium:

pip install -U cerium

Alternately, you can download the source distribution from PyPI, unarchive it, and run:

python setup.py install

Or by github.com:

git clone git@github.com:fjwCode/cerium.git
cd cerium
python setup.py install

Note: You may want to consider using virtualenv to create isolated Python environments.

Android Debug Bridge

Cerium requires Android Debug Bridge Tool to with the chosen android device. And Cerium contains Android Debug Bridge by default. You don't need to set the environment variable by yourself.

Quickstart

  • List connected android devices or simulator.
  • Show the version of Android Debug Bridge.
from cerium import AndroidDriver

driver = AndroidDriver()

print(driver.devices())
print(driver.devices_l())  # show devices and models

print(driver.version())
  • Copy local files/directories to device.
  • Copy files/directories from device.
  • Taking a screenshot of a device display, then copy it to your computer.
from cerium import AndroidDriver

driver = AndroidDriver()

driver.push(local='README.md', remote='/sdcard/README.md')
driver.pull(remote='/sdcard/README.md', local='README.md')

driver.pull_screencap(local='screencap.png')
  • Simulate finger click.
  • Simulate finger slide.
  • Input text.
from cerium import AndroidDriver

driver = AndroidDriver()

driver.click(100, 100)
driver.swipe(100, 200, 100, 100, duration=100)
driver.send_keys("I'm White Turing.")

Author

Cerium is written and maintained by White Turing (fujiawei@stu.hznu.edu.cn).

Metadata

Release files for cerium 1.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cerium 1.2.4
File Size Uploaded
cerium-1.2.4.tar.gz 851.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cerium 1.2.4
File Interpreter ABI Platform
cerium-1.2.4-py3-none-any.whl Python 3 none any Details

Total release size: 1.7 MB

Release files / cerium-1.2.4.tar.gz

Download URL cerium-1.2.4.tar.gz
Size 851.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e81ddbe86a11686c49abfedc895c3ae52e995f092672bc7388325162a118f2aa
BLAKE2b-256 checksum
How to use checksums
ce407f7427749214f5cac1975f1115a12bdb65684e1328c84d0fb6269cfd86d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / cerium-1.2.4-py3-none-any.whl

Download URL cerium-1.2.4-py3-none-any.whl
Size 854.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e38842a9e38e0c48f1c5b8007c9e1f84f352f277d101fc78f4e0500b55663fdc
BLAKE2b-256 checksum
How to use checksums
0a88981b6610c2257e02ccf595d3c358a570fd24e8bda3656710cf8df31dca74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

1.2.6

2 release files

1.2.5

2 release files

This release

1.2.4 This release

2 release files

1.2.3

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

1 release file

1.0.2

2 release files

1.0.1

1 release file

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page