Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.5%) to scientific vocabulary
Repository
Python ADB + Fastboot implementation
Basic Info
Statistics
- Stars: 1,835
- Watchers: 109
- Forks: 363
- Open Issues: 72
- Releases: 1
Metadata Files
README.md
python-adb
Note: This is not an official Google project. It is maintained by ex-Google engineers. For a better maintained option, look at adb_shell.
This repository contains a pure-python implementation of the ADB and Fastboot protocols, using libusb1 for USB communications.
This is a complete replacement and rearchitecture of the Android project's ADB and fastboot code
This code is mainly targeted to users that need to communicate with Android devices in an automated fashion, such as in automated testing. It does not have a daemon between the client and the device, and therefore does not support multiple simultaneous commands to the same device. It does support any number of devices and never communicates with a device that it wasn't intended to, unlike the Android project's ADB.
Using as standalone tool
Install using pip:
sh
pip install adb
Once installed, two new binaries should be available: pyadb and pyfastboot.
sh
pyadb devices
pyadb shell ls /sdcard
Running ./make_tools.py creates two files: adb.zip and fastboot.zip. They
can be run similar to native adb and fastboot via the python interpreter:
python adb.zip devices
python adb.zip shell ls /sdcard
Using as a Python Library
A presentation was made at PyCon 2016, and here's some demo code:
```python import os.path as op
from adb import adbcommands from adb import signcryptography
KitKat+ devices require authentication
signer = sign_cryptography.CryptographySigner( op.expanduser('~/.android/adbkey'))
Connect to the device
device = adbcommands.AdbCommands() device.ConnectDevice( rsakeys=[signer])
Now we can use Shell, Pull, Push, etc!
for i in xrange(10): print device.Shell('echo %d' % i) ```
Pros
- Simpler code due to use of libusb1 and Python.
- API can be used by other Python code easily.
- Errors are propagated with tracebacks, helping debug connectivity issues.
- No daemon outliving the command.
- Can be packaged as standalone zips that can be run independent of the CPU architecture (e.g. x86 vs ARM).
Cons
- Technically slower due to Python, mitigated by no daemon.
- Only one command per device at a time.
- More dependencies than Android's ADB.
Dependencies
- libusb1 (1.0.16+)
- python-libusb1 (1.2.0+)
adb.zip: one of:- py-cryptography
- python-rsa (3.2+)
fastboot.zip(optional):- python-progressbar (2.3+)
History
1.0.0
- Initial version
1.1.0
- Added TcpHandle (jameyhicks)
- Various timing and other changes (alusco)
1.2.0
- Update to libusb1 1.6+ (bytearray output)
- Add support for Python 3.6
- Create adb.zip and fastboot.zip as executable tools.
- Add Travis CI integration
- Support multiple crypto libraries (M2Crypto + python-rsa)
- Push directories
1.3.0
Backwards Incompatible changes
adb_commands.AdbCommands() is now a normal class rather than a collection of staticmethods. Using the following example code to get started:
py
device = adb_commands.AdbCommands()
device.ConnectDevice(rsa_keys=[signer])
Other changes/fixes
Many changes since 1.2.0!
- New entrypoints exposed by pip: pyadb and pyfastboot
- Lots of Python 2/3 compatibility fixes
- Windows compatibility fixes
- Transfer progress available (
Push,Pull,Install) - Handle some misbehaving devices (double CLSE bug)
- New options for
PushandInstall(st_modeandgrant_permissions)
Owner
- Name: Google
- Login: google
- Kind: organization
- Email: opensource@google.com
- Location: United States of America
- Website: https://opensource.google/
- Twitter: GoogleOSS
- Repositories: 2,773
- Profile: https://github.com/google
Google ❤️ Open Source
GitHub Events
Total
- Watch event: 50
- Fork event: 7
Last Year
- Watch event: 50
- Fork event: 7
Committers
Last synced: 11 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Fahrzin Hemmati | f****m@g****m | 21 |
| Fahrzin Hemmati | f****m@u****m | 12 |
| Jamey Hicks | j****s@q****m | 9 |
| Alex Lusco | a****o@g****m | 8 |
| Fahrzin Hemmati | f****m@g****m | 7 |
| Mohammad Abu-Garbeyyeh | m****0@g****m | 6 |
| Marc-Antoine Ruel | m****l@c****g | 5 |
| greateggsgreg | 3****g@u****m | 5 |
| Halastra | t****y@g****m | 2 |
| Tarek Galal | t****l@g****m | 2 |
| dbonafilia | d****a@g****m | 2 |
| Piotr Kucharski | b****f@g****m | 2 |
| Francois Gervais | f****s@g****m | 1 |
| Jeff Irion | J****n@u****m | 1 |
| Max Borghino | m****b@t****m | 1 |
| Mathieu | m****x@g****m | 1 |
| llliuyx | l****x@a****m | 1 |
| Josip Delic | d****i@g****m | 1 |
| Sytone | s****e@u****m | 1 |
| farthornas | k****s@g****m | 1 |
| ktechmidas | d****l@m****t | 1 |
| Max Borghino | f****o@g****m | 1 |
| tuxuser | t****0@g****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 11 months ago
All Time
- Total issues: 66
- Total pull requests: 34
- Average time to close issues: 3 months
- Average time to close pull requests: 4 months
- Total issue authors: 57
- Total pull request authors: 23
- Average comments per issue: 2.44
- Average comments per pull request: 4.5
- Merged pull requests: 7
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- fahhem (3)
- JeffLIrion (3)
- bannsec (3)
- caffeinatedMike (2)
- vBlackOut (2)
- baruchl (2)
- alongstar518 (1)
- wolfyy59 (1)
- deeppility (1)
- a1ex4 (1)
- Danny89530 (1)
- zgoda-mobica (1)
- pedrofsantoscom (1)
- ChapiIL (1)
- eismog (1)
Pull Request Authors
- g1im2 (3)
- JeffLIrion (3)
- joeleong (3)
- Halastra (3)
- penn5 (2)
- bif-g (2)
- embray (2)
- ghost (1)
- lsd-cat (1)
- YSunLIN (1)
- llliuyx (1)
- GeekTan (1)
- pmldrmota (1)
- cclauss (1)
- matthieuxyz (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 5
-
Total downloads:
- pypi 3,151 last-month
-
Total dependent packages: 2
(may contain duplicates) -
Total dependent repositories: 18
(may contain duplicates) - Total versions: 8
- Total maintainers: 6
pypi.org: adb
A pure python implementation of the Android ADB and Fastboot protocols
- Homepage: https://github.com/google/python-adb
- Documentation: https://adb.readthedocs.io/
- License: Apache Software License
-
Latest release: 1.3.0
published about 8 years ago
Rankings
pypi.org: adb-homeassistant
A pure python implementation of the Android ADB and Fastboot protocols
- Homepage: https://github.com/google/python-adb
- Documentation: https://adb-homeassistant.readthedocs.io/
- License: Apache Software License
-
Latest release: 1.3.2
published over 7 years ago
Rankings
Maintainers (1)
pypi.org: ak-adb
A pure python implementation of the Android ADB and Fastboot protocols
- Homepage: https://github.com/google/python-adb
- Documentation: https://ak-adb.readthedocs.io/
- License: UNKNOWN
-
Latest release: 1.1.0
published almost 10 years ago
Rankings
Maintainers (2)
pypi.org: frida-android-adb
A pure python implementation of the Android ADB and Fastboot protocols
- Homepage: https://github.com/google/python-adb
- Documentation: https://frida-android-adb.readthedocs.io/
- License: Apache Software License
-
Latest release: 1.2.0
published over 8 years ago
Rankings
Maintainers (1)
conda-forge.org: adb
This repository contains a pure-python implementation of the ADB and Fastboot protocols, using libusb1 for USB communications.
- Homepage: https://github.com/google/python-adb
- License: Apache-2.0
-
Latest release: 1.3.0
published almost 5 years ago
Rankings
Dependencies
- libusb1 >=1.0.16
- rsa_signer_library *