But when I tried to do # aft-mtp-mount usb1/, I get this result:
Device::Find failed:Device is already used by another process
Device::Find failed:Device is already used by another process
Device::Find failed:Device is already used by another process
Device::Find failed:Device is already used by another process
Device::Find failed:Device is already used by another process
connect failed: no MTP device found
I have had a lot of problems with MTP on NixOS, with multiple devices. The
devices work on Debian, so there must be a way to make them work on NixOS.
Unfortunately, I do not have time to devote to the issue. (I currently manage
those devices on an Arch system.)
I do not know if it will help your specific issue, but here are my general
tips for working with MTP on NixOS:
Contrary to normal MTP usage, use root to mount as well as work with the
device. (I have experienced strange issues when attempting to use my
non-privileged user.)
Try various utilities. Different devices seem to work (better) with
different utilities. (I have a device that only “works” with go-mtpfs.)
android-file-transfer
jmtpfs
go-mtpfs
When mounting, do not include a trailing / in the directory name (which
is automatically added when using tab-completion). For example, use aft-mtp-mount usb1notaft-mtp-mount usb1/. (I have a device that
fails to mount when there is a trailing /, indicating that the program
is not properly normalizing arguments.)
Check to see if the device is mounted even when you get an error. Sometimes
an error indicates that it is not mounted when it actually is!
I switched to nixos-unstable and followed your tips. Now everything works fine, Thank you!
Other details I should add:
My device only works with go-mtpfs like you said.
When you try to access something on the phone, don’t go into sensitive folders or it will block your access/generate IO error for whatever reasons and you’ll have to remount.