Use libusb
Install
pip install pycryptodome
pip install libusb1
- (windows) copy libusb-1.0.dll to C:\Windows\System32\ (i use MSYS2-MINGW64 one)
- (some version python need this, some not) copy adb folder in this project to
$PYTHON_INSTALL_DIR/Lib/site-packages/adb
Usage:
- python main.py oem pull partition – would return the partition table
- python main.py oem pull *partition_name* – would return the contents of partition_name (g. oem pull uboot_log)
- python main.py oem pull *address*++*size* – would return the contents of the memory address, returning size bytes. (g. oem pull 0x80000000++0x1000)
- python main.py reboot