git-annex is now available for Android. This includes the git-annex assistant, for easy syncing between your Android and other devices.

Android installation instructions

When you run the git-annex Android app, two windows will open. The first is a terminal window, and the second is a web browser showing the git-annex webapp.

two windows

closing and reopening the webapp

The webapp does not need to be left open after you've set up your repository. As long as the terminal window is left open, git-annex will remain running and sync your files. To re-open the webapp after closing it, use the New Window icon in the terminal window.

starting git-annex

The app is not currently automatically started on boot, so you will need to manually open it to keep your files in sync. You do not need to leave the app running all the time, though. It will sync back up automatically when started.

stopping git-annex

Simply close the terminal window to stop git-annex from running.

using the command line

Android terminal

If you prefer to use git-annex at the command line, you can do so using the terminal. A fairly full set of tools is provided, including git, ssh, rsync, and gpg.

To prevent the webapp from being automatically started when a terminal window opens, go into the terminal preferences, to "Inital Command", and clear out the default git annex webapp setting.

Or, if you'd like to run the assistant automatically, but not open the webapp, change the "Initial Command" to: git annex assistant --autostart

using from adb shell

To set up the git-annex environment from within adb shell, run: /data/data/ga.androidterm/runshell

This will launch a shell that has git-annex, git, etc in PATH.

disk space usage

The git-annex app uses 65 MB of space on your Android device. Do not be fooled by larger numbers that Android may display for its size, like "273 MB". Android does not correctly calculate the size of hard linked files, so its numbers are wrong.

comment 1 cc9caa5dd22dd67e5c1d22d697096dd2
[[!comment Error: unsupported page format txt]]
Thu May 16 23:05:08 2013

The Android app works on many non-rooted Android systems.

The "link busybox: Read-only file system" means that /data/data/ga.androidterm/lib/lib.busybox.so cannot be hard linked to /data/data/ga.androidterm/busybox. That's not normal. I'd appreciate if you could provide more information on your Android device, like Android version and model number.

Comment by http://joeyh.name/ Fri May 17 22:28:34 2013

Sorry for the delay: my android is stock Samsung-tuned Jelly beans. Android 4.1.2 Baseband version N7000XXLSO

not sure if that would be of any use :-/ nothing in the logs (aLogcat) if I filter by annex -- should there any debug output? what should be a key to search by?

Comment by http://yarikoptic.myopenid.com/ Sat May 18 01:23:28 2013

I just tried to run this on my Nexus 7 which has Android 4.2.2, and I received the following: http://hodapple.com/files/Screenshot_2013-05-19-09-49-53.png http://hodapple.com/files/git-annex-error.txt

In spite of that, though, the URL provided still worked.

@Chris, that is a known bug: Android app permission denial on startup
Comment by http://joeyh.name/ Sun May 19 19:46:14 2013

@yarikoptic, there is a process you can perform that will help me determine what's going on.

You should be able to get the git-annex app to let you into a shell. You can do this by starting the app, and then going into its configuration menu, to Preferences, selecting "Command Line", and changing it to run "/system/bin/sh"

Then when you open a new window in the git-annex app, you'll be at a shell prompt. From there, you can run:

ls -ld /data/data/ga.androidterm

I'm interested to know a) whether the directory exists and b) what permissions and owner it has. On my tablet, I get back "drwxr-x--x app_39 app_39" .. and if I run id in the shell, it tells me it's running as app_39.

My guess is the directory probably does exist, but cannot be written to by the app. If you're able to verify that, the next step will be to investigate if there is some other directory that the app can write to. It needs to be able to write to someplace that is not on the /sdcard to install itself.

Comment by http://joeyh.name/ Sun May 19 20:06:56 2013
Comments on this page are closed.