Adding repack_bootimg.py
This is to import files from the ramdisk in --src_bootimg
to the ramdisk in --dst_bootimg. A typical use case is updating
`first_stage_ramdisk/userdebug_plat_sepolicy.cil` in a
debug ramdisk, to make it work with a new system.img from
the next Android release version.
Bug: 174443192
Test: m repack_bootimg
Test: `cp $OUT/vendor_boot.img .` &&
`repack_bootimg \
--src_bootimg $OUT/vendor_boot-debug.img \
--dst_bootimg vendor_boot.img --ramdisk_add \
first_stage_ramdisk/userdebug_plat_sepolicy.cil \
first_stage_ramdisk/force_debuggable \
first_stage_ramdisk/adb_debug.prop`,
then flash the updated vendor_boot.img and checks it
behaves like a vendor_boot-debug.img
Change-Id: Ib5436110b59eb038908279b0399142193315a6ff
2 files changed