Getting files to a handheld.

After playing with my Nexus 7 for a while, I wanted to transfer some files to the unit. There were programs such as a spreadsheet that I wrote to work with qbasic.  Dosbox will certainly run qbasic.  Since Adosbox was available for Android I went and downloaded that. So far so good. Or so I thought.  Now how do I get the files to the Nexus 7. Can not use a usb drive. Hmmm. You pay for and then download an application that would get your files from a usb stick without being root. Why should I pay for something that should of come with the unit to begin with. 



Now it is time to think out of the box. Well if I can download files from a web page without root, why can I not do that with a web server of my own? But how to do it. Alhough I do have an Apache web server set up, what about the times when it may not be available. Aha! The quickie web server (see links below) can be the answer. So I copied the files where I wanted to serve the files to the Nexus 7. then made sure they were there.

 $ ls -al
total 284
-rwxr-xr-x  1 www-data www-data  16533 2013-02-05 11:11 file1.exe
-rwxr-xr-x  1 www-data www-data  16533 2013-02-06 10:11 file2.exe
-rwxr-xr-x  1 www-data www-data  37213 2013-02-05 11:11 file3.exe
-rwxr-xr-x  1 www-data www-data    212 2013-02-06 10:28 index.html
-rwxr-xr-x  1 www-data www-data 194309 2013-02-05 11:11 qbasic.exe

Did not have to, but I made a simple table of contents or index.html  That way it was clear what I really wanted to download. A good idea especially if you have a lot of files in the directory.


Now to download the files. So I pointed the web browser to oesrvr1/nexus7 if I was using the apache web server.



Just lick on the link... (if using a regular browser, it might look like this:





If you are using the quickie python web server without the index.html, it might look something like this. (You would connect to a port (8000) instead of the directory.)




Obviuously this is not a secure method of transferring files. But on your own private network, that should not be an issue if you are careful. The files were easily transfered to the Nexus 7 and I am happily using them now. Did not have to purchase a special app or worry about how to connect to the Nexus 7 with hardware. Which leaves me to say, If you have one or more computers, having a web server just just as important as having a flashlight for emergencies.

Update:

On MSwindows you will need some kind of mtp program that will recognize the Nexus 7.

With linux use gmtp to transfer files via the gui



With linux specifically Debian linux from the command line, you can:

# HOWTO Mount Nexus or MTP Device in Debian or Ubuntu

# Install MTP and its tools:
sudo apt-get install mtpfs mtp-tools

# Create a mountpoint:
sudo mkdir -p -m 777 /mnt/nexus

# Install mod fuse (or permanent in /etc/modules):
sudo modprobe fuse

# Plugin your Nexus
# Ignore the "New Device found" notification

# Mount the device manually instead:
mtpfs /mnt/nexus

# Open your favourite file manager and go to /mnt/nexus and transfer files
# When finished, don't forget to dismount the device:

sudo umount /mnt/nexus



---------------------------------------------
Linux quickie web server
http://www.instructables.com/id/Quicky-web-server-for-linux/
Windows XP quickie web server
http://www.instructables.com/id/Quicky-web-server-for-MSWindows-XP/

Xp mtp hints:
http://forum.xda-developers.com/showthread.php?t=2012786

Comments

Popular posts from this blog

Guiless?

MSOffice vs Libreoffice

Raspberry pi zero.