Ubuntu 配置 MTP

出自Silica Library | 間奏時光
於 2015年9月24日 (四) 08:50 由 Silica對話 | 貢獻 所做的修訂 (创建页面,内容为“Category:Linux == 前言 ==   之前一直想把整个环境切换到 Linux 下,但这操蛋的 MTP 让我有了继续留在 Windows 的理由。然而今…”)
(差異) ←上個修訂 | 最新修訂 (差異) | 下個修訂→ (差異)
跳至導覽 跳至搜尋

前言

  之前一直想把整個環境切換到 Linux 下,但這操蛋的 MTP 讓我有了繼續留在 Windows 的理由。然而今天費了點時間還是找到了方法。
  總之一路上就是蛋疼。

步驟

[1] 安装依赖库
sudo apt-get install libmtp-common mtp-tools libmtp-dev libmtp-runtime libmtp9

[2] 把自己扔进 fuse 组

[3] 编辑 /etc/fuse.conf
#/etc/fuse.conf – Configuration file for Filesystem in Userspace (FUSE)

#Set the maximum number of FUSE mounts allowed to non-root users.
#The default is 1000.
#mount_max = 1000

# Allow non-root users to specify the allow_other or allow_root mount options.
user_allow_other

[4] 查看 USB 设备代码
:lsusb 
[5] 编辑 /lib/udev/rules.d/69-mtp.rules
# Android Phone
ATTR{idVendor}==”设备代码”, ATTR{idProduct}==”设备代码”, SYMLINK+=”libmtp-%k”, ENV{ID_MTP_DEVICE}=”1″, ENV{ID_MEDIA_PLAYER}=”1″

[6] 编辑 /etc/udev/rules.d/51-android.rules
ATTR{idVendor}==”设备代码”, ATTR{idProduct}==”设备代码”, MODE=”0666″

[7] 重启 udev
sudo service udev restart

[8] 重新插上手机

[9] 完