From d9bfe5c9c5478000bab0176a299a37bcd9574b0e Mon Sep 17 00:00:00 2001 From: Jackson Coxson Date: Wed, 9 Jul 2025 20:33:07 -0600 Subject: [PATCH] Update AMFI tool for new usage --- tools/src/amfi.rs | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/tools/src/amfi.rs b/tools/src/amfi.rs index 2276ff5..ff0b4fa 100644 --- a/tools/src/amfi.rs +++ b/tools/src/amfi.rs @@ -39,7 +39,11 @@ async fn main() { .subcommand(Command::new("enable").about("Enables developer mode")) .subcommand(Command::new("accept").about("Shows the accept dialogue for developer mode")) .subcommand(Command::new("status").about("Gets the developer mode status")) - .subcommand(Command::new("state").about("Gets the device SEP state")) + .subcommand( + Command::new("trust") + .about("Trusts an app signer") + .arg(Arg::new("uuid").required(true)), + ) .get_matches(); if matches.get_flag("about") { @@ -85,9 +89,16 @@ async fn main() { .await .expect("Failed to get status"); println!("Enabled: {status}"); - } else if matches.subcommand_matches("state").is_some() { + } else if let Some(matches) = matches.subcommand_matches("state") { + let uuid: &String = match matches.get_one("uuid") { + Some(u) => u, + None => { + eprintln!("No UUID passed. Invalid usage, pass -h for help"); + return; + } + }; let status = amfi_client - .get_sep_device_state() + .trust_app_signer(uuid) .await .expect("Failed to get state"); println!("Enabled: {status}");