HowTo Transfer Files Between Linux and Android Phone
Posted by sky
| Filed under
In Android 2.2, we can just connect our computer to the phone's Wi-Fi hotspot directly without accessing a separate wireless network. The instruction below will describe the use of the phone's Wi-Fi hotspot although it is not required. (It is sufficient that your computer can access your phone through a network)
- On the Android phone, Select Menu > select Settings > select Wireless&networks
- Select Tethering & portable hotspot
- Select the Portable Wi-Fi hotspot checkbox to share your data connection
- If this is the first time the Wi-Fi hotspot is turned on, you should configure your phone's network SSID and password. To do that, select Portable Wi-Fi hotspot settings > select Configure Wi-Fi hotspot, then enter the values and save it.
- From Linux, assuming you are using NetworkManager, you can select your phone's network SSID and enter the password you have set earlier on your phone to connect to Internet via your phone's Wi-Fi hotspot. Subsequently, NetworkManager will by default auto-connect without requiring the password to be entered again.
Open a terminal, and enter the route command to check your phone's IP address. In my case, the default gateway 192.168.43.1 for my wireless network interface (ra0) is my phone's IP address.
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.43.0 * 255.255.255.0 U 2 0 0 ra0
link-local * 255.255.0.0 U 1000 0 0 ra0
default 192.168.43.1 0.0.0.0 UG 0 0 0 ra0
- On your phone, download and install SwiFTP. It is FTP server for Android.
- Run SwiFTP. You will need to set the ftp user and password. By default, it listens on port 2121.
- Using the Linux Gnome File browser, select File menu > select Connect to Server menu, and then enter the ftp user, server and port. You can add the ftp connection as a bookmark so that you only need to enter the password subsequently.
The File browser will prompt for the ftp user's password.
The File browser is displaying the Android phone's root folder.
- You can now use normal file operations: cut, copy, paste to transfer files between your phone and Linux. (If you prefer to use a Ftp client software, you can use that also.)