With the option: extract zip file in the directory where zip is, and the
extracted files remain.
Without the option: extract zip file in tmp and clean up after a run
Test: check if files remain with -p option
Bug: N/A
Change-Id: I1aa74c017dbb885481b8f5a0674d089c0a732620
As-is: extract zip file in-place
To-be: extract zip file in tmp dir
Test: run the tool with -u option, and check if there is no file in a
directory where zip file is located
Change-Id: I2654bfa257714cb5b266abf4feb31acaabdbb7cb
* `compare_images -t a b -s system -w whitelist.txt` to specify
whitelist.
* diff.csv is split into two parts:
- whitelisted_diff.csv: Diffs that are ignored by a whitelist
- diff.csv: Diffs that are not ignored by any whitelist.
* Add `-c, --check` option to compare_images_and_print.sh
When this option is specified, compare_images_and_print.sh exits with
a non-zero status if diff.csv contains any unexpected diffs.
Bug: 144398662
Test: Tested manually by creating two directories that contain common
files, whitelisted diffing files and not whitelisted diffing files.
Test: ./compare_images_and_print.sh --help
Test: ./compare_images_and_print.sh --check "-t a b -s SYSTEM -i"
Change-Id: Ie80741d08ef5bc245b409b46ee716ae783428a7d
unzip option: 'unzip -qd target target/* search_path/*' before execution
Bug: 138639389
Test: place zip file in the dir, and then run compare_images with -u
Change-Id: I8ad442f32d8ab5a5e504882c6db0cae166fef42c
os.path.isdir, os.path.exists cannot handle Path type until python 3.5
so cat Path to string type
Bug: 138639389
Test: development/vndk/tools/image-diff-tool/compare_images_and_print.sh "-t path1 path2 -s SYSTEM -i"
Change-Id: I147eac6f2548558737409a7a93ac54f0053a072e
recursive option in glob.glob is supported from 3.5, so use Path.glob
instaed
Bug: 138639389
Test: development/vndk/tools/image-diff-tool/compare_images_and_print.sh "-t path1 path2 -s SYSTEM -i
"
Change-Id: If184b15e1b0be2a80f2f79a281b5093ad177eb6c
1. Rename some variables to more detail
2. Fix a bug that occurs when system.img contains product, system_ext
3. Remove multithread code, it made performance worse :(
before: 136.97s user 1070.22s system 290% cpu 6:55.84 total
after: 56.29s user 76.95s system 105% cpu 2:06.84 total
Bug: 138329983
Test: compare some images, and check if result is same as before
Change-Id: I4cec27475283a34d063ad3251cfc5909c34071c1
system_product_image_diff -> compare_images
it has more general options, so change its name more general
Bug: 131273025
Test: m
Change-Id: I7579f01edb9f8b8f2fe727b405a592b9c6217eb4
Even though some apps has identical contents(code, resource), they looks
different from each other if signing keys are different.
So, for efficiency, add --ignore_signing_key option in compare tool.
If it is set, sha1sum logic is changed.
As-is: sha1sum apk_file
To-be: add every sha1sum of files that are in apk_file except META-INF,
and then get sha1sum from sha1sums
Bug: 135503972
Test: compare two apk of which code and resource is same but signing key
is diffent.
Change-Id: I2176fdfce5f0fc2181073a1a1183c51dfbfaee49
This tool compares system and product image across models, and generate
common.csv and diff.csv
Here is example output
- common.csv:
filename, sha1sum, targets
/system/a, da39a3ee5e, a;b;c
- diff.csv:
filename, sha1sum, targets
/system/b, da39a3ee5e, a;b
/system/c, 3f786850e3, a
/system/c, 89e6c98d92, b;c
Bug: 131273025
Test: m system_product_image_diff
Test: system_product_image_diff -t model1 model2 -s system product
Change-Id: Ie9cc368e0a6d26e956f1e27ebe683bea5e80465c