In this article, we would cover how to transfer files between Ubuntu and an Android device. This can be either from Ubuntu to an Android device or vice versa. For the purpose, we will be using a package – blueman.
Blueman is a Bluetooth manager. It uses bluez D-Bus backend. We have already covered how to connect Bluetooth audio devices with Ubuntu 22.04. If you have read that, then you may skip the blueman package installation section.
This article is divided in two sections –
- Install Blueman in Ubuntu 22.04 and,
- Setup and use Blueman to transfer files between Ubuntu and an Android device.
Note: Following operations would require you to have superuser privileges. In case you don’t have one then, we advise you to contact your System Administrator for assistance.
Install Blueman in Ubuntu 22.04 and,
The Ubuntu’s standard repository already has required files for package – blueman. Therefore, we first update the repository. Hence, open a terminal and issue the following –
sudo apt update
Now, to install blueman –
sudo apt install blueman
All the related dependencies gets installed with the above code.
Setup and use Blueman to transfer files between Ubuntu and an Android device
This is section is further divided in two sections –
Section I. Transfer files from Ubuntu to an Android device:
Launch Bluetooth Manager from our systems’ main menu. Make our Android device discoverable by turning the Bluetooth ON. And, make the Android device Visible to Other Devices.
Now, click Search button in Bluetooth Manager to search the device. If everything goes fine, it will show us the Android device we would like to connect to. Right click on the device and Connect. Soon after, it would show us the Bluetooth pairing request and a value to authenticate. The value shown here should match on both the devices. If the value shown is different then do not pair.
Note: At this point, Bluetooth Manager would prompt us for Headset connection request. Please Deny. Otherwise, we won’t be able to transfer files.
Now, in the Bluetooth Manager itself, right-click the Android device we have paired and click on Send a file option. Select the file, you would like to send to the Android device. A confirmation prompt would be received on the Android device. Accept to complete the transfer.
Section II. Transfer files from an Android device to Ubuntu:
This time around, we need to make the Bluetooth adapter plugged in to our machine Visible. Open Bluetooth Manager. Go to Adapter in menu bar, click on Preferences and switch to Always Visible or Temporary Visible.
Now, on the Android device – Go to Settings –> Bluetooth and do a Search. It would show us a list of Available Devices. Select the one which we want to pair. Again Confirm the authentication code. It should match on both the devices. And, deny the Headset and Advance audio request on Ubuntu.
Before sending files, we need to set a Transfer directory for Blueman. Click on View in menu bar, then Local Services. Under Transfer, select Incoming folder location.
Now, select the file you would like to transfer from the Android device through a File Manager. And, share or send it using Bluetooth. Select the Ubuntu Bluetooth Adapter. This will immediately prompt on Ubuntu – Incoming file over Bluetooth? Accept to receive the file. It confirms after the file is successfully received.
Important! Please ensure that you have changed your device Visibility setting to Hidden again. Subsequent requests from the same device don’t need the Bluetooth to stay visible. It will work in Hidden mode until you unpair the devices.
In conclusion, we have covered how to transfer files between Ubuntu and an Android device.