Skip to content

Instantly share code, notes, and snippets.

@huberflores
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save huberflores/9444950 to your computer and use it in GitHub Desktop.
Save huberflores/9444950 to your computer and use it in GitHub Desktop.
dalvikvm wrapper
#!/bin/sh
#This wrapper works with our Dalvik x86 image running in Amazon
#Please contact at huber AT ut DOT ee for granting access to the image
# base directory, at top of source tree; replace with absolute path
base=`pwd`
root=$base/out/host/linux-x86
export ANDROID_ROOT=$root
# configure bootclasspath
# some extra jars are required besides services.jar, core.jar, ext.jar and framework.jar
bootpath=$base/out/target/product/generic_x86/system/framework
export BOOTCLASSPATH=$bootpath/core.jar:$bootpath/core-junit.jar:$bootpath/bouncycastle.jar:$bootpath/ext.jar:$bootpath/framework.jar:$bootpath/android.policy.jar:$bootpath/services.jar
export LD_LIBRARY_PATH=$bootpath/lib:$LD_LIBRARY_PATH
# this is where we create the dalvik-cache directory; make sure it exists
export ANDROID_DATA=/tmp/dalvik_$USER
mkdir -p $ANDROID_DATA/dalvik-cache
exec $root/bin/dalvikvm -Xbootclasspath:$BOOTCLASSPATH $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment