Skip to content

pymobiledevice3 afc

Browse, push, and pull files via the AFC service (/var/mobile/Media).

shell

Open an interactive AFC shell rooted at /var/mobile/Media.

pymobiledevice3 afc shell [OPTIONS]

Accepts the connection options: --rsd, --tunnel, --userspace, --mobdev2, --usbmux, --udid.

webdav

Serve /var/mobile/Media over WebDAV for local mounting (e.g. in Finder).

pymobiledevice3 afc webdav [OPTIONS] [path]

Arguments:

Argument Description
path AFC path to serve as the volume root (default: /) [default: /]

Options:

Option Description
--mount mount the served path locally and reveal it in your file manager
--host <str> local interface to bind [default: 127.0.0.1]
--bind-port <int> local TCP port (0 picks a free port) [default: 0]
--readonly expose the path read-only

Accepts the connection options: --rsd, --tunnel, --userspace, --mobdev2, --usbmux, --udid.

pull

Download a remote path under /var/mobile/Media to the local filesystem.

pymobiledevice3 afc pull [OPTIONS] {remote_file} {local_file}

Arguments:

Argument Description
remote_file [required]
local_file [required]

Options:

Option Description
-i, --ignore-errors Continue downloading even if some files error (best-effort pull).

Accepts the connection options: --rsd, --tunnel, --userspace, --mobdev2, --usbmux, --udid.

push

Upload a local file into /var/mobile/Media.

pymobiledevice3 afc push [OPTIONS] {local_file} {remote_file}

Arguments:

Argument Description
local_file [required]
remote_file [required]

Accepts the connection options: --rsd, --tunnel, --userspace, --mobdev2, --usbmux, --udid.

ls

List files under /var/mobile/Media (optionally recursively).

pymobiledevice3 afc ls [OPTIONS] {remote_file}

Arguments:

Argument Description
remote_file [required]

Options:

Option Description
-r, --recursive Recurse into subdirectories when listing.

Accepts the connection options: --rsd, --tunnel, --userspace, --mobdev2, --usbmux, --udid.

rm

Delete a file under /var/mobile/Media.

pymobiledevice3 afc rm [OPTIONS] {remote_file}

Arguments:

Argument Description
remote_file [required]

Accepts the connection options: --rsd, --tunnel, --userspace, --mobdev2, --usbmux, --udid.