Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Quote APK filename when passing to aapt or adb. Fixes JENKINS-9700.
  • Loading branch information
orrc committed May 16, 2011
1 parent 638b63a commit 973b370
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -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)
Expand Down
Expand Up @@ -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
Expand Down

0 comments on commit 973b370

Please sign in to comment.