Go to file
Tao Bao afee8f3036 Skip checking files that have less blocks in block map.
When creating ext4 images with mke2fs, it may skip allocating some
blocks if they contain all zeros. As a result, there could be less
blocks listed in the block map than the actual file length.

For example, for a file with a length of 112200-byte (27+ blocks),
the listed blocks in block.map could be '43665-43688' (24 blocks).
Because some all-zero blocks are not taking actual space.

The generated ext4 images are perfectly valid - kernel will figure out
that data block is not allocated and writes all zeros into user buffer.
However, we can't fully reconstruct a file from its block list in our
Python script. Ideally this can be avoided by mounting or parsing an
ext4 image directly, which is yet to be supported in our script.

This CL skips checking for such files to avoid failing
validate_target_files.py.

Bug: 65213616
Test: validate_target_files.py passes on targets with mke2fs generated
      images (e.g. marlin).
Change-Id: Id9cc59e345b9283844044ef94ceb5702f0ca0526
(cherry picked from commit b418c30e3a)
2017-09-08 11:22:59 -07:00
core DO NOT MERGE OC-MR1 is REL 2017-09-06 13:12:42 -07:00
target Merge "Remove root folder bt_firmware in GSI" into oc-mr1-dev 2017-09-07 14:59:43 +00:00
tests Only set TARGET_PLATFORM version in lunch when explicitly requested 2017-05-03 02:47:59 +00:00
tools Skip checking files that have less blocks in block map. 2017-09-08 11:22:59 -07:00
.gitignore Add build subprojects to .gitignore 2015-07-23 13:18:47 -07:00
Android.mk Add new Android.mk to handle repo move 2016-06-16 15:30:19 -07:00
CleanSpec.mk Copy adbd from system/bin to recovery/root/sbin 2017-08-15 11:33:17 +08:00
OWNERS Add OWNERS in build/make 2017-06-21 16:09:56 -07:00
buildspec.mk.default Add TARGET_PLATFORM_VERSION to lunch 2017-03-23 09:44:08 -07:00
envsetup.sh Merge "Revert "Use java prebuilts"" am: 4d69df5191 am: f4e78ccf25 2017-07-19 22:58:23 +00:00