Saturday, September 15, 2012

Nexus 7 and Files

The Nexus 7 doesn't come with any built-in way to look at files, as in looking at the files in the various directories. I'm using File Manager HD, and this does what I need, such as getting a look at the directory structure, seeing what files are where, and so on. But what about transferring files to or from the tablet?

The presumption seems to be that you will use the internet, either by transferring them as email attachments or maybe using something up there in the cloud. But you may want to be a bit more private that either of these.

There is a capability of transferring via the USB socket, but the filesystem is an MTP format, not native to anything, so you have to go througn some steps to do this. I decided I didn't want to bother.

I've used ssh (secure shell) at home for years for transferring files, signing onto another computer remotely, and also the related sftp means of uploading files to my site. It took me a while to get the syntax right. Generally speaking I am using my desktop to interact with the tablet, so given that the wifi address of my tablet is, I can type

ssh -o Port=2222 root@

to remotely connect to the tablet, and

scp -P 2222 somefile.jpg root@

to send the picture somefile.jpg to the tablet.

sftp -o Port=2222 root@

sets up an sftp connection to the tablet, where you might serially send and receive a number files to/from the device. For example, after connecting with the sftp command above, I could type

put somefile.jpg

to accomplish the same thing I did with the scp command, but afterward, I'm still connected to the tablet, until I type 'bye'.

get anotherfile.jpg

would download anotherfile.jpg from the device.
Once I have the file there, then typically I may use File Manager HD to move it where I want to. It's helpful to know which directories your files are in, since some apps have minimal ability to search directories.

SSHDroid is only setting up your tablet to be a receiver from other computers, it's not loading an ssh binary on the tablet.

No comments: