mirror of
https://github.com/jkcoxson/idevice.git
synced 2026-03-02 22:46:14 +01:00
Add missing amfi actions
This commit is contained in:
@@ -38,6 +38,8 @@ async fn main() {
|
||||
.subcommand(Command::new("show").about("Shows the developer mode option in settings"))
|
||||
.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"))
|
||||
.get_matches();
|
||||
|
||||
if matches.get_flag("about") {
|
||||
@@ -77,6 +79,18 @@ async fn main() {
|
||||
.accept_developer_mode()
|
||||
.await
|
||||
.expect("Failed to show");
|
||||
} else if matches.subcommand_matches("status").is_some() {
|
||||
let status = amfi_client
|
||||
.get_developer_mode_status()
|
||||
.await
|
||||
.expect("Failed to get status");
|
||||
println!("Enabled: {status}");
|
||||
} else if matches.subcommand_matches("state").is_some() {
|
||||
let status = amfi_client
|
||||
.get_sep_device_state()
|
||||
.await
|
||||
.expect("Failed to get state");
|
||||
println!("Enabled: {status}");
|
||||
} else {
|
||||
eprintln!("Invalid usage, pass -h for help");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user