由于工作原因….我手中没有直接能用到Windows 系统,前几天连最后一台windows 台式机也进化成CentOS了…导致安卓设备的数据线连接电脑只能充电不能访问移动设备的存储…..
1、安装MTP工具集:
1
2
3
4
5
6
7
8
9
10
|
mr_liu
@
i
-
it
:
~
$
sudo
apt
-
get
install
mtp
-
tools
mtpfs
mr_liu
@
i
-
it
:
~
$
dpkg
-
l
mtp
-
tools
mtpfs
Desired
=
Unknown
/
Install
/
Remove
/
Purge
/
Hold
|
Status
=
Not
/
Inst
/
Conf
-
files
/
Unpacked
/
halF
-
conf
/
Half
-
inst
/
trig
-
aWait
/
Trig
-
pend
|
/
Err
?
=
(
none
)
/
Reinst
-
required
(
Status
,
Err
:
uppercase
=
bad
)
||
/
Name
Version
Description
++
+
-=
===
===
===
===
===
===
===
===
===
==
-=
===
===
===
===
===
===
===
===
===
==
-=
===
===
===
===
===
===
===
===
===
===
===
===
===
===
===
===
===
===
===
===
===
===
===
===
===
ii
mtp
-
tools
1.1.3
-
1ubuntu0.1
Media
Transfer
Protocol
(
MTP
)
library
tools
ii
mtpfs
0.9
-
3build1
FUSE
filesystem
for
Media
Transfer
Protocol
devices
|
2、检测设备的 idVendor 和 idProduct
1
2
3
4
5
6
7
8
|
mr_liu
@
i
-
it
:
~
$
mtp
-
detect
|
grep
idVendor
Device
0
(
VID
=
1949
and
PID
=
000d
)
is
UNKNOWN
.
mr_liu
@
i
-
it
:
~
$
lsusb
Bus
001
Device
002
:
ID
8087
:
0024
Intel
Corp
.
Integrated
Rate
Matching
Hub
Bus
002
Device
002
:
ID
8087
:
0024
Intel
Corp
.
Integrated
Rate
Matching
Hub
Bus
003
Device
002
:
ID
045e
:
07b2
Microsoft
Corp
.
Bus
003
Device
003
:
ID
1949
:
000d
Lab126
|
3、在linux 里面不需要为Pad或安卓手机安装设备驱动,但需要添加访问规则,如下,编辑/etc/udev/rules.d/51-android.rules
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#如前面通过lsusb和mtp-detect获取到到设备ID号 对应到变更到下面的配置中#
mr_liu
@
i
-
it
:
~
$
sudo
cat
/
etc
/
udev
/
rules
.
d
/
51
-
android
.
rules
SUBSYSTEM
==
"usb"
,
ATTR
{
idVendor
}
==
"1949"
,
ATTR
{
idProduct
}
==
"000d"
,
MODE
=
"0666"
#创建一个目录作为我设备的挂载点#
mr_liu
@
i
-
it
:
~
$
mkdir
my
-
kindle
#挂载设备#
mr_liu
@
i
-
it
:
~
$
sudo
mtpfs
-
o
allow_other
my
-
kindle
/
mr_liu
@
i
-
it
:
~
$
ls
my
-
kindle
/
Alarms
Baidu_music
Documents
kindle
Pictures
Ringtones
Android
Books
Download
Movies
Playlists
sogou
Audible
cleanmaster_cn
FileRecv_QQHD
Music
Podcasts
Tencent
baidu
DCIM
gameloft
Notifications
Qzone
#卸载设备#
umount
~
/
my
-
kindle
|