Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #340 from bootstraponline/fix_apk

APK fixes
  • Loading branch information...
commit c169d9796f922e58b64c574baa70081bf43ca3b1 2 parents 29295e6 + 3e9a89d
@jlipps jlipps authored
Showing with 7 additions and 7 deletions.
  1. +7 −7 uiautomator/adb.js
View
14 uiautomator/adb.js
@@ -688,7 +688,7 @@ ADB.prototype.uninstallApk = function(pkg, cb) {
};
ADB.prototype.installApk = function(apk, cb) {
- var cmd = this.adbCmd + " install -r " + apk;
+ var cmd = this.adbCmd + ' install -r "' + apk + '"';
this.debug(cmd);
exec(cmd,function(err, stdout) {
if (err) {
@@ -783,6 +783,12 @@ ADB.prototype.installApp = function(cb) {
} else { cb(null); }
},
function(cb) {
+ if (installClean) {
+ me.debug("Installing clean apk");
+ me.installApk(me.cleanAPK, function(err) { if (err) return cb(err); return cb(null); });
+ } else { cb(null); }
+ },
+ function(cb) {
// App is already installed so reset it.
if (!installApp) {
me.runFastReset(function(err) {
@@ -790,12 +796,6 @@ ADB.prototype.installApp = function(cb) {
return cb(null);
});
} else { cb(null); }
- },
- function(cb) {
- if (installClean) {
- me.debug("Installing clean apk");
- me.installApk(me.cleanAPK, function(err) { if (err) return cb(err); return cb(null); });
- } else { cb(null); }
}
],
// Top level callback.
Please sign in to comment.
Something went wrong with that request. Please try again.