ADB Python Module
An easy way to control Android (TV) devices remotely using Python
Examples
·
Report Bug
·
Request Feature
Table of Contents
About The Project
Like any project, this one have started to solve a simple problem,
"How can I integrate my AndroidTV with smart home applications, without using Google Home"
So here it is, a simple solution (or kind of), just using Python and Google's Android Debug Bridge. Of course is possible to use this to control any android device, not just the ones running AndroidTV. Using a device like a Raspberry Pi, you can easily control a lot of Android devices with Alexa, for example, and create routines; since Alexa is not natively compatible (yet?!) with AndroidTV and Chromecast devices.Getting Started
Clone this project and you're done:
git clone https://github.com/luis-gustta/adbtv.git
Using pip:
python -m pip install adbtv
or:
python -m pip install git+https://github.com/luis-gustta/adbtv.git
Prerequisites
The following modules are requirements to AdbTV:
-
osandtime -
typing:python3 -m pip install typing
ADB:
Also, you (of course) must have ADB installed.
Windows users:
If you're using Windows, you can download it from: https://developer.android.com/studio/releases/platform-tools.
Linux users:
If you're using Linux, you can download it using:
-
Debian-based Linux:
sudo apt install android-tools-adb
-
Fedora/SUSE-based Linux:
sudo yum install android-tools
Usage
This module was built to be simple and intuitive, every function have a little "documentation" and is very easy to use. Here's an example:
import adbtv as adb
adb.connect('ip','port')
adb.shell_cmd('echo hello world')
Because the main focus of this module is to control AndroidTV systems, most commands have been optimized for this. Another example:
import adbtv as adb
adb.connect('ip','port')
adb.launch_app('NETFLIX')
More examples about usage can be found under the examples folder.
Contributing
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
License
Distributed under the MIT License. See LICENSE for more information.
Contact
Luis Gustavo - lang.gaiato@ufrgs.br
Project Link: https://github.com/luis-gustta/adbtv/
Acknowledgements
Release files for adbtv 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| adbtv-0.0.2.tar.gz | 11.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| adbtv-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.2 kB
Release files / adbtv-0.0.2.tar.gz
| Download URL | adbtv-0.0.2.tar.gz |
|---|---|
| Size | 11.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
86bc2ad26d6fe2ff05987650ece3637ecfd0ea6201a86c7ed1bb38e94fc4586c
|
|
BLAKE2b-256 checksum How to use checksums |
050befbd9ce009928e97614f7e0d24b99084aee76e684fb7902d280e01dad301
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5
|
Release files / adbtv-0.0.2-py3-none-any.whl
| Download URL | adbtv-0.0.2-py3-none-any.whl |
|---|---|
| Size | 9.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ccc04324bc6c025712e3753c845454da873975c906d9968940214bda8ab8e739
|
|
BLAKE2b-256 checksum How to use checksums |
0d8d48c29b878d56ce19b5982e28e2a9d376e89de76ea08b471741a578824dbd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5
|