diff options
19 files changed, 263 insertions, 112 deletions
@@ -241,22 +241,7 @@ ANDROIDAPP_DEST=$(GIT_ANNEX_TMP_BUILD_DIR)/git-annex.android androidapp: $(MAKE) android $(MAKE) -C standalone/android - - rm -rf "$(ANDROIDAPP_DEST)" - install -d "$(ANDROIDAPP_DEST)" - - cp -aR standalone/android/git-annex-bundle "$(ANDROIDAPP_DEST)" - cp -a standalone/android/runshell "$(ANDROIDAPP_DEST)" - install -d "$(ANDROIDAPP_DEST)/git-annex-bundle/bin" - cp git-annex "$(ANDROIDAPP_DEST)/git-annex-bundle/bin/" - - $$HOME/.ghc/android-14/arm-linux-androideabi-4.7/bin/arm-linux-androideabi-strip "$(ANDROIDAPP_DEST)"/git-annex-bundle/bin/* - - ln -sf git-annex "$(ANDROIDAPP_DEST)/git-annex-bundle/bin/git-annex-shell" - zcat standalone/licences.gz > $(ANDROIDAPP_DEST)/git-annex-bundle/LICENSE - install -d "$(ANDROIDAPP_DEST)/git-annex-bundle/templates" - - cd $(ANDROIDAPP_DEST) && tar czf ../git-annex-android.tar.gz . + cp standalone/android/source/term/bin/Term-debug.apk $(GIT_ANNEX_TMP_BUILD_DIR)/git-annex.apk # used by ./ghci getflags: diff --git a/doc/assistant/android/appinstalled.png b/doc/assistant/android/appinstalled.png Binary files differnew file mode 100644 index 000000000..9ab6c5a61 --- /dev/null +++ b/doc/assistant/android/appinstalled.png diff --git a/doc/assistant/android/install.png b/doc/assistant/android/install.png Binary files differnew file mode 100644 index 000000000..219fc1807 --- /dev/null +++ b/doc/assistant/android/install.png diff --git a/doc/assistant/android/terminal.png b/doc/assistant/android/terminal.png Binary files differnew file mode 100644 index 000000000..eb368bdbd --- /dev/null +++ b/doc/assistant/android/terminal.png diff --git a/doc/design/assistant/android.mdwn b/doc/design/assistant/android.mdwn index a8ed891bb..b1b3c3a35 100644 --- a/doc/design/assistant/android.mdwn +++ b/doc/design/assistant/android.mdwn @@ -2,9 +2,8 @@ 1. Get git-annex working at the command line in Android, along with all the programs it needs, and the assistant. **done** +2. Get an easy to install Android app built. **done** 2. Get the webapp working. Needs Template Haskell, or a workaround. -3. A hopefully small Java app will be developed, which runs the - webapp daemon, and a web browser to display it. ### Android specific features @@ -20,3 +19,15 @@ 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. Additionally, cripped filesystem mode is needed, to avoid hard links, file modes, etc. + +## TODO + +* webapp +* 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" diff --git a/doc/design/assistant/blog/day_195__real_android_app.mdwn b/doc/design/assistant/blog/day_195__real_android_app.mdwn new file mode 100644 index 000000000..f97f8841c --- /dev/null +++ b/doc/design/assistant/blog/day_195__real_android_app.mdwn @@ -0,0 +1,32 @@ +Well, it's built. [Real Android app for git-annex](http://downloads.kitenet.net/git-annex/android/current/). + +[[!img /assistant/android/appinstalled.png]] + +When installed, this will open a terminal in which you have access to +git-annex and all the git commands and busybox commands as well. No webapp +yet, but command line users should feel right at home. + +[[!img /assistant/android/terminal.png]] + +Please test it out, at least as far as installing it, opening the terminal, +and checking that you can run `git annex`; I've only been able to test on +one Android device so far. I'm especially keen to know if it works with +newer versions of Android than 4.0.3. (I know it only supports arm based +Android, no x86 etc.) Please comment if you tried it. + +---- + +Building this went mostly as planned, although I had about 12 builds of +the app in the middle which crashed on startup with no error message ora +logs. Still, it took only one day to put it all together, + and I even had time to gimp up a quick icon. (Better icons welcome.) + +Kevin thinks that my space-saving hack won't work on all Androiden, and he +may be right. If the `lib` directory is on a different filesystem on some +devices, it will fail. But I used it for now anyhow. Thanks to the hack, +the 7.8 mb compressed .apk file installs to use around 23 mb of disk space. + +---- + +Tomorrow: Why does `git-annex assistant` on Android re-add all existing +files on startup? diff --git a/doc/install.mdwn b/doc/install.mdwn index e1e055a75..589c71adc 100644 --- a/doc/install.mdwn +++ b/doc/install.mdwn @@ -3,6 +3,7 @@ [[!table format=dsv header=yes data=""" detailed instructions | quick install [[OSX]] | [download git-annex.app](http://downloads.kitenet.net/git-annex/OSX/current/) +[[Android]] | [download git-annex.apk](http://downloads.kitenet.net/git-annex/android/current/) **beta** [[Linux|linux_standalone]] | [download prebuilt linux tarball](http://downloads.kitenet.net/git-annex/linux/) [[Debian]] | `apt-get install git-annex` [[Ubuntu]] | `apt-get install git-annex` @@ -14,7 +15,6 @@ detailed instructions | quick install [[ScientificLinux5]] | (and other RHEL5 clones like CentOS5) [[openSUSE]] | Windows | [[sorry, Windows not supported yet|todo/windows_support]] -[[Android]] | """]] ## Using cabal diff --git a/doc/install/Android.mdwn b/doc/install/Android.mdwn index 120e2453b..5936bfa7d 100644 --- a/doc/install/Android.mdwn +++ b/doc/install/Android.mdwn @@ -1,31 +1,17 @@ git-annex can be used on Android, however you need to know your way around -the command line to install and use it. (An Android app may be developed -eventually.) +the command line to install and use it. (Hope to get the webapp working eventually.) -## prebuilt tarball +## android app -Download the [prebuilt tarball](http://downloads.kitenet.net/git-annex/android/). -Instructions below assume it was downloaded to `/sdcard/Download`, which -is the default if you use the web browser for the download. +First, ensure your Android device is configured to allow installation of +non-Market apps. Go to Setup -> Security -> and enable "Unknown Sources". -To use this tarball, you need to install either -[KBOX](http://kevinboone.net/kbox.html) or -[Terminal IDE](https://play.google.com/store/apps/details?id=com.spartacusrex.spartacuside) -(available in Google Play). -This is both to get a shell console, as well as a location under -`/data` where git-annex can be installed. +Download the [git-annex.apk](http://downloads.kitenet.net/git-annex/android/current/) +onto your Android device, and open it to install. -Open the console app you installed, and enter this command: - - cd $(which sh)/..; tar xf /sdcard/Download/git-annex-android.tar.gz - -Now git-annex is installed, but to use it you need to enter a special -shell environment: - - runshell - -Now you have git-annex, git, and some other utilities available, and can -do everything in the [[walkthrough]] and more. +When you start the Git Annex app, it will dump you into terminal. +From here, you can run git-annex, as well as many standard git and unix commands +provided with the app. You can do everything in the [[walkthrough]] and more. ## building it yourself @@ -35,3 +21,7 @@ and also have to `cabal install` all necessary dependencies. This is not yet an easy process. You also need to install git and all the utilities listed on [[fromscratch]]. + +Then to build the full Android app bundle, use `make androidapp`. You will +need to have the Android SDK and NDK installed; edit +`standalone/android/Makefile` to configure the paths to them. diff --git a/standalone/android/.gitignore b/standalone/android/.gitignore new file mode 100644 index 000000000..7461b11d3 --- /dev/null +++ b/standalone/android/.gitignore @@ -0,0 +1 @@ +build-utils diff --git a/standalone/android/Makefile b/standalone/android/Makefile index 13cbf2322..e6ed1e992 100644 --- a/standalone/android/Makefile +++ b/standalone/android/Makefile @@ -1,13 +1,67 @@ -# Cross-compiles utilities needed for git-annex on Android. +# Cross-compiles utilities needed for git-annex on Android, +# and builds the Android app. # Add Android cross-compiler to PATH (as installed by ghc-android) # (This directory also needs to have a cc that is a symlink to the prefixed # gcc cross-compiler executable.) PATH:=$(HOME)/.ghc/android-14/arm-linux-androideabi-4.7/bin:$(PATH) -build: source - mkdir -p git-annex-bundle/bin +# Paths to the Android SDK and NDK. +export ANDROID_SDK_ROOT=$(HOME)/tmp/adt-bundle-linux-x86/sdk +export ANDROID_NDK_ROOT=$(HOME)/tmp/android-ndk-r8d +GITTREE=source/git/installed-tree + +build: source build-utils + # Debug build because it does not need signing keys. + cd source/term && tools/build-debug + + # Install executables as pseudo-libraries so they will be + # unpacked from the .apk. + mkdir -p source/term/libs/armeabi + cp ../../git-annex source/term/libs/armeabi/lib.git-annex.so + cp source/busybox/busybox source/term/libs/armeabi/lib.busybox.so + cp source/openssh/ssh source/term/libs/armeabi/lib.ssh.so + cp source/openssh/ssh-keygen source/term/libs/armeabi/lib.ssh-keygen.so + cp source/rsync/rsync source/term/libs/armeabi/lib.rsync.so + cp source/gnupg/g10/gpg source/term/libs/armeabi/lib.gpg.so + cp source/git/git source/term/libs/armeabi/lib.git.so + cp source/git/git-shell source/term/libs/armeabi/lib.git-shell.so + cp source/git/git-upload-pack source/term/libs/armeabi/lib.git-upload-pack.so + arm-linux-androideabi-strip --strip-unneeded --remove-section=.comment --remove-section=.note source/term/libs/armeabi/* + cp runshell source/term/libs/armeabi/lib.runshell.so + + # remove git stuff we don't need to save space + rm -rf $(GITTREE)/bin/git-cvsserver \ + $(GITTREE)/libexec/git-core/git-daemon \ + $(GITTREE)/libexec/git-core/git-show-index \ + $(GITTREE)/libexec/git-core/mergetools \ + $(GITTREE)/libexec/git-core/git-credential-* \ + $(GITTREE)/libexec/git-core/git-cvsserver \ + $(GITTREE)/libexec/git-core/git-cvsimport \ + $(GITTREE)/libexec/git-core/git-fast-import \ + $(GITTREE)/libexec/git-core/git-http-backend \ + $(GITTREE)/libexec/git-core/git-imap-send \ + $(GITTREE)/libexec/git-core/git-instaweb \ + $(GITTREE)/libexec/git-core/git-p4 \ + $(GITTREE)/libexec/git-core/git-remote-test* \ + $(GITTREE)/libexec/git-core/git-submodule \ + $(GITTREE)/libexec/git-core/git-svn \ + $(GITTREE)/libexec/git-core/git-web--browse + # Most of git is in one multicall binary, but a few important + # commands are still shell scripts. Those are put into + # a tarball, along with a list of all the hard links that should be + # set up. + cd $(GITTREE) && mkdir -p links + cd $(GITTREE) && find -samefile bin/git > links/git + cd $(GITTREE) && find -samefile bin/git-shell > links/git-shell + cd $(GITTREE) && find -samefile bin/git-upload-pack > links/git-upload-pack + cd $(GITTREE) && find -type f -not -samefile bin/git -not -samefile bin/git-shell -not -samefile bin/git-upload-pack|tar czf ../git.tar.gz -T - + cp source/git/git.tar.gz source/term/libs/armeabi/lib.git.tar.gz.so + + cd source/term && ant debug + +build-utils: source cd source/openssl && CC=$$(which cc) ./Configure android cd source/openssl && $(MAKE) @@ -18,27 +72,36 @@ build: source cd source/openssh && sed -i -e 's/getrrsetbyname.o //' openbsd-compat/Makefile cd source/openssh && sed -i -e 's/auth-passwd.o //' Makefile cd source/openssh && $(MAKE) ssh ssh-keygen - cp -a source/openssh/ssh source/openssh/ssh-keygen git-annex-bundle/bin/ cp busybox_config source/busybox/.config cd source/busybox && yes '' | $(MAKE) oldconfig cd source/busybox && $(MAKE) - cp -a source/busybox/busybox git-annex-bundle/bin/ - cd source/git && $(MAKE) install 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 prefix= DESTDIR=../../git-annex-bundle - rm -f git-annex-bundle/bin/git-cvsserver + cd source/git && $(MAKE) install 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 prefix= DESTDIR=installed-tree cd source/rsync && git reset --hard origin/master && git am < ../../rsync.patch cp source/automake/lib/config.sub source/automake/lib/config.guess source/rsync/ cd source/rsync && ./configure --host=arm-linux-androideabi --disable-locale --disable-iconv-open --disable-iconv --disable-acl-support --disable-xattr-support cd source/rsync && $(MAKE) - cp -a source/rsync/rsync git-annex-bundle/bin/ cd source/gnupg && git checkout gnupg-1.4.13 cd source/gnupg && ./autogen.sh cd source/gnupg && ./configure --host=arm-linux-androideabi --disable-gnupg-iconv --enable-minimal --disable-card-support --disable-agent-support --disable-photo-viewers --disable-keyserver-helpers --disable-nls cd source/gnupg; $(MAKE) || true # expected failure in doc build - cp -a source/gnupg/g10/gpg git-annex-bundle/bin/ + + cd source/term && git reset --hard + cd source/term && patch -p1 <../../term.patch + (cd icons && tar c .) | (cd source/term/res && tar x) + # This renaming has a purpose. It makes the path to the app's + # /data directory shorter, which makes ssh connection caching + # sockets placed there have more space for their filenames. + # Also, it avoids overlap with the Android Terminal Emulator + # app, if it's also installed. + cd source/term && find -name .git -prune -o -type f -print0 | xargs -0 perl -pi -e 's/jackpal/ga/g' + cd source/term && perl -pi -e 's/Terminal Emulator/Git Annex/g' res/*/strings.xml + cd source/term && tools/update.sh + + touch build-utils source: mkdir -p source @@ -49,14 +112,17 @@ source: git clone git://git.gnupg.org/gnupg.git source/gnupg git clone git://git.openssl.org/openssl source/openssl git clone git://github.com/CyanogenMod/android_external_openssh.git source/openssh + git clone git://github.com/jackpal/Android-Terminal-Emulator.git source/term clean: + rm -rf $(GITTREE) build-utils cd source/busybox && $(MAKE) clean - cd source/openssl && $(MAKE) clean + #cd source/openssl && $(MAKE) clean cd source/openssh && $(MAKE) clean cd source/git && $(MAKE) clean cd source/rsync && $(MAKE) clean cd source/gnupg && $(MAKE) clean + cd source/term && ant clean reallyclean: rm -rf source diff --git a/standalone/android/busybox_config b/standalone/android/busybox_config index 0b4725e85..a3cf59269 100644 --- a/standalone/android/busybox_config +++ b/standalone/android/busybox_config @@ -377,12 +377,12 @@ CONFIG_FEATURE_DIFF_DIR=y # # Finding Utilities # -# CONFIG_FIND is not set -# CONFIG_FEATURE_FIND_PRINT0 is not set -# CONFIG_FEATURE_FIND_MTIME is not set +CONFIG_FIND=y +CONFIG_FEATURE_FIND_PRINT0=y +CONFIG_FEATURE_FIND_MTIME=y # CONFIG_FEATURE_FIND_MMIN is not set -# CONFIG_FEATURE_FIND_PERM is not set -# CONFIG_FEATURE_FIND_TYPE is not set +CONFIG_FEATURE_FIND_PERM=y +CONFIG_FEATURE_FIND_TYPE=y # CONFIG_FEATURE_FIND_XDEV is not set # CONFIG_FEATURE_FIND_MAXDEPTH is not set # CONFIG_FEATURE_FIND_NEWER is not set @@ -400,7 +400,7 @@ CONFIG_FEATURE_DIFF_DIR=y # CONFIG_FEATURE_FIND_REGEX is not set # CONFIG_FEATURE_FIND_CONTEXT is not set # CONFIG_FEATURE_FIND_LINKS is not set -# CONFIG_GREP is not set +CONFIG_GREP=y # CONFIG_FEATURE_GREP_EGREP_ALIAS is not set # CONFIG_FEATURE_GREP_FGREP_ALIAS is not set # CONFIG_FEATURE_GREP_CONTEXT is not set @@ -416,21 +416,21 @@ CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y # CONFIG_BOOTCHARTD is not set # CONFIG_FEATURE_BOOTCHARTD_BLOATED_HEADER is not set # CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE is not set -CONFIG_HALT=y +# CONFIG_HALT is not set # CONFIG_FEATURE_CALL_TELINIT is not set -CONFIG_TELINIT_PATH="" -CONFIG_INIT=y -CONFIG_FEATURE_USE_INITTAB=y +# CONFIG_TELINIT_PATH="" +# CONFIG_INIT is not set +# CONFIG_FEATURE_USE_INITTAB is not set # CONFIG_FEATURE_KILL_REMOVED is not set -CONFIG_FEATURE_KILL_DELAY=0 -CONFIG_FEATURE_INIT_SCTTY=y -CONFIG_FEATURE_INIT_SYSLOG=y -CONFIG_FEATURE_EXTRA_QUIET=y -CONFIG_FEATURE_INIT_COREDUMPS=y -CONFIG_FEATURE_INITRD=y -CONFIG_INIT_TERMINAL_TYPE="linux" -CONFIG_MESG=y -CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP=y +# CONFIG_FEATURE_KILL_DELAY=0 +# CONFIG_FEATURE_INIT_SCTTY is not set +# CONFIG_FEATURE_INIT_SYSLOG is not set +# CONFIG_FEATURE_EXTRA_QUIET is not set +# CONFIG_FEATURE_INIT_COREDUMPS is not set +# CONFIG_FEATURE_INITRD is not set +# CONFIG_INIT_TERMINAL_TYPE="linux" +# CONFIG_MESG is not set +# CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP=y # # Login/Password Management Utilities @@ -480,10 +480,10 @@ CONFIG_TUNE2FS=y # # Linux Module Utilities # -CONFIG_MODINFO=y -CONFIG_MODPROBE_SMALL=y -CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE=y -CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED=y +# CONFIG_MODINFO is not set +# CONFIG_MODPROBE_SMALL is not set +# CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE=y +# CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED=y # CONFIG_INSMOD is not set # CONFIG_RMMOD is not set # CONFIG_LSMOD is not set @@ -505,8 +505,8 @@ CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED=y # CONFIG_FEATURE_CHECK_TAINTED_MODULE is not set # CONFIG_FEATURE_MODUTILS_ALIAS is not set # CONFIG_FEATURE_MODUTILS_SYMBOLS is not set -CONFIG_DEFAULT_MODULES_DIR="/lib/modules" -CONFIG_DEFAULT_DEPMOD_FILE="modules.dep" +# CONFIG_DEFAULT_MODULES_DIR="/lib/modules" +# CONFIG_DEFAULT_DEPMOD_FILE="modules.dep" # # Linux System Utilities @@ -869,7 +869,7 @@ CONFIG_IOSTAT=y CONFIG_MPSTAT=y CONFIG_NMETER=y CONFIG_PMAP=y -CONFIG_POWERTOP=y +# CONFIG_POWERTOP is not set CONFIG_PSTREE=y CONFIG_PWDX=y CONFIG_SMEMCAP=y diff --git a/standalone/android/icons/drawable-hdpi/ic_launcher.png b/standalone/android/icons/drawable-hdpi/ic_launcher.png Binary files differnew file mode 100644 index 000000000..8ab03145c --- /dev/null +++ b/standalone/android/icons/drawable-hdpi/ic_launcher.png diff --git a/standalone/android/icons/drawable-ldpi/ic_launcher.png b/standalone/android/icons/drawable-ldpi/ic_launcher.png Binary files differnew file mode 100644 index 000000000..9ae1aadfc --- /dev/null +++ b/standalone/android/icons/drawable-ldpi/ic_launcher.png diff --git a/standalone/android/icons/drawable-mdpi/ic_launcher.png b/standalone/android/icons/drawable-mdpi/ic_launcher.png Binary files differnew file mode 100644 index 000000000..01b32ef85 --- /dev/null +++ b/standalone/android/icons/drawable-mdpi/ic_launcher.png diff --git a/standalone/android/icons/drawable-xhdpi/ic_launcher.png b/standalone/android/icons/drawable-xhdpi/ic_launcher.png Binary files differnew file mode 100644 index 000000000..e435eaad1 --- /dev/null +++ b/standalone/android/icons/drawable-xhdpi/ic_launcher.png diff --git a/standalone/android/icons/drawable/ic_launcher.png b/standalone/android/icons/drawable/ic_launcher.png new file mode 120000 index 000000000..28d94e566 --- /dev/null +++ b/standalone/android/icons/drawable/ic_launcher.png @@ -0,0 +1 @@ +../drawable-mdpi/ic_launcher.png
\ No newline at end of file diff --git a/standalone/android/runshell b/standalone/android/runshell index 20738ddb0..0dc4ea42a 100755 --- a/standalone/android/runshell +++ b/standalone/android/runshell @@ -1,43 +1,53 @@ #!/system/bin/sh -# Runs a shell command (or interactive shell) using the binaries and -# libraries bundled with this app. +# This is run by the Android app, and runs a shell in an environment +# configured for git-annex. set -e -here="$(dirname $0)" -base="$here/git-annex-bundle" +# I'm installed as lib/lib.runshell.so +orig="$(pwd)" +cd "$0/../.." +base="$(pwd)" +cd "$orig" -if [ ! -d "$base" ]; then - echo "** cannot find base directory (I seem to be $0)" >&2 - exit 1 -fi +# Cannot rely on Android providing a sane HOME +HOME="/sdcard/git-annex.home" +export HOME -if [ ! -e "$base/bin/git-annex" ]; then - echo "** base directory $base does not contain bin/git-annex" >&2 - exit 1 -fi -if [ ! -e "$base/bin/git" ]; then - echo "** base directory $base does not contain bin/git" >&2 - exit 1 -fi +setup () { + echo "Installation starting to $base" + mkdir -p "$base/bin" + for prog in busybox git-annex git-shell git-upload-pack git gpg rsync ssh ssh-keygen; do + echo "installing $prog" + ln $base/lib/lib.$prog.so $base/bin/$prog + done + $base/bin/busybox --install $base/bin + $base/bin/tar zxf lib/lib.git.tar.gz.so -# Install busybox links. -if [ ! -e "$base/bin/sha256sum" ]; then - echo "(First run detected ... setting up busybox ...)" - "$base/bin/busybox" --install "$base/bin" -fi + for prog in git git-shell git-upload-pack; do + for link in $(cat $base/links/$prog); do + echo "linking $link to $prog" + ln $base/bin/$prog $base/$link + done + rm $base/links/$prog + done -# Get absolute path to base, to avoid breakage when things change directories. -orig="$(pwd)" -cd "$base" -base="$(pwd)" -cd "$orig" + mkdir -p "$base/templates" + mkdir -p "$base/tmp" + echo "Installation complete" +} + +if [ ! -d "$base/bin" ]; then + if ! mkdir -p "$HOME"; then + echo "mkdir of $HOME failed!" + fi + if ! setup > $HOME/git-annex-install.log 2>&1; then + echo "Installation failed! Please report a bug and attach $HOME/git-annex-install.log" + sh + fi +fi -# Put our binaries first, to avoid issues with out of date or incompatable -# system or App binaries. -ORIG_PATH="$PATH" -export ORIG_PATH -PATH=$base/bin:$PATH +PATH="$base/bin:$PATH" export PATH ORIG_GIT_EXEC_PATH="$GIT_EXEC_PATH" @@ -51,14 +61,13 @@ GIT_TEMPLATE_DIR="$base/templates" export GIT_TEMPLATE_DIR # Indicate which variables were exported above. -GIT_ANNEX_STANDLONE_ENV="PATH GIT_EXEC_PATH GIT_TEMPLATE_DIR" +GIT_ANNEX_STANDLONE_ENV="GIT_EXEC_PATH GIT_TEMPLATE_DIR" export GIT_ANNEX_STANDLONE_ENV # This is a temporary directory on a non-crippled filesystem. # This needs to be as short a path as possible. -GIT_ANNEX_TMP_DIR=$here/tmp +GIT_ANNEX_TMP_DIR=$base/tmp export GIT_ANNEX_TMP_DIR -mkdir -p "$GIT_ANNEX_TMP_DIR" if [ "$1" ]; then cmd="$1" diff --git a/standalone/android/term.patch b/standalone/android/term.patch new file mode 100644 index 000000000..36bd0069e --- /dev/null +++ b/standalone/android/term.patch @@ -0,0 +1,56 @@ +diff --git a/tools/build-debug b/tools/build-debug +index 1f15cd2..e611956 100755 +--- a/tools/build-debug ++++ b/tools/build-debug +@@ -34,4 +34,4 @@ fi + + rm -rf `find . -name bin -o -name obj -prune` + cd jni +-$ANDROID_NDK_ROOT/ndk-build && cd .. && ant debug ++$ANDROID_NDK_ROOT/ndk-build && cd .. +diff --git a/tools/update.sh b/tools/update.sh +index 57219c3..79b45ef 100755 +--- a/tools/update.sh ++++ b/tools/update.sh +@@ -18,7 +18,7 @@ command -v "$ANDROID" >/dev/null 2>&1 || { echo >&2 "The $ANDROID tool is not fo + + # Make sure target-11 is installed + +-$ANDROID update sdk -u -t android-11 ++$ANDROID update sdk -u -t android-17 + + DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + ATE_ROOT="$( cd $DIR/.. && pwd )" +@@ -31,5 +31,5 @@ for PROJECT_FILE in $PROJECT_FILES + do + PROJECT_DIR="$( dirname "$PROJECT_FILE" )" + echo "Updating $PROJECT_FILE" +- $ANDROID update project -p "$PROJECT_DIR" --target android-11 ++ $ANDROID update project -p "$PROJECT_DIR" --target android-17 + done +diff --git a/examples/widget/src/jackpal/androidterm/sample/telnet/TermActivity.java b/examples/widget/src/jackpal/androidterm/sample/telnet/TermActivity.java +index f6952f0..4b2aa5f 100644 +--- a/examples/widget/src/jackpal/androidterm/sample/telnet/TermActivity.java ++++ b/examples/widget/src/jackpal/androidterm/sample/telnet/TermActivity.java +@@ -166,7 +166,7 @@ public class TermActivity extends Activity + /* ... create a process ... */ + String execPath = LaunchActivity.getDataDir(this) + "/bin/execpty"; + ProcessBuilder execBuild = +- new ProcessBuilder(execPath, "/system/bin/sh", "-"); ++ new ProcessBuilder(execPath, "/data/data/ga.androidterm/lib/lib.runshell.so", ""); + execBuild.redirectErrorStream(true); + Process exec = null; + try { +diff --git a/res/values/defaults.xml b/res/values/defaults.xml +index 67287b2..cc2f691 100644 +--- a/res/values/defaults.xml ++++ b/res/values/defaults.xml +@@ -13,7 +13,7 @@ + <string name="pref_fnkey_default">4</string> + <string name="pref_ime_default">0</string> + <bool name="pref_alt_sends_esc_default">false</bool> +- <string name="pref_shell_default">/system/bin/sh -</string> ++ <string name="pref_shell_default">/data/data/ga.androidterm/lib/lib.runshell.so</string> + <string name="pref_initialcommand_default"></string> + <string name="pref_termtype_default">screen</string> + <bool name="pref_close_window_on_process_exit_default">true</bool> diff --git a/standalone/licences.gz b/standalone/licences.gz Binary files differindex 15e9344fc..032bee9be 100644 --- a/standalone/licences.gz +++ b/standalone/licences.gz |