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: I7bdab8dd1c1cd67790174aa68e9d38b41d770449
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>