From 66ca430622954a4d18d42e6b2336d489e166e0bf Mon Sep 17 00:00:00 2001 From: cfig Date: Wed, 31 Aug 2022 17:17:36 +0800 Subject: [PATCH] some trivial changes --- README.md | 3 ++- bbootimg/src/main/kotlin/bootimg/Signer.kt | 1 + bbootimg/src/main/kotlin/bootimg/v3/BootV3.kt | 1 + doc/layout.md | 6 +++++- helper/build.gradle.kts | 2 +- src/integrationTest/resources | 2 +- 6 files changed, 11 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5383607..df773f6 100644 --- a/README.md +++ b/README.md @@ -230,7 +230,8 @@ Then flash vbmeta.img.signed to your device. ## boot.img layout -Read [layout](doc/layout.md) of Android boot.img and vendor\_boot.img. +Read [boot layout](doc/layout.md) of Android boot.img and vendor\_boot.img. +Read [miac layout](doc/misc_image_layout.md) of misc\.img ## References and Acknowledgement
diff --git a/bbootimg/src/main/kotlin/bootimg/Signer.kt b/bbootimg/src/main/kotlin/bootimg/Signer.kt index 1c7528a..a88769f 100644 --- a/bbootimg/src/main/kotlin/bootimg/Signer.kt +++ b/bbootimg/src/main/kotlin/bootimg/Signer.kt @@ -70,6 +70,7 @@ class Signer { DefaultExecutor().execute(this) } Helper.assertFileEquals("$output.signed", "$output.signed2") + File("$output.signed2").delete() //TODO: decide what to verify //Parser.verifyAVBIntegrity(cfg.info.output + ".signed", avbtool) //Parser.verifyAVBIntegrity(cfg.info.output + ".signed2", avbtool) diff --git a/bbootimg/src/main/kotlin/bootimg/v3/BootV3.kt b/bbootimg/src/main/kotlin/bootimg/v3/BootV3.kt index 5cd7575..6fa3591 100644 --- a/bbootimg/src/main/kotlin/bootimg/v3/BootV3.kt +++ b/bbootimg/src/main/kotlin/bootimg/v3/BootV3.kt @@ -189,6 +189,7 @@ data class BootV3( } Helper.assertFileEquals(this.info.output + ".clear", this.info.output + ".google") + File(this.info.output + ".google").delete() return this } diff --git a/doc/layout.md b/doc/layout.md index 8a13a9c..2b2ea82 100644 --- a/doc/layout.md +++ b/doc/layout.md @@ -99,6 +99,8 @@ Value at 0x28 is one of {0x00,0x01,0x02,0x03,0x04}, this filed should be read fi ## 2. boot.img v3-v4 +For partitions: `/boot` and `/init_boot`. + ### header item size in bytes position @@ -139,6 +141,8 @@ Value at 0x28 is one of {0x00,0x01,0x02,0x03,0x04}, this filed should be read fi ## 3. vendor\_boot.img v3-v4 +For partitions: `/vendor_boot`. + ### header item size in bytes position @@ -298,7 +302,7 @@ Value at 0x28 is one of {0x00,0x01,0x02,0x03,0x04}, this filed should be read fi │ ├─────────────────────┤ │ │ vendor ramdisk n │ ├──────────────────┴─────────────────────┤ - │ generic ramdisk │ + │ generic ramdisk (from init_boot/boot) │ ├──────────────────┬─────────────────────┤ │ │parameters │ │ ├─────────────────────┤ diff --git a/helper/build.gradle.kts b/helper/build.gradle.kts index fdcc422..1a1acd8 100644 --- a/helper/build.gradle.kts +++ b/helper/build.gradle.kts @@ -15,7 +15,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { - kotlin("jvm") version "1.7.0" + kotlin("jvm") version "1.7.10" `java-library` application } diff --git a/src/integrationTest/resources b/src/integrationTest/resources index bca8ccc..0f9f57c 160000 --- a/src/integrationTest/resources +++ b/src/integrationTest/resources @@ -1 +1 @@ -Subproject commit bca8ccc62a849a1b9831b5a5ff476f8c86d84361 +Subproject commit 0f9f57cb3b25ab299acfeb3d2e80b2ad488ff17a