calisro
Member
I didn't want to compile rsync myself so I grabbed this APK (https://code.google.com/p/rsyncdroid/downloads/list), downloaded it, renamed it to rsyncdroid-0.4.zip. If you open it in with any of your zip programs, you can pull the rsync executable from the apk. I put that rsync in /data/local/bin (where I install all my binaries and 'chmod +x'. I use that location since you cant use the sdcard to execute binaries directly in shell). I then exchanged keys with my nas and put the resulting key in /sdcard/.ssh/ and set permissions as required by a key exchange.
Now it is just a matter of running normal rsync like anywhere else. I execute it with SL4A shell because with that localle plugin you can have it execute in the background. Remember this needs root so you'll need to execute rsync like this in the shell script:
rsync.sh script:
/system/xbin/su -c "/data/local/bin/rsync -e \"ssh -i /sdcard/.ssh/id_rsa\" -thlvr --delete /sdcard/ root@nas:/some/path/sdcard/"
I run cyanogenmod so it has the right ssh for this to work. Im sure you can do the same with busybox but I cant test that.
/system
My Llama event is simple. When a variable for night = yes and time is between 2am and 6am, run localle plugin SL4A:/rsync.sh.
Now it is just a matter of running normal rsync like anywhere else. I execute it with SL4A shell because with that localle plugin you can have it execute in the background. Remember this needs root so you'll need to execute rsync like this in the shell script:
rsync.sh script:
/system/xbin/su -c "/data/local/bin/rsync -e \"ssh -i /sdcard/.ssh/id_rsa\" -thlvr --delete /sdcard/ root@nas:/some/path/sdcard/"
I run cyanogenmod so it has the right ssh for this to work. Im sure you can do the same with busybox but I cant test that.
/system
My Llama event is simple. When a variable for night = yes and time is between 2am and 6am, run localle plugin SL4A:/rsync.sh.