test: add more tests for android 10 coral

pull/41/head
cfig 5 years ago
parent 75af56ad57
commit ff7021e2db
No known key found for this signature in database
GPG Key ID: B104C307F0FDABB7

@ -62,7 +62,7 @@ class Signer {
}
addArgument("--internal_release_string")
addArgument(ai.header!!.release_string, false)
log.warn(this.toString())
log.info(this.toString())
File(cfg.info.output + ".clear").copyTo(File(cfg.info.output + ".signed2"))
DefaultExecutor().execute(this)

@ -23,13 +23,11 @@ class HashDescriptor(var flags: UInt = 0U,
: Descriptor(TAG, 0U, 0) {
var flagsInterpretation: String = ""
get() {
var ret = ""
if (this.flags and Header.HashDescriptorFlags.AVB_HASH_DESCRIPTOR_FLAGS_DO_NOT_USE_AB.inFlags.toUInt() == 1U) {
ret += "1:no-A/B system"
return if (this.flags and Header.HashDescriptorFlags.AVB_HASH_DESCRIPTOR_FLAGS_DO_NOT_USE_AB.inFlags.toUInt() == 1U) {
"1:no-A/B system"
} else {
ret += "0:A/B system"
"0:A/B system"
}
return ret
}
constructor(data: InputStream, seq: Int = 0) : this() {
@ -90,6 +88,7 @@ class HashDescriptor(var flags: UInt = 0U,
it.read(randomSalt)
log.warn("salt is empty, using random salt[$expectedDigestSize]: " + Helper.toHexString(randomSalt))
this.salt = randomSalt
this.salt_len = this.salt.size.toUInt()
}
} else {
log.info("preset salt[${this.salt.size}] is valid: ${Hex.encodeHexString(this.salt)}")
@ -113,6 +112,7 @@ class HashDescriptor(var flags: UInt = 0U,
}.digest()
log.info("Digest(salt + file): " + Helper.toHexString(newDigest))
this.digest = newDigest
this.digest_len = this.digest.size.toUInt()
}
return this

@ -156,7 +156,7 @@ class Packer {
val googleCmd = info2.toCommandLine().apply {
addArgument(cfg.info.output + ".google")
}
log.warn(googleCmd.toString())
log.info(googleCmd.toString())
DefaultExecutor().execute(googleCmd)
val ourHash = hashFileAndSize(cfg.info.output + ".clear")

@ -58,3 +58,7 @@ This part is contributed by @Surendrajat, thanks!
#### libsparse: output\_file.cpp
*typeof* is missing in macos clang++, need to change it to *decltype* instead.
## using pre-packed ramdisk.img.gz
place 'ramdisk.img.gz' in directory, delete "root/", program will use it as prebuilt.

@ -72,6 +72,12 @@ def verifySingleDir(inResourceDir, inImageDir):
cleanUp()
verifySingleJson(jsonFile)
cleanUp()
pyFiles = glob.glob(os.path.join(resDir, imgDir) + "/*.py")
for pyFile in pyFiles:
cleanUp()
log.warning("calling %s" % pyFile)
subprocess.check_call(pyFile, shell = True)
cleanUp()
def decompressXZ(inFile, outFile):
with lzma.open(inFile) as f:
@ -102,6 +108,9 @@ def main():
# from volunteers
verifySingleDir(resDir, "recovery_image_from_s-trace")
# 10
verifySingleDir(resDir, "10.0.0_coral-qq1d.200205.002")
log.info(successLogo)
if __name__ == "__main__":

@ -1 +1 @@
Subproject commit 2b95308b91c2c0a564451b744354b2ef1428311d
Subproject commit b38a8c9e9763aefa1584e80b866efb0173cae04b
Loading…
Cancel
Save