Now the first "public beta" of my little "adbsync" script is tagged and available at
https://codeberg.org/izzy/adbsync/releases
Should be stable enough to be released to the public (though its code was public from the very beginning). adbsync lets you sync directories between your #Android device(s) and your (#Linux) PC without any special app, just utilizing things like rsync, adb, adbfs – and jq (to parse the JSON config file).
Give it a try, feedback welcome
https://codeberg.org/izzy/adbsync/releases
Should be stable enough to be released to the public (though its code was public from the very beginning). adbsync lets you sync directories between your #Android device(s) and your (#Linux) PC without any special app, just utilizing things like rsync, adb, adbfs – and jq (to parse the JSON config file).
Give it a try, feedback welcome
Peter Vágner likes this.
Peter Vágner reshared this.
Floppy 💾
in reply to IzzyOnDroid ✅ • • •I'm in the process of migrating all my devices to use Syncthing (via Wireguard). But I will give it a think! Sometimes I wondered whether some faster, more controlled, and direct means might be easier for some use cases. adbsync looks like it has potential here! (I used USB-cable-based data transfer and like the idea for various reasons.)
IzzyOnDroid ✅
in reply to Floppy 💾 • • •IzzyOnDroid ✅
in reply to IzzyOnDroid ✅ • • •Floppy 💾
in reply to IzzyOnDroid ✅ • • •I was bothered by similar issues (installing Syncthing, lack of SSH server). Will definitely try out! Also I'm curious how well it performs on non-rooted devices (that performant, but pesky Fire HDX).
I like the rationale behind Adebar! Will have a closer look soon!
IzzyOnDroid ✅
in reply to Floppy 💾 • • •(1/2)
IzzyOnDroid ✅
in reply to IzzyOnDroid ✅ • • •Adebar: great, take a look at the example docs it generated: https://izzy.codeberg.page/adebar/
Adebar DeviceDoc Examples
Izzy’s Codeberg PagesFloppy 💾
in reply to IzzyOnDroid ✅ • • •I had a look at adbsync and I like it a lot! I had some minor issues (details follow), but it seems to be working nicely. Pretty impressive you went all the way through directory tree traversal and working around the timestamp limitations!
Floppy 💾
in reply to Floppy 💾 • • •https://termbin.com/w1ls
I still get some strange rsync errors, but they don't seem to impact anything.
rsync: [sender] readdir("[local-path]/[android-path]/."): Input/output error (5)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1326) [sender=3.2.4]
IzzyOnDroid ✅
in reply to Floppy 💾 • • •2) could you please put that into an issue in the repo, or a PR?
3) yes, those errors happen when syncing TO the device, Guess why I had to work around that with some special rsync options and manual timestamp adjustments 🙈 That's caused by adbfs, see https://github.com/spion/adbfs-rootless/issues/59
Timestamps are lost when copying to device · Issue #59 · spion/adbfs-rootless
GitHubFloppy 💾
in reply to IzzyOnDroid ✅ • • •2) Will try! But setting up a Codeberg account is on my list of a while and not sure when I will get to it.
IzzyOnDroid ✅
in reply to Floppy 💾 • • •Floppy 💾
in reply to IzzyOnDroid ✅ • • •But before that I wanted to settle on some kind of way of handling my online identities. For privacy reasons I want to keep different interests, stuff to be put online (so much), and social interactions deliberately dissociated. As for in this case, I haven't completely settled on e.g. a proper online name for the nerdier interests. ("floppy" is nice, but wasn't intended to be final. 🙂)
Floppy 💾
in reply to Floppy 💾 • • •In terms of documentation, I think it might be good for people less familiar with rsync to point out that in the config's .devices[].sync[].{devdir,pcdir} should keep the trailing slash. (Or some handling in the script might be nice.)
IzzyOnDroid ✅
in reply to Floppy 💾 • • •And good point with the trailing slash – had that in mind but always forget…
Floppy 💾
in reply to IzzyOnDroid ✅ • • •Floppy 💾
in reply to Floppy 💾 • • •I'm pretty swamped at the moment, so I might need a few more days, but I'll give adbsync a more thorough test and get back to you in a while!
IzzyOnDroid ✅
in reply to Floppy 💾 • • •Logging to a file: Sure, same thing and also documented: "logfile":"/path/to/logfile". Everything that's not just empty, "none" or "syslog" is expected to be a file name.
IzzyOnDroid ✅
in reply to Floppy 💾 • • •Further, no longer adjusting timestamps on push. Guess what I just discovered: "adb push" supports a `--sync` parameter only pushing newer files & taking care for timestamps. "adb pull" unfortunately does not support that or rsync+adbfs would only be needed for "--delete"…
Floppy 💾
in reply to IzzyOnDroid ✅ • • •Thank you for the update also! adb's parameter sounds like good news, at least partially. Maybe they fix the "pull" sub-command too some time.
Thanks for taking care of the trailing slashes! 😉 I think other people checking out the project will benefit greatly there. :)