idevice
Files & Apps

House Arrest

Expose an app container or Documents directory as an AFC client.

House Arrest starts from HouseArrestClient and returns an AfcClient scoped to one installed app.

Use It For

  • Accessing an app's Documents directory.
  • Accessing an app's container.
  • Reusing AFC operations against app-scoped storage.

Feature Flag

Cargo.toml
[dependencies]
idevice = { version = "0.1.64", features = ["usbmuxd", "house_arrest"] }

house_arrest enables afc in the crate feature graph.

Service Names

PathValue
Lockdown servicecom.apple.mobile.house_arrest
RSD servicecom.apple.mobile.house_arrest.shim.remote

Rust Example

src/main.rs
use idevice::{IdeviceService, house_arrest::HouseArrestClient};

let provider = first_provider().await?;
let house_arrest = HouseArrestClient::connect(&provider).await?;

let mut afc = house_arrest
    .vend_documents("com.example.app")
    .await?;

for entry in afc.list_dir("/Documents").await? {
    println!("{entry}");
}

Use vend_container(...) when you need the app container instead of only Documents.

CLI Equivalent

Terminal
idevice-tools afc --documents com.example.app list /Documents
idevice-tools afc --container com.example.app list /

Common Errors

ErrorWhat to check
Permission deniedvend_documents only exposes /Documents.
Vend request failsConfirm the bundle ID is installed and supports file sharing for the requested path.
AFC path failureTreat the returned client like AFC, but within the app-scoped jail.

Source

On this page