git-annex/ Android

git-annex is available for Android inside Termux or Nix-On-Droid. This includes the git-annex assistant, for easy syncing between your Android and other devices. You do not need to root your Android to use git-annex.

(Alternatively, rather than installing git-annex on your Android device, git-annex can run on your computer and use `adb` to pull and push changes to the Android device. See android sync with adb for instructions on using git-annex that way.)

## Installation (Termux)

First, install Termux. This is an Android app that can run some Linux software in a terminal, including git-annex.

git-annex is not currently part of the Termux distribution, but it's easy to install it. Paste these commands into Termux:

    pkg install wget
    wget https://git-annex.branchable.com/install/Android/git-annex-install
    source git-annex-install

## Installation (Nix-On-Droid)

Installing git-annex using Nix-On-Droid is recommended for more advanced users who want to use git-annex at the command line. The git-annex webapp does not currently work in Nix-On-Droid (as a workaround, run `git annex webapp --listen 127.0.0.1` and copy-paste the URL in a browser).

To enter a shell with git-annex available to use, run inside Nix-On-Droid: `nix-shell -p git git-annex`

To avoid needing to do that every time you start Nix-On-Droid, you can add git and git-annex to your `environment.packages` in `~/.config/nixpkgs/nix-on-droid.nix` and then run `nix-on-droid switch`

## Starting git-annex assistant

Just run "git-annex webapp" inside Termux. A browser window will open with the git-annex interface.

## Closing and reopening the webapp

The webapp does not need to be left open after you've set up your repository. As long as Termux (or Nix-On-Droid) is left open, git-annex will remain running and sync your files.

## Starting at power on

If you install the Termux:Boot app, git-annex will be automatically started when your Android device powers on. It will run in the background in whatever repositories you have set up in the webapp.

## Using the command line

If you prefer to use `git-annex` at the command line, you can do so inside Termux or Nix-On-Droid. Here we'll make a repository for photos:

        cd ~/storage/dcim
        git init
        git-annex init

You can go on to set up a ssh remote pointing to a server, and sync your files to and from it.

And so on. Most ways you would use git-annex on a Linux system work fairly well in the Termux environment.

## Upgrading (Termux)

To upgrade to a new git-annex release, just run `git-annex-install` again.

Download with the git-annex-install script fail

    Downloading git-annex...
    --2025-08-24 12:49:08--  https://downloads.kitenet.net/git-annex/linux/current/git-annex-standalone-arm64-ancient.tar.gz
    Resolving downloads.kitenet.net (downloads.kitenet.net)... 66.228.36.95, 2600:3c03::f03c:91ff:fe73:b0d2
    Connecting to downloads.kitenet.net (downloads.kitenet.net)|66.228.36.95|:443... connected.
    HTTP request sent, awaiting response... 403 Forbidden
    2025-08-24 12:49:09 ERROR 403: Forbidden.

The Download with the git-annex-install script fail, I guess because the build is failed. see: https://downloads.kitenet.net/git-annex/autobuild/arm64-ancient/

    enableremote encryption changes: FAIL (0.73s)
    ./Test/Framework.hs:92:
    initremote failed with unexpected exit code (transcript follows)
    initremote baz
    git-annex: There is no security benefit to using onlyencryptcreds=yes with encryption=shared
    failed
    initremote: 1 failed

It would be grate if you could fix that. Thanks in advance.

Comment by waldi1985 — Wed Oct 29 14:05:27 2025
git-annex for managing music

I'm trying to use git-annex to manage music on my phone (surely a common-ish use case?), so I have a git-annex checkout under `/sdcard/Music/`. It sort of works? I did a clone under there (I think, it was a few weeks ago), it seemed to check out my files okay and set e.g. `core.symlinks = false` and `annex.sshcaching = true`. However, I keep getting warnings that I should run `git annex restage` or that some git hook didn't run because it wasn't executable. I'm also now using `git annex adjust --hide-missing --unlock` since I think locked files just don't work on exfat(?). Also, there's various characters that aren't supported that caused a lot of confusion when I was first setting it up... I think the Nix-on-Droid app-specific directory has a better filesystem, but I don't think my music player would be able to access that.

Do folks have tips on using git-annex on Android? My suspicion is that because of the filesystem and maybe other things, there's a fair amount of details that don't apply to git-annex usage on a normal Linux machine, and I don't really understand Android, exfat, or git well enough to confidently compensate -- more of a howto or rundown of features/config that's likely to come up on Android would be really helpful for this page.

Comment by adehnert — Wed Oct 29 14:05:27 2025
comment 6

starting `git annex webapp` fails for me with (Android 12, CalyxOS):

    CANNOT LINK EXECUTABLE "/system/bin/app_process": library "libnativeloader.so" not found: needed by main executable
    failed to start web browser

The webapp still runs and I can connect the browser by copypaste the link.

instead trying to open the browser natively i have a bit more success with Termux:API by

    termux-open-url 'http://127.0.0.1:42005/?auth=...

This seems to be the right thing to do, unfortunally for some unknown reason it fails sometimes too, but I think thats an issue within termux which may become fixed eventually.

Comment by cehteh — Wed Oct 29 14:05:27 2025
Use curl instead of wget

It's not necessary to download `wget` in Termux since it already comes with `curl`.

However the installation guide instructs to install `wget` in order to fetch the installation script `git-annex-install` from the internet. Also the script itself relies on `wget` and installs it as a dependency even though the preinstalled `curl` could be used just as well.

I think we should use `curl` to reduce the amount of dependencies which have to be additionally installed.

Comment by mzimann — Wed Oct 29 14:05:27 2025
Android - gitlab repo
I realized that the webapp of this android version does not support synchronizing a gitlab repo with local repo. Is it possible to achieve it using command line?
Comment by quzhengrobot — Wed Oct 29 14:05:27 2025
comment 3

Thank you for reporting that, I have fixed the url.

I'd again like to ask that, if you have any kind of problem or bug with this Android build of git-annex, you open a bug report rather than posting a problem here.

Comment by joey — Wed Oct 29 14:05:27 2025
comment 29

If you are experiencing a problem using git-annex on Android, please examine the list of bugs and add a new, detailed bug report if no-one has reported the problem. If you are not sure if you have a bug, or need help in filing a good bug report, ask for help in the forum.

I have removeda lot of old comments about problems that may be fixed or not (hard to tell without a bug report!) This page cannot scale to handle every bug report that someone wants to paste into it.

Comment by http://joeyh.name/ — Wed Oct 29 14:05:27 2025
wget link broken

    wget https://git-annex.branchable.com/install/Android/git-annex-install.sh

This seems to download a html.

Comment by hoxu — Wed Oct 29 14:05:27 2025
Comments on this page are closed.