summaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-01-31 21:15:32 +0100
committerSven Gothel <[email protected]>2013-01-31 21:15:32 +0100
commitb47d0d92dd222999bf38633de1cec8de6a7ad369 (patch)
tree764afc7741b6cb5cf3a11f5d4a8d3c117b3b5f0e /make
parentc8de8fbf5d080b674b509763fbb7374c21ee705b (diff)
Android: Cleanup ClassLoaderUtil/LauncherUtil - Using cached parent ClassLoader for SYS-Packages w/ native libs, and non cached child ClassLoader for USR-Packages
Android's Dalvik VM, like a JVM, cannot load a native library from one location by multiple ClassLoader. Since we don't like to hardcode the system-packages, as it was before, i.e. "com.jogamp.common", "javax.media.opengl", we need to either copy the libs or use parenting of cached ClassLoader. The latter is chosen, since it's faster and uses less resources. - System-packages are passed through from the user 'List<String> LauncherUtil.BaseActivityLauncher::getSysPackages()' to the ActivityLauncher, which instantiates the ClassLoader. - No more hard-reference the system-packages in ClassLoaderUtil ("com.jogamp.common", "javax.media.opengl"), just use the new user provided system-packages. - The system-packages denominate a hash-key for caching, a new ClassLoader is created and mapped if it does not yet exist. - A non-chached user-packages ClassLoader is created using the cached system-packages ClassLoader as it's parent.
Diffstat (limited to 'make')
-rw-r--r--make/scripts/adb-launch-main.sh32
1 files changed, 20 insertions, 12 deletions
diff --git a/make/scripts/adb-launch-main.sh b/make/scripts/adb-launch-main.sh
index 1a1c977..d032e19 100644
--- a/make/scripts/adb-launch-main.sh
+++ b/make/scripts/adb-launch-main.sh
@@ -8,10 +8,18 @@ export HOST_RSYNC_ROOT=PROJECTS/JOGL
export TARGET_UID=jogamp
#export TARGET_IP=panda02
-export TARGET_IP=jautab03
-export TARGET_ADB_PORT=5555
+#export TARGET_IP=jautab03
+export TARGET_IP=C5OKCT139647
+#export TARGET_ADB_PORT=5555
+export TARGET_ADB_PORT=
export TARGET_ROOT=jogamp-test
+if [ -z "$TARGET_ADB_PORT" ] ; then
+ export TARGET_IP_PORT=$TARGET_IP
+else
+ export TARGET_IP_PORT=$TARGET_IP:$TARGET_ADB_PORT
+fi
+
export BUILD_DIR=../build-android-armv6
if [ -e /opt-linux-x86/android-sdk-linux_x86 ] ; then
@@ -19,16 +27,16 @@ if [ -e /opt-linux-x86/android-sdk-linux_x86 ] ; then
export PATH=$ANDROID_HOME/platform-tools:$PATH
fi
-TSTCLASS=com.jogamp.common.GlueGenVersion
-#TSTCLASS=jogamp.android.launcher.LauncherUtil
+#TSTCLASS=com.jogamp.common.GlueGenVersion
+TSTCLASS=jogamp.android.launcher.LauncherUtil
LOGFILE=`basename $0 .sh`.log
-#adb -s $TARGET_IP:$TARGET_ADB_PORT uninstall jogamp.android.launcher
-#adb -s $TARGET_IP:$TARGET_ADB_PORT install $BUILD_DIR/jogamp-android-launcher.apk
+#adb -s $TARGET_IP_PORT uninstall jogamp.android.launcher
+#adb -s $TARGET_IP_PORT install $BUILD_DIR/jogamp-android-launcher.apk
-#adb -s $TARGET_IP:$TARGET_ADB_PORT uninstall com.jogamp.common
-#adb -s $TARGET_IP:$TARGET_ADB_PORT install $BUILD_DIR/gluegen-rt-android-armeabi.apk
+#adb -s $TARGET_IP_PORT uninstall com.jogamp.common
+#adb -s $TARGET_IP_PORT install $BUILD_DIR/gluegen-rt-android-armeabi.apk
SHELL_CMD="\
cd /sdcard ; \
@@ -39,8 +47,8 @@ am kill-all ; \
am start -W -S -a android.intent.action.MAIN -n jogamp.android.launcher/jogamp.android.launcher.MainLauncher -d launch://jogamp.org/$TSTCLASS/?pkg=com.jogamp.common \
"
-adb connect $TARGET_IP:$TARGET_ADB_PORT
-adb -s $TARGET_IP:$TARGET_ADB_PORT logcat -c
-adb -s $TARGET_IP:$TARGET_ADB_PORT shell $SHELL_CMD 2>&1 | tee $LOGFILE
-adb -s $TARGET_IP:$TARGET_ADB_PORT logcat -d 2>&1 | tee -a $LOGFILE
+adb connect $TARGET_IP_PORT
+adb -s $TARGET_IP_PORT logcat -c
+adb -s $TARGET_IP_PORT shell $SHELL_CMD 2>&1 | tee $LOGFILE
+adb -s $TARGET_IP_PORT logcat -d 2>&1 | tee -a $LOGFILE