Add deapexer
Given an APEX file, this tool recursively prints out a content of
apex_payload.img. It will be used to fail build in case unexpected
entries are found in a payload of an APEX.
Things to be done in follow up CLs:
1. Add support for flattened APEX
2. Move most of the logic into deapexer_lib.py so that it can be used in
case owners of APEX modules want to have more fine-grained checks
(e.g. art_apex_test).
3. Add unit tests for deapexer_lib.
Test: m deapexer
Test: deapexer system/apex/shim/com.android.apex.cts.shim.v1.apex
Test: deapexer ${OUT}system/apex/shim/com.android.tzdata.apex /tmp/empty-file.txt
Test: deapexer ${OUT}/system/apex/com.android.tzdata.apex >/tmp/tzdata.txt
Test: deapexer ${OUT}/system/apex/com.android.tzdata.apex /tmp/tzdata.txt
Bug: 139125405
Change-Id: If135de30b66c8d1c08f55c7ee7cc6aab9ab74e67
2 files changed