Update readme

This commit is contained in:
Jackson Coxson
2025-04-05 15:20:27 -06:00
parent dadf676135
commit 3cb4f468e6
5 changed files with 119 additions and 35 deletions

2
Cargo.lock generated
View File

@@ -1134,7 +1134,7 @@ dependencies = [
[[package]] [[package]]
name = "idevice" name = "idevice"
version = "0.1.27" version = "0.1.28"
dependencies = [ dependencies = [
"async-recursion", "async-recursion",
"base64", "base64",

131
README.md
View File

@@ -6,53 +6,124 @@ and [pymobiledevice3](https://github.com/doronz88/pymobiledevice3),
this library interfaces with lockdownd and usbmuxd to perform actions this library interfaces with lockdownd and usbmuxd to perform actions
on an iOS device that a Mac normally would. on an iOS device that a Mac normally would.
For help and information, join the [idevice Discord](https://discord.gg/qtgv6QtYbV)
## State ## State
**IMPORTANT**: Breaking changes will happen at each point release until 0.2.0. **IMPORTANT**: Breaking changes will happen at each point release until 0.2.0.
The library is still in the development and brainstorming stage.
Pin your `Cargo.toml` to a specific version to avoid breakage. Pin your `Cargo.toml` to a specific version to avoid breakage.
This library is in development and research stage. This library is in development and research stage.
Releases are being published to crates.io for use in other projects, Releases are being published to crates.io for use in other projects,
but the API and feature-set are far from final or even planned. but the API and feature-set are far from final or even planned.
- [x] lockdownd connection
- [x] SSL support
- [x] Heartbeat
- [x] Pairing file
- [ ] Instproxy (partial support)
- [ ] afc
- [ ] amfi
- [ ] companion proxy
- [ ] diagnostics
- [ ] file relay
- [ ] house arrest
- [ ] misagent (certificates)
- [x] RemoteXPC
- [ ] mobile backup
- [ ] notification proxy
- [x] DVT protocol
- [ ] screenshot
- [ ] simulate location
- [x] process control
- [ ] web inspector
- [ ] usbmuxd connection
- [ ] Documentation
## Features ## Features
To keep dependency bloat and compile time down, everything is contained in features. To keep dependency bloat and compile time down, everything is contained in features.
- core_device_proxy - afc - Apple File Conduit, partial/in-progress support
- heartbeat - core_device_proxy - Start a secure tunnel to access protected services
- debug_proxy - Send GDB commands
- dvt - Developer tools/instruments
- heartbeat - Heartbeat the device
- installation_proxy - Install/manage apps, partial support
- springboardservices - Manage the sprinboard, partial support
- misagent - Manage provisioning profiles
- mobile_image_mounter - Manage the DDI mounted on the device
- location_simulation - Simulate the GPS location
- tcp - Connect to devices over TCP
- tunnel_tcp_stack - Naive software TCP stack for core_device_proxy
- tss - Requests to Apple's TSS servers, partial support
- tunneld - Interface with pymobiledevice3's tunneld
- usbmuxd - Connect to devices over usbmuxd daemon
- xpc - Get protected services over RSD via XPC
- full (all features)
### Planned/TODO
Finish the following:
- lockdown support
- afc
- installation_proxy - installation_proxy
- mounter - sprinboard
- xpc
- full Implement the following:
- amfi
- companion_proxy
- crash_reports
- diagnostics
- house_arrest
- mobilebackup2
- notification_proxy
- screenshot
- syslog_relay
- webinspector
As this project is done in my free time within my busy schedule, there As this project is done in my free time within my busy schedule, there
is no ETA for any of these. Feel free to contribute or donate! is no ETA for any of these. Feel free to contribute or donate!
## Usage
idevice is purposefully verbose to allow for powerful configurations.
No size fits all, but effort is made to reduce boilerplate via providers.
```rust
// enable the usbmuxd feature
use idevice::{lockdown::LockdowndClient, IdeviceService};
use idevice::usbmuxd::{UsbmuxdAddr, UsbmuxdConnection},
#[tokio::main]
async fn main() {
// usbmuxd is Apple's daemon for connecting to devices over USB.
// We'll ask usbmuxd for a device
let mut usbmuxd = UsbmuxdConnection::default()
.await
.expect("Unable to connect to usbmxud")
let devs = usbmuxd.get_devices().unwrap();
if devs.is_empty() {
eprintln!("No devices connected!");
return;
}
// Create a provider to automatically create connections to the device.
// Many services require opening multiple connections to get where you want.
let provider = devs[0].to_provider(UsbmuxdAddr::from_env_var().unwrap(), 0, "example-program")
// ``connect`` takes an object with the provider trait
let mut lockdown_client = match LockdowndClient::connect(&provider).await {
Ok(l) => l,
Err(e) => {
eprintln!("Unable to connect to lockdown: {e:?}");
return;
}
};
println!("{:?}", lockdown_client.get_value("ProductVersion").await);
println!(
"{:?}",
lockdown_client
.start_session(
&provider
.get_pairing_file()
.await
.expect("failed to get pairing file")
)
.await
);
println!("{:?}", lockdown_client.idevice.get_type().await.unwrap());
println!("{:#?}", lockdown_client.get_all_values().await);
}
```
More examples are in the ``tools`` crate and in the crate documentation.
## FFI
For use in other languages, a small FFI crate has been created to start exposing
idevice. Example C programs can be found in this repository.
## Version Policy ## Version Policy
As Apple prohibits downgrading to older versions, this library will As Apple prohibits downgrading to older versions, this library will
@@ -62,7 +133,7 @@ not keep compatibility for older versions than the current stable release.
doronz88 is kind enough to maintain a [repo](https://github.com/doronz88/DeveloperDiskImage) doronz88 is kind enough to maintain a [repo](https://github.com/doronz88/DeveloperDiskImage)
for disk images and personalized images. for disk images and personalized images.
On MacOS, you can find them at ``~/Library/Developer/DeveloperDiskImages`` on a Mac. On MacOS, you can find them at ``~/Library/Developer/DeveloperDiskImages``.
## License ## License

View File

@@ -2,7 +2,7 @@
name = "idevice" name = "idevice"
description = "A Rust library to interact with services on iOS devices." description = "A Rust library to interact with services on iOS devices."
authors = ["Jackson Coxson"] authors = ["Jackson Coxson"]
version = "0.1.27" version = "0.1.28"
edition = "2021" edition = "2021"
license = "MIT" license = "MIT"
documentation = "https://docs.rs/idevice" documentation = "https://docs.rs/idevice"
@@ -89,3 +89,6 @@ full = [
"tunneld", "tunneld",
"springboardservices", "springboardservices",
] ]
[package.metadata.docs.rs]
all-features = true

View File

@@ -1,3 +1,4 @@
#![doc = include_str!("../../README.md")]
// Jackson Coxson // Jackson Coxson
#[cfg(feature = "afc")] #[cfg(feature = "afc")]

View File

@@ -2,7 +2,7 @@
// idevice Rust implementation of libimobiledevice's ideviceinfo // idevice Rust implementation of libimobiledevice's ideviceinfo
use clap::{Arg, Command}; use clap::{Arg, Command};
use idevice::{lockdown::LockdowndClient, pairing_file::PairingFile, IdeviceService}; use idevice::{lockdown::LockdowndClient, IdeviceService};
mod common; mod common;
@@ -67,8 +67,17 @@ async fn main() {
println!("{:?}", lockdown_client.get_value("ProductVersion").await); println!("{:?}", lockdown_client.get_value("ProductVersion").await);
let p = PairingFile::read_from_file(pairing_file.unwrap()).unwrap(); println!(
println!("{:?}", lockdown_client.start_session(&p).await); "{:?}",
lockdown_client
.start_session(
&provider
.get_pairing_file()
.await
.expect("failed to get pairing file")
)
.await
);
println!("{:?}", lockdown_client.idevice.get_type().await.unwrap()); println!("{:?}", lockdown_client.idevice.get_type().await.unwrap());
println!("{:#?}", lockdown_client.get_all_values().await); println!("{:#?}", lockdown_client.get_all_values().await);
} }