SwiftMTP

Neighbor-ZGPL-2.0活跃维护

在 macOS 上通过 MTP 协议管理 Android 手机文件的传输工具,用 Swift 编写,还加入了 AI 辅助能力,替代 Android File Transfer 的卡顿体验。

A modern Android File Transfer tool for macOS with AI supercharged.

v1.3.2发布于 2026-11-05 14:27 UTC470star +2 / 7 天11fork同步于 2026-11-10 06:02 UTC

怎么上手

由 README 提炼,执行前请确认
brew tap neighbor-z/swiftmtp && brew install --cask swiftmtp
硬件要求按 README 说明

需要 macOS 12.0+ 的 Mac,通过 USB 连接支持 MTP 的安卓手机或相机;README 未提及显存或 GPU 要求。

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

macOS 上的轻量 MTP 文件传输工具,用 Swift 原生实现,让 Mac 直接浏览和读写安卓手机文件

在 macOS 上通过 MTP 协议管理 Android 手机文件的传输工具,用 Swift 编写,还加入了 AI 辅助能力,替代 Android File Transfer 的卡顿体验。

核心能力

  • 用原生 SwiftUI 界面浏览设备目录,支持 Quick Look 空格预览
  • 支持拖拽与粘贴的双向导入导出,并显示实时传输进度
  • 无需 ADB 或开启 USB 调试即可连接 MTP 设备
  • 内置自然语言搜索,可用对话式描述查找文件
  • 附带 swiftmtp-cli 命令行工具,便于脚本或 AI Agent 调用

容易踩的坑

若提示 OpenSession after reset: LIBUSB_ERROR_NOT_FOUND,需先退出 Preview、Image Capture、Android File Transfer 及其后台 Agent 等占用 MTP 会话的软件;非 App Store 版本可能被 macOS 拦截,需在隐私与安全性中放行或执行 sudo xattr -rd com.apple.quarantine /Applications/SwiftMTP.app;从源码构建需 Xcode 15.0+。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v1.3.2
  1. v1.3.2SwiftMTP 1.3.2 RC最新正式版2026-11-05 · 2026-11-05 14:27 UTC
    • Introduces icon and gallery views (1.3.0)
    • Add Finder share extension (1.3.1)
    1.3.2
    • Fix MTP timestamps across device time zones
    • Handle MTP exceptions safely
    • Handle unknown MTP storage capacity
  2. v1.2.5SwiftMTP 1.2.52026-09-12 · 2026-09-12 09:34 UTC
    查看更新说明
    • Fix a network access config issue #17
    • Revert the logic that causing connection drop #17
    • Fix an animation issue when using Quick Look
    • Add "New Window" in "File" menu
  3. v1.2.4SwiftMTP 1.2.42026-07-20 · 2026-07-20 13:00 UTC
    查看更新说明
    • Improve favorites remove UX #13
    • Add Delete option in FileListView context menu #13

    swiftmtp-cli (v0.1.2) :

    • Add rm mv mkdir info commands and file override alert
    • Auto deviceID for single device connection #14
  4. v1.2.3SwiftMTP 1.2.32026-07-05 · 2026-07-05 14:21 UTC
    查看更新说明

    swiftmtp-cli is now shipped with SwiftMTP 1.2.3. This version also includes following changes:

    • Switch to new gomtp backend
    • Adjust favorite items
    • Fix transfer fail when dragging multiple files #8
    • Fix a linking issue #12
  5. v1.2.2SwiftMTP 1.2.22026-06-07 · 2026-06-07 12:29 UTC
    查看更新说明
    • Add correctness check for directory navigation

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    Download on the Mac App Store

    Swift 5.9+Platform: macOS 12.0+License: GPL

    SwiftMTP is a light-weight, modern, Swift-based utility for interacting with MTP (Media Transfer Protocol) devices on macOS. It allows users to browse, manage, and transfer files between a Mac and external devices like Android phones.

    Inspired by OpenMTP, SwiftMTP uses the enhanced backend to provide a consistently high-performance transfer experience while maintaining a compact footprint.


    News

    Upcoming

    swiftmtp-cli

    Introducing swiftmtp-cli. It is a powerful, lightweight macOS command-line interface designed to manage Media Transfer Protocol (MTP) devices with ease. Built natively in Swift and backed by the brand new Gomtp backend, it allows users to easily use AI Agent to quickly interact with connected Android devices or cameras.

    CLI

    swiftmtp-cli is located in SwiftMTP.app/Contents/MacOS.

    The usage guide CLI_USAGE.md is available through the "File" menu - "Export CLI Usage Guide".


    Features

    • Device Management: Easily connect/disconnect MTP devices and select specific storage devices.
    • File Browsing: Deeply navigate through device directories with a native macOS feel with Quick Look preview supported.
    • Bi-directional Transfer: Import and export files with support for Drag-and-Drop.
    • File Operations: Create new folders, rename and delete files directly on the device.
    • Progress Tracking: Real-time transfer progress bars and status indicators.
    • Safe and secure: No ADB or USB debugging required.
    • Localization: Multilingual support via Localizable.xcstrings.
    • Natural Language Search: Find your files naturally like a conversation. Just type what you're looking for, e.g., "Photos of last week" or "Work documents from 2024".
    • Device Info Analysis: Get smart insights about your device hardware, connectivity status, and potential performance optimizations.

    For AI details, privacy and security, please read Details_and_Privacy.md


    Screenshot

    Gallery ViewIcon View
    Gallery ViewIcon View
    Natural Language SearchDevice Info Analysis
    NLSearchDIA
    Share Option in Finder MenuDestination Picker
    MenuShare Picker

    Architecture

    The project is structured to bridge high-level Swift with low-level MTP kernel interactions:

    SwiftMTP/
    ├──SwiftMTP/                  # Main App Source
    │   ├── SwiftMTPApp.swift     # Entry point
    │   ├── Views/                # SwiftUI UI Layer
    │   ├── Models/               # Data models
    │   └── Services/             # Connection & Transfer logic
    ├──GomtpShim/                # C shim bridging Swift and the MTP kernel
    ├──lib/                      # Runtime dependencies (gomtp.dylib, libusb.dylib)
    └──swiftmtp-cli/             # cli files
    

    Getting Started

    Install

    Download Release or install via homebrew:

    brew tap neighbor-z/swiftmtp && brew install --cask swiftmtp
    

    Build

    Prerequisites
    • Xcode 15.0+
    • macOS 12.0+
    Build & Run
    1. Open SwiftMTP.xcodeproj in Xcode.
    2. Select your target platform (macOS).
    3. Press Run.

    Realized

    • Drag-and-Drop
    • Automatic device connect detection
    • Transfer progress bar and status indicators
    • Multi selections and export
    • "Go" and "File" menu
    • Favorites
    • Finder-like quick look preview (press spacebar)
    • File list font size adjustment
    • Paste to import
    • Multiple device connections (v1.1)
    • Cancel a transfer (v1.1)

    FAQ

    I got "OpenSession after reset: LIBUSB_ERROR_NOT_FOUND"

    This could be due to other software occupying MTP sessions or a device connection issue. Please ensure software like Preview, Image Capture, or Android File Transfer is not running. For Android File Transfer, even if it's not running in the foreground, there is an Android File Transfer Agent in the system background to detect USB MTP device connections in real time and automatically launch the main app. You can exit Android File Transfer Agent in Activity Monitor. After that, please reconnect or restart your device.

    macOS cannot verify this app?

    This is because the app was not released in the way Apple prefers. Apple requires developers to pay $99 annually for a so-called "security signature". Please go to System Settings > Privacy & Security, scroll down and allow the app to run. If the problem still exists, please execute the following command in Terminal and try opening the app once again.

    sudo xattr -rd com.apple.quarantine /Applications/SwiftMTP.app
    

    License

    GPL


    About AI: AI assistance involved; each code segment has undergone manual review and testing.

    Need help? If you encounter any issues, please open an Issue.

    Contributing: SwiftMTP is always looking for contributions. Just simply fork this repo and make pull requests. You can also improve the translation or add your new language freely.

    Support project: ☕️ Buy Me a Coffee