Giter Site home page Giter Site logo

fastbootpy's Introduction

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()

fastbootpy's People

Contributors

workhardes avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.