Skip to content
Permalink
Browse files

Quote APK filename when passing to aapt or adb. Fixes JENKINS-9700.

  • Loading branch information...
orrc committed May 16, 2011
1 parent 638b63a commit 973b3704757c38fd528d9106018a5aa46b600807
@@ -85,7 +85,7 @@ public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListen

// Execute installation
AndroidEmulator.log(logger, Messages.INSTALLING_APK(apkPath.getName()));
String args = String.format("%s install -r %s", deviceIdentifier, apkPath.getName());
String args = String.format("%s install -r \"%s\"", deviceIdentifier, apkPath.getName());
Utils.runAndroidTool(launcher, logger, logger, androidSdk, Tool.ADB, args, apkPath.getParent());

// TODO: Evaluate success/failure and fail the build (if the user said we should do so)
@@ -123,7 +123,7 @@ private static String getPackageIdForApk(AbstractBuild<?, ?> build, Launcher lau
throws IOException, InterruptedException {
// Run aapt command on given APK
ByteArrayOutputStream aaptOutput = new ByteArrayOutputStream();
String args = String.format("dump badging %s", apkPath.getName());
String args = String.format("dump badging \"%s\"", apkPath.getName());
Utils.runAndroidTool(launcher, aaptOutput, logger, androidSdk, Tool.AAPT, args, apkPath.getParent());

// Determine package ID from aapt output

0 comments on commit 973b370

Please sign in to comment.
You can’t perform that action at this time.