Software & AppsOperating SystemLinux

How To Transfer Files from Android to Ubuntu via USB Cable in Ubuntu 21.10

Ubuntu 4

In this article, we will be discussing how to transfer files from an Android device to Ubuntu 21.10 using a USB cable. This process can be a bit tricky due to the different file systems and protocols used by Android and Ubuntu, but with the right steps, it can be done smoothly and efficiently.


Before we proceed, ensure that you have the following:

  • An Android device with USB cable
  • Ubuntu 21.10 installed on your computer
  • Sudo privileges on your Ubuntu system

Solution 1: Install MTP Support

The first solution involves installing Media Transfer Protocol (MTP) support on your Ubuntu machine. MTP is a protocol associated with Windows, but it is also used by Android to communicate with any computer. Ubuntu does not include MTP support by default, so we need to install it manually.

Open a terminal and run the following command:

sudo apt-get install gmtp

This command uses sudo to run the operation with root privileges, apt-get is the package handling utility in Ubuntu, and install is the operation to install a new package. gmtp is the package we want to install.

After running this command and restarting your machine, you should be able to connect your Android device and browse its files.

Solution 2: Check USB Connection Settings on Android Device

The second solution involves checking the USB connection settings on your Android device. By default, for security reasons, many Android devices set the USB connection mode to “Charging”. This means that when you connect your device to your computer, it will only charge and not allow file transfer.

To change this setting, follow these steps:

  1. Connect your Android device to your Ubuntu machine using a USB cable.
  2. On your Android device, drop down the Notifications.
  3. Select the USB connection option and choose “File Transfer” or a similar option.

Now, your Android device should be visible in your Ubuntu file manager, and you can browse and transfer files.

Solution 3: Edit udev Rules (Advanced)

If the above solutions do not work, you can try editing the udev rules on your Ubuntu system. This is a more advanced solution and should be used with caution.

Here’s how to do it:

  1. Connect your Android device to your Ubuntu machine.
  2. Open a terminal and run the following command: lsusb. This command lists all USB devices connected to your machine.
  3. Identify your Android device in the list and note down its ID.
  4. Edit the udev rules by running sudo nano /etc/udev/rules.d/51-android.rules. This command opens the udev rules file in a text editor.
  5. Add a new line with the following format: SUBSYSTEM=="usb", ATTR{idVendor}=="[Your Device ID]", MODE="0666". Replace [Your Device ID] with the ID you noted down earlier.
  6. Save and close the file, then restart your machine.

Now, when you connect your Android device, it should be recognized by your Ubuntu system, and you can transfer files.

Solution 4: Use a Thumb Drive

If none of the above solutions work, you can use a thumb drive as a workaround. Simply connect a thumb drive to your Android device, copy the files to the thumb drive, then connect the thumb drive to your Ubuntu machine and copy the files over.


Transferring files from an Android device to Ubuntu can be a bit tricky due to the different protocols and file systems involved. However, with the right steps and a bit of patience, it can be done. We hope this guide has been helpful in showing you how to transfer files from Android to Ubuntu via USB cable in Ubuntu 21.10. If you have any questions or run into any issues, feel free to leave a comment below.

What is MTP?

MTP stands for Media Transfer Protocol. It is a protocol used by Android devices to communicate with computers and transfer files.

Why doesn’t Ubuntu have MTP support by default?

Ubuntu does not include MTP support by default due to licensing and patent issues. However, you can easily install MTP support using the gmtp package.

Can I transfer files from Ubuntu to my Android device using these methods?

Yes, the methods mentioned in this article can also be used to transfer files from Ubuntu to an Android device.

What if I don’t have sudo privileges on my Ubuntu system?

If you don’t have sudo privileges, you won’t be able to install packages or edit system files. In that case, you may need to seek assistance from the system administrator or user with sudo privileges.

Are there any risks involved in editing udev rules?

Editing udev rules can potentially affect the functioning of your system if not done correctly. It is recommended to have a backup of the original file and proceed with caution. If you are not comfortable with editing system files, it’s best to seek assistance from someone with more experience.

Can I use a USB hub to connect multiple Android devices to my Ubuntu machine?

Yes, you can use a USB hub to connect multiple Android devices to your Ubuntu machine. However, keep in mind that the performance and file transfer speed may be affected depending on the capabilities of the USB hub and the USB ports on your machine.

What if my Android device is not recognized even after trying all the solutions?

If your Android device is still not recognized after trying all the solutions, there may be compatibility issues or other underlying problems. It is recommended to check for any software updates on both your Android device and Ubuntu system, and also consider seeking help from online forums or support channels specific to your device and Ubuntu version.

Leave a Comment

Your email address will not be published. Required fields are marked *