May 9, 2014

Transferring files between Linux and Windows phone

A hackish workaround for transferring videos, pdf's, music and documents from a Linux system to a Windows phone.

Current situation

Most Windows Phone(Lumia) users with a Linux computer face problems transferring data from their computer to phone. Here's a brief description of the problem - while data transfer over USB works alright, the Windows phone does not detect the file. The file IS present on the Windows phone file system. In fact, it can be verified(I am not mentioning how, please search the internet for this). So the most commonly suggestions are 

  1. Connect the phone to a Windows PC. Copy the required files to the Windows PC. Delete the files on the Windows Phone system. Copy back  the files from the Windows PC to the Windows Phone. Do not ask how, but it works
  2. Transfer files from the Linux based file system to the Windows phone via bluetooth, but this option is very time consuming
  3. Upload to cloud services, and sync on phone. This method may not work for certain file formats, and again is very time consuming.

The solution

My solution requires the presence a Python (2.6 or greater) in the Linux system. Python is present on most Linux systems, so not a major issue.
Also, install UC Browser from the app store on your phone.(This browser is required if you intend to transfer videos and music.) If you only intend to transfer pdfs, documents etc, the built-in Internet Explorer should be enough. But it's advisable to install UC Browser, mainly due to ease-of-use.

The steps


Navigate to the directory where your files to be transferred and stored and start a HTTP server by entering the following command in terminal - "python -m SimpleHTTPServer". This will start a HTTP server on port 8000. Verify by opening http://0.0.0.0:8000 in your browser
Extract the LAN IP of your computer by "hostname -I".

On your Windows phone, with UC Browser installed, navigate to the IP address obtained in step 2 at port 8000. It should look something like http://<your-ip>:8000
Directory listing
Directory listing image
Tap on the resource that you would like to download. Depending on the type, you will be given options to save(for images, text etc.) and download(for videos). Choose the appropriate option. The downloads will occur at pretty fast speeds(for me it was around 5 Mbyte/s).
Download from linux in lumiaTransfer from linux to windows lumia phone


Once the download is over, downloaded videos can be viewed by navigating to the "Download" section of UC Browser. Images appear in the Image hub. Text resources can be seen in the Office section.
downloaded video from linux to lumia phonedownloaded pdf from linux to lumia phone











No comments:

Post a Comment