summaryrefslogtreecommitdiff
path: root/doc/design/assistant/android.mdwn
blob: 170a45a0ff10b36141e464ef0f6205aa6ae57845 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
### goals

1. Get git-annex working at the command line in Android,
   along with all the programs it needs.
2. Get the webapp and assistant working. A hopefully small Java app will be
   developed, which runs the webapp daemon, and a web browser to display it.

Current status: git-annex can be built for Android, with `make android`.
You need <https://github.com/neurocyte/ghc-android> installed first,
and also have to `cabal install` all necessary dependencies.

### TODO

* port rsync
* port busybox, so it doesn't need KBOX's busybox
* port gpg
* port ssh, so it doesn't need KBOX's version
  (probably use dropbear, only outgoing is likely to work due to firewall)
* Make a runshell wrapper for Android, setting paths, etc.
* Build a standalone tarball for Android.
* Make build system that can generate ports, and tarball, from source
  checkouts.

* git-annex sets `#!/bin/sh` in hook script, but that is not
  a valid path on android, and the right path needs to be determined at runtime.

### Android specific features

The app should be aware of power status, and avoid expensive background
jobs when low on battery or run flat out when plugged in.

The app should be aware of network status, and avoid expensive data
transfers when not on wifi. This may need to be configurable.

### FAT

Due to use of the FAT filesystem, which doesn't do symlinks, [[desymlink]]
is probably needed for at least older Android devices that have SD cards.

### Porting notes

#### git

To build git, you can use the C cross compiler installed by ghc-android.
I did so like this:

	PATH=~/.ghc/android-14/arm-linux-androideabi-4.7/bin:$PATH NO_OPENSSL=1 NO_GETTEXT=1 NO_GECOS_IN_PWENT=1 NO_GETPASS=1 NO_NSEC=1 NO_MKDTEMP=1 NO_PTHREADS=1 NO_PERL=1 NO_CURL=1 NO_EXPAT=1 NO_TCLTK=1 NO_ICONV=1 make

This required first making cc a symlink to arm-linux-androideabi-gcc