dropbear - Epic 4G Android Development

I've got dropbear, ssh and scp running on my Epic so I thought I'd share.
http://www.elkins.org/dropbear.tar.gz
It's pretty simple to install:
0. Login as root
1. mount /system as rw
2. copy dropbear.tar.gz to /system/bin
3. cd /system/bin
4. tar xvf dropbear.tar.gz
Once that's done, you'll need to issue two commands:
1. /system/bin/mkdropbear.sh -- this command sets up your /data/dropbear directory and only has to be run once.
2. /system/bin/dropbear.sh -- This command needs to be run at system boot to start dropbear. It sets up dropbear with a default password of yourpass. You may want to edit dropbear.sh and change this. To start dropbear at boot, add the line dropbear.sh to Joey's playlogo script.
I haven't been able to get a passwordless login to work. Also, scp does not work directly on the phone. However, from your OS X /Linux pc you can:
scp yourphoneip:/directory/file . -- this copies a file from the phone to your pc
scp filename yourphoneip:/data/local -- this copies a file from your pc to the phone
when you try to ssh/scp directly from the phone to a pc it chokes on /dev/random or /dev/urandom. Not sure what's causing this...

what is it?

sweet thx! i'll give it a shot
whosdaman: its a ssh server

jgaikwad said:
sweet thx! i'll give it a shot
whosdaman: its a ssh server
Click to expand...
Click to collapse
A server running on a phone??? really?

Whosdaman said:
A server running on a phone??? really?
Click to expand...
Click to collapse
It's actually pretty common.

jocala said:
It's actually pretty common.
Click to expand...
Click to collapse
So what is an ssh server though, is that like a backup sever, or an email server or what can it be used as?

Whosdaman said:
So what is an ssh server though, is that like a backup sever, or an email server or what can it be used as?
Click to expand...
Click to collapse
It allows you to remotely login to a device and more.
http://en.wikipedia.org/wiki/Secure_Shell

Whosdaman said:
So what is an ssh server though, is that like a backup sever, or an email server or what can it be used as?
Click to expand...
Click to collapse
It stands for "Secure SHell"
It's a remote terminal for your phone. You can use SCP to copy files to/from the phone, and with dropbear (or any SSH server for that matter) you can SSH into your phone and get shell access.
Not very useful for the average user, but pretty cool if you're a power user
EDIT: Well seems like jocala beat me to it but yeah

Geniusdog254 said:
It stands for "Secure SHell"
It's a remote terminal for your phone. You can use SCP to copy files to/from the phone, and with dropbear (or any SSH server for that matter) you can SSH into your phone and get shell access.
Not very useful for the average user, but pretty cool if you're a power user
EDIT: Well seems like jocala beat me to it but yeah
Click to expand...
Click to collapse
Well I'm a developer and all and I'm just gathering as much information as I can and collecting everything I can find. However, I work for an indirect dealer for Sprint and I have basically sold all of my co-workers on getting the Samsung Epic. And our store itself has 8 servers it is running due to the other half being a business phone system. So I think the head guy and a few of the others might be very interested

Related

Installing Debian on the G1

This was already mentioned by alansj here, but I though it was important enough to have it's own thread
Saurik has created a Debian image you can install onto your sd card. Once installed, you have the full power of debian on your phone. No more puny little busybox
Instructions and such are here.
Thanks Saurik!
I was actually looking into this earlier... let me know how it runs
cant download a few things
can not open ext2.ko......when i type insmod $kit/ext2.ko ...i get "insmod: can't open ' /sdcard/kit/ext2.ko'...some one please help me out
What graphical interface does this install, or is there one?
cbrunner said:
What graphical interface does this install, or is there one?
Click to expand...
Click to collapse
That was my question when I heard about this... I just went for it though because when I read through the instructions, I realized that everything is stored in the MicroSD card and in RAM (which is reset when the phone is rebooted)
It turns out that there is no GUI - just a good old text-based Debian install! I'm sure that someone will get one working... or maybe just port the entire BSD Subsystem along with apt so we can just forget the Market...
amgupt01 said:
That was my question when I heard about this... I just went for it though because when I read through the instructions, I realized that everything is stored in the MicroSD card and in RAM (which is reset when the phone is rebooted)
It turns out that there is no GUI - just a good old text-based Debian install! I'm sure that someone will get one working... or maybe just port the entire BSD Subsystem along with apt so we can just forget the Market...
Click to expand...
Click to collapse
This awesome article has answered tons of my questions and also seems to imply otherwise:
"This does not replace Android. This also gives you access to the full plethora of programs available in Debian and let's you continue using your phone as it was intended to be: as an Android device with all the capabilities thereof."​
In addition, this IRC channel is where the author of that article idles.
cbrunner said:
This awesome article has answered tons of my questions and also seems to imply otherwise:
"This does not replace Android. This also gives you access to the full plethora of programs available in Debian and let's you continue using your phone as it was intended to be: as an Android device with all the capabilities thereof."​
In addition, this IRC channel is where the author of that article idles.
Click to expand...
Click to collapse
Right. No gui, but you have a full working linux distro on your phone. You can apt-get just about any of the normal stuff.. You could probably even get a x-windows installation to working, although you would have to connect to it remotely - it would probably be "difficult" to get it to display a gui on the phone itself (although that would be sweet).
I've installed Saurik's image on my phone, it works great. Although if you do the "unionfs.sh" step, the wifi settings don't quite work right anymore. It won't let you enable or disable wifi.
But I was able to get an ssh server (with real user and password management) and even a samba server running on my phone quite easily with this . I've also got gcc installed, and will start playing around with developing directly on the phone (instead of having to cross compile).
Sorry for not being hip to the game, but what the heck is Debian?
donutman said:
Sorry for not being hip to the game, but what the heck is Debian?
Click to expand...
Click to collapse
Arguably the most influential distribution of Linux ever. Its package management system, apt, is awesome, and it is what Ubuntu and tons of other distros were started from.
Why would you not use Google before asking here?
can anyone help with my above mentioned problem
i want this baby to run
Is your phone connected to your computer? You lose access to the storage card when it is, I think (you can't cd to it when it's plugged in) and unplugging my phone allowed me to install the module.
/a
Installing Debian errors?
Here is what I get:
insmod $kit/ext2.ko
insmod: init_module '/sdcard/kit/ext2.ko' failed (Operation not permitted)
i've been through this, i'm not gonna explain what happens and why, but imo, the only way to get a real root is the following:
-Install telnet client to your device (from android market).
-Reboot your phone to be sure no telnet-daemons/shells are running.
-When you are on the desktop, just type "enter", "telnetd", "enter". (If you do it from the terminal app it will run under the uid of the terminal app which is not root).
-Then run the telnet client app, and connect to local host. (Or skip this step + the first one if you wanna connect from another pc)
I know it's weird, but when you run something from the terminal app it runs under the terminal app's uid, even if you run a new shell, you still are eg. "app_33", not root. and btw you will have to set the environment variables all from the same shell, that means you can't have a script cause it will run under another shell, with another uid. I'm so confused... maybe I'm wrong but android is not the most friendly environment.
aggtrfrad said:
i've been through this, i'm not gonna explain what happens and why, but imo, the only way to get a real root is the following:
-Install telnet client to your device (from android market).
-Reboot your phone to be sure no telnet-daemons/shells are running.
-When you are on the desktop, just type "enter", "telnetd", "enter". (If you do it from the terminal app it will run under the uid of the terminal app which is not root).
-Then run the telnet client app, and connect to local host. (Or skip this step + the first one if you wanna connect from another pc)
I know it's weird, but when you run something from the terminal app it runs under the terminal app's uid, even if you run a new shell, you still are eg. "app_33", not root. and btw you will have to set the environment variables all from the same shell, that means you can't have a script cause it will run under another shell, with another uid. I'm so confused... maybe I'm wrong but android is not the most friendly environment.
Click to expand...
Click to collapse
Haha I feel you. Now the thing is when I am at the home screen on my G1 i push "Enter" on the keyboard and then type "telnetd" and then push enter again it doesnt do anything. When I open up telnet client on my PC it wont connect with wifi on.
So I then go to Telnet client on myG1 and go to connect to "localhost:23" and it says "Error while connecting to server: localhost/127.0.0.1:23 - Connection refused" the thing is that my local host for my wifi is not 127.0.0.1:23
And when I "netstat" from inside Terminal Emulator there is no address with port "23"
ballaholyk84 said:
Haha I feel you. Now the thing is when I am at the home screen on my G1 i push "Enter" on the keyboard and then type "telnetd" and then push enter again it doesnt do anything. When I open up telnet client on my PC it wont connect with wifi on.
So I then go to Telnet client on myG1 and go to connect to "localhost:23" and it says "Error while connecting to server: localhost/127.0.0.1:23 - Connection refused" the thing is that my local host for my wifi is not 127.0.0.1:23
And when I "netstat" from inside Terminal Emulator there is no address with port "23"
Click to expand...
Click to collapse
Are you already running RC30?
SplasPood said:
Are you already running RC30?
Click to expand...
Click to collapse
Yes, I am running the Modified RC30 posted by JesusFreke
cbrunner said:
Why would you not use Google before asking here?
Click to expand...
Click to collapse
Because I wanted you to tell me baby. That is what a wife is suppose to do.
JesusFreke said:
Right. No gui, but you have a full working linux distro on your phone. You can apt-get just about any of the normal stuff.. You could probably even get a x-windows installation to working, although you would have to connect to it remotely - it would probably be "difficult" to get it to display a gui on the phone itself (although that would be sweet).
I've installed Saurik's image on my phone, it works great. Although if you do the "unionfs.sh" step, the wifi settings don't quite work right anymore. It won't let you enable or disable wifi.
But I was able to get an ssh server (with real user and password management) and even a samba server running on my phone quite easily with this . I've also got gcc installed, and will start playing around with developing directly on the phone (instead of having to cross compile).
Click to expand...
Click to collapse
What command did you use to get the SSH to install? Every time I do the one in the tut by saurik it errors and wont install all the way. I get an error after x11-common and it wont finish.
ballaholyk84 said:
So I then go to Telnet client on myG1 and go to connect to "localhost:23" and it says "Error while connecting to server: localhost/127.0.0.1:23 - Connection refused" the thing is that my local host for my wifi is not 127.0.0.1:23
Click to expand...
Click to collapse
localhost usually refers to the loopback interface which on most devices will be 127.0.0.1.
I'm getting the same thing here... I think there's something wrong with apt-get having to write to /tmp which does not exist (and is mounted read-only).

dhcpd on Android/ARM

Has anyone tried compiling dhcpd for Android/ARM? I'm working on a Wireless Router application for Android, and having the phone be a dhcp server would make PC setup really easy.
http://www.openbsd.org/cgi-bin/cvsweb/src/usr.sbin/dhcpd/
No, but if you get it working, I'd gladly pay (for the program, not dhcp ).
Is it possible to set it up to a non-adhoc wireless access point? My WiFi card doesn't work for adhoc under Ubuntu :/.
I've been using dnsmasq, works great..
Any reason why you want to use the source from openbsd?
You can get DHCP server from here:
https://www.isc.org/downloadables/12
It's currently compiling on my phone but everything looks good so far.
I guess you could also the udhcp from the busybox project. I think it's smaller.
http://udhcp.busybox.net/
npace said:
Any reason why you want to use the source from openbsd?
You can get DHCP server from here:
https://www.isc.org/downloadables/12
It's currently compiling on my phone but everything looks good so far.
I guess you could also the udhcp from the busybox project. I think it's smaller.
http://udhcp.busybox.net/
Click to expand...
Click to collapse
Oh, awesome! I didn't realize busybox had a dhcp daemon. Linux/ARM is supported too, and it seems to be running fine. I'll make sure it's actually working now.
Bleh, dnsd isn't working properly. Might need to compile within the Android build environment. (None of the busybox networking related commands seem to work, even basic ones such as nslookup.)
Basically what I'm trying to do is have the phone be a DNS, DHCP, and gateway server, so that the PC connection setup is painless: just associate with a the phone's ad hoc network.
What's the busybox's default pass? Mine seems to have it, but I can't figure it out.
Koush said:
Bleh, dnsd isn't working properly. Might need to compile within the Android build environment. (None of the busybox networking related commands seem to work, even basic ones such as nslookup.)
Basically what I'm trying to do is have the phone be a DNS, DHCP, and gateway server, so that the PC connection setup is painless: just associate with a the phone's ad hoc network.
Click to expand...
Click to collapse
did you try the udhcpd applet in busybox?
JesusFreke said:
did you try the udhcpd applet in busybox?
Click to expand...
Click to collapse
Nah, failed with a bunch of errors and I didn't bother looking into it further:
Code:
busybox udhcpd -f
udhcpd: /etc/udhcpd.conf: No such file or directory
udhcpd (v1.12.2) started
udhcpd: can't open '/var/lib/misc/udhcpd.leases': No such file or directory
udhcpd: is interface eth0 up and configured?: No such device
The missing files ones are obviously fixable, but the last one about the eth0 I have no idea about.
Koush said:
Bleh, dnsd isn't working properly. Might need to compile within the Android build environment. (None of the busybox networking related commands seem to work, even basic ones such as nslookup.)
Basically what I'm trying to do is have the phone be a DNS, DHCP, and gateway server, so that the PC connection setup is painless: just associate with a the phone's ad hoc network.
Click to expand...
Click to collapse
I'm a little confused about what you're trying to do here. In page 5 of the iptables thread, alansj has a script that will setup the wifi connection, forward the traffic using iptables and enable dnsmasq to serve as a DHCP server. (rale00 also deserves credit for building dnsmasq and the original script)
If I'm missing something here, what is it that you want to do differently?
Koush said:
Nah, failed with a bunch of errors and I didn't bother looking into it further:
Code:
busybox udhcpd -f
udhcpd: /etc/udhcpd.conf: No such file or directory
udhcpd (v1.12.2) started
udhcpd: can't open '/var/lib/misc/udhcpd.leases': No such file or directory
udhcpd: is interface eth0 up and configured?: No such device
The missing files ones are obviously fixable, but the last one about the eth0 I have no idea about.
Click to expand...
Click to collapse
You need a udhcp.conf file like this one:
http://udhcp.busybox.net/udhcpd.conf
Then you'll need to change the interface from eth0 to whatever the wifi one is... do 'ifconfig' with your wifi on and you'll see the interface name.

iPod and G1 syncing

I use my G1 and iPod Touch hand and hand. I share my G1s internet over wifi. Basically I want to create a script that will ssh from my G1 to my Touch then copy the contents of say my images folder to my Touch. This way keeping my iPod and G1 in sync over wifi. I'm wondering what would be the easiest way of doing it, creating a cron script that pings for my iPod's IP and if returned would start a SSH connection and auto copy my pictures? Any idea's?
Note: I was also thinking maybe creating a custom tether app based off the wifi tethering app available that when tethering was activated it would ping periodically for my iPod's IP. That way I could avoid the hassles of cron under the Android Environment and I would only be trying to sync when my G1 is tethering.
G1 has nothing to share with ipod, pervert
...right. I don't think you can do cron jobs on android or host a ssh server natively but you might be able to mount debian on your sdcard and then do everything from in there. rsync is popular for this.
jusplainmike said:
I use my G1 and iPod Touch hand and hand. I share my G1s internet over wifi. Basically I want to create a script that will ssh from my G1 to my Touch then copy the contents of say my images folder to my Touch. This way keeping my iPod and G1 in sync over wifi. I'm wondering what would be the easiest way of doing it, creating a cron script that pings for my iPod's IP and if returned would start a SSH connection and auto copy my pictures? Any idea's?
Click to expand...
Click to collapse
Basically, yeah. Could be easier / more elegant to build a Java app that runs in the background, pinging the ip. To copy via ssh you need scp, which is included in my JF 1.43 ADP1.1 flash.
Then just
Code:
scp -i /sdcard/android_id.seckey -r [email protected]:/wherever/the/files/are/ /sdcard/where/i/want/them
You'd need to supply a public key without password protection (in my example android_id.seckey) to the iPod, which usually is a significant security risk. Maybe in case of your iPod, not so much though.
jusplainmike said:
Note: I was also thinking maybe creating a custom tether app based off the wifi tethering app available that when tethering was activated it would ping periodically for my iPod's IP. That way I could avoid the hassles of cron under the Android Environment and I would only be trying to sync when my G1 is tethering.
Click to expand...
Click to collapse
That's possible as well, but it's more complicated since you'd have to adapt to changes to WiFiTether / G1Tether. Also, that app might need root, while the other approach probably wouldn't, but would only work when both devices are connected to an access point where IPs are DHCP'd statically.
Interesting problem.
d00m said:
...right. I don't think you can do cron jobs on android or host a ssh server natively but you might be able to mount debian on your sdcard and then do everything from in there. rsync is popular for this.
Click to expand...
Click to collapse
The iPod host the ssh server, I would only have to SSH from the G1 and android actually has a cron service, I can't remember what it is of the top of my head exactly.
While trying to scp I get this error:
/system/bin/ssh: No such file or directory
Click to expand...
Click to collapse
Yet I can ssh from my G1

Automatic wireless folder sync app needed

Hi,
I have looked around and cant seem to find an application quite fitting.
All I want is an app that will wirelessly sync just a folder automatically when I have my WiFi turned on, is there an app that can do this?
i.e. Come home from work, turn on wifi and it just syncs.
Many thanks
To any developers about: How hard would something like this be to make?
I think dropbox does that?
Dropbox syncs a folder on multiple devices with a folder on dropbox server.
There is also an app called PCFileSync that syncs a folder over wifi between the phone and a samba share. I am turning it on with Tasker once it connects to my home ssid. Works great!
Sent from my Desire HD using XDA App
samba share? hm........
rsync and ssh would be a much better choice and cleaner, just a script to run.
synflex said:
samba share? hm........
rsync and ssh would be a much better choice and cleaner, just a script to run.
Click to expand...
Click to collapse
http://a-more-common-hades.blogspot.com/2010/07/backup-photos-with-rsync.html
Tasker+Rsync, and combine it with a ssh key and you can automate it easy.
BTW, I decided to do this today.. I have one which backs up /sdcard/DCIM, and another which backs up the entire sdcard, both over wifi to my Fedora Linux workstation. I'll have to figure out how I want to execute these, but I can do it from GScript Lite, Tasker, whatever floats my boat.
Here's the notes I took, just in case I have to do it again in the future, hope it's useful to some folks..
# Get dropbear/dropbearkey from http://www.elkins.org/dropbear.tar.gz
# Get ssh off device and follow instructions (references at the end) to fix it, name fixed file "sshfxed"
# Remount /system rw
~/AndroidSDK/tools/adb shell
su
mount -o rw,remount device /system
#exit back to Linux shell
Click to expand...
Click to collapse
# Install dropbear and sshfixed from adb push
~/AndroidSDK/tools/adb push sshfixed /system/xbin/sshfixed
~/AndroidSDK/tools/adb push dropbear /system/xbin/dropbear
~/AndroidSDK/tools/adb push dropbearkey /system/xbin/dropbearkey
Click to expand...
Click to collapse
# Now get into adb shell and execute in Android..
mkdir /system/etc/dropbear
chmod 4755 /system/bin/dropbear
chmod 4755 /system/bin/dropbearkey
Click to expand...
Click to collapse
# Create keys
dropbearkey -t rsa -f /system/etc/dropbear/dropbear_rsa_host_key
dropbearkey -t dss -f /system/etc/dropbear/dropbear_dss_host_key
Click to expand...
Click to collapse
# Copy and paste the public DSS key the dss command above outputs and put it in ~/.ssh/authorized_keys on intended host. If you need to know more here, google for how to use ssh keys on Linux hosts. Basically if you're going to [email protected], on machine1 under user account "user" you create a file named authorized_keys in the .ssh directory with the output of the previous command, it tells you it's the 'public key', which is what you want to copy. It has to be all one line.
# Now actually use it all and rsync sdcard to your host For debugging, I suggest trying the "sshfixed -l USER -y -i /system/etc/dropbear/dropbear_dss_host_key" part just by itself and make sure you can ssh to your machine WITHOUT any prompting, password, etc.
~/AndroidSDK/tools/adb shell
# the following is all one line..
rsync -rltDv --chmod=u=rwX,g=rX,o=rX -e "sshfixed -l USER -y -i /system/etc/dropbear/dropbear_dss_host_key" /mnt/sdcard [email protected]:/your/path
Click to expand...
Click to collapse
-- References
Get dropbear - http://forum.xda-developers.com/showthread.php?p=8220181
Set up dropbear - http://forum.xda-developers.com/showthread.php?t=442754
Fix ssh client to use urandom - https://www.heiher.info/1592.html
Use it all to rsync over wifi - http://a-more-common-hades.blogspot.com/2010/07/backup-photos-with-rsync.html
Another vote for Dropbox, it works great! Look for referral codes in the comments on Market for some additional free storage. I use it all the time for pictures and vids for the family.
Sent from my HTC Desire using the XDA App
I use S&K sync.
Horrible user interface but once things are set up you need only to start the client on your phone and press the "Start Sync" button.
Supports multiple configuration sets (local/remote directory pairs, ip address, etc), each can be started separately.
Google: "SK sync android"
khaytsus said:
http://a-more-common-hades.blogspot.com/2010/07/backup-photos-with-rsync.html
Tasker+Rsync, and combine it with a ssh key and you can automate it easy.
Click to expand...
Click to collapse
I'm actually syncing to 2 android phones, with dropbox, rsync and dropbear.
Dropbox is good for documents and such, with small filesize and possiblity of sharing with others.
Using rsync for large files like movies and music folders, also some pictures, notes, keepass, and stuffs I like having around, things that's only going around between my laptop and phone.
Running a crontab that scans for my phone in adb devices, if found, pull a "last sync status" file, if interval > 1 hour or changes made locally, do a local notify-send till rsync is done, then execute dropbear on phone, rsync remote and local, kills dropbear, then push last sync file.
This way, no resources is wasted on the phone, all scanning and verification of device, system, and files were done on laptop.
At the same time I'm monitoring my development phone with frequent ssh rsync when it's in range, push updates, kernels and such across in proper folder structure.
This will ensure changes or new kernels were pushed to phone ready for testing.
Could use the same script for both phone, be it adb+ssh+rsync or pure ssh+rsync, but I personally don't like having sshd running in background when I'm connected to wifi hotspot.
Cleaner this way, less resources wasted on phone, and I can have full control over what, where, and when to sync.
I do realise that there isn't much choice for syncronization in the wild, thus you may like yo try something along the same idea, and you may get your own perfect combo to sync.
P.S. backing up, restoring or syncing bookmarks from browser.db and such could be done this way.

[App] rsync backup for Android

I just wanted you to inform you about my first Android application: rsync backup for Android. It is available in Market (for free, ad-supported).
Comments, suggestions, feature requests and bug reports are welcomed.
Just curious about your instructions.... You mention generating keys multiple times, but not sure why?
Typically to use ssh keys, one must generate keys on the client, transfer the public key of the client to the server. Then the client can connect into the server using the certificate rather than passphrase authentication.
Your instructions confused me.. It could be due to not having coffee yet, but might want to streamline the info a bit or users might never get to actually using it.
I'll try it myself later, as I already do this but curious how you've done it on your end. Here's what I run manually about once a week from GScript:
rsync -rltDv --delete --chmod=u=rwX,g=rX,o=rX --exclude=".android_secure" --exclude "Music" -e "sshfixed -l user -y -i /sdcard/bin/etc/dropbear/dropbear_dss_host_key" /mnt/sdcard [email protected]:/media3/android/microsd/rsync-backup/hourly.0/
Click to expand...
Click to collapse
And the server itself does a hard-link copy and move of directory names etc which maintains a set of 4 snapshots, I also do the same thing for my backups on the machines themselves.. Handy to find stuff I just realized I hosed a month ago..
Biggest annoyance was having to dupliate ssh (dropbear) and fix it so it uses /dev/urandom, as /dev/random isn't a viable source for ssh.
These are three different ways of generating private+public key pair. I'll add some description, because it could be confusing, as you said.
_sammael_ said:
These are three different ways of generating private+public key pair. I'll add some description, because it could be confusing, as you said.
Click to expand...
Click to collapse
Ah, yes that makes more sense, give them options on how to generate the keys.. However, you can only create keys on the client itself, one mention seemed like it was referring to using a Linux box to create them?
You can always generate keys on Linux box, then transfer private key to your Android and append public key to authorized_keys.
_sammael_ said:
You can always generate keys on Linux box, then transfer private key to your Android and append public key to authorized_keys.
Click to expand...
Click to collapse
To connect from Linux to Android... Yes. But pretty sure that won't work for Android to Linux, which is what I'd think you'd normally do?
He's saying, move both keys. Generally the private key is left on the system that generated it, but that doesn't need to be the case. At least as far as I know.
First off, brilliant app! It's exactly what I have been looking for to save me a huge amount of time and effort. Currently I was doing this by hand because I've had bad experiences with sdcards suddenly just stop working meaning I loose everything.
I have set a range of profiles up and had Tasker kick them off daily however I am at a loss how to get --exclude-from '/sdcard/excludefile.txt' working. When ever I run a profile it states:
rsync: failed to open exclude file '/sdcard/excludefile.txt' : No such file or directory (2)
rsync error : error in file IO (code 11) at exclude.c(1062) [client=3.0.6]
Click to expand...
Click to collapse
What I'm wanting to do is have the following profiles
/ -> /home/user/mobile/dellstreak/
[exclude sdcard exclude*]
/sdcard -> /home/user/mobile/dellstreak/sdcard
[exclude DCIM audio ebooks video media rings downloads temp exclude*]
/sdcard/DCIM -> /home/user/mobile/dellstreak/sdcard/DCIM
Click to expand...
Click to collapse
You can see what I'm wanting to do, I want a little more control over some profiles i.e. so I can backup DCIM whilst out and about or back up the sdcard without backing up all my music, videos etc.
Any help would be appreciated.
Try filename without the quotes:
--exclude-from /sdcard/excludefile.txt
Currently custom parameters parser takes arguments literally. Splitting is done using space as a delimited. That's why spaces in filenames won't work and rsync think that your filename is '/sdcard/excludefile.txt' (file excludefile.txt' in directory '/sdcard) instead of /sdcard/excludefile.txt
khaytsus said:
To connect from Linux to Android... Yes. But pretty sure that won't work for Android to Linux, which is what I'd think you'd normally do?
Click to expand...
Click to collapse
Yes, it will work. If you don't believe me, check it for yourself. In fact I initially generated my private key on my Linux box (using dropbearkey), then tested method with dropbearconvert.
Please notice that what you're generating is key pair, which means that it will work as long as you put public key in remote side's authorized_keys (no matter what system it is and where it was generated) and authenticate using corresponding private key.
Been using it for weeks now, I love it.
You should document a few things, such as how to create a dropbear key from a standard key.
Confirmation number: 9X233376XY8982101.
It is documented on application's webpage (see Menu -> Help).
_sammael_ said:
It is documented on application's webpage (see Menu -> Help).
Click to expand...
Click to collapse
So it is. I'm not sure if that was there when I first started using, but you've added the things I would have suggested (being able to change the command line options, etc.)
_sammael_ said:
Try filename without the quotes:
--exclude-from /sdcard/excludefile.txt
Currently custom parameters parser takes arguments literally. Splitting is done using space as a delimited. That's why spaces in filenames won't work and rsync think that your filename is '/sdcard/excludefile.txt' (file excludefile.txt' in directory '/sdcard) instead of /sdcard/excludefile.txt
Click to expand...
Click to collapse
The exclude files I'm parsing don't have spaces in anyway so luckily I didn't have to worry about that (coming from a linux background has taught me to avoid spaces where ever possible, not to mention keep everything lower case )
Your suggestion of removing the quotes (') seems to have done it, I use rsync on my linux boxes which require you to use quotes when parsing an exclude file.
Will check that it's parsing the exclude files correctly and will report back.
As per documentation that someone has suggested, I found the current documentation to work find, however it seems a little sparse. Maybe creating a wiki site for the documentation might help with this?
Again thankyou for a great app.
The exclude list seems to be working as expected, I now have it syncing as follows
/ -> /home/user/mobile/dellstreak/sdcard
/sdcard -> /home/user/mobile/dellstreak/sdcard
/sdcard/DCIM -> /home/user/mobile/dellstreak/sdcard/DCIM
Click to expand...
Click to collapse
I've also significantly increased my excludes to cover directories that have permission issues or that are (re)created on boot.
##rsyncrootexclude##
/sdcard
/acct
/cache
/config
/d
/mnt
/proc
/dev
/sys
Click to expand...
Click to collapse
##rsyncsdcardexclude##
/sdcard/Update*.zip
/sdcard/update*.zip
/sdcard/video
/sdcard/audio
/sdcard/ebooks
/sdcard/download
/sdcard/media/music
/sdcard/music
/sdcard/xuluan.podcast
Click to expand...
Click to collapse
So one suggestion, is it possible to add a scheduler to this?
I use Titanium Backup to make backups of my apps/data daily and would like that pushed automatically to my rsync server.
I didn't plan to add this, you can use Tasker or Locale.
As _sammael_ says, tasker works great with it.
I get it to automagically rsync when ever I connect to my wifi, and then on a timed scheduled.
ssh required?
great app.. like others, I was using rsync manually.
Do you only support rsync over ssh? I currently use the (insecure) rsync protocol to sync a "TV" folder on my Windows Media Center box. I can install a SSH server, it just seems overkill for my needs.
Robert
Currently only rsync over ssh is supported, but I guess I can add selection whether user want to use ssh or not. Am I thinking correctly that it will be as simple as skipping rsync's -e option?

Categories

Resources