androidenv: also allow references to individual apk files

This commit is contained in:
Sander van der Burg 2014-01-28 19:09:08 +01:00
parent 4124bb9ff5
commit 1f42b02624

View File

@ -95,7 +95,15 @@ stdenv.mkDerivation {
${stdenv.lib.optionalString (app != null) ''
# Install the App through the debugger
${androidsdkComposition}/libexec/android-sdk-*/platform-tools/adb -s emulator-$port install ${app}/*.apk
if [ -d "${app}" ]
then
appPath="$(echo ${app}/*.apk)"
else
appPath="${app}"
fi
${androidsdkComposition}/libexec/android-sdk-*/platform-tools/adb -s emulator-$port install "$appPath"
# Start the application
${androidsdkComposition}/libexec/android-sdk-*/platform-tools/adb -s emulator-$port shell am start -a android.intent.action.MAIN -n ${package}/.${activity}