Skip to main content

No project description provided

Project description

Fastbootpy

Fastbootpy is based on pyusb and using libusb1 for USB communications.


Installation

pip

poetry add fastbootpy

poetry

poetry add fastbootpy

Supported fastboot commands

  • getvar
  • download
  • upload
  • flash
  • erase
  • boot
  • continue
  • reboot

Examples

All examples of using library you can find in folder examples.

Get and display all fastboot devices which are connected with pc via usb.

from fastbootpy import FastbootManager


def main() -> None:
    fastboot_devices = FastbootManager.devices()
    print("fastboot_devices:", fastboot_devices)


if __name__ == "__main__":
    main()

Boot device into regular mode.

from fastbootpy import FastbootDevice


def main() -> None:
    serial = "emulator-5554"
    device = FastbootDevice.connect(serial)
    device.boot()


if __name__ == "__main__":
    main()

Getvar command example.

from fastbootpy import FastbootDevice, FastbootManager


def main() -> None:
    fastboot_devices = FastbootManager.devices()
    serial = fastboot_devices[0]
    device = FastbootDevice.connect(serial)
    result = device.getvar("all")
    print("result:", result)


if __name__ == "__main__":
    main()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastbootpy-0.4.1.tar.gz (4.9 kB view hashes)

Uploaded Source

Built Distribution

fastbootpy-0.4.1-py3-none-any.whl (7.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page