Transfers files and folders between the dev machine and connected mobile devices.
Supports push, pull, sync (bidirectional with delete), and ls operations across Android devices, iOS simulators, and physical iOS devices.
Folder transfer
Folders are transferred as atomic tar archives on Android (to preserve
SELinux context and avoid per-file overhead). On iOS Simulator, cp -r is
used directly. On iOS Physical, xcrun devicectl handles directory copies.
Sync
sync/3 computes a local<->remote diff based on file sizes and mtimes, then
transfers only changed files and optionally deletes remote files that don't
exist locally.
Path conventions
Relative paths resolve against the app's files directory on device:
- Android: /data/data/<bundle_id>/files/
- iOS Simulator: <sim_data>/Documents/
- iOS Physical: Documents/ (relative to app container)
Absolute paths (starting with /) are used as-is (rooted Android only).
Summary
Functions
Lists files in a directory on a device. Returns {:ok, files} or {:error, reason}.
Pulls a file or directory from a device to the local machine.
Pushes a local file or directory to connected device(s).
Synchronizes a local directory with a remote directory on device(s).
Types
Functions
Lists files in a directory on a device. Returns {:ok, files} or {:error, reason}.
@spec pull(String.t(), String.t(), keyword()) :: [transfer_result()]
Pulls a file or directory from a device to the local machine.
Options
:device- Source device ID (required for multiple devices):on_conflict-:overwrite(default),:skip, or:rename:progress-trueto print per-file progress (default:false)
@spec push(String.t(), String.t(), keyword()) :: [transfer_result()]
Pushes a local file or directory to connected device(s).
Options
:device- Target device ID (optional, targets all if omitted):on_conflict-:overwrite(default),:skip, or:rename:progress-trueto print per-file progress (default:false)
@spec sync(String.t(), String.t(), keyword()) :: [sync_result()]
Synchronizes a local directory with a remote directory on device(s).
Computes a diff based on file sizes and modification times, then:
- Pushes files that are new or changed locally
- Pulls files that are new or changed on device
- Optionally deletes remote files that don't exist locally
Options
:device- Target device ID (optional, targets all if omitted):delete-trueto delete remote files not present locally (default:false):dry_run-trueto print actions without executing (default:false):progress-trueto print per-file progress (default:false)