certify_bootimg: avoid using subprocess calls to unpack_bootimg am: ac2f0c28b2 am: f149ca0d9a am: aef5320af0 am: 4e8e1365bd

Original change: https://android-review.googlesource.com/c/platform/system/tools/mkbootimg/+/2038863

Change-Id: I6fe92ff30ca5630ad39bdd2b33fafed7c0829a46
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>