Index: /issm/trunk-jpl/externalpackages/android/android-ndk/android_aux.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/android/android-ndk/android_aux.sh	(revision 18065)
+++ /issm/trunk-jpl/externalpackages/android/android-ndk/android_aux.sh	(revision 18065)
@@ -0,0 +1,43 @@
+#!/bin/bash
+#
+# android_aux.sh serves as an auxiliary script for all installation
+# scripts with the Android suffix.
+#
+# TODO: include M4 macros for generic options.
+#
+
+sdk_rev=22.6.2
+ndk_rev=9
+api_levels="android-14,android-15,android-16"
+host_triplet="arm-linux-androideabi"
+default_droid="android-4.1"
+
+step=0;
+j=1;
+
+echo ""
+echo "This install script utilizes 'android_aux.sh' to allow for options."
+echo "For usage information enter: '--help'"
+echo Number of arguments is: $#
+
+for arg in $* 
+do 
+    if [[ "$arg" =~ --step=([0-9])* ]]; then
+        step=${BASH_REMATCH[1]}; 
+        echo "Setting step to: " $step
+    elif [[ "$arg" == "--help" ]]; then
+        echo ""
+        echo "USAGE: $ install.sh [--step=#] [-j#]"
+        echo ""
+        echo "Where '#' is some integer."
+        echo "To check the number of steps check the install script."
+        echo ""
+        exit 1;
+    elif [[ "$arg" =~ -j=([1-9]+[0-9]*) ]]; then
+        j=${BASH_REMATCH[1]}; 
+        echo "Number of jobs set to: " $j
+    else
+        echo "Option not recognized"
+        exit 1;
+    fi
+done
Index: /issm/trunk-jpl/externalpackages/android/android-ndk/installNDK-linux-x86.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/android/android-ndk/installNDK-linux-x86.sh	(revision 18065)
+++ /issm/trunk-jpl/externalpackages/android/android-ndk/installNDK-linux-x86.sh	(revision 18065)
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+# This installs the Android NDK (Native Development Kit)
+# which is needed for the compilation of C/C++ code into the 
+# native architecture of the Android device.
+
+# The android-ndk-r8-darwin-x86.tar.bz2 ndk.tar.bz2 file was downloaded 
+# from the android developer website: 
+source $ANDROID_DIR/android_aux.sh
+
+if [[ $step == "1" || $step == "0" ]]; then
+    # Cleanup the install
+    rm -rf install
+    rm -rf $ANDROID_DIR/arm-linux-android-${default_droid}
+
+    # Download from ISSM server
+#    $ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/android-ndk-r'${ndk_rev}'-darwin-x86.tar.bz2' 'ndk.tar.bz2'
+    # Download from google
+#    if ["$(uname -m)" = "x86_64"]; then
+#	wget 'https://dl.google.com/android/ndk/android-ndk-r'${ndk_rev}'d-linux-x86_64.tar.bz2' 'ndk.tar.bz2'
+#   fi
+
+#    if ["$(uname -m)" = "x86"]; then
+	wget 'https://dl.google.com/android/ndk/android-ndk-r'${ndk_rev}'d-linux-x86.tar.bz2'
+ #   fi
+    # Install Android NDK
+    mv 'android-ndk-r'${ndk_rev}'d-linux-x86.tar.bz2' ndk.tar.bz2
+    tar -xvf ndk.tar.bz2
+    rm -rf ndk.tar ndk.tar.bz2
+
+    # Move to install
+    mv android-ndk-r${ndk_rev}d install
+fi
+
+# Create Standalone Development Directory
+# Note: API-14 corresponds to Android 4.0.
+if [[ $step == "2" || $step == "0" ]]; then
+    $ANDROID_DIR/android-ndk/install/build/tools/make-standalone-toolchain.sh --platform=android-14 --install-dir=$ANDROID_DIR/android-ndk/install/arm-linux-android-install
+fi
Index: /issm/trunk-jpl/externalpackages/android/android-sdk/installSDK-linux-x86.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/android/android-sdk/installSDK-linux-x86.sh	(revision 18065)
+++ /issm/trunk-jpl/externalpackages/android/android-sdk/installSDK-linux-x86.sh	(revision 18065)
@@ -0,0 +1,85 @@
+#!/bin/bash
+
+# This installs the Android SDK (Software Development Kit)
+# which is needed for the compilation of the Java project. 
+
+source $ANDROID_DIR/android_aux.sh
+
+# Different steps here. 
+#   0: do all
+#   1: install sdk, ant and sdk tools
+#   2: install an emulator.
+#   3: test the emulator
+#   4: cleanup
+
+present_dir=`pwd`;
+sd_card="issm-sdcard"
+
+if [[ $step == "1" || $step == "0" ]]; then
+
+	# Cleanup the install
+	rm -rf install
+
+	# Download from ISSM server
+#	$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://developer.android.com/sdk/index.html#download' 'android-sdk-linux.zip'
+	
+	#Download from Google server
+	wget https://dl.google.com/android/android-sdk_r$sdk_rev-linux.tgz
+
+	# Install Android SDK.
+	tar -zxvf android-sdk_r$sdk_rev-linux.tgz
+	rm -rf android-sdk_r$sdk_rev-linux.tgz
+	# Move to install
+	mv -f android-sdk-linux install
+
+	# Post_install configuration: 
+	# We need specific settings for specific platforms, for the SDK to 
+	# function properly
+
+	# For now, we need to install:  
+	# android sdk platform tools  
+	# and a specific android api: API 16, API 15 and API 14
+	# Note: API 16, API 15 and 14 correspond to Android 4.1, 4.0.3 and 4.0 respectively. 
+
+	cd install/tools/ && source ./android update sdk -t platform-tool,${api_levels},system-image --no-ui
+
+fi
+
+if [[ $step == "2" || $step == "0" ]]; then
+
+	# Once this is done, we need to install an emulator. Location will default to ~/.android/avd, 
+	# which we will move to $ISSM_DIR/externalpackages/android-emulators.  
+	# For now, it's called: Android-4.0.3
+
+	# Here we delete the Android-4.0.3 device if it already exists.
+	cd $present_dir/install/tools
+
+    if [ -e $ANDROID_DIR/android-emulators/$default_droid ] 
+    then
+        echo "Deleting previously created device: $default_droid"
+	    ./android delete avd -n $default_droid
+    fi
+
+	# Android will prompt the user to specify hardware emulation options. For now, default
+	# default settings will suffice. Press 'enter' to take default settings or enter 'no'.
+
+	./android create avd -f -n $default_droid -t 1 -p $ANDROID_DIR/android-emulators/$default_droid --abi armeabi-v7a
+    echo "Creating an SD Card"
+    ./mksdcard -l $sd_card 2G $ANDROID_DIR/android-emulators/$sd_card.img
+fi
+
+if [[ $step == "3" || $step == "0" ]]; then
+    # Here we will start up our default emulator to test that it is working properly.
+    # Once the device has booted we will use the Android Debug Bridge tool to gain
+    # a terminal in our device.
+
+	cd $present_dir/install/tools
+	./emulator -avd $default_droid -sdcard $ANDROID_DIR/android-emulators/$sd_card.img &
+
+    cd ../platform-tools
+    ./adb wait-for-device shell
+fi
+
+#if [[ $step == "4" || $step == "0" ]]; then
+#	rm -rf install
+#fi
