goals
- Get git-annex working at the command line in Android, along with all the programs it needs, and the assistant. done
- Deal with crippled filesystem; no symlinks; etc. done
- Get an easy to install Android app built. done
- Get the webapp working. Needs Template Haskell, or switching to http://www.yesodweb.com/blog/2012/10/yesod-pure.
- Possibly, switch from running inside terminal app to real standalone app. See https://github.com/neurocyte/android-haskell-activity and https://github.com/neurocyte/foreign-jni.
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.
TODO
- autostart any configured assistants. Best on boot, but may need to only do it when app is opened for the first time.
- Don't make app initially open terminal, but go to a page that allows opening the webapp or terminal.
- I have seen an assistant thread crash with an interrupted system call when the device went to sleep while it was running. Auto-detect and deal with that somehow.
- Make git stop complaining that "warning: no threads uspport, ignoring --threads"
- git does not support http remotes. To fix, need to port libcurl and allow git to link to it.
- getEnvironment is broken on Android https://github.com/neurocyte/ghc-android/issues/7 and a few places use it.
- XMPP support. I got all haskell libraries installed, but it fails to find several C libraries at link time.
- Get local pairing to work. network-multicast and network-info don't currently install.
- Get test suite to pass. Current failure is because
git fetch
is somehow broken with local repositories.
mount
requires root and you'll have still the 4gb limit for your image by FAT. some phones (e.g. galaxy nexus) already useext4
for/sdcard
though.I played around a bit with GHC and Android today. It isn't really a result, but maybe useful for someone out there.
I have a Debian
chroot
environment on my Android device (howto: http://www.saurik.com/id/10/). In the Debian box:well, that isn't really static. tell the linker to build a static binary (those are arguments to
ld
):now, get this (quite big) binary into the normal android environment, using
adb
,SSHDroid
or whatever:looking in the source of
System.IO
it seems like aniconv
issue. So, there's still some dynamic dependency in there... sighThanks Bernard, that's really massively useful. It makes sense -- statically building with libc should work, the Android kernel is still Linux after all.
To get past the iconv problem, I think all you need is part of the
locales
package from your linux system installed on the Android. Probably just a few of the data files from /usr/share/i18n/charmaps//usr/share/i18n/
does not exists on my Debian ARM system :/however,
strace ./arm
in the debian chroot reveals that some files from/usr/lib/gconv/
are loaded:full log: http://wien.tomnetworks.com/strace_arm. Unfortunately, I don't have
strace
in the android userland for comparison.Just copying the related
gconv
files didn't work. I don't have so much time at the moment, I'll investigate further in some days or so.At least, output using
error :: String -> a
does work :-)Just so this does not get lost: For better or for worse, the vanilla Android devices stopped shipping with micro-SD support in 2011 (or 2010 if the Nexus S does not support them either; on sketchy GPRS so not googling around). Most higher-end Android devices ship with at least 8 GiB of on-board Flash storage, some even go up to 64 GiB.
IMHO, this would make it viable to first get git-annex working on Android without regard for FAT.
The obvious advantage is that porting should be easier and quicker.
The obvious downside is that this may mean revisiting some parts of the code later.
-- Richard
Actually, this is something that would be ideal for a poll:
Should FAT-based Android repos be implemented:
Also, as another data point, the FAT-based SD card can be mounted as USB storage by any computer an Android device is connected to whereas the EXT4-based root FS can only be accessed via MTP.
I use Terminal IDE on android, which is 'sort of a shell environment'.
It has bash, git, dropbear ssh, and vim. It is a bit limited, but it does feel like a linux shell.
I'd like to have my phone sync a bunch of files when I'm at home and when I get to work, have them synced to my work machine, deleted off my phone and when I get home, also deleted off my home machine.
This will allow incremental backups to a local folder at home and I can then "mule" my files, sneaker-net style, to work with zero user intervention. It only works if events can be triggered or I can combine a triggering app with a special android intent for both ends of my trip.