{"id":18994045,"url":"https://github.com/fujiawei-dev/cerium","last_synced_at":"2025-04-22T12:47:25.612Z","repository":{"id":62561389,"uuid":"130045992","full_name":"fujiawei-dev/cerium","owner":"fujiawei-dev","description":"This project is mainly targeted to users that need to communicate with Android devices in an automated fashion, such as in automated testing.","archived":false,"fork":false,"pushed_at":"2020-04-28T10:17:50.000Z","size":8698,"stargazers_count":6,"open_issues_count":0,"forks_count":4,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-17T01:36:31.532Z","etag":null,"topics":["adb","android","automation"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fujiawei-dev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-18T10:30:35.000Z","updated_at":"2023-09-08T17:39:27.000Z","dependencies_parsed_at":"2022-11-03T15:17:03.744Z","dependency_job_id":null,"html_url":"https://github.com/fujiawei-dev/cerium","commit_stats":null,"previous_names":["ffujiawei/cerium"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fujiawei-dev%2Fcerium","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fujiawei-dev%2Fcerium/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fujiawei-dev%2Fcerium/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fujiawei-dev%2Fcerium/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fujiawei-dev","download_url":"https://codeload.github.com/fujiawei-dev/cerium/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250243378,"owners_count":21398332,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adb","android","automation"],"created_at":"2024-11-08T17:23:57.084Z","updated_at":"2025-04-22T12:47:25.558Z","avatar_url":"https://github.com/fujiawei-dev.png","language":"Python","readme":"# Cerium\n[![Platform](https://img.shields.io/badge/Platform-Windows-4BC51D.svg)](https://pypi.org/project/cerium/)\n[![PyPI version](https://img.shields.io/pypi/v/cerium.svg)](https://pypi.org/project/cerium/)\n[![Wheel](https://img.shields.io/pypi/wheel/cerium.svg)](https://pypi.org/project/cerium/)\n[![Python version](https://img.shields.io/pypi/pyversions/cerium.svg)](https://pypi.org/project/cerium/)\n[![License](https://img.shields.io/badge/license-Apache_2-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)\n[![Documentation status](https://readthedocs.org/projects/cerium/badge/?version=latest)](http://cerium.readthedocs.io/en/latest/?badge=latest)\n\n\u003e Cerium is an umbrella project encapsulating a variety of tools and\nlibraries enabling android automation.\n\nCerium's source code is made available under the [Apache 2.0 license](https://github.com/ffujiawei/cerium/LICENSE).\n\nWelcome to **Read the Docs** for [Cerium](http://cerium.readthedocs.io/)!\n\n\n## Introduction\n\n**Cerium: A Toy for Android Automation**\n\n**Cerium** is an Android automation framework for Python, safe for human consumption.\n\n**Behold, the power of Cerium**:\n\n```python\n\u003e\u003e\u003e from cerium import AndroidDriver\n\u003e\u003e\u003e driver = AndroidDriver()\n\u003e\u003e\u003e driver.unlock(1997)   # unlock your device by password\n\u003e\u003e\u003e driver.auto_connect()   # connect to your device via TCP/IP automatically\nNow you can unplug the USB cable, and control your device via WLAN.\n\u003e\u003e\u003e driver.view_packgets_list(keyword='tencent')\n['com.tencent.mm', 'com.tencent.android.qqdownloader', 'com.tencent.tim']\n\u003e\u003e\u003e driver.make_a_call(18268237856)   # call me\n```\n\n**Cerium** allows you to send *organic, grass-fed* commands, without the the need for manual labor.\n\n[Android Debug Bridge (adb)](http://web.mit.edu/ruggles/MacData/afs/sipb/project/android/OldFiles/docs/tools/help/adb.html) 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.\n\n## Supported Python Versions\n* Python 3.6+\n\n## Supported Platforms\n* Windows 10 (Other platforms have not been tested and are not intended to be supported for the time being officially)\n\n## Installation\nIf you have [pip](https://pip.pypa.io/) on your system, you can simply install or upgrade cerium:\n\n    pip install -U cerium\n\nAlternately, you can download the source distribution from [PyPI](https://badge.fury.io/py/cerium), unarchive it, and run:\n\n    python setup.py install\n\nOr by [github.com](https://github.com/ffujiawei/cerium):\n\n    git clone git@github.com:ffujiawei/cerium.git\n    cd cerium\n    python setup.py install\n\n\u003e Note: You may want to consider using [virtualenv](http://www.virtualenv.org/) to create isolated Python environments.\n\n\n## [Android Debug Bridge](http://web.mit.edu/ruggles/MacData/afs/sipb/project/android/OldFiles/docs/tools/help/adb.html) \nCerium 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.\n\n\n## Quickstart\n\n* List connected android devices or simulator.\n* Show the version of Android Debug Bridge.\n\n```python\nfrom cerium import AndroidDriver\n\ndriver = AndroidDriver()\n\nprint(driver.devices())\nprint(driver.devices_l())  # show devices and models\n\nprint(driver.version())\n```\n\n* Copy local files/directories to device.\n* Copy files/directories from device.\n* Taking a screenshot of a device display, then copy it to your computer.\n\n```python\nfrom cerium import AndroidDriver\n\ndriver = AndroidDriver()\n\ndriver.push(local='README.md', remote='/sdcard/README.md')\ndriver.pull(remote='/sdcard/README.md', local='README.md')\n\ndriver.pull_screencap(local='screencap.png')\n```\n\n* Simulate finger click.\n* Simulate finger slide.\n* Input text.\n\n```python\nfrom cerium import AndroidDriver\n\ndriver = AndroidDriver()\n\ndriver.click(100, 100)\ndriver.swipe(100, 200, 100, 100, duration=100)\ndriver.send_keys(\"I'm White Turing.\")\n```\n\n\n## Demonstration\n\n* [**A wireless automation application**](https://github.com/ffujiawei/auto-answer-tnwz)\n* [**A command line wireless control tool for Android**](https://github.com/ffujiawei/wireless-control)\n\n\n## Author\n\nCerium is written and maintained by [White Turing](https://github.com/ffujiawei) (fujiawei@stu.hznu.edu.cn).","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffujiawei-dev%2Fcerium","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffujiawei-dev%2Fcerium","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffujiawei-dev%2Fcerium/lists"}