1048 Commits

Author SHA1 Message Date
Yi Jin
bdf58942c8 1. Implement Privacy Policy Tag Inheritance
2. Expose Dest values in IIncidentReportArgs.h

Please see bug for detail descriptions.

Bug: 67869340
Test: unit tested and on-device test. Ran command:
$ out/host/linux-x86/bin/incident-section-gen incidentd
to test various of privacy taggings.
Change-Id: I12af3d7da4c7c72bd63598893fe2c1f70b09baa4
2017-12-01 13:37:13 -08:00
Colin Cross
cf3a0b5355 Convert framework.jar to Android.bp
Use Soong to build framework-res.apk and framework.jar.
See build/soong/README.md for more information.

Bug: 69917341
Test: m checkbuild tests docs
Test: manually compare framework.jar and framework-res.apk
Test: manually compare out/target/common/docs
Change-Id: Ibdfe1cbf34d97c43f4857c2c5d7604fa72d5b5a4
2017-11-30 14:14:08 -08:00
Yi Jin
0dc7e54400 Merge "Implement Cpu Freq Section" 2017-11-20 19:34:15 +00:00
Nan Zhang
24c9924797 Merge "Build fontchain_lint using python_binary_host" am: 7ecac139ea am: 7ade558ad2
am: 67695d3aff

Change-Id: I850304f79c1c35bfeb6951307b8ca2365da0330b
2017-11-17 22:30:37 +00:00
Nan Zhang
2db709de30 Build fontchain_lint using python_binary_host
Test: out/host/linux-x86/bin/fontchain_lint
out/target/product/generic/system true external/unicode
Bug: b/27727331

Change-Id: Ib9353d2338c3b939027069f49e3e847c65526581
2017-11-17 09:22:12 -08:00
Yi Jin
0eb223496c Implement Cpu Freq Section
When poll from sysfs, revents return POLLERR by default, handles
this edge case in this cl.

Bug: 68774444
Test: unit tested + on device tests
Change-Id: I23540299c026d3e7676497f56690e9f8646a47bd
2017-11-14 13:22:25 -08:00
Yi Jin
0dfa752e67 Implement System Properties Section
Bug: 68774852
Test: unit tested and on device tests
Change-Id: I0d4aadf8d4203fe56e35bbfb77e5c532116fd27e
2017-11-14 10:54:24 -08:00
Yi Jin
e2f7f79d02 Implement Cpu Info Section
Support carriage return in Read class, and add a new way to parse lines
which is not able to split purly by delimiters

Bug: 65642861
Test: unit test and on device test
Change-Id: Ib82dd4e458bb7d2fa33462b23fbe11b828325916
2017-11-10 17:34:07 -08:00
Yi Jin
04625ad488 Refactor incident_helper to use protoutil and cppstream plugin.
1. Split the parsers to its own file to prevent all the parsers in one
gaint file.

2. Completely get rid of protobuf-cpp-full in incident_helper, use
ProtoOutputStream and cppstream instead, the incident_helper binary is
reduced from ~500K to ~113K.

3. Write data to protobuf even its values are zero/default, the reason
is for example we have a repeated int32 orders = 1; and people
explicitly append 0 so the total repeated field has 10 values, if zero
is not written to serialized data, this repeated field will only have 9
values which is not what we want at first place. This also aligns with
the default protobuf serialization behavior in incident_helper_test.

4. Use Android.bp for protoutil lib since it is not able to depend on
libs compiled by .mk file, it works the other way.

5. Add a new custom message option for streaming_proto, if specified,
the cppstream will create extra metadata to get field ids by field name.
A Table class is created in incident_helper to use it.

Bug: 67860303
Test: unit tested as well as on device test
Change-Id: I8e136fd15f343a4a623d20910ec64b622b478a3e
2017-10-31 16:54:38 -07:00
Colin Cross
9de94c628b Merge "Convert framework-protos to Android.bp" am: d4609af986 am: d78b46eb63
am: 5fec62ceb7

Change-Id: Ice5e7dfcf2ac8d58cde7cc5691271e318a45582d
2017-10-26 01:42:45 +00:00
Colin Cross
747e7c15d8 Convert framework-protos to Android.bp
See build/soong/README.md for more information.

Test: m checkbuild
Change-Id: Id7992ff0cc5d631b64c1fa8e82e8a130ea508236
2017-10-24 17:48:49 -07:00
Jeff Sharkey
01478ec183 Export AIDL for keystore Android.bp.
Test: builds, boots
Bug: 67041047
Change-Id: Iaff1de1f9c015a824ffc1f4946ced4a13d9bd7c1
Merged-In: Iaff1de1f9c015a824ffc1f4946ced4a13d9bd7c1
(cherry picked from commit 0c686e78ad2fbfc9e814bdd3abc5bd66c858c60f)
2017-10-24 16:09:01 -07:00
Jeff Sharkey
0c686e78ad Export AIDL for keystore Android.bp.
Test: builds, boots
Bug: 67041047
Change-Id: Iaff1de1f9c015a824ffc1f4946ced4a13d9bd7c1
2017-10-23 16:04:35 -06:00
Chih-hung Hsieh
e1e0785c38 Merge "Use -Werror in frameworks/base" am: 16fbd3a1d8 am: 0bfb717a37 am: 9f004b1752
am: decc397b26

Change-Id: Id4abbc6cb95b2eb96f535b6c1c5295cb27c9d2b0
2017-10-16 20:39:41 +00:00
Chih-hung Hsieh
0bfb717a37 Merge "Use -Werror in frameworks/base"
am: 16fbd3a1d8

Change-Id: Iab69cf4f99cf4bedd12eb7764c773a893bfe5343
2017-10-16 19:24:53 +00:00
Colin Cross
ad90a766fa Merge "Convert ext.jar to Android.bp" am: 42156f3e56 am: 8feea076a2 am: faededa6af
am: 3f6bef874e

Change-Id: Icb72ff3997c59a605f7339014b48c8eb4ee13795
2017-10-15 03:30:06 +00:00
Colin Cross
8feea076a2 Merge "Convert ext.jar to Android.bp"
am: 42156f3e56

Change-Id: I44443e9095c8b527ebb42d11a6f5369fdf3e5d05
2017-10-15 02:06:20 +00:00
Chih-Hung Hsieh
c7edf078f9 Use -Werror in frameworks/base
* Fix unused variable and return value warnings.

Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I890e65a20848d00559ba5a4f9691be1347b456af
2017-10-13 16:25:16 -07:00
Colin Cross
42156f3e56 Merge "Convert ext.jar to Android.bp" 2017-10-13 01:08:01 +00:00
Chih-hung Hsieh
e640a8284d Merge "Revert work around clang-tidy segmentation fault."
am: a47e513464

Change-Id: Ie04d0d16a05c35a865776571f95078e63bc1bf47
2017-10-04 06:38:31 +00:00
Chih-hung Hsieh
a47e513464 Merge "Revert work around clang-tidy segmentation fault." 2017-10-04 06:26:42 +00:00
Steven Moreland
862fed56a1 Merge "Convert java hwbinder mk -> bp." am: 53c945fb71 am: 7bebf15460 am: e215488334
am: ae1d9692e1

Change-Id: Ice41676c739aa9df308cf68dab652913195307d5
2017-10-04 04:39:30 +00:00
Steven Moreland
ae1d9692e1 Merge "Convert java hwbinder mk -> bp." am: 53c945fb71 am: 7bebf15460
am: e215488334

Change-Id: Ic24c9d2af58e58aa97e0ad1f8b2ff50f7db66007
2017-10-04 04:29:26 +00:00
Steven Moreland
7bebf15460 Merge "Convert java hwbinder mk -> bp."
am: 53c945fb71

Change-Id: Ia1bde2b32e824f160dd4e768531b6b48179f7ba5
2017-10-04 04:11:38 +00:00
Steven Moreland
eddafe990f Convert java hwbinder mk -> bp.
This library is used to avoid a circular dependency
between frameworks.jar and HIDL hal definition libs.
It is not installed on the device.

Bug: 33420795
Test: m -j hwbinder and things it depends on
Change-Id: I44cc670383f80275026ea892151524599b713087
2017-10-04 03:40:15 +00:00
Chih-Hung Hsieh
ca8dbebe1e Revert work around clang-tidy segmentation fault.
Bug: 34740546
Test: build with WITH_TIDY=1 and
WITH_TIDY_CHECKS="*,-readability-*,-google-readability-*,-google-runtime-references"

Change-Id: If99c75cab6a2bec0c6b38aa17189668b4943478d
2017-10-03 20:23:10 -07:00
Colin Cross
d8e0225188 Convert ext.jar to Android.bp
See build/soong/README.md for more information

Switches to using static libraries for tagsoup and nist-sip to avoid
reference source files in another project.

Test: m -j checkbuild
Change-Id: I5d4c7729196dd78da63bd9d6b43647f6f61006cb
2017-10-02 17:14:22 -07:00
Yi Jin
757c659160 Merge "Implement PageTypeInfo section" 2017-09-14 21:43:10 +00:00
Yi Jin
810b14f5c2 Implement PageTypeInfo section
Bug: 65560369
Test: unit tests written, manually tested in incident_report tool
Change-Id: Ibb588fe3affc9675db4cfc2835eea31d1bbb701b
2017-09-14 11:47:44 -07:00
Yi Jin
7e0b4e5880 Fixes regarding to comments in ag/2839267
1. use struct {} to instantiate privacy fields for efficiency reason
2. use vector<uint8_t>* instead of vector<uint8_t>& to indicate the
caller knows the value gets changed.
3. binary search privay policy for sections

Bug: 65595927
Test: unit test covers
Change-Id: Ic58c2f607465d1a7f10352b9a38c3d8b1a5cf352
2017-09-13 14:32:42 -07:00
Dan Willemsen
2e9ec5f0de Merge changes I93cf24d4,I32e438ef am: 30798ad13a am: c28d591b36
am: 59225490b8

Change-Id: I6cf57e951900b3df816070feee0d3bf92a6a5a7d
2017-09-10 02:05:05 +00:00
Dan Willemsen
c28d591b36 Merge changes I93cf24d4,I32e438ef
am: 30798ad13a

Change-Id: I0b178c8523d0c5829d731f6ed05cfa3fe89ad9b4
2017-09-10 01:44:06 +00:00
Dan Willemsen
d3eac266b0 Convert host tools to Android.bp
See build/soong/README.md for more information.

Test: m libinstrumentation interrupter accessorychat accessorytest bit obbtool pbkdf2gen libsplit-select_tests split-select protoc-gen-javastream validatekeymaps libaapt_tests aapt
Test: mmma frameworks/base
Test: out/host/linux-x86/nativetest64/libaapt_tests/libaapt_tests
Test: out/host/linux-x86/nativetest64/libsplit-select_tests/libsplit-select_tests
Change-Id: I93cf24d4b232353a52d53be8ed85781b8f4a3877
2017-09-09 06:18:48 +00:00
Yi Jin
b44f7d46b6 This cl implements CommandSection and use it to add procrank.proto Section
Bug: 63863444
Test: manual - create gtests for CommandSection and Procrank Parser following
instructions in the README.md of incidentd and incident_helper on how to
run them.

Change-Id: I099808fd13bf9ed9a564b122f1126b1691a83291
2017-08-02 16:33:17 -07:00
Yi Jin
0a3406fc4f This cl does the following things:
0) Implements a skeleton of incident_helper
1) Implements FileSection class which calls incident_helper to parse
   file content to protobuf
2) Adds Kernel Wake Sources to incident.proto and makes it parsed by
   FileSection
3) Adds basic gtests to test FdBuffer, io_utils, FileSection
implementation

Bug: 62923266
Bug: 62926061
Test: manual - push incidentd, incident_helper and incident to my device
      and verify kernel wakeup sources file is able to be parsed.
Change-Id: I2aa6b6158d962ce70e6fa6c8a9c42213a45ff41c
2017-07-24 11:50:33 -07:00
yawanng
e725325270 Revert work around clang-tidy segmentation fault.
Bug: 34740546
Test: build with WITH_TIDY=1 and
WITH_TIDY_CHECKS="*,-readability-*,-google-readability-*,-google-runtime-references"

Change-Id: Ie0885744bdf07d1a66792b61d8a49305162bcd71
2017-06-12 09:45:47 -07:00
Colin Cross
eb27d2798a Convert libmedia_jni to Android.bp
See build/soong/README.md for more information.

Test: m -j checkbuild
Change-Id: I1817c75ee45537ca0d5fc40a035f94a3dfeccc11
Merged-In: I1817c75ee45537ca0d5fc40a035f94a3dfeccc11
(cherry picked from commit 76de4f6b4d09423b3a5d3603527ce79acae4ed32)
2017-05-17 03:02:21 +00:00
Colin Cross
76de4f6b4d Convert libmedia_jni to Android.bp
See build/soong/README.md for more information.

Test: m -j checkbuild
Change-Id: I1817c75ee45537ca0d5fc40a035f94a3dfeccc11
2017-05-16 13:07:57 -07:00
John Reck
915883b9f0 Switch to protobuf lite
Fixes: 36272398

Protobuf lite isn't just smaller, it also doesn't
have the problematic DescriptorPool at all. So no
need to switch this to a shared library.

Test: hwui_unit_test passes and doesn't crash. CTS incident tests pass
as well

Change-Id: I2693ba2c47af89a5c561c4f63cc7e1f509ebbbec
2017-05-12 10:44:46 -07:00
Colin Cross
af737306f9 Convert libandroid and libandroid_runtime to Android.bp
See build/soong/README.md for more information.

Test: m -j checkbuild
Change-Id: Ie3c9c3d3c8c75ade36422d1e8ee0a5fe117e9091
(cherry picked from commit 3f8fd40f285dba5b3639ee1e3d4e4544048c1446)
2017-05-06 00:50:39 +00:00
Colin Cross
3f8fd40f28 Convert libandroid and libandroid_runtime to Android.bp
See build/soong/README.md for more information.

Test: m -j checkbuild
Change-Id: Ie3c9c3d3c8c75ade36422d1e8ee0a5fe117e9091
2017-05-04 13:00:21 -07:00
Colin Cross
2bcc40bde1 Convert libplatfomprotos to Android.bp
See build/soong/README.md for more information.

Test: m -j checkbuild
Change-Id: I0b45697d1042cb1647f2609b2257444dede84d2a
(cherry picked from commit aa0d4355d78a94b2c6557983d1fa9aa6c529294c)
2017-05-04 17:01:47 +00:00
Colin Cross
aa0d4355d7 Convert libplatfomprotos to Android.bp
See build/soong/README.md for more information.

Test: m -j checkbuild
Change-Id: I0b45697d1042cb1647f2609b2257444dede84d2a
2017-05-03 16:40:57 -07:00
Fabien Sanglard
191602091b AAPT2: Convert Android.mk to Android.bp
Change-Id: I6c563993b57e3f04165ca57743f9a2878aba556c
2017-01-13 18:56:55 -05:00
Svetoslav Ganov
74c9983e80 Fix vulnerability in MemoryIntArray
MemoryIntArray was using the size of the undelying
ashmem region to mmap the data but the ashmem size
can be changed until the former is memory mapped.
Since we use the ashmem region size for boundary
checking and memory unmapping if it does not match
the size used while mapping an attacker can force
the system to unmap memory or to access undefined
memory and crash.

Also we were passing the memory address where the
ashmem region is mapped in the owner process to
support cases where the client can pass back the
MemoryIntArray instance. This allows an attacker
to put invalid address and cause arbitrary memory
to be freed.

Now we no longer support passing back the instance
to the owner process (the passed back instance is
read only), so no need to pass the memory adress
of the owner's mapping, thus not allowing freeing
arbitrary memory.

Further, we now check the memory mapped size against
the size of the underlying ashmem region after we do
the memory mapping (to fix the ahsmem size) and if
an attacker changed the size under us we throw.

Tests: Updated the tests and they pass.

bug:33039926
bug:33042690

Change-Id: Ib8e50afcdb5475123968572ac9696e8ed4031631
2016-12-07 22:43:56 +00:00
Colin Cross
4f8d9e69eb Convert libandroidfw to Android.bp
See build/soong/README.md for more information.

Test: libandroidfw_tests
Change-Id: I4e575d62f724d5ffe43f12ff5642fb6799f7819e
2016-12-02 09:33:18 -08:00
Dan Albert
7ce8df32a7 Move libjnigraphics to ndk_library.
The headers are already migrated because they're in
frameworks/native/include/android, which was covered when migrating
libandroid.

Test: make native
Bug: http://b/30465923
Change-Id: I610dc6c613f2a408960088a86629073da38682a0
2016-09-27 13:59:05 -07:00
Dan Albert
2a8d9c20bd Migrate libandroid.so to ndk_library.
Test: make native
Bug: http://b/30465923
Change-Id: I956b5014c4da4dce1ce28da706b9d868eba4cce3
2016-09-27 13:59:04 -07:00