chriswoope / resign-android-image

Resign Android OS (esp. GrapheneOS) images with your signing keys and add ADB root and other modifications
MIT License
91 stars 6 forks source link

Pixel 6(oriole) with custom built otatools assert #8

Open z3t4s opened 2 years ago

z3t4s commented 2 years ago

First of all, thank you for creating this tool. It's exactly what I was looking for after discovering that GrapheneOS doesn't give you actual control over your device.

The problem

I've ran into an issue while trying to re-sign an update/factory images for the standard Pixel 6 (oriole). First of all, when using otatools from ci.android.com everything breaks. For example aapt2 cant parse sdkVersion from framework-res.apk.

The troubleshooting

I then cloned grapheneos and built otatools from that source tree. I specifically selected oriole, release and user via lunch and choosecombo (I don't know if that has any impact on m otatools-package, its my first time building android stuff)

While the previous issues seem to be fixed now, the script dies at

 File "/home/user/.resign-android-image/otatools/bin/sign_target_files_apks/add_img_to_target_files.py", line 293, in AddDtbo
AssertionError

which should be this I guess? https://github.com/GrapheneOS/platform_build/blob/12.1/tools/releasetools/add_img_to_target_files.py#L292

I'm kinda lost at this point. I have no way of verifying if my otatools.zip is actually correct. I've uploaded it here because github won't let me attach something > 25MB

It also doesn't matter if I use --ota, --factory-image or --factory-zip

EDIT: The otatools package you published as a release behaves exactly the same as the one I built from source

The full output

root@*:/home/user/resign-android-image# ./resign-android-image work keys grapheneos oriole 2022060701 --ota --generate-keys
[sudo] password for user: 
Already up to date.
Already up to date.
Already up to date.
MAKING work/out_resign/target_files.zip with make_target_files_zip
    MAKING work/out_resign/target_files with make_target_files_base
        MAKING work/out_resign/target_files_signed with make_target_files_signed
            MAKING work/out_resign/target_files_signed.zip with make_target_files_signed_zip
                DISCARD: work/out_resign/target_files_intermediates
tee: work/out_resign/sign_target_files.txt: No such file or directory
+ sign_target_files_apks -o -d keys --avb_vbmeta_key keys/avb.pem --avb_vbmeta_algorithm SHA256_RSA4096 --extra_apks OsuLogin.apk,ServiceConnectivityResources.apk,ServiceWifiResources.apk=keys/releasekey --extra_apks com.android.adbd.apex=keys/releasekey --extra_apex_payload_key com.android.adbd.apex=keys/avb.pem --extra_apks com.android.apex.cts.shim.apex=keys/releasekey --extra_apex_payload_key com.android.apex.cts.shim.apex=keys/avb.pem --extra_apks com.android.appsearch.apex=keys/releasekey --extra_apex_payload_key com.android.appsearch.apex=keys/avb.pem --extra_apks com.android.art.apex=keys/releasekey --extra_apex_payload_key com.android.art.apex=keys/avb.pem --extra_apks com.android.art.debug.apex=keys/releasekey --extra_apex_payload_key com.android.art.debug.apex=keys/avb.pem --extra_apks com.android.cellbroadcast.apex=keys/releasekey --extra_apex_payload_key com.android.cellbroadcast.apex=keys/avb.pem --extra_apks com.android.conscrypt.apex=keys/releasekey --extra_apex_payload_key com.android.conscrypt.apex=keys/avb.pem --extra_apks com.android.extservices.apex=keys/releasekey --extra_apex_payload_key com.android.extservices.apex=keys/avb.pem --extra_apks com.android.i18n.apex=keys/releasekey --extra_apex_payload_key com.android.i18n.apex=keys/avb.pem --extra_apks com.android.ipsec.apex=keys/releasekey --extra_apex_payload_key com.android.ipsec.apex=keys/avb.pem --extra_apks com.android.media.apex=keys/releasekey --extra_apex_payload_key com.android.media.apex=keys/avb.pem --extra_apks com.android.media.swcodec.apex=keys/releasekey --extra_apex_payload_key com.android.media.swcodec.apex=keys/avb.pem --extra_apks com.android.mediaprovider.apex=keys/releasekey --extra_apex_payload_key com.android.mediaprovider.apex=keys/avb.pem --extra_apks com.android.neuralnetworks.apex=keys/releasekey --extra_apex_payload_key com.android.neuralnetworks.apex=keys/avb.pem --extra_apks com.android.os.statsd.apex=keys/releasekey --extra_apex_payload_key com.android.os.statsd.apex=keys/avb.pem --extra_apks com.android.permission.apex=keys/releasekey --extra_apex_payload_key com.android.permission.apex=keys/avb.pem --extra_apks com.android.resolv.apex=keys/releasekey --extra_apex_payload_key com.android.resolv.apex=keys/avb.pem --extra_apks com.android.runtime.apex=keys/releasekey --extra_apex_payload_key com.android.runtime.apex=keys/avb.pem --extra_apks com.android.scheduling.apex=keys/releasekey --extra_apex_payload_key com.android.scheduling.apex=keys/avb.pem --extra_apks com.android.sdkext.apex=keys/releasekey --extra_apex_payload_key com.android.sdkext.apex=keys/avb.pem --extra_apks com.android.tethering.apex=keys/releasekey --extra_apex_payload_key com.android.tethering.apex=keys/avb.pem --extra_apks com.android.tzdata.apex=keys/releasekey --extra_apex_payload_key com.android.tzdata.apex=keys/avb.pem --extra_apks com.android.vndk.current.apex=keys/releasekey --extra_apex_payload_key com.android.vndk.current.apex=keys/avb.pem --extra_apks com.android.wifi.apex=keys/releasekey --extra_apex_payload_key com.android.wifi.apex=keys/avb.pem --extra_apks com.google.pixel.camera.hal.apex=keys/releasekey --extra_apex_payload_key com.google.pixel.camera.hal.apex=keys/avb.pem /home/user/resign-android-image/work/out_resign/target_files_intermediates.zip /home/user/resign-android-image/work/out_resign/target_files_signed.zip.dfaV74.tmp
2022-06-15 13:06:06 - common.py - WARNING : Failed to read SYSTEM/etc/build.prop
2022-06-15 13:06:06 - common.py - WARNING : Failed to read VENDOR/etc/build.prop
2022-06-15 13:06:06 - common.py - WARNING : Failed to read ODM/etc/build.prop
2022-06-15 13:06:06 - common.py - WARNING : Failed to read ODM/build.prop
2022-06-15 13:06:06 - common.py - WARNING : Failed to read ODM_DLKM/etc/build.prop
2022-06-15 13:06:06 - common.py - WARNING : Failed to read ODM_DLKM/build.prop
2022-06-15 13:06:06 - common.py - WARNING : Failed to read IMAGES/boot.img
2022-06-15 13:06:06 - sign_target_files_apks.py - WARNING : Failed to find com.android.art.debug.apex in target_files; Ignored
Rewriting BOOT/RAMDISK/system/etc/ramdisk/build.prop:
    signing: OneTimeInitializer.apk                                                                        (keys/releasekey)
    signing: Iwlan.apk                                                                                     (keys/platform)
    signing: SettingsIntelligence.apk                                                                      (keys/releasekey)
    signing: ImsServiceEntitlement.apk                                                                     (keys/releasekey)
    signing: Dialer.apk                                                                                    (keys/shared)
    signing: EuiccGoogle.apk                                                                               (keys/platform)
    signing: ANGLE.apk                                                                                     (keys/releasekey)
    signing: Contacts.apk                                                                                  (keys/shared)
NOT signing: Apps.apk
        (skipped due to special cert string)
Rewriting PRODUCT/etc/build.prop:
Rewriting PRODUCT/etc/selinux/product_mac_permissions.xml with new keys.
NOT signing: TrichromeLibrary.apk
        (skipped due to special cert string)
    signing: Gallery2.apk                                                                                  (keys/releasekey)
    signing: Calendar.apk                                                                                  (keys/releasekey)
    signing: Music.apk                                                                                     (keys/releasekey)
    signing: DefaultThemesStub.apk                                                                         (keys/releasekey)
    signing: QuickSearchBox.apk                                                                            (keys/shared)
    signing: messaging.apk                                                                                 (keys/releasekey)
NOT signing: Camera.apk
        (skipped due to special cert string)
NOT signing: Auditor.apk
        (skipped due to special cert string)
    signing: DeskClock.apk                                                                                 (keys/releasekey)
    signing: PhotoTable.apk                                                                                (keys/releasekey)
    signing: ExactCalculator.apk                                                                           (keys/releasekey)
NOT signing: TrichromeChrome.apk
        (skipped due to special cert string)
NOT signing: TrichromeWebView.apk
        (skipped due to special cert string)
    signing: LatinIME.apk                                                                                  (keys/shared)
    signing: ModuleMetadata.apk                                                                            (keys/releasekey)
NOT signing: PdfViewer.apk
        (skipped due to special cert string)
    signing: DisplayCutoutEmulationHoleOverlay.apk                                                         (keys/releasekey)
    signing: com.android.settings.auto_generated_rro_product_adevtool__.apk                                (keys/releasekey)
    signing: NavigationBarMode2ButtonOverlay.apk                                                           (keys/releasekey)
    signing: NavigationBarModeGesturalOverlayWideBack.apk                                                  (keys/releasekey)
    signing: NavigationBarMode3ButtonOverlay.apk                                                           (keys/releasekey)
    signing: DisplayCutoutEmulationCornerOverlay.apk                                                       (keys/releasekey)
    signing: DisplayCutoutEmulationWideOverlay.apk                                                         (keys/releasekey)
    signing: NavigationBarModeGesturalOverlayNarrowBack.apk                                                (keys/releasekey)
    signing: OneHandedModeGesturalOverlay.apk                                                              (keys/releasekey)
    signing: DisplayCutoutEmulationNarrowOverlay.apk                                                       (keys/releasekey)
    signing: FontNotoSerifSourceOverlay.apk                                                                (keys/releasekey)
    signing: com.android.systemui.auto_generated_rro_product_adevtool__.apk                                (keys/releasekey)
    signing: DisplayCutoutEmulationWaterfallOverlay.apk                                                    (keys/releasekey)
    signing: NavigationBarModeGesturalOverlay.apk                                                          (keys/releasekey)
    signing: SettingsOverlayGR1YH.apk                                                                      (keys/releasekey)
    signing: com.android.server.telecom.auto_generated_rro_product_adevtool__.apk                          (keys/releasekey)
    signing: com.android.phone.auto_generated_rro_product_adevtool__.apk                                   (keys/releasekey)
    signing: android.auto_generated_rro_product_adevtool__.apk                                             (keys/releasekey)
    signing: com.android.traceur.auto_generated_rro_product_adevtool__.apk                                 (keys/releasekey)
    signing: DisplayCutoutEmulationDoubleOverlay.apk                                                       (keys/releasekey)
    signing: SettingsOverlayG9S9B.apk                                                                      (keys/releasekey)
    signing: WifiOverlay.apk                                                                               (keys/platform)
    signing: SettingsOverlayGB7N6.apk                                                                      (keys/releasekey)
    signing: ConnectivityOverlay.apk                                                                       (keys/releasekey)
    signing: com.android.networkstack.tethering__TetheringConfig.auto_generated_rro_product_adevtool__.apk (keys/releasekey)
    signing: com.google.euiccpixel.auto_generated_rro_product_adevtool__.apk                               (keys/releasekey)
    signing: NavigationBarModeGesturalOverlayExtraWideBack.apk                                             (keys/releasekey)
    signing: NoCutoutOverlay.apk                                                                           (keys/releasekey)
    signing: DisplayCutoutEmulationTallOverlay.apk                                                         (keys/releasekey)
    signing: com.android.neuralnetworks.apex                                                               container (keys/releasekey)
           : com.android.neuralnetworks.apex                                                               payload   (keys/avb.pem)
    signing: com.android.scheduling.apex                                                                   container (keys/releasekey)
           : com.android.scheduling.apex                                                                   payload   (keys/avb.pem)
    signing: com.android.runtime.apex                                                                      container (keys/releasekey)
           : com.android.runtime.apex                                                                      payload   (keys/avb.pem)
    signing: com.android.apex.cts.shim.apex                                                                container (keys/releasekey)
           : com.android.apex.cts.shim.apex                                                                payload   (keys/avb.pem)
    signing: com.android.cellbroadcast.apex                                                                container (keys/releasekey)
           : com.android.cellbroadcast.apex                                                                payload   (keys/avb.pem)
    signing: com.android.sdkext.apex                                                                       container (keys/releasekey)
           : com.android.sdkext.apex                                                                       payload   (keys/avb.pem)
    signing: com.android.media.apex                                                                        container (keys/releasekey)
           : com.android.media.apex                                                                        payload   (keys/avb.pem)
    signing: com.android.vndk.current.apex                                                                 container (keys/releasekey)
           : com.android.vndk.current.apex                                                                 payload   (keys/avb.pem)
    signing: com.android.appsearch.apex                                                                    container (keys/releasekey)
           : com.android.appsearch.apex                                                                    payload   (keys/avb.pem)
    signing: com.android.permission.apex                                                                   container (keys/releasekey)
           : com.android.permission.apex                                                                   payload   (keys/avb.pem)
    signing: com.android.adbd.apex                                                                         container (keys/releasekey)
           : com.android.adbd.apex                                                                         payload   (keys/avb.pem)
    signing: com.android.conscrypt.apex                                                                    container (keys/releasekey)
           : com.android.conscrypt.apex                                                                    payload   (keys/avb.pem)
    signing: com.android.extservices.apex                                                                  container (keys/releasekey)
           : com.android.extservices.apex                                                                  payload   (keys/avb.pem)
    signing: com.android.ipsec.apex                                                                        container (keys/releasekey)
           : com.android.ipsec.apex                                                                        payload   (keys/avb.pem)
    signing: com.android.tzdata.apex                                                                       container (keys/releasekey)
           : com.android.tzdata.apex                                                                       payload   (keys/avb.pem)
    signing: com.android.resolv.apex                                                                       container (keys/releasekey)
           : com.android.resolv.apex                                                                       payload   (keys/avb.pem)
    signing: com.android.wifi.apex                                                                         container (keys/releasekey)
           : com.android.wifi.apex                                                                         payload   (keys/avb.pem)
    signing: com.android.art.apex                                                                          container (keys/releasekey)
           : com.android.art.apex                                                                          payload   (keys/avb.pem)
    signing: com.android.i18n.apex                                                                         container (keys/releasekey)
           : com.android.i18n.apex                                                                         payload   (keys/avb.pem)
    signing: com.android.os.statsd.apex                                                                    container (keys/releasekey)
           : com.android.os.statsd.apex                                                                    payload   (keys/avb.pem)
    signing: com.android.media.swcodec.apex                                                                container (keys/releasekey)
           : com.android.media.swcodec.apex                                                                payload   (keys/avb.pem)
    signing: com.android.tethering.apex                                                                    container (keys/releasekey)
           : com.android.tethering.apex                                                                    payload   (keys/avb.pem)
    signing: com.android.mediaprovider.apex                                                                container (keys/releasekey)
           : com.android.mediaprovider.apex                                                                payload   (keys/avb.pem)
    signing: MediaProviderLegacy.apk                                                                       (keys/media)
    signing: ONS.apk                                                                                       (keys/platform)
    signing: TeleService.apk                                                                               (keys/platform)
    signing: StatementService.apk                                                                          (keys/platform)
    signing: ManagedProvisioning.apk                                                                       (keys/platform)
    signing: ContactsProvider.apk                                                                          (keys/shared)
    signing: UserDictionaryProvider.apk                                                                    (keys/shared)
    signing: Tag.apk                                                                                       (keys/releasekey)
    signing: MtpService.apk                                                                                (keys/media)
    signing: LocalTransport.apk                                                                            (keys/platform)
    signing: InputDevices.apk                                                                              (keys/platform)
    signing: SoundPicker.apk                                                                               (keys/media)
    signing: BuiltInPrintService.apk                                                                       (keys/releasekey)
    signing: NetworkPermissionConfig.apk                                                                   (keys/networkstack)
    signing: BackupRestoreConfirmation.apk                                                                 (keys/platform)
    signing: TelephonyProvider.apk                                                                         (keys/platform)
    signing: DocumentsUI.apk                                                                               (keys/platform)
    signing: VpnDialogs.apk                                                                                (keys/platform)
    signing: PackageInstaller.apk                                                                          (keys/platform)
    signing: MmsService.apk                                                                                (keys/platform)
    signing: FusedLocation.apk                                                                             (keys/platform)
    signing: DynamicSystemInstallationService.apk                                                          (keys/platform)
    signing: ProxyHandler.apk                                                                              (keys/platform)
    signing: CellBroadcastLegacyApp.apk                                                                    (keys/platform)
    signing: Shell.apk                                                                                     (keys/platform)
    signing: DownloadProviderUi.apk                                                                        (keys/media)
    signing: Updater.apk                                                                                   (keys/releasekey)
    signing: ExternalStorageProvider.apk                                                                   (keys/platform)
    signing: CalendarProvider.apk                                                                          (keys/releasekey)
    signing: SettingsProvider.apk                                                                          (keys/platform)
    signing: SharedStorageBackup.apk                                                                       (keys/platform)
    signing: MusicFX.apk                                                                                   (keys/releasekey)
    signing: DownloadProvider.apk                                                                          (keys/media)
    signing: NetworkStack.apk                                                                              (keys/networkstack)
    signing: CallLogBackup.apk                                                                             (keys/shared)
    signing: BlockedNumberProvider.apk                                                                     (keys/shared)
    signing: Seedvault.apk                                                                                 (keys/platform)
    signing: Telecom.apk                                                                                   (keys/platform)
    signing: Traceur.apk                                                                                   (keys/shared)
Rewriting SYSTEM/etc/selinux/plat_mac_permissions.xml with new keys.
    signing: ExtShared.apk                                                                                 (keys/platform)
    signing: BasicDreams.apk                                                                               (keys/releasekey)
    signing: CameraExtensionsProxy.apk                                                                     (keys/platform)
    signing: LocalContactsBackup.apk                                                                       (keys/releasekey)
    signing: WallpaperBackup.apk                                                                           (keys/platform)
    signing: EasterEgg.apk                                                                                 (keys/platform)
    signing: SimAppDialog.apk                                                                              (keys/releasekey)
    signing: GmsCompat.apk                                                                                 (keys/releasekey)
    signing: BluetoothMidiService.apk                                                                      (keys/releasekey)
    signing: BookmarkProvider.apk                                                                          (keys/releasekey)
    signing: Bluetooth.apk                                                                                 (keys/platform)
    signing: HTMLViewer.apk                                                                                (keys/releasekey)
    signing: LiveWallpapersPicker.apk                                                                      (keys/platform)
    signing: PacProcessor.apk                                                                              (keys/platform)
    signing: CaptivePortalLogin.apk                                                                        (keys/networkstack)
    signing: CarrierDefaultApp.apk                                                                         (keys/platform)
    signing: SecureElement.apk                                                                             (keys/platform)
    signing: Stk.apk                                                                                       (keys/platform)
    signing: CertInstaller.apk                                                                             (keys/platform)
    signing: PrintSpooler.apk                                                                              (keys/releasekey)
    signing: PrintRecommendationService.apk                                                                (keys/releasekey)
    signing: KeyChain.apk                                                                                  (keys/platform)
    signing: NfcNci.apk                                                                                    (keys/platform)
    signing: PartnerBookmarksProvider.apk                                                                  (keys/releasekey)
    signing: talkback.apk                                                                                  (keys/releasekey)
    signing: CompanionDeviceManager.apk                                                                    (keys/releasekey)
Rewriting SYSTEM/build.prop:
    signing: framework-res.apk                                                                             (keys/platform)
    signing: WallpaperCropper.apk                                                                          (keys/platform)
NOT signing: OemRilService.apk
        (skipped due to special cert string)
    signing: RemoteProvisioner.apk                                                                         (keys/releasekey)
NOT signing: ShannonRcs.apk
        (skipped due to special cert string)
    signing: Launcher3QuickStep.apk                                                                        (keys/releasekey)
    signing: StorageManager.apk                                                                            (keys/releasekey)
    signing: ThemePicker.apk                                                                               (keys/releasekey)
    signing: SetupWizard.apk                                                                               (keys/platform)
NOT signing: EuiccSupportPixel.apk
        (skipped due to special cert string)
NOT signing: ShannonIms.apk
        (skipped due to special cert string)
    signing: CarrierConfig.apk                                                                             (keys/platform)
NOT signing: ShannonQualifiedNetworksService.apk
        (skipped due to special cert string)
    signing: Settings.apk                                                                                  (keys/platform)
    signing: EuiccSupportPixelPermissions.apk                                                              (keys/platform)
    signing: EmergencyInfo.apk                                                                             (keys/platform)
    signing: SystemUI.apk                                                                                  (keys/platform)
Rewriting SYSTEM_EXT/etc/build.prop:
Rewriting SYSTEM_EXT/etc/selinux/system_ext_mac_permissions.xml with new keys.
    signing: OemRilHookService.apk                                                                         (keys/platform)
Rewriting VENDOR/odm/etc/build.prop:
    signing: com.google.pixel.camera.hal.apex                                                              container (keys/releasekey)
           : com.google.pixel.camera.hal.apex                                                              payload   (keys/avb.pem)
Rewriting VENDOR/etc/selinux/vendor_mac_permissions.xml with new keys.
    signing: android.auto_generated_rro_vendor_adevtool__.apk                                              (keys/releasekey)
Rewriting VENDOR/build.prop:
Rewriting VENDOR/odm_dlkm/etc/build.prop:
Rewriting VENDOR_BOOT/RAMDISK/prop.default:
Rewriting VENDOR_BOOT/RAMDISK/default.prop:
Rewriting VENDOR_DLKM/etc/build.prop:
META/otakeys.txt has no keys; using keys/releasekey.x509.pem for OTA package verification.
Rewriting OTA key: SYSTEM/etc/security/otacerts.zip ['keys/releasekey.x509.pem']
Rewriting OTA key: VENDOR_BOOT/RAMDISK/system/etc/security/otacerts.zip ['keys/releasekey.x509.pem']
Replacing AVB signing key for vbmeta with "keys/avb.pem" (SHA256_RSA4096)
Rewriting AVB prop for product:

  replace: --hash_algorithm sha256 --prop com.android.build.product.fingerprint:Android/aosp_raven/raven:12/SP2A.220405.004/2022041700:user/test-keys --prop com.android.build.product.os_version:12 --prop com.android.build.product.security_patch:2022-04-05
     with: --hash_algorithm sha256 --prop com.android.build.product.fingerprint:Android/aosp_raven/raven:12/SP2A.220405.004/2022041700:user/release-keys --prop com.android.build.product.os_version:12 --prop com.android.build.product.security_patch:2022-04-05
Rewriting AVB prop for recovery:

  replace: --prop com.android.build.recovery.fingerprint:Android/aosp_raven/raven:12/SP2A.220405.004/2022041700:user/test-keys
     with: --prop com.android.build.recovery.fingerprint:Android/aosp_raven/raven:12/SP2A.220405.004/2022041700:user/release-keys
Rewriting AVB prop for vendor_boot:

  replace: --prop com.android.build.vendor_boot.fingerprint:Android/aosp_raven/raven:12/SP2A.220405.004/2022041700:user/test-keys
     with: --prop com.android.build.vendor_boot.fingerprint:Android/aosp_raven/raven:12/SP2A.220405.004/2022041700:user/release-keys
Rewriting AVB prop for boot:

  replace: --prop com.android.build.boot.fingerprint:Android/aosp_raven/raven:12/SP2A.220405.004/2022041700:user/test-keys --prop com.android.build.boot.os_version:12 --prop com.android.build.boot.security_patch:2022-04-05
     with: --prop com.android.build.boot.fingerprint:Android/aosp_raven/raven:12/SP2A.220405.004/2022041700:user/release-keys --prop com.android.build.boot.os_version:12 --prop com.android.build.boot.security_patch:2022-04-05
Rewriting AVB prop for system:

  replace: --hash_algorithm sha256 --prop com.android.build.system.fingerprint:Android/aosp_raven/raven:12/SP2A.220405.004/2022041700:user/test-keys --prop com.android.build.system.os_version:12 --prop com.android.build.system.security_patch:2022-04-05
     with: --hash_algorithm sha256 --prop com.android.build.system.fingerprint:Android/aosp_raven/raven:12/SP2A.220405.004/2022041700:user/release-keys --prop com.android.build.system.os_version:12 --prop com.android.build.system.security_patch:2022-04-05
Rewriting AVB prop for vendor:

  replace: --hash_algorithm sha256 --prop com.android.build.vendor.fingerprint:Android/aosp_raven/raven:12/SP2A.220405.004/2022041700:user/test-keys --prop com.android.build.vendor.os_version:12 --prop com.android.build.vendor.security_patch:2022-04-05
     with: --hash_algorithm sha256 --prop com.android.build.vendor.fingerprint:Android/aosp_raven/raven:12/SP2A.220405.004/2022041700:user/release-keys --prop com.android.build.vendor.os_version:12 --prop com.android.build.vendor.security_patch:2022-04-05
Rewriting AVB prop for system_ext:

  replace: --hash_algorithm sha256 --prop com.android.build.system_ext.fingerprint:Android/aosp_raven/raven:12/SP2A.220405.004/2022041700:user/test-keys --prop com.android.build.system_ext.os_version:12 --prop com.android.build.system_ext.security_patch:2022-04-05
     with: --hash_algorithm sha256 --prop com.android.build.system_ext.fingerprint:Android/aosp_raven/raven:12/SP2A.220405.004/2022041700:user/release-keys --prop com.android.build.system_ext.os_version:12 --prop com.android.build.system_ext.security_patch:2022-04-05
Rewriting AVB prop for dtbo:

  replace: --prop com.android.build.dtbo.fingerprint:Android/aosp_raven/raven:12/SP2A.220405.004/2022041700:user/test-keys
     with: --prop com.android.build.dtbo.fingerprint:Android/aosp_raven/raven:12/SP2A.220405.004/2022041700:user/release-keys
Rewriting AVB prop for odm_dlkm:

  replace: --hash_algorithm sha256 --prop com.android.build.odm_dlkm.fingerprint:Android/aosp_raven/raven:12/SP2A.220405.004/2022041700:user/test-keys --prop com.android.build.odm_dlkm.os_version:12
     with: --hash_algorithm sha256 --prop com.android.build.odm_dlkm.fingerprint:Android/aosp_raven/raven:12/SP2A.220405.004/2022041700:user/release-keys --prop com.android.build.odm_dlkm.os_version:12
Rewriting AVB prop for vendor_dlkm:

  replace: --hash_algorithm sha256 --prop com.android.build.vendor_dlkm.fingerprint:Android/aosp_raven/raven:12/SP2A.220405.004/2022041700:user/test-keys --prop com.android.build.vendor_dlkm.os_version:12
     with: --hash_algorithm sha256 --prop com.android.build.vendor_dlkm.fingerprint:Android/aosp_raven/raven:12/SP2A.220405.004/2022041700:user/release-keys --prop com.android.build.vendor_dlkm.os_version:12
Rewriting AVB prop for odm:

  replace: --hash_algorithm sha256 --prop com.android.build.odm.fingerprint:Android/aosp_raven/raven:12/SP2A.220405.004/2022041700:user/tes2022-06-15 13:09:17 - common.py - WARNING : Failed to read SYSTEM/etc/build.prop
2022-06-15 13:09:17 - common.py - WARNING : Failed to read VENDOR/etc/build.prop
2022-06-15 13:09:17 - common.py - WARNING : Failed to read ODM/etc/build.prop
2022-06-15 13:09:17 - common.py - WARNING : Failed to read ODM/build.prop
2022-06-15 13:09:17 - common.py - WARNING : Failed to read ODM_DLKM/etc/build.prop
2022-06-15 13:09:17 - common.py - WARNING : Failed to read ODM_DLKM/build.prop
2022-06-15 13:09:17 - common.py - WARNING : Failed to read IMAGES/boot.img
t-keys --prop com.android.build.odm.os_version:12
     with: --hash_algorithm sha256 --prop com.android.build.odm.fingerprint:Android/aosp_raven/raven:12/SP2A.220405.004/2022041700:user/release-keys --prop com.android.build.odm.os_version:12
Traceback (most recent call last):
  File "/home/user/.resign-android-image/otatools/bin/sign_target_files_apks/internal/stdlib/runpy.py", line 174, in _run_module_as_main
  File "/home/user/.resign-android-image/otatools/bin/sign_target_files_apks/internal/stdlib/runpy.py", line 72, in _run_code
  File "/home/user/.resign-android-image/otatools/bin/sign_target_files_apks/__main__.py", line 12, in <module>
  File "/home/user/.resign-android-image/otatools/bin/sign_target_files_apks/internal/stdlib/runpy.py", line 174, in _run_module_as_main
  File "/home/user/.resign-android-image/otatools/bin/sign_target_files_apks/internal/stdlib/runpy.py", line 72, in _run_code
  File "/home/user/.resign-android-image/otatools/bin/sign_target_files_apks/sign_target_files_apks.py", line 1420, in <module>
  File "/home/user/.resign-android-image/otatools/bin/sign_target_files_apks/sign_target_files_apks.py", line 1413, in main
  File "/home/user/.resign-android-image/otatools/bin/sign_target_files_apks/add_img_to_target_files.py", line 1025, in main
  File "/home/user/.resign-android-image/otatools/bin/sign_target_files_apks/add_img_to_target_files.py", line 906, in AddImagesToTargetFiles
  File "/home/user/.resign-android-image/otatools/bin/sign_target_files_apks/add_img_to_target_files.py", line 293, in AddDtbo
AssertionError
grep: work/out_resign/sign_target_files.txt: No such file or directory
Failed to run: go work/out_resign/sign_target_files.STMCAC.tmp work/out_resign/target_files_signed.zip.dfaV74.tmp
Failed to run: make_target_files_signed_zip work/out_resign/target_files_signed.zip.dfaV74.tmp 
Failed to run: make_target_files_signed work/out_resign/target_files_signed.9meP3P.tmp 
Failed to run: make_target_files_base work/out_resign/target_files.7Pr2CI.tmp 
Failed to run: make_target_files_zip work/out_resign/target_files.zip.Tv1xLK.tmp 
root@*:/home/user/resign-android-image#
peterjanbalkenende commented 1 year ago

It seems that specifying the full paths of the key directory solves this issue. Issue #21 is a new problem though.