Refactor idevice tools into single binary

This commit is contained in:
Jackson Coxson
2026-01-03 16:58:33 -07:00
parent 2eebbff172
commit 189dd5caf2
34 changed files with 1983 additions and 2777 deletions

View File

@@ -1,10 +1,22 @@
// Jackson Coxson
use idevice::dvt::message::Message;
use idevice::{dvt::message::Message, provider::IdeviceProvider};
use jkcli::{CollectedArguments, JkArgument, JkCommand};
#[tokio::main]
async fn main() {
let file = std::env::args().nth(1).expect("No file passed");
pub fn register() -> JkCommand {
JkCommand::new()
.help("Parse a DVT packet from a file")
.with_argument(
JkArgument::new()
.required(true)
.with_help("Path the the packet file"),
)
}
pub async fn main(arguments: &CollectedArguments, _provider: Box<dyn IdeviceProvider>) {
let mut arguments = arguments.clone();
let file: String = arguments.next_argument().expect("No file passed");
let mut bytes = tokio::fs::File::open(file).await.unwrap();
let message = Message::from_reader(&mut bytes).await.unwrap();