7b6d0da9b8
As well as adding the necessary methods, a few other changes to the adb remote: * Use ".annextmp" extension for temp files, to avoid conflict with other temp files. * Stop using "echo $?" to get exit status of command inside adb. There were two problems; first the "echo" just before it meant it was always 0! And secondly, it seems kind of random on my phone whether it's 1 or 0, not dependant on whether the command seems to have succeeded.
61 lines
2 KiB
Markdown
61 lines
2 KiB
Markdown
git-annex is available for Android inside Termux. This includes the
|
|
[[git-annex assistant|/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 [[tips/android_sync_with_adb]] for instructions
|
|
on using git-annex that way.)
|
|
|
|
[[!toc ]]
|
|
|
|
## Installation
|
|
|
|
First, install [Termux](https://termux.com/). 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
|
|
|
|
## Starting git-annex
|
|
|
|
To start git-annex, just run "git annex webapp" inside Termux.
|
|
A browser window will open with the git-annex interface.
|
|
|
|
[[!img webapp.png alt="git-annex webapp"]]
|
|
|
|
## 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 is left open, git-annex will
|
|
remain running and sync your files.
|
|
|
|
## Starting at power on
|
|
|
|
If you install the [Termux:Boot app](https://wiki.termux.com/wiki/Termux:Boot),
|
|
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. 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
|
|
|
|
To upgrade to a new git-annex release, just run `git-annex-install` again.
|