diff --git a/lib/roles/device/plugins/service.js b/lib/roles/device/plugins/service.js index a6035b8a..a1a40f12 100644 --- a/lib/roles/device/plugins/service.js +++ b/lib/roles/device/plugins/service.js @@ -89,8 +89,8 @@ module.exports = syrup.serial() return devutil.killProcsByComm( adb , options.serial - , 'app_process' - , 'app_process' + , 'stf.agent' + , 'stf.agent' ) } @@ -143,17 +143,12 @@ module.exports = syrup.serial() }) } + // The APK should be up to date at this point. If it was reinstalled, the + // service should have been automatically stopped while it was happening. + // So, we should be good to go. function openService() { log.info('Launching service') - return stopService() - .timeout(15000) - .then(function() { - return devutil.waitForPortToFree(adb, options.serial, service.port) - .timeout(10000) - }) - .then(function() { - return callService(util.format("-a '%s'", apk.startAction)) - }) + return callService(util.format("-a '%s'", apk.startAction)) .then(function() { return devutil.waitForPort(adb, options.serial, service.port) .timeout(15000) @@ -250,10 +245,6 @@ module.exports = syrup.serial() } } - function stopService() { - return callService(util.format("-a '%s'", apk.stopAction)) - } - function keyEvent(data) { return runAgentCommand( apk.wire.MessageType.DO_KEYEVENT diff --git a/lib/roles/device/resources/service.js b/lib/roles/device/resources/service.js index b740beaf..b16a4004 100644 --- a/lib/roles/device/resources/service.js +++ b/lib/roles/device/resources/service.js @@ -15,7 +15,7 @@ module.exports = syrup.serial() var log = logger.createLogger('device:resources:service') var resource = { - requiredVersion: '0.6.5' + requiredVersion: '0.7.0' , pkg: 'jp.co.cyberagent.stf' , main: 'jp.co.cyberagent.stf.Agent' , apk: pathutil.vendor('STFService/STFService.apk') diff --git a/vendor/STFService/STFService.apk b/vendor/STFService/STFService.apk index ecf824a9..ec2960b6 100644 Binary files a/vendor/STFService/STFService.apk and b/vendor/STFService/STFService.apk differ