Commit graph

4164 commits

Author SHA1 Message Date
Tao Bao
88f7e6a867 Merge \"Handle multiple APKs from the same package in check_target_files_signatures.py.\"
am: 653980bfe4

Change-Id: I9b47c241b8d8c879b6e1794e5c84ad9fd8541613
2016-07-28 04:41:18 +00:00
Tao Bao
6a54299fbd Handle multiple APKs from the same package in check_target_files_signatures.py.
We were using the package name as the key to index APKs. APKs from the
same package got messed up and gave wrong signature summary. Switch to
using the package filename as the key, which is identical in a given build.

Also fix the trailing space when printing the signature summary.

Bug: 30418268
Test: Run with a target_files.zip that has multiple APKs from the same package.

Change-Id: I6317e8c05e987c5690915e05c294153d10e2f0ab
2016-07-27 19:52:28 -07:00
Chih-Hung Hsieh
1955ea00a0 Merge \"Add option to dump HTML warnings per project.\"
am: 620ce44a7a

Change-Id: If37ceb0cbbf43356a9df2681eb192b09c2c6a551
2016-07-27 00:45:13 +00:00
Chih-Hung Hsieh
ff71afa4e0 Merge \"Add performance* to default global tidy checks.\"
am: 32c8bcf0bd

Change-Id: I9bb84dd4e53d84c3c9ad228616fa7f7839075128
2016-07-27 00:45:11 +00:00
Treehugger Robot
620ce44a7a Merge "Add option to dump HTML warnings per project." 2016-07-26 23:04:29 +00:00
Chih-Hung Hsieh
4354a33874 Add option to dump HTML warnings per project.
* Use --byproject flag to dump warnings in HTML file by projects.
* Add external/google and vendor/google projects, vs other
  external/non-google and vendor/non-google projects.
* Refactor code in dumpcategory to dump warnings by projects
  when --byproject is specified.
* Recognize new compiler -Wvarargs warning pattern.
* No change to default HTML output format.

Change-Id: I2406ad392ab18683357ff0ee0cf6c41f87cf399c
Test: run through current build.log files.
2016-07-26 14:53:28 -07:00
Chih-Hung Hsieh
c868293abc Add performance* to default global tidy checks.
* This enables 5 performance related checks:
    performance-faster-string-find
    performance-for-range-copy
    performance-implicit-cast-in-loop
    performance-unnecessary-copy-initialization
    performance-unnecessary-value-param
* Recognize these new warnings in warn.py.

Bug: http://b/27779618
Change-Id: I7af3fdc262dd44db90d3b62eb37c5eac5a2eaa01
Test: build with WITH_TIDY=1 and run warn.py with build.log
2016-07-26 14:36:54 -07:00
Chih-Hung Hsieh
d59fe53668 Merge \"Count warnings per project and dump out CSV format.\"
am: 053c54b554

Change-Id: I22315bc641d501e74b995ddde8d7624fa9a6b883
2016-07-22 01:02:47 +00:00
Chih-Hung Hsieh
48a16ba709 Count warnings per project and dump out CSV format.
* No change to html output, except removing unused "PageTop" anchor.
* Add --gencsv flag to output a CSV file instead of html file.
  CSV files are combined to a table for dashboard charts.
* Count warnings from selected source project directories.
* CSV output lines are:
   num_of_warnings,project_name,warning_description
* project_name is empty for sum of warnings from all projects.
* warning_description could be:
  (1) "<severity>: <warning type description>"
      for one warning type, or
  (2) "<severity> warnings"
      for all warning types of the severity.

Change-Id: I1cf976ed0cf142091226b22665b7f28d383608fd
Test: run through current build.log files.
2016-07-21 14:43:02 -07:00
Chih-Hung Hsieh
bdcc181588 Merge \"Recognize new clang and clang-tidy warnings.\"
am: 6131119708

Change-Id: If307f868da5d961ad3c1cac371ca3e5a42a6b652
2016-07-20 23:08:36 +00:00
Chih-Hung Hsieh
c21ddbdcce Recognize new clang and clang-tidy warnings.
* Count new clang-tidy warnings:
    google-runtime-references
    google-runtime-operator
* Count new clang warnings:
    -Wconst-conversion similar to -Wliteral-conversion
    -Wundefined-var-template
* Modified static analyzer warning message about
    "Null passed to a callee that requires a non-null ..."
* Disable google-runtime-references by default and
  disable misc-macro-parentheses in vendor projects;
  too many old C/C++ code have this warning.

Change-Id: Ib35e0af85875aada17c92b0237b76cd5ae3bfcc8
Test: build with clang-tidy.
2016-07-20 14:45:01 -07:00
Chih-Hung Hsieh
472589e1cb Merge \"Avoid matching the same warning line twice.\"
am: 0cbba3df2a

Change-Id: I641fa895ac7033056833107bf062015987965632
2016-07-18 23:38:24 +00:00
Chih-Hung Hsieh
5ecafd1260 Avoid matching the same warning line twice.
Used to skip only immediately followed identical warning lines.
Now classifywarning is called only once for each unique warning line.

Change-Id: Ie3b77ded70b41dafad91c042dbe15ad2be119e62
Test: run through build.log file
2016-07-18 15:27:02 -07:00
Gaelle Nassiet
f464d8e7d4 Merge \"Fix root_filesystem_config.txt generation\"
am: 461a3283d9

Change-Id: I07ebb4520d02948bff90911d03692d7896dff89c
2016-07-13 23:15:12 +00:00
Tao Bao
461a3283d9 Merge "Fix root_filesystem_config.txt generation" 2016-07-13 23:04:10 +00:00
Tao Bao
538ed261eb resolve merge conflicts of 4058a71 to stage-aosp-master
Change-Id: I0816bfc5d8adb20e175617d97651f1474ce4e916
2016-07-11 09:08:24 -07:00
Tao Bao
62a6c464a2 releasetools: Fix the detection of using squashfs.
We should disable using imgdiff if *any* of the source and target
partitions uses squashfs.

Bug: 30004734
Test: Create an incremental with two builds with one of them uses squashfs.
Change-Id: I826cd13d7b852c548e4b45e61f5ae00f6407cac3
(cherry picked from commit f8acad1480)
2016-07-10 23:16:14 -07:00
Tao Bao
b6568cd4be releasetools: Disable using imgdiff for squashfs.
We use imgdiff to handle files in zip format (e.g. jar/zip/apk) for
higher compression ratio.

For system/vendor in squashfs, a) all files are compressed in LZ4
format; b) we use 4096-byte block size in their sparse images, but the
files in squashfs may not be laid out as 4K-aligned. So the blocks for
a given file as listed in block map may not form a valid zip file, which
may fail the patch generation with imgdiff.

Disable using imgdiff for squashfs images, and use bsdiff instead.

Bug: 22322817
Change-Id: Ie76aa4cece5c9d38cb1d1a34c505a4a8f37512d3
(cherry picked from commit 293fd135c7)
2016-07-10 23:15:48 -07:00
Tao Bao
c4449f819c Merge \"releasetools: Fix the payload public key replacement.\"
am: 8a09095c34

Change-Id: I464ec9dd1a12dcb06bc1dcbf340fdcbac04b9575
2016-07-08 21:09:20 +00:00
Tao Bao
13b6962e8d releasetools: Fix the payload public key replacement.
update_engine expects the extracted public key instead of the
certificate.

Bug: 28701652
Change-Id: I292d39da9e039f96d01a4214226aeb46f8cb881d
(cherry picked from commit afaf295cb8)
2016-07-08 12:52:45 -07:00
Gaelle Nassiet
aa8f2f65a0 Fix root_filesystem_config.txt generation
The first line returned by awk is empty. In consequence, when
fs_config computes its mode it will consider this line as a file (no
trailing slash) and affect the default android_files mode which is
0644. The mode for the root directory should be the default
android_dirs mode 0755.
Add a special case in fs_config to consider empty line as a directory.

Change-Id: I9f33f6fcf4be05c31914db898e65c92b0a611518
Signed-off-by: Gaelle Nassiet <gaellex.nassiet@intel.com>
2016-07-08 10:40:06 +02:00
Alex Klyubin
ee7d7e3506 Merge \"Move apksigner library to tools/apksig.\"
am: c78147c650

Change-Id: I34e66d67736fb0a671f8030b4c94983a908e5d8c
2016-07-07 20:40:05 +00:00
Treehugger Robot
c78147c650 Merge "Move apksigner library to tools/apksig." 2016-07-07 20:33:05 +00:00
Chih-Hung Hsieh
6beef3807d Merge \"Recognize new C/C++ compiler and static analyzer warnings.\"
am: 1734523900

Change-Id: I71b8f324ad88ff38b077ba1763c163f9d80a30fa
2016-07-07 18:24:12 +00:00
Treehugger Robot
1734523900 Merge "Recognize new C/C++ compiler and static analyzer warnings." 2016-07-07 18:07:21 +00:00
Alex Klyubin
1b09a508ba Move apksigner library to tools/apksig.
This moves build/tools/apksigner/core to its own project tools/apksig.
The move also renames the moved Java packages from
com.android.apksigner.core.* to com.android.apksig.* to reflect the
new name of the library.

Bug: 27461702
Change-Id: Iab812ae2b8f0a741014f842460c78e35bc249d43
2016-07-07 10:53:14 -07:00
Alex Klyubin
69c8c38f63 Merge \"APK signer primitive.\"
am: d81beca2b2

Change-Id: I9570df7b5f7a70b4fdd04cbbdeae80d3e5bf9616
2016-07-06 23:14:09 +00:00
Treehugger Robot
d81beca2b2 Merge "APK signer primitive." 2016-07-06 22:59:32 +00:00
Chih-Hung Hsieh
8d14543a9b Recognize new C/C++ compiler and static analyzer warnings.
Change-Id: I5f47c45498c640702922704aa5305a85e9493fcc
Test: run with Android build.log.
2016-07-06 10:22:23 -07:00
Tianjie Xu
85da4d3566 Merge \"Skip copying existing vendor images\"
am: 1767d3f918

Change-Id: I5f929adedb17b6d32d2e0e284aa37c39c643c3ea
2016-06-29 18:45:57 +00:00
Tianjie Xu
aaca421ec1 Skip copying existing vendor images
add_img_to_target_files.py has an option of "-a" to add missing
images only. Under this option, the script should skip copying
the radio images for A/B devices when given image exists already
under "IMAGES/".

Test: Run the command on an A/B device, the existing radio images under "IMAGES/" don't get overwritten; and missing images are added correctly.
Bug: 29608905
Change-Id: Ie034b85a5d777d53e367f99470cea4d19cb1aaaf
2016-06-29 18:32:30 +00:00
Ethan Xia
e4efe69fae Merge \\"releasetools: Change the default key path for bvbtool\\" am: 7c7571d510
am: 090e8eff5e

Change-Id: I34f3cc1a38b860fd3100548f55a38af9faf69e19
2016-06-28 01:59:47 +00:00
Ethan Xia
090e8eff5e Merge \"releasetools: Change the default key path for bvbtool\"
am: 7c7571d510

Change-Id: Ic02f432c689edba37ecce684662d8f5f1cfc32b6
2016-06-28 01:57:26 +00:00
Alex Klyubin
819e8485e4 APK signer primitive.
This adds an APK signer primitive which preserves as much of the input
APK as possible. For example, it preserves the order of APK entries
and preserves their contents, including compressed form and alignment
of data.

Bug: 27461702
Change-Id: I51d07c530480182a66379e70a00f680544ff6214
2016-06-27 11:28:08 -07:00
Ethan Xia
37b4a9819b releasetools: Change the default key path for bvbtool
The bvb path has been changed from 'system/bvb' to 'external/bvb'

Change-Id: I8587351b7d702a287883c6bd3c9de1cd3540435b
2016-06-27 17:19:01 +08:00
Chih-hung Hsieh
a612b58464 Merge \\"Add +/- buttons to expand/collapse warning categories.\\" am: 4837ce8ca6
am: 320d126394

Change-Id: I637c546da197a7d9cc6b1ea91dc6f45f51f7ecda
2016-06-24 18:17:05 +00:00
Chih-Hung Hsieh
320d126394 Merge \"Add +/- buttons to expand/collapse warning categories.\"
am: 4837ce8ca6

Change-Id: I56057da6bae847533cc59e9881e364f632927cd9
2016-06-24 18:12:10 +00:00
Chih-hung Hsieh
4837ce8ca6 Merge "Add +/- buttons to expand/collapse warning categories." 2016-06-24 18:07:44 +00:00
Tao Bao
1ea603491f Merge \\"Fix the path for verity_key replacement when signing.\\" am: 46abc55954
am: 5b9921369e

Change-Id: Iae1fbc6e07d1cada56d0f34b87dad2074b4664a6
2016-06-24 05:30:31 +00:00
Tao Bao
c8338f1c35 Merge \\"Add ability to pass in payload_signer args\\" am: 8e6582b238
am: 8f9df9efb9

Change-Id: I3603ac55a8836406ca60c05959efffffb7ffca3a
2016-06-24 05:30:31 +00:00
Tao Bao
63cc08f93d Merge \\"releasetools: Support using payload_signer.\\" am: 983a42bdf1
am: 9322317ee7

Change-Id: I13c5eede68149c1dda6da9bb33a2527adc05dd8c
2016-06-24 05:30:31 +00:00
Tao Bao
fb45739c55 Merge \\"releasetools: replace verity keyid\\" am: 6efa887f9b
am: 45d28d7392

Change-Id: I2104805b0de9ca28fde19f2c460b540977260dc2
2016-06-24 05:30:30 +00:00
Tao Bao
b2814336a0 Merge \\"Replace OTA keys when signing for A/B devices.\\" am: f2c34ece3c
am: deb116a65d

Change-Id: Ib57f472bdd232a908e0399dc1365f9aaf8ddf3ba
2016-06-24 05:30:30 +00:00
Tao Bao
5b9921369e Merge \"Fix the path for verity_key replacement when signing.\"
am: 46abc55954

Change-Id: I9496d5826e077a470ac0ddd3565e3547611e6bf1
2016-06-24 05:27:03 +00:00
Baligh Uddin
8f9df9efb9 Merge \"Add ability to pass in payload_signer args\"
am: 8e6582b238

Change-Id: I83ab46e365fd09c7bf3d4a97fddf289e5d819ce0
2016-06-24 05:27:02 +00:00
Tao Bao
9322317ee7 Merge \"releasetools: Support using payload_signer.\"
am: 983a42bdf1

Change-Id: I027ae0f71c3a57ffad476791721b111605844f1d
2016-06-24 05:27:02 +00:00
Badhri Jagan Sridharan
45d28d7392 Merge \"releasetools: replace verity keyid\"
am: 6efa887f9b

Change-Id: I63b11e2e0d27100a58a05ea91c0e7c29bb0597ff
2016-06-24 05:27:01 +00:00
Tao Bao
deb116a65d Merge \"Replace OTA keys when signing for A/B devices.\"
am: f2c34ece3c

Change-Id: I7eb287bd486d197b3c2c96616b558e7bc9536329
2016-06-24 05:27:00 +00:00
Tao Bao
8adcfd1688 Fix the path for verity_key replacement when signing.
system_root_image expects the key at ROOT/verity_key as opposed to
BOOT/verity_key. Also refactor the verity key replacement lines.

Bug: 29397395
Test: 'sign_target_files_apks.py --replace_verity_private_key newkey --replace_verity_public_key newkey.pub target_files.zip signed-target_files.zip' and verify the replaced key in boot.img.
Change-Id: I58a5defff4be008ad55d4b5a5b7148569c3b8d66
(cherry picked from commit e0ee794fa1)
2016-06-23 22:17:46 -07:00
Baligh Uddin
34eb000de5 Add ability to pass in payload_signer args
Bug: 28701652
Change-Id: I110d5fc14446e4a6a0f8e25dcb0d300decdf09a4
(cherry picked from commit 2abbbd0333)
2016-06-23 22:16:46 -07:00