2018-10-13 16:10:58 +00:00
|
|
|
git-annex is available for Android inside Termux. This includes the
|
2013-05-03 16:29:52 +00:00
|
|
|
[[git-annex assistant|/assistant]], for easy syncing between your Android
|
2013-07-30 17:54:03 +00:00
|
|
|
and other devices. You do not need to root your Android to use git-annex.
|
2013-05-03 16:29:52 +00:00
|
|
|
|
2019-04-09 21:52:41 +00:00
|
|
|
(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.)
|
|
|
|
|
2018-10-13 16:10:58 +00:00
|
|
|
[[!toc ]]
|
2013-05-03 16:29:52 +00:00
|
|
|
|
2018-10-13 16:10:58 +00:00
|
|
|
## Installation
|
2013-05-03 16:29:52 +00:00
|
|
|
|
2018-10-13 16:10:58 +00:00
|
|
|
First, install [Termux](https://termux.com/). This is an Android app that can
|
|
|
|
run some Linux software in a terminal, including git-annex.
|
2013-05-03 16:53:52 +00:00
|
|
|
|
2018-10-13 16:10:58 +00:00
|
|
|
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
|
2018-10-16 15:23:31 +00:00
|
|
|
wget https://git-annex.branchable.com/install/Android/git-annex-install
|
2018-10-22 17:22:10 +00:00
|
|
|
source git-annex-install
|
2018-10-13 16:10:58 +00:00
|
|
|
|
|
|
|
## 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"]]
|
2013-05-03 17:16:03 +00:00
|
|
|
|
2018-10-13 16:10:58 +00:00
|
|
|
## Closing and reopening the webapp
|
2013-05-03 16:29:52 +00:00
|
|
|
|
|
|
|
The webapp does not need to be left open after you've set up your
|
2018-10-13 16:10:58 +00:00
|
|
|
repository. As long as Termux is left open, git-annex will
|
|
|
|
remain running and sync your files.
|
2013-05-03 16:29:52 +00:00
|
|
|
|
2018-10-13 16:10:58 +00:00
|
|
|
## Starting at power on
|
2013-05-03 16:29:52 +00:00
|
|
|
|
2018-10-13 16:52:41 +00:00
|
|
|
If you install the [Termux:Boot app](https://wiki.termux.com/wiki/Termux:Boot),
|
2018-10-26 17:51:15 +00:00
|
|
|
git-annex will be automatically started when your Android device
|
2018-10-13 16:52:41 +00:00
|
|
|
powers on. It will run in the background in whatever repositories you have
|
|
|
|
set up in the webapp.
|
2013-05-03 16:29:52 +00:00
|
|
|
|
2018-10-13 16:10:58 +00:00
|
|
|
## Using the command line
|
2013-05-03 16:29:52 +00:00
|
|
|
|
2018-10-13 16:10:58 +00:00
|
|
|
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:
|
2013-05-03 16:29:52 +00:00
|
|
|
|
2018-10-13 16:10:58 +00:00
|
|
|
cd ~/storage/dcim
|
|
|
|
git init
|
|
|
|
git annex init
|
2013-05-03 16:29:52 +00:00
|
|
|
|
2018-10-13 16:10:58 +00:00
|
|
|
You can go on to set up a ssh remote pointing to a server, and sync
|
|
|
|
your files to and from it.
|
2013-05-03 16:29:52 +00:00
|
|
|
|
2018-10-13 16:10:58 +00:00
|
|
|
And so on. Most ways you would use git-annex on a Linux system work fairly
|
|
|
|
well in the Termux environment.
|
2013-05-03 16:29:52 +00:00
|
|
|
|
2018-10-13 16:10:58 +00:00
|
|
|
## Upgrading
|
2013-05-03 17:15:24 +00:00
|
|
|
|
2018-10-16 15:23:31 +00:00
|
|
|
To upgrade to a new git-annex release, just run `git-annex-install` again.
|