hiyoyo Posted on May 31 Why NSOpenPanel Can't See Your Android Device # android # mtp # tauri # rust All tests run on an 8-year-old MacBook Air. When I was building HiyokoMTP, I hit a limitation that seems obvious in hindsight: you can't use a native macOS folder picker to browse an Android device over MTP. NSOpenPanel — the standard macOS file dialog — has no idea your Android device exists. It only sees what Finder mounts, and Finder doesn't mount MTP devices as a proper volume. So the entire native folder selection API is useless for this use case. Why the Native Dialog Can't See Your Android Device macOS exposes the file system to apps through a set of APIs that assume storage is mounted as a volume. MTP doesn't work that way. It's a stateful protocol layered over USB — not a file system mount. Android File Transfer used to create a virtual mount, but that approach had reliability issues and kernel extension dependencies, and is largely abandoned. Modern MTP implementations talk to the device directly over USB and manage the object tree themselves. The OS never sees it as a folder. The result: NSOpenPanel , NSSavePanel , Finder integration — none of it works for MTP paths. You're on your own. How to Build One Anyway If you need folder selection over MTP, you have to build your own picker from scratch. Here's the approach: Rust side — expose a list_mtp_dir(path) command via Tauri IPC. This queries the MTP device for the contents of a given directory and returns the object list. #[tauri::command] fn list_mtp_dir ( path : String ) -> Result < Vec < MtpObject > , String > { // query MTP device and return object list } Enter fullscreen mode Exit fullscreen mode React side — build a modal UI that behaves like a minimal Finder: // On open const root = await invoke ( " list_mtp_dir " , { path : " / " }); // On folder selection const contents = await invoke ( " list_mtp_dir " , { path : selectedPath }); // Maintain a navigation stack to support back na
Back to Home

📰Dev.to — dev.to
B
Blizine Admin
View Profile Staff Writer
Related Articles
Watch Nvidia's Computex 2026 keynote here — Jensen Huang takes the stage for Computex and GTC Taipei at 8pm PT / 11pm ET on May 31
Jun 1, 2026·2 min read
AMD confirms AM5 support through 2029 — Zen 4 and 5 platform will likely see two more generations, at least
Jun 1, 2026·2 min read
AMD brings back Ryzen 7 5800X3D, launches Ryzen 7 7700X3D to combat rising component prices — eight-core X3D CPUs arrive under $350 for AM4 or AM5, DDR4 or DDR5
Jun 1, 2026·2 min read