Syncing files from Linux to an Android Tablet – Part 2

So… the “progressive slowing down” was really getting to me. I couldn’t work out what was causing it, so I decided to try a few other things and now I’ve found a new system that I’m really happy with.

I’m still using rsync, but now it’s a pull rather than a push.

To do this, install SSHelper on your tablet.

SSHelper is a fully-fledged ssh client AND server which is pretty neat. But really you just need to use it as a client.

Then you need to make sure that you can ssh (and rsync) to your Linux server.

Once that’s done, write a small script on your tablet, I found the android keyboard to be really annoying, so I turned on the SSH server in SSHelper and ssh’d in so I could write the script with a real keyboard.

You can call the script whatever you want, I called mine “sync” and left it in my home directory because that makes it easy to type. 🙂

Example script:

#!/system/bin/sh

set -x

SOURCE=user@192.168.10.10:/disk0/rsync/taba/
DEST=$HOME/SDCard/Movies

$SSHELPER/bin/rsync --progress      \
                    --size-only     \
                    --no-perms      \
                    --delete-before \
                    -vHrDz          \
                    -e ssh          \
                    $SOURCE $DEST

Make sure your script has execute permissions.

Now just click on the “Terminal” tab in SSHelper, and run:

$ ./sync

And it should start “pulling” your files from your Linux server to your tablet over WiFi.

Leave a Reply

Your email address will not be published. Required fields are marked *