Commit Graph

30073 Commits

Author SHA1 Message Date
Treehugger Robot dbe9ab1074 Merge "Fix "fastboot oem"." 2017-05-11 23:40:59 +00:00
Mark Salyzyn 1423041905 Merge "logd: validate and fill in socket credentials"
am: 17254f59a2

Change-Id: I987d058e7245f5cb9a3603b3f52f7fa947d5dea7
2017-05-11 22:14:10 +00:00
Mark Salyzyn ed1e53fc77 Merge "logcat: test: inject for *.event_tag_filter"
am: 2841b4efe0

Change-Id: Ic1fb5ed5bb304ab4a6fa3e55414a07e73c5d546b
2017-05-11 22:13:48 +00:00
Elliott Hughes 29d5d7d718 Fix "fastboot oem".
Broken by d6365a7052.

Bug: https://issuetracker.google.com/38216236
Test: "fastboot oem uart enable"
Change-Id: I672d5b96bb16fd77e7af61115b8a38606c691ea8
2017-05-11 15:05:13 -07:00
Treehugger Robot 17254f59a2 Merge "logd: validate and fill in socket credentials" 2017-05-11 21:49:30 +00:00
Treehugger Robot 2841b4efe0 Merge "logcat: test: inject for *.event_tag_filter" 2017-05-11 21:48:38 +00:00
Renaud Paquay 9cf71d784e Merge "Fix uninitialized member variable"
am: 46bb1ffa8a

Change-Id: I102f6414d6846186327f68b5dae2e23eadfa0502
2017-05-11 21:04:41 +00:00
Mark Salyzyn 1961eab662 Merge "logd: test: check sepolicy background rate before testing"
am: 5a40c42877

Change-Id: I785965cc1c27d598f3293493d133e7b865c98d59
2017-05-11 21:04:16 +00:00
Siarhei Vishniakou 04daed4793 Merge "Adding 'uhid' permission for access to /dev/uhid."
am: cecbc9993d

Change-Id: I0cfcdaac7685f10a6f2b5e9bfc54a83cc5385da2
2017-05-11 20:48:04 +00:00
Mark Salyzyn c4e4823b00 logd: validate and fill in socket credentials
- android::pidToUid() additional checking.  Make sure if we have to
  convert a PID to an UID that the parse of /proc/<pid>/status
  requires a trailing space after the number
- android::tidToPid() added, in the same vein as android::pidToUid().
- stats.tidToPid() added
- If no credentials, set PID to 0 and UID to DEFAULT_OVERFLOWUID
- If credentialed PID is 0, use stats.tidToPid()
- If credentialed UID is DEFAULT_OVERFLOWUID, use stats.pidToUid()

Test: remove +passcred from logd.rc for daemon and confirm very few
      UID=65534 or PID=0 cases actually show up
Bug: 37985222
Change-Id: I7d20506e70e67beb3043d1537cf9450ab58dc278
2017-05-11 12:21:02 -07:00
Treehugger Robot 46bb1ffa8a Merge "Fix uninitialized member variable" 2017-05-11 19:17:21 +00:00
Mark Salyzyn 24b79ce2bc logcat: test: inject for *.event_tag_filter
Inject a message for event_tag_filter and bucket tests. The former
registered an occasional failure.

Switch order of EXPECT checks so that constant is on the right so
that error reports make more sense.

Test: gTest logcat-unit-tests --gtest_filter=*.event_tag_filter
Test: gTest logcat-unit-tests
Bug: 37791296
Change-Id: Ic2536e6e4c95e3a913ad0ea4c22219aa3c5c01eb
2017-05-11 12:16:06 -07:00
Treehugger Robot 5a40c42877 Merge "logd: test: check sepolicy background rate before testing" 2017-05-11 19:13:52 +00:00
Siarhei Vishniakou cecbc9993d Merge "Adding 'uhid' permission for access to /dev/uhid." 2017-05-11 19:02:32 +00:00
Renaud Paquay b7a4f0b9e2 Fix uninitialized member variable
The default constructor of FileMap was missing an initializer for the
mFileMapping variables. This results in CloseHandle being called with
a "random" value, which can cause havoc in Win32 process over time (e.g.
in the case of libaapt2_jni.dll, which is loaded in a JVM process).

Also, update the code to use "NULL" for invalid file map handle
and "INVALID_HANDLE_VALUE" for invalid file handle.

Bug: 38197857
Test: Stress testing on (Windows) machine
Change-Id: Ibd769219d601fbafcfcee89e848b31cc5137826c
2017-05-11 10:30:52 -07:00
Mark Salyzyn c51ecf9238 logd: test: check sepolicy background rate before testing
logd.sepolicy_rate_limiter_* tests can fail individually so join them
together into one test.  The new test logd.sepolicy_rate_limiter
fails as a group if the background sepolicy activity is too high, so
check it and report a warning that the test can fail as a result so it
can be forgiven during unit testing.  The failure remains as a VTS
performance threshold that requires investigation.

The test takes a total of 45 seconds to run, it was split up as this
approaches the 60 second test timeout on go/apct.

Test: gTest logd-unit-tests --gtest_filter=logd.sepolicy_rate_limiter
      (run in loop ensuring passes do not interfere with eachother)
Bug: 37791296
Change-Id: Ia865241f684c6b0de428702cbd5110dc17927c66
2017-05-11 17:16:30 +00:00
Siarhei Vishniakou 0729dd1edb Adding 'uhid' permission for access to /dev/uhid.
This CL is in support of another CL c/2048848, topic
'Refactor hid command in /frameworks/base/cmds' in
internal master. Adding the permissions for
shell here to access uhid_node as part of the
new 'uhid' group.

Bug: 34052337
Test: Tested on angler, bluetooth mouse works OK.

Change-Id: If9e100aa1262d689fb8adc5c0ce93f157c96399e
2017-05-11 01:28:53 +00:00
Josh Gao 162ec283cf Merge changes I0ff1fc5c,I7a23d3bf
am: 7d199de8e2

Change-Id: I6f47c2f66d79b8d26c239c974dcea34e4e8fef67
2017-05-10 23:54:41 +00:00
Chih-Hung Hsieh 4a926efc49 Merge "Work around clang-tidy segmentation fault."
am: d761dd747e

Change-Id: I51913166b123b41e31c23da8c0def798057dd556
2017-05-10 23:54:12 +00:00
Josh Gao 7d199de8e2 Merge changes I0ff1fc5c,I7a23d3bf
* changes:
  libdebuggerd: print the build fingerprint in fallback.
  libdebuggerd: implement fallback register dumping on arm/aarch64.
2017-05-10 23:24:38 +00:00
Treehugger Robot d761dd747e Merge "Work around clang-tidy segmentation fault." 2017-05-10 23:11:19 +00:00
Josh Gao 8016a0aa11 Merge "adb: fix darwin build break."
am: a0661237e1

Change-Id: If89dd3fa27da4316122802af234b6104c2a8ef58
2017-05-10 22:08:44 +00:00
Josh Gao a0661237e1 Merge "adb: fix darwin build break." 2017-05-10 21:58:10 +00:00
Josh Gao 362b4041f3 adb: fix darwin build break.
Fix the following build breakage:

    system/core/adb/client/usb_osx.cpp:433:13: error: static declaration of 'usb_cleanup' follows non-static declaration
    static void usb_cleanup() NO_THREAD_SAFETY_ANALYSIS {
                ^
    system/core/adb/usb.h:48:5: note: previous declaration is here
        ADB_USB_INTERFACE(native::usb_handle*);

Bug: http://b/38203892
Test: mma on linux, darwin
Change-Id: I1c042e4d64ddcc0713f329202bc2037e590a9b4f
2017-05-10 13:58:51 -07:00
David Zeuthen 7ea2c2814d fs_mgr: Update for new libavb API.
In https://android-review.googlesource.com/#/c/392873/ we slightly
changed the libavb API. This CL updates fs_mgr to use the new API.

Bug: 38157502
Test: Manually tested.
Change-Id: Ia3371e11fcd81fcc1d147f030cd62af67943aad5
2017-05-10 15:45:12 -04:00
Josh Gao b7f3707cd3 Merge changes I394f5782,I9475f5d0,I59707186
am: 44f6592b0d

Change-Id: Ic1a62436b98f986e129a6b08d1ab939b70d5f3e6
2017-05-10 19:01:57 +00:00
Josh Gao 44f6592b0d Merge changes I394f5782,I9475f5d0,I59707186
* changes:
  adb: move all cleanup to a function with defined ordering.
  adb: make `adb kill-server` wait for the server to die.
  adb: libusb: replace sleep with timed CV wait.
2017-05-10 18:42:14 +00:00
Elliott Hughes 86698112b9 Merge "Fix style nits in adb's Android.mk."
am: 30b7f59efc

Change-Id: I6a2ff9ba9967e16917397141ced113d5a884d826
2017-05-10 17:55:03 +00:00
Elliott Hughes 30b7f59efc Merge "Fix style nits in adb's Android.mk." 2017-05-10 17:43:54 +00:00
Elliott Hughes f8627cea7f Add libkeyutils.
Also move init over to it.

Bug: http://b/37991155
Test: builds+boots
Change-Id: I5113a9d96a5ce0a0f3bad71134d6cc4f7b41a57e
2017-05-10 10:40:11 -07:00
Elliott Hughes 8964fbfa5f Fix style nits in adb's Android.mk.
We [try to] always use trailing \s in lists.

Bug: N/A
Test: builds
Change-Id: Ibc1ccacbe8a31f784f206d29a8c4f0f4650f7bde
2017-05-10 08:41:50 -07:00
Elliott Hughes f2f3c3b91c Merge "Fix build error when (ADB|FASTBOOT)_VERSION has space"
am: 3d29736d6b

Change-Id: I8b3fa683884606e441340940e52114c5f94bb484
2017-05-10 15:26:37 +00:00
Elliott Hughes 3d29736d6b Merge "Fix build error when (ADB|FASTBOOT)_VERSION has space" 2017-05-10 15:11:28 +00:00
SzuWei Lin b3526e1ee8 Fix build error when (ADB|FASTBOOT)_VERSION has space
Test: make, and build pass
Change-Id: I8fc608a5b8bccb43b8af72978ce16a945147f62d
2017-05-10 18:52:02 +08:00
George Burgess IV 951d7e953e Merge "fix static-analyzer logging/CHECK macros"
am: 01e7990a10

Change-Id: If2094a3c41fe95b6c5727e65cbd02cb6d88a08d8
2017-05-10 03:08:12 +00:00
Dimitry Ivanov 55ecc6ff6f Merge "Explicitly enable greylist for classloader-namespaces"
am: 2f2cd76d4d

Change-Id: I6dd5c358aa34da3166bfb5e7f579677f1ae2b7eb
2017-05-10 03:07:51 +00:00
Treehugger Robot 01e7990a10 Merge "fix static-analyzer logging/CHECK macros" 2017-05-10 03:05:40 +00:00
Treehugger Robot 2f2cd76d4d Merge "Explicitly enable greylist for classloader-namespaces" 2017-05-10 02:53:32 +00:00
Elliott Hughes 3602f6141a Merge "Show the "platform tools" version in adb/fastboot --version."
am: 6f4d47438d

Change-Id: I5ff109186b29b9770f61506eb4cfb99ce71db4e9
2017-05-10 01:51:38 +00:00
Bowgo Tsai c82235ebbd Merge "first stage mount: removing the requirement of by-name prefix for AVB"
am: cdad92fdad

Change-Id: Id15d51e8e7e6e4767bf965e22a109aa49cbc8d6e
2017-05-10 01:51:07 +00:00
Treehugger Robot 6f4d47438d Merge "Show the "platform tools" version in adb/fastboot --version." 2017-05-10 01:41:41 +00:00
Treehugger Robot cdad92fdad Merge "first stage mount: removing the requirement of by-name prefix for AVB" 2017-05-10 01:37:28 +00:00
Dimitry Ivanov 9e253ce6b7 Explicitly enable greylist for classloader-namespaces
The linker no longer enables greylist by default, it
needs to be explicitly enabled by specifying corresponding
flag.

Bug: https://issuetracker.google.com/38146125
Test: builds
Change-Id: Ib593f2d9a35dbadffb436f5fbc9a2a7a8f64ada0
(cherry picked from commit 058b2ea8c5)
2017-05-09 18:00:38 -07:00
Steven Moreland 1e0a523d68 Merge "trusty*: Android.mk -> Android.bp"
am: e732d15337

Change-Id: Ie1e78fe387312f16aeee17d818999e9cc12d9ef9
2017-05-09 22:43:47 +00:00
Elliott Hughes f22da9a1ba Merge "Make fastboot command-line parsing a bit more like adb."
am: 0a253390d1

Change-Id: Ic9543862b6a6fd0d4ae70e5370890f6cc2e68b4c
2017-05-09 22:43:17 +00:00
Treehugger Robot e732d15337 Merge "trusty*: Android.mk -> Android.bp" 2017-05-09 22:32:49 +00:00
Elliott Hughes 0a253390d1 Merge "Make fastboot command-line parsing a bit more like adb." 2017-05-09 22:15:24 +00:00
Josh Gao 01b7bc43e9 adb: move all cleanup to a function with defined ordering.
We want to explicitly define the order in which we teardown adb, so
move all of the at_quick_exits sprinkled throughout into one function
containing all of the cleanup functions.

Bug: http://b/37104408
Test: adb kill-server; adb start-server
Change-Id: I394f5782eb147e394d4b87df1ba364c061de4b90
2017-05-09 14:32:47 -07:00
Josh Gao b3c14ec693 adb: make `adb kill-server` wait for the server to die.
Make the host:kill service shutdown its socket on process exit, instead
of immediately. Also, unify the two 'kill-server' implementations and
hide _adb_connect.

Bug: http://b/37104408
Test: adb kill-server; adb start-server
Change-Id: I9475f5d084d5fb91d33e393f2fd4e34056613384
2017-05-09 14:31:15 -07:00
Josh Gao 707a6e469f adb: libusb: replace sleep with timed CV wait.
Instead of sleeping for 500ms at the end of every device poll loop, use
a timed condition variable wait so that we can tell the device poll
thread to immediately commit suicide.

Bug: http://b/37869663
Test: adb kill-server; adb start-server
Change-Id: I597071866f7d9ef91900411727345d32c1a97556
2017-05-09 14:30:13 -07:00