Commit graph

28710 commits

Author SHA1 Message Date
Mark Salyzyn
700ba9591c Merge "liblogcat: introduce getopt_long_r" am: 58381648b1
am: 68741efbe3

Change-Id: I12097e6e01528c7ba9b6f95355fd7ff648accfe8
2017-03-06 18:32:49 +00:00
Mark Salyzyn
68741efbe3 Merge "liblogcat: introduce getopt_long_r"
am: 58381648b1

Change-Id: I3a3994f8f5d5f52b47239bd9aebb849a14eb3c8c
2017-03-06 18:26:20 +00:00
Treehugger Robot
58381648b1 Merge "liblogcat: introduce getopt_long_r" 2017-03-06 18:18:48 +00:00
Mark Salyzyn
e9ade17418 liblogcat: introduce getopt_long_r
Resolve one of the threading issues by creating a private C++ified
copy of getopt_long_r that started out its life as the bionic
getopt_long, but is reentrant.  Adds a new state context for the
stderr stream called optstderr.  Utilize this new function in logcat.
Control opterr and optstderr to match liblogcat expectations.  Correct
and fortify const.

Alternative would be to lock around _all_ getopt callers.  This has
the advantage of requiring _no_ locks that could get in the way of
using liblogcat in a signal handler.  The log reader interface does
run the risk of incurring locks and heap allocations though, so there
is more work to be done for that final goal.

Test: gTest logcat-unit-tests
Bug: 35326290
Change-Id: Ibb1b374c55d357d5d7fa5ad00bfaf07ae0bc4ba5
2017-03-06 08:40:16 -08:00
Mark Salyzyn
9f051eec77 Merge "liblog: logprint, error return and truncated data" am: 07169227e1
am: f7f0b53aec

Change-Id: I3cf6ba292a61cb68b9fa822120217ad99141bc82
2017-03-06 16:39:05 +00:00
Mark Salyzyn
f7f0b53aec Merge "liblog: logprint, error return and truncated data"
am: 07169227e1

Change-Id: I2adb74fe54dfb6a4a6cc4b3f1a2898d7e0650560
2017-03-06 16:36:38 +00:00
Mark Salyzyn
07169227e1 Merge "liblog: logprint, error return and truncated data" 2017-03-06 16:31:35 +00:00
Ralph Nathan
d5f9ba7d0c Merge "Convert libbinderwrapper_test_support to be a static library" am: f5dea8b393
am: 062a372ca7

Change-Id: I3aabdf2d60774be20a675020c4b652a61a4a5deb
2017-03-04 07:11:18 +00:00
Ralph Nathan
062a372ca7 Merge "Convert libbinderwrapper_test_support to be a static library"
am: f5dea8b393

Change-Id: I4288e975812fa753393faf8e82831eeab10957fd
2017-03-04 07:08:48 +00:00
Treehugger Robot
f5dea8b393 Merge "Convert libbinderwrapper_test_support to be a static library" 2017-03-04 07:03:34 +00:00
Ralph Nathan
823aeffbcf Convert libbinderwrapper_test_support to be a static library
Some unittests require libbinderwrapper_test_support.so and fail
because it isn't on userdebug images.

Bug: 30631078, 35804180
Test: `make dist`

(cherry picked from commit 6515f36e43082ea105115de7e34d9cd09c77220a)

Change-Id: I4d8878de8963d0cbd29d6aca4b233ba674121688
2017-03-03 17:14:04 -08:00
Elliott Hughes
9208ed7d51 Merge "Small debuggerd improvements." am: 4463c820a6
am: 24cb6dd765

Change-Id: Ib778422f09d9d7fbfbc1069769097c7abf514adb
2017-03-04 00:37:02 +00:00
Elliott Hughes
24cb6dd765 Merge "Small debuggerd improvements."
am: 4463c820a6

Change-Id: I893c52600464c2541c2be8701d831a4d11e12836
2017-03-04 00:33:24 +00:00
Josh Gao
c92f1c2ba7 Merge "adb: turn on libusb by default." am: 817b2f3b2c
am: ef501512fa

Change-Id: If47ca0f1e6d09ff3dc9481f9cd68e6ff315f7781
2017-03-04 00:33:21 +00:00
Josh Gao
ef501512fa Merge "adb: turn on libusb by default."
am: 817b2f3b2c

Change-Id: Iaeefdcc45a5b96243b0b47822361d71c6e154b6e
2017-03-04 00:31:11 +00:00
Elliott Hughes
4463c820a6 Merge "Small debuggerd improvements." 2017-03-04 00:20:14 +00:00
Josh Gao
817b2f3b2c Merge "adb: turn on libusb by default." 2017-03-04 00:11:10 +00:00
Alex Klyubin
712ba302d0 Merge "Track the move of split SELinux policy CIL files" am: 8df4dded13
am: c46245a541

Change-Id: Ib3feef2a0c7db446208be74620116562ba1f8121
2017-03-03 21:53:22 +00:00
Alex Klyubin
c46245a541 Merge "Track the move of split SELinux policy CIL files"
am: 8df4dded13

Change-Id: I4c6f911ab9aa6062370e90d15f82a470cdcf8147
2017-03-03 21:50:26 +00:00
Alex Klyubin
8df4dded13 Merge "Track the move of split SELinux policy CIL files" 2017-03-03 21:43:24 +00:00
Mark Salyzyn
b1d150bc42 liblog: logprint, error return and truncated data
android_log_processBinaryLogBuffer and android_log_processLogBuffer
error return should have message and messageLen fields set to zero,
or to a valid-but-truncated buffer so that we can discern the
difference.  This will resolve an issue with reporting content from
an uninitialized field in liblogcat should caller add --debug flag.

To enhance the debugging capability, truncated string events because
of the logger limits are provided rather than dropping the field, but
still with an error return.

Some minor coding style issues resolved. Add required, or remove
extraneous spaces.  Use C-style comments only.

Test: gtest liblog-unit-tests
Bug: 27405083
Bug: 35326290
Change-Id: I4a7ddd7278fb1c582f921e1ba10e0765fadb791b
2017-03-03 11:10:11 -08:00
Alex Klyubin
c2a4c9ab9a Track the move of split SELinux policy CIL files
The three CIL files comprising split sepolicy are being moved from the
root directory to system and vendor directories based on whether the
file is for platform/system policy or non-platform/vendor policy.

Test: Device boots, no additional SELinux denials. This test was run
      for a device which has split policy and for a device which has
      monolithic policy.
Bug: 31363362
Change-Id: Ica49f0beae56be0f1cea7117e48bf2f6af8b848b
2017-03-03 10:35:10 -08:00
Alex Klyubin
b049bdc72a Merge "Include correct type of SELinux policy" am: 0ab93fdf3a
am: 18a826024b

Change-Id: I1f6da6ef96992bd46dde751da92a4e4063616758
2017-03-03 03:59:46 +00:00
Alex Klyubin
18a826024b Merge "Include correct type of SELinux policy"
am: 0ab93fdf3a

Change-Id: I2e82f03f15767296004acee2b04887888f849e6e
2017-03-03 03:55:40 +00:00
Treehugger Robot
0ab93fdf3a Merge "Include correct type of SELinux policy" 2017-03-03 03:50:49 +00:00
Elliott Hughes
12b7129406 Small debuggerd improvements.
Include the ABI in seccomp causes.

Slightly improved command-line usage information.

Fix crasher for seccomp failures.

Bug: N/A
Test: crasher
Change-Id: Ie419ecfe72ee4f5ccf49c927be18350a58a66a90
2017-03-02 19:01:20 -08:00
Keun-young Park
6ca378ba56 Merge "use ro.persistent_properties.ready for persistent props ready" am: 22cc398d76
am: 37bdcfcbdb

Change-Id: Ifebdb2473b434e489d7b516820a5f9ce3837178c
2017-03-02 22:46:29 +00:00
Keun-young Park
37bdcfcbdb Merge "use ro.persistent_properties.ready for persistent props ready"
am: 22cc398d76

Change-Id: Iead2f1ea10b5293ebb177292802e551e3e55bd58
2017-03-02 22:43:50 +00:00
Keun-young Park
22cc398d76 Merge "use ro.persistent_properties.ready for persistent props ready" 2017-03-02 22:41:30 +00:00
Alex Klyubin
b51f9abf45 Include correct type of SELinux policy
This makes the build system include split SELinux policy (three CIL
files and the secilc compiler needed to compile them) if
PRODUCT_FULL_TREBLE is set to true. Otherwise, the monolitic SELinux
policy is included.

Split policy currently adds around 400 ms to boot time (measured on
marlin/sailfish and bullhead) because the policy needs to be compiled
during boot. This is the main reason why we include split policy only
on devices which require it.

Test: Device boots, no additional SELinux denials. This test is
      performed on a device with PRODUCT_FULL_TREBLE set to true, and
      on a device with PRODUCT_FULL_TREBLE set to false.
Test: Device with PRODUCT_FULL_TREBLE set to true contains secilc and
      the three *.cil files, but does not contain the sepolicy file.
      Device with PRODUCT_FULL_TREBLE set to false contains sepolicy
      file but does not contain the secilc file or any *.cil files.
Bug: 31363362

Change-Id: I419aa35bad6efbc7f936bddbdc776de5633846fc
2017-03-02 13:25:17 -08:00
Josh Gao
f2f0b31850 adb: turn on libusb by default.
Bug: http://b/31321337
Test: python test_device.py
Change-Id: Idb2ff1108331bf505feeeb943b6be7bb78124618
2017-03-02 13:23:56 -08:00
Marissa Wall
3f4c0aa72a Merge changes I66d4fc71,I686dce91,I31325c76 am: 497cb085c7
am: 2993cc1e07

Change-Id: I65a08bed13c477193c38ac6770b5a92cef3ccca9
2017-03-02 21:00:40 +00:00
Marissa Wall
2993cc1e07 Merge changes I66d4fc71,I686dce91,I31325c76
am: 497cb085c7

Change-Id: I4a8ada072f2a131db3ff0e8abb6d7aaba9ccf501
2017-03-02 20:57:50 +00:00
Treehugger Robot
497cb085c7 Merge changes I66d4fc71,I686dce91,I31325c76
* changes:
  libadfhwc: Fix adf_hwc_close
  libadfhwc: add adf_set_active_config_hwc2 support
  libadfhwc: support hwc2 display attributes
2017-03-02 20:54:44 +00:00
Bo Hu
f71bf5345f Merge "DO NOT MERGE ANYWHERE Qemu-pipe: refactor qemu_pipe.h into libqemu_pipe" am: 8c35491151 -s ours
am: 21e2e90eb8  -s ours

Change-Id: I2f4e7716ecac5d8b2d6b3ec0cfca3e37212054b9
2017-03-02 18:13:27 +00:00
bohu
8d00827b1f DO NOT MERGE ANYWHERE Qemu-pipe: refactor qemu_pipe.h into libqemu_pipe am: 294d44be33 -s ours
am: cb95cfa1f4  -s ours

Change-Id: I14390fd41a1f6879c8ff6d35d68e1a408b64ba91
2017-03-02 18:12:36 +00:00
Bo Hu
21e2e90eb8 Merge "DO NOT MERGE ANYWHERE Qemu-pipe: refactor qemu_pipe.h into libqemu_pipe"
am: 8c35491151  -s ours

Change-Id: Id963d9bb263e5bc2553f16497ddf8a08bb1fd77f
2017-03-02 18:10:31 +00:00
bohu
cb95cfa1f4 DO NOT MERGE ANYWHERE Qemu-pipe: refactor qemu_pipe.h into libqemu_pipe
am: 294d44be33  -s ours

Change-Id: I50c8def74e6bec2e1071000e0530ffb9920a14a6
2017-03-02 18:09:36 +00:00
Bo Hu
8c35491151 Merge "DO NOT MERGE ANYWHERE Qemu-pipe: refactor qemu_pipe.h into libqemu_pipe" 2017-03-02 18:03:30 +00:00
Marissa Wall
956f1f64a1 libadfhwc: Fix adf_hwc_close
The adf hwc event thread now responds to pthread_kill which
allows adf_hwc_close to succeed.

Test: Call "adb shell stop" and check if thread exits.
      This change will allow testing of libadfhwc in future patches.

Change-Id: I66d4fc71a058db42af8d42b5d6193378a8b5d972
2017-03-02 17:40:16 +00:00
Marissa Wall
b4f0041421 libadfhwc: add adf_set_active_config_hwc2 support
Add the necessary set mode support to enable HWC2's set_active_config

Test: run gtests located in frameworks/native/services/surfaceflinger/tests/hwc2
Change-Id: I686dce91a2d8fe86db13c66d22f81960c2f8e8f2
2017-03-02 17:40:09 +00:00
Marissa Wall
9dcd750d81 libadfhwc: support hwc2 display attributes
adf_getDisplayAttributes_hwc2 gets the display attributes using the updated
enums from HWC2

Test: run gtests located in frameworks/native/services/surfaceflinger/tests/hwc2
Change-Id: I31325c764ccaf65c6d970727b56327d24c7b16d8
2017-03-02 17:40:02 +00:00
Alex Klyubin
9000f0f868 Merge "Use split SELinux policy at boot, if available" am: 056eca201b
am: a3ccbe6abc

Change-Id: If5325bc1a9de07becf72eed295116889323055c2
2017-03-02 01:13:52 +00:00
Alex Klyubin
a3ccbe6abc Merge "Use split SELinux policy at boot, if available"
am: 056eca201b

Change-Id: Ib56a7c0f50babf6eaa70bea083610ff484d784d9
2017-03-02 01:08:21 +00:00
Treehugger Robot
056eca201b Merge "Use split SELinux policy at boot, if available" 2017-03-02 01:02:15 +00:00
bohu
294d44be33 DO NOT MERGE ANYWHERE Qemu-pipe: refactor qemu_pipe.h into libqemu_pipe
Traditionally, qemu_pipe has both the declaration and implentation of each
function in one header file--qemu_pipe.h, and it is getting incovenient to
maintain.

This CL separates the implementation of functions from the header file,
and makes qemu_pipe a static library for other modules to link to.

Note that the interface and implementation of qemu_pipe are kept unchanged,
and future CLs will enhance the implementation to make it more reliable and
more compatible with old and new API levels.

Following projects are affected by this refactoring, and they are modified
accordingly:

device/generic/goldfish
device/generic/goldfish-opengl
hardware/ril/reference-ril

Change-Id: I541ecbf0cc7eadeef9d4e37ffd9ca7bfcc5c94c0
2017-03-01 16:33:44 -08:00
Mark Salyzyn
2a9ce60dc6 Merge "liblogcat: -v and ${ANDROID_PRINTF_LOG} support comma separated list" am: a02a42ecb1
am: 7fa61d6878

Change-Id: I9d2c583e3b675bebb6909bf14c9c78cf8188de41
2017-03-02 00:02:50 +00:00
Mark Salyzyn
fe4e8518cb Merge "liblogcat: replace NULL with nullptr" am: 7826f853bc
am: dcf6021ee1

Change-Id: I553c77d877e18424566bb14111bad2adbfa2cf1e
2017-03-02 00:02:39 +00:00
Mark Salyzyn
7fa61d6878 Merge "liblogcat: -v and ${ANDROID_PRINTF_LOG} support comma separated list"
am: a02a42ecb1

Change-Id: Ib840fe387efc669aec8aa61ec5b6dfa6b25726d8
2017-03-01 23:57:50 +00:00
Mark Salyzyn
dcf6021ee1 Merge "liblogcat: replace NULL with nullptr"
am: 7826f853bc

Change-Id: Ic2e33c1c81cbbb83b459359403739cd98fdab2e7
2017-03-01 23:57:39 +00:00