Currently the binaries in tools/ use the text-based CLI over the serial port to communicate with a Flipper Zero and run FAPs. We should instead use the start_rpc_session CLI command to drop into the Protobuf RPC control mode, using e.g. the prost crate. This would remove most of the hand-written CLI parsing logic, and probably be more accurate and flexible.
In particular, I am curious about whether PB_App.StartRequest is specifically a request to Applications that enables us to provide arguments to FAPs (which the text CLI loader open Applications foo.fap does not), or whether it is a request to loader (and thus the same as the text CLI).
Absolutely agree. When implementing the current storage_cli code in tools/, I tried to keep it identical to the Python implementation because of just how fragile that kind of CLI driving is.
Currently the binaries in
tools/
use the text-based CLI over the serial port to communicate with a Flipper Zero and run FAPs. We should instead use thestart_rpc_session
CLI command to drop into the Protobuf RPC control mode, using e.g. theprost
crate. This would remove most of the hand-written CLI parsing logic, and probably be more accurate and flexible.In particular, I am curious about whether
PB_App.StartRequest
is specifically a request toApplications
that enables us to provide arguments to FAPs (which the text CLIloader open Applications foo.fap
does not), or whether it is a request toloader
(and thus the same as the text CLI).