@@ -6,34 +6,52 @@ python-adb
66This repository contains a pure-python implementation of the ADB and Fastboot
77protocols, using libusb1 for USB communications.
88
9- This is a complete replacement and rearchitecture of the Android project's ADB
10- and fastboot code available at
11- https://github.com/android/platform_system_core/tree/master/adb
9+ This is a complete replacement and rearchitecture of the Android project's [ ADB
10+ and fastboot code] ( https://github.com/android/platform_system_core/tree/master/adb )
1211
1312This code is mainly targeted to users that need to communicate with Android
1413devices in an automated fashion, such as in automated testing. It does not have
1514a daemon between the client and the device, and therefore does not support
1615multiple simultaneous commands to the same device. It does support any number of
17- devices and never communicates with a device that it wasn't intended to, unlike
18- the Android project's ADB.
16+ devices and _ never_ communicates with a device that it wasn't intended to,
17+ unlike the Android project's ADB.
18+
19+
20+ ### Using as standalone tool
21+
22+ Running ` ./make_tools.py ` creates two files: ` adb.zip ` and ` fastboot.zip ` . They
23+ can be run similar to native ` adb ` and ` fastboot ` via the python interpreter:
24+
25+ python adb.zip devices
26+ python adb.zip shell ls /sdcard
27+
28+
29+ ### Pros
1930
20- Pros:
2131 * Simpler code due to use of libusb1 and Python.
2232 * API can be used by other Python code easily.
2333 * Errors are propagated with tracebacks, helping debug connectivity issues.
34+ * No daemon outliving the command.
35+ * Can be packaged as standalone zips that can be run independent of the CPU
36+ architecture (e.g. x86 vs ARM).
37+
38+
39+ ### Cons
2440
25- Cons:
2641 * Technically slower due to Python, mitigated by no daemon.
2742 * Only one command per device at a time.
2843 * More dependencies than Android's ADB.
2944
30- Dependencies:
45+
46+ ### Dependencies
47+
3148 * libusb1 (1.0.16+)
3249 * python-libusb1 (1.2.0+)
33- * python-progressbar (for fastboot_debug, 2.3+)
34- * One of:
50+ * ` adb.zip ` : one of:
3551 * python-m2crypto (0.21.1+)
3652 * python-rsa (3.2+)
53+ * ` fastboot.zip ` (optional):
54+ * python-progressbar (2.3+)
3755
3856[ coverage_img ] : https://coveralls.io/repos/github/google/python-adb/badge.svg?branch=master
3957[ coverage_link ] : https://coveralls.io/github/google/python-adb?branch=master
0 commit comments