update android docs for termux

This commit was sponsored by John Pellman on Patreon.
This commit is contained in:
Joey Hess 2018-10-13 12:10:58 -04:00
parent d14983ee68
commit b72f1e1b48
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
22 changed files with 63 additions and 125 deletions

View file

@ -1,53 +1,66 @@
git-annex is now available for Android. This includes the
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.
[[Android installation instructions|/install/android]]
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.
[[!img apps.png alt="two windows"]]
[[!toc ]]
## closing and reopening the webapp
## 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.sh
sh git-annex-install.sh
## 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 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 [[!img newwindow.png alt="New Window"]] icon in the terminal window.
repository. As long as Termux is left open, git-annex will
remain running and sync your files.
## starting git-annex
## Starting at power on
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.
If you install the Termux:Boot app, git-annex will automatically
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. (Or have listed in (or listed in
~/.config/git-annex/autostart)
## stopping git-annex
## Using the command line
Simply close the terminal window to stop git-annex from running.
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:
## using the command line
cd ~/storage/dcim
git init
git annex init
[[!img terminal.png alt="Android terminal"]]
You can go on to set up a ssh remote pointing to a server, and sync
your files to and from it.
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`.
And so on. Most ways you would use git-annex on a Linux system work fairly
well in the Termux environment.
To prevent the webapp from being automatically started
when a terminal window opens, go into the terminal preferences, to "Initial
Command", and clear out the default `git annex webapp` setting.
# Known limitations
Or, if you'd like to run the assistant automatically, but not open the
webapp, change the "Initial Command" to: `git annex assistant --autostart`
* Direct mode
## using from adb shell
git-annex will probably default to direct mode due to the
limitations of Android's /sdcard. You can get around this using v6
unlocked repositories, or by putting the git-annex repository on a better
filesystem on the Android device, such as your termux home directory.
To set up the git-annex environment from within `adb shell`, run:
`/data/data/ga.androidterm/runshell`
## Upgrading
This will launch a shell that has git-annex, git, etc in PATH.
To upgrade to a new git-annex release, just run `git-annex-install.sh` again.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1,009 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

View file

@ -1,45 +1,7 @@
Now git-annex can be used on Android!
[[Documentation for using git-annex on Android|/android]]
See [[/Android]] for installation instructions and other details.
## Termux
This just in: git-annex can be used in Termux, instead of using the Android
app below. [[Give git-annex in Termux a try|tips/install_on_Android_in_Termux/]]
## (Old) Android app
This app is being deprecated in favor of Termux. It doesn't work with newer
versions of Android.
To install it, first, ensure your Android device is configured to allow
installation of the app. Go to Setup -> Security, and enable "Unknown
Sources".
Then download the git-annex.apk for your version of Android, and
open it to install.
* [Android 5.0 git-annex.apk](http://downloads.kitenet.net/git-annex/android/current/5.0/git-annex.apk)
* [Android 4.4 and 4.3 git-annex.apk](http://downloads.kitenet.net/git-annex/android/current/4.3/git-annex.apk)
* [Android 4.0 to 4.2 git-annex.apk](http://downloads.kitenet.net/git-annex/android/current/4.0/git-annex.apk)
## autobuilds
A daily build is also available, thanks to Mesar Hameed and the University
of Bath CS department.
* [Android 5.0 git-annex.apk](http://downloads.kitenet.net/git-annex/autobuild/android/5.0/git-annex.apk)
* [Android 4.4 and 4.3 git-annex.apk](http://downloads.kitenet.net/git-annex/autobuild/android/4.3/git-annex.apk)
* [Android 4.0 to 4.2 git-annex.apk](http://downloads.kitenet.net/git-annex/autobuild/android/4.0/git-annex.apk)
* [build logs](http://downloads.kitenet.net/git-annex/autobuild/android/)
## building it yourself
git-annex can be built from source for Android.
1. Run `standalone/android/buildchroot` as root (requires debootstrap).
This builds a chroot with a `builder` user.
The rest of the build will run in this chroot as that user.
2. In the chroot, run `standalone/android/install-haskell-packages`
3. Finally, once the chroot is set up, you can build an Android binary
with `make android`, and `make androidapp` will build the complete APK.
The way it works now is the [[Linux_standalone]] builds of git-annex are run
inside the Termux app. The old git-annex Android app,
is no longer being updated, details about it are at [[oldapp]].

View file

@ -0,0 +1,11 @@
## Old Android app
This app is being deprecated in favor of Termux. It doesn't work with newer
versions of Android.
**These builds are not being updated.** They are provided just in case
someone needs them, but use at your own risk.
* [Android 5.0 git-annex.apk](http://downloads.kitenet.net/git-annex/android/current/5.0/git-annex.apk)
* [Android 4.4 and 4.3 git-annex.apk](http://downloads.kitenet.net/git-annex/android/current/4.3/git-annex.apk)
* [Android 4.0 to 4.2 git-annex.apk](http://downloads.kitenet.net/git-annex/android/current/4.0/git-annex.apk)

View file

@ -1,49 +1 @@
[Termux](https://termux.com/) is an Android app that can run some
Linux software in a terminal.
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.sh
sh git-annex-install.sh
Now you can set up a git-annex repository or two, to manage your
Android files. To avoid typing any more, you can start up the
git-annex webapp and set things up in there:
git annex webapp
Or you can continue using git-annex at the command line. 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 this Termux environment.
## Starting on boot
If you install the Termux:Boot app, git-annex will also integrate with it.
Repositories you create with the webapp (or listed in
~/.config/git-annex/autostart) will have the assistant started in them on
boot, so you don't need to start it manually.
## Known limitations
* Direct mode
git-annex will probably default to direct mode due to the
limitations of Android's /sdcard. You can get around this using v6
unlocked repositories, or by putting the git-annex repository on a better
filesystem on the Android device, such as your termux home directory.
## Upgrading
To upgrade to a new git-annex release, just run
`git-annex-install.sh` again.
The content that was here has moved to [[Android]].