Add support for Android O Developer Preview 1.

This commit is contained in:
Simo Kinnunen
2017-04-08 23:21:19 +09:00
parent 9fa11ac7ff
commit 43f0341297
8 changed files with 63 additions and 16 deletions

View File

@@ -13,16 +13,19 @@ var Resource = require('./util/resource')
module.exports = syrup.serial()
.dependency(require('../support/adb'))
.dependency(require('../support/properties'))
.define(function(options, adb, properties) {
.dependency(require('../support/abi'))
.define(function(options, adb, properties, abi) {
var log = logger.createLogger('device:resources:minirev')
var resources = {
bin: new Resource({
src: pathutil.vendor(util.format(
'minirev/%s/minirev%s'
, properties['ro.product.cpu.abi']
, properties['ro.build.version.sdk'] < 16 ? '-nopie' : ''
))
src: pathutil.requiredMatch(abi.all.map(function(supportedAbi) {
return pathutil.vendor(util.format(
'minirev/%s/minirev%s'
, supportedAbi
, abi.pie ? '' : '-nopie'
))
}))
, dest: [
'/data/local/tmp/minirev'
, '/data/data/com.android.shell/minirev'
@@ -54,7 +57,7 @@ module.exports = syrup.serial()
}
function installResource(res) {
log.info('Installing "%s" as "%s"', res.comm, res.dest)
log.info('Installing "%s" as "%s"', res.src, res.dest)
function checkExecutable(res) {
return adb.stat(options.serial, res.dest)