Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a full session example #9

Open
XVilka opened this issue May 31, 2024 · 1 comment
Open

Add a full session example #9

XVilka opened this issue May 31, 2024 · 1 comment

Comments

@XVilka
Copy link

XVilka commented May 31, 2024

Currently, only individual commands have examples. I wonder if it will be easier to understand for newcomers with a more complicated example of the "common session". The fastboot specification document from Google has this example, I think it would be a good target for doing so:

Example Session
---------------
Host:    "getvar:version"        request version variable
Client:  "OKAY0.4"               return version "0.4"
Host:    "getvar:nonexistant"    request some undefined variable
Client:  "OKAY"                  return value ""
Host:    "download:00001234"     request to send 0x1234 bytes of data
Client:  "DATA00001234"          ready to accept data
Host:    < 0x1234 bytes >        send data
Client:  "OKAY"                  success
Host:    "flash:bootloader"      request to flash the data to the bootloader
Client:  "INFOerasing flash"     indicate status / progress
         "INFOwriting flash"
         "OKAY"                  indicate success
Host:    "powerdown"             send a command
Client:  "FAILunknown command"   indicate failure
@orangecms
Copy link

I'll just add a full CLI, similar to what other Rust libraries do. It's quite trivial and should be good enough as a reference for using the crate as a pure library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants