无法从终端访问 MTP 安装的设备?

无法从终端访问 MTP 安装的设备?

我已将手机插入电脑并启用 Android 的“文件共享”。

我可以轻松地从 Nautilus(Fedora 36 上的 Gnome)访问文件(照片、文件夹、下载等),但不知何故,下面根本没有文件夹/run/user/{uid}/gvfs/

我钻研了各种方法,尝试使用 USB 代码手动安装设备,gio mount "mtp://device_name"甚至通过 USB 代码安装。在执行此操作时,我收到错误“设备未实现安装”(抱歉翻译得不太准确,这是法语)。

在互联网上搜索后,我发现运行 DBus 命令可以解决这个问题,因此我运行dbus-run-session bash并重试了该命令,然后它似乎起作用了:

dbus-daemon[59784]: [session uid=0 pid=59784] Activating service name='org.gtk.vfs.Daemon' requested by ':1.0' (uid=0 pid=59808 comm="gio mount mtp://OnePlus_OnePlus_992770bb/" label="unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023")
dbus-daemon[59784]: [session uid=0 pid=59784] Successfully activated service 'org.gtk.vfs.Daemon'
dbus-daemon[59784]: [session uid=0 pid=59784] Activating service name='org.gtk.vfs.UDisks2VolumeMonitor' requested by ':1.0' (uid=0 pid=59808 comm="gio mount mtp://OnePlus_OnePlus_992770bb/" label="unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023")
dbus-daemon[59784]: [session uid=0 pid=59784] Successfully activated service 'org.gtk.vfs.UDisks2VolumeMonitor'
dbus-daemon[59784]: [session uid=0 pid=59784] Activating service name='org.gtk.vfs.MTPVolumeMonitor' requested by ':1.0' (uid=0 pid=59808 comm="gio mount mtp://OnePlus_OnePlus_992770bb/" label="unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023")
dbus-daemon[59784]: [session uid=0 pid=59784] Successfully activated service 'org.gtk.vfs.MTPVolumeMonitor'
dbus-daemon[59784]: [session uid=0 pid=59784] Activating service name='org.gtk.vfs.GoaVolumeMonitor' requested by ':1.0' (uid=0 pid=59808 comm="gio mount mtp://OnePlus_OnePlus_992770bb/" label="unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023")
dbus-daemon[59784]: [session uid=0 pid=59784] Activating service name='org.gnome.OnlineAccounts' requested by ':1.4' (uid=0 pid=59830 comm="/usr/libexec/gvfs-goa-volume-monitor" label="unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023")
goa-daemon-Message: 09:57:06.148: goa-daemon version 3.44.0 starting
dbus-daemon[59784]: [session uid=0 pid=59784] Activating service name='org.gnome.Identity' requested by ':1.5' (uid=0 pid=59834 comm="/usr/libexec/goa-daemon" label="unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023")
dbus-daemon[59784]: [session uid=0 pid=59784] Successfully activated service 'org.gnome.OnlineAccounts'
dbus-daemon[59784]: [session uid=0 pid=59784] Successfully activated service 'org.gtk.vfs.GoaVolumeMonitor'
dbus-daemon[59784]: [session uid=0 pid=59784] Successfully activated service 'org.gnome.Identity'
dbus-daemon[59784]: [session uid=0 pid=59784] Activating service name='org.gtk.vfs.GPhoto2VolumeMonitor' requested by ':1.0' (uid=0 pid=59808 comm="gio mount mtp://OnePlus_OnePlus_992770bb/" label="unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023")

(process:59843): libgoaidentity-WARNING **: 09:57:06.164: GoaKerberosIdentityManager: Using polling for change notification for credential cache type 'KCM'
dbus-daemon[59784]: [session uid=0 pid=59784] Successfully activated service 'org.gtk.vfs.GPhoto2VolumeMonitor'
dbus-daemon[59784]: [session uid=0 pid=59784] Activating service name='org.gtk.vfs.AfcVolumeMonitor' requested by ':1.0' (uid=0 pid=59808 comm="gio mount mtp://OnePlus_OnePlus_992770bb/" label="unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023")
dbus-daemon[59784]: [session uid=0 pid=59784] Successfully activated service 'org.gtk.vfs.AfcVolumeMonitor'
Device 0 (VID=2a70 and PID=f003) is a OnePlus OnePlus 2 A2005.
Android device detected, assigning default bug flags

但是 gvfs 仍然为空!

提醒一下,使用 Nautilus 效果很好,但我想通过终端访问。

怎么了 ?

谢谢!

相关内容