1. Install MTP Software First
Apt-get Install Mtpfs libmtp-common mtp-tools libmtp-dev libmtp-runtime LIBMTP9
2. Edit the/etc/fuse.conf file
#/etc/fuse.conf-configuration file for Filesystem in userspace (fuse) #Set The maximum number of fuse mounts allowed to n On-root users. #The default is. #mount_max = 1000# Allow non-root users to specify the Allow_other or allow_root mount Options.user_allow_other
Uncomment the last line as shown above
3. Check your Android device
lsusbbus 002 device 003: id 17ef:1003 Lenovo integrated smart card readerbus 002 device 006: id 05c6 :6774 qualcomm, inc. bus 002 device 002: id 8087:0024 intel corp. integrated rate matching hubbus 002 device 001: id 1d6b:0 002 linux foundation 2.0 root hubbus 001 device 004: id 04f2 : B221 chicony electronics co., ltd integrated camerabus 001 device 003: ID 0a5c:217f Broadcom Corp. BCM2045B (BDC-2.1) bus 001 device 002: id 8087:0024 intel corp. integrated rate matching Hubbus 001 device 001: id 1d6b:0002 linux foundation 2.0 root hub
As on the second line is my Android device, display is Qualcomm remember ID number 05C6 and 6774
4. Adding Udev Rules
vim/lib/udev/rules.d/69-mtp.rules# a0001attr{idvendor}== "05c6", attr{idproduct}== "6774", SYMLINK+= "Libmtp-%k", ENV {id_mtp_device}= "1", env{id_media_player}= "1" vim/etc/udev/rules.d/51-android.rulesattr{idvendor}== "05c6", ATTR{ idproduct}== "6774", mode= "0666"
The ID obtained in the third step is used here.
5. Restart the Udev service
Service Udev Restart
So far, one of my mobile phones has been able to connect to Ubuntu over the MTP protocol. It is important to note that the above operations are done under root. If root is disabled friends please use the sudo command. If the current account is not in the Sudo group, refer to my other article and enter recovery mode to add the user to the sudo group.
This article is from the "technology for the King" blog, please be sure to keep this source http://wangzhenyu.blog.51cto.com/2996939/1590870
Ubuntu Connect Android Device