git-annex/ tips/ install on Android in Termux/ old comments

Some old comments, all obsoleted now. --Joey

Debugging "No such file or directory"

I'm experiencing the same issue as CandyAngel on an arm64 tablet (which should be able to execute regular arm code).

Tracing down from the error message:

    $ ./git-annex.linux/runshell
    proot error: execve("/data/data/com.termux/files/home/git-annex.linux/bin/sh"): No such file or directory
    [...]
    $ head -n1 /data/data/com.termux/files/home/git-annex.linux/bin/sh
    #!/bin/sh
    $ which sh
    /data/data/com.termux/files/usr/bin/sh

So it might just be that the different environments disagree which sh is now executable. For contrast, trying a bash (which is not in /bin/):

    $ ./git-annex.linux/runshell bash
    bash-4.4$ git-annex
    bash: /data/data/com.termux/files/home/git-annex.linux/bin/git-annex: /bin/sh: bad interpreter: No such file or directory

Ok, /bin/sh is obviously bad influence here.

    $ termux-fix-shebang git-annex.linux/bin/*
    $ ./git-annex.linux/runshell bash
    bash-4.4$ git-annex
    Segmentation fault

At first glance this does sound like "Mh, we can't execute 32bit binaries her", but look:

    bash-4.4$ ./git-annex.linux/lib/ld-linux.so.3  # that's what exe/sh is symliked to
    Segmentation fault
    $ exit                                         # now we're out of the runshell again
    $ /git-annex.linux/lib/ld-linux.so.3
    Usage: ld.so [OPTION]... EXECUTABLE-FILE [...]

Something in the environment is breaking things. My current stage of drilling is that I can run the variables-expanded version of [[!toggle text=tar id=tarcommand]] [[!toggleable id=tarcommand """ `GIT_ANNEX_PROGRAMPATH=tar ./git-annex.linux/exe/tar --library-path /data/data/com.termux/files/home/git-annex.linux//usr/lib/arm-linux-gnueabi/gconv:/data/data/com.termux/files/home/git-annex.linux//usr/lib/arm-linux-gnueabi/audit:/data/data/com.termux/files/home/git-annex.linux//etc/ld.so.conf.d:/data/data/com.termux/files/home/git-annex.linux//lib:/data/data/com.termux/files/home/git-annex.linux//lib/arm-linux-gnueabi:/data/data/com.termux/files/home/git-annex.linux//usr/lib/arm-linux-gnueabi: ./git-annex.linux/shimmed/tar/tar --help` """]] successfully from the outside but not from within runshell. Will update when I've found more.

Comment by https://christian.amsuess.com/chrysn — Wed Oct 29 14:05:27 2025
comment 8
My phone is an ARMv7, according to /proc/cpuinfo in Termux, so armel would be the correct package? That is the one I have installed..
Comment by CandyAngel — Wed Oct 29 14:05:27 2025
comment 7

@CandyAngel git-annex.linux/bin/sh is included in the bundle. If proot cannot run it, it seems likely that you have downloaded a build of git-annex that does not match the CPU architecure of your Android device. While most Android devices are arm, some use intel or mips..

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

Are the instructions complete/correct? I get an error when following them and trying to execute runshell. Seems to be looking in the wrong place for /bin/sh.

    $ git-annex.linux/runshell
    proot-error: execve("/data/data/com.termux/files/home/git-annex.linux/bin/sh"): No such file or directory

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

We now have a workaround that seems to work, `pkg install proot` and use proot to run git-annex. Tomorrrow's daily build of the git-annex standalone bundle will do that automatically.

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

@hobbes, that error means Android's system call filter has blocked a system call that's needed to run git-annex, unfortunately.

Comment by joey — Wed Oct 29 14:05:27 2025
Works now!!
Thanks a lot @joey, after running `termux-fix-shebang git-annex.linux/bin/*` this new build works!
Comment by branchable — Wed Oct 29 14:05:27 2025
comment 21

Well, I see the signal 11 too, on my arm64 phone running LineageOS Android 8.1. Some others had earlier reported it worked on arm64, but perhaps newer versions of Android don't or whatever.

I made a test arm64 build, and it does work. Get it here: https://tmp.joeyh.name/git-annex-arm64-test-build/

(I also had to run termux-fix-shebang as described above.)

I do not yet have an arm64 autobuilder running, todo for that is arm64 autobuilder -- if anyone has an arm64 machine that could run the autobuilder, that would help!

Comment by joey — Wed Oct 29 14:05:27 2025
aarch64 still broken, please help
@joey, any update on this signal 11 issue? Currently we aarch64 users are completely stuck, AFAICS. Thanks!
Comment by branchable — Wed Oct 29 14:05:27 2025
Bad system call fix

Found this issue thread:

https://github.com/termux/termux-packages/issues/420

which had the solution to this particular issue! Yay \o/! Needed to call

    unset LD_PRELOAD

I'm noticing that the arm builds are missing now (current 403s, autobuild 404s), but maybe that's intentional for now? Either way, I have gotten past the bad system call issue with `runshell`, but now when I try to run `git annex webapp` I get...

    fatal: 'annex' appears to be a git command, but we were not able to execute it. Maybe you need to 'pkg install perl'?

I ran `pkg install perl`, but I get the same message :(. Either way, I'm glad this seems to be moving forward, and very excited that I might finally be able to put git-annex back on my phone after all these years!

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

@hobbes we're working on that issue, which seems likely to involve arm64, here: https://github.com/termux/termux-packages/issues/420

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

@Teyras, I think this would be possible, but you'd have to get gpg and git-remote-gcrypt installed and working in that environment.

Comment by joey — Wed Oct 29 14:05:27 2025
gcrypt support
Is it possible to use gcrypt remotes when running git-annex in Termux?
Comment by Teyras — Wed Oct 29 14:05:27 2025
samee here
Aarch64 incurs signal 11
Comment by msloco — Wed Oct 29 14:05:27 2025
still broken on aarch64

I didn't explicitly mention it in my last comment (only in the issue I linked to), but I had already applied the `termux-fix-shebang` fix. Whilst this helps resolve the other issue, it does not help with the fact that `./git-annex.linux/lib/ld-linux.so.3` is a 32-bit binary which crashes with a segfault (SIG11) when run via `runshell`.

So this is still broken for me :-( Has anyone else had better luck on aarch64 (ARM v8) ?

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

Running

    termux-fix-shebang git-annex.linux/bin/*

actually seems to have fixed my installation. `runshell` and `webapp` both execute now, with webapp bringing up the browser.

Comment by CandyAngel — Wed Oct 29 14:05:27 2025
Not working on OnePlus 5T either

As I mentioned in Package request: git-annex · Issue #420 · termux/termux-packages just now, I also get:

    % ./git-annex.linux/runshell
    proot info: vpid 1: terminated with signal 11

Some further digging suggests that this is due to the architecture mismatch between my OnePlus 5T which is aarch64, and the linker which is 32-bit:

    % PROOT_VERBOSE=9 ./git-annex.linux/runshell |& tail -n3
    proot info: vpid 1: translate("/" + "/data/data/com.termux/files/home/git-annex.linux/lib/ld-linux.so.3")
    proot info: vpid 1:          -> "/data/data/com.termux/files/home/git-annex.linux/lib/ld-linux.so.3"
    proot info: vpid 1: terminated with signal 11
    % file /data/data/com.termux/files/home/git-annex.linux/lib/ld-linux.so.3
    /data/data/com.termux/files/home/git-annex.linux/lib/ld-linux.so.3: ELF 32-bit LSB pie executable ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[sha1]=59819e8e8c922b822204d3778cd4d6c843422462, stripped
    % termux-info
    Updatable packages:
    All packages up to date
    System information:
    Linux localhost 4.4.78-perf+ #1 SMP PREEMPT Wed Jun 13 17:23:58 CST 2018 aarch64 Android
    Termux-packages arch:
    aarch64
    Android version:
    8.1.0
    Device manufacturer:
    OnePlus
    Device model:
    ONEPLUS A5010

Comment by branchable — Wed Oct 29 14:05:27 2025
Not working on OnePlus 6

I copied and pasted the instructions, here is my output:

https://pastebin.com/ZVJ7uSeU

Almoços for including my entire session, the relevant error is at the bottom.

I'm fairly certain this device has ARM64 arch.

Comment by bqone — Wed Oct 29 14:05:27 2025
Termux Error

I followed the instruction to install git-annex on my Lenovo Vibe K4 running Android 6

At first I got the error `/bin/sh/ is missing`, which I worked around with termux-fix-shebang on runshell. Now I am getting this error.

`proot info: vpid 1: terminated with signal 11`

Please advice.

Comment by madapeedikakkaran — Wed Oct 29 14:05:27 2025
Platform addendum for "Debugging "No such file or directory""
Probably should have given some platform details to my findings that proot is counter-productive on my device: I'm running LineageOS 14.1-20180206-NIGHTLY-gts210vewifi (LineageOS API level 7, Android 7.1.2, Kernel 3.10.102) on a Samsung SM-T813 (arm64).
Comment by https://christian.amsuess.com/chrysn — Wed Oct 29 14:05:27 2025
Debugging "No such file or directory"

Setting all the environment variables from inside still did not break the tar execution; last resort was disabling proot in runshell. I still had to keep the termux-fix-shebang workaround.

    $ ./git-annex.linux/runshell
    $ mkdir test; cd test
    $ git init
    $ git annex init

From a first glance, things appear to be working now. I had to run termux-fix-shebang on the `.git/hooks/*` and set TMPDIR=something-that-actually-exists, but short of that, local adding and committing as well as moving data around.

Joey, you mentioned ghc runtime issues when introducing proot. Anything particular I should test?

Comment by https://christian.amsuess.com/chrysn — Wed Oct 29 14:05:27 2025
Bad system call

This line causes termux to say "Bad System Call"

git-annex.linux/runshell

It also first complained about /bin/sh being missing, but stopped after restarting termux.

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