Commit graph

5 commits

Author SHA1 Message Date
Fabien Sanglard
3d38ff9f38 Merge "Improve Zipalign test" 2020-11-13 20:43:11 +00:00
Fabien Sanglard
a720635be2 Fix zipalign alignment error
Problem: Zipalign operates over several false assumptions. First it
assumes that zip entries are in the same order in the body and in
the Central Direcotry. Second, it assumes there are not space
between entries. This makes alignment incorrect when these asserts
are not true.

Solution: Don't align entries by tracking bias based on input zip
entry location. Calculate the expected alignment based on the out-
put zip file and correct with extra padding.

Fixes: 162117652
Test: Units Tests
Change-Id: Ia179338f658cab18a377cba2c7c8e629089a2785
2020-11-11 17:00:22 -08:00
Fabien Sanglard
4b4b495d88 Improve Zipalign test
Problem: Zipalign test invokes process but not verify.
Solution: Invoke both during test.

Test: Unit Test
Bug: NA
Change-Id: If603df301048f4b508e3429c4a8c77339ab351ae
2020-11-11 16:50:18 -08:00
Fabien Sanglard
6dfc6fb4c4 Fix zipalign tests with GetExecutableDirectory
Test: Self-tested
Bug: NA
Change-Id: Idc15c0e028b74a2b38c26af0e7d4a51f32210145
2020-11-06 17:04:59 -08:00
Fabien Sanglard
0f29f54695 Refactor zipalign to allow unit tests
Test: Self-tested
Bug: NA
Change-Id: I322b78c5e18082f7abf7427cdc62dbabcb18b4a0
2020-11-03 10:03:30 -08:00