Commit Graph

40383 Commits

Author SHA1 Message Date
Josh Gao 0b54aa1b4b [automerger skipped] adb: fix windows test build.
am: 83ebd8da84  -s ours

Change-Id: Iaeedac9eb300dea9f22c47492215e14e782c6b3f
2018-03-30 20:24:25 +00:00
Josh Gao 2072ce099d adb: bump the local socket backlog to the maximum.
am: abb634308f

Change-Id: I4f99ff20ab664c13e57ffafc78a3896cfb2fdba0
2018-03-30 20:23:55 +00:00
Josh Gao 31ab8c9307 adb: delete vestigial SHELL_EXIT_NOTIFY_FD.
am: cc9414eda4

Change-Id: I3edee6c2431c9fb8b1a6b6f82d63923bd676388e
2018-03-30 20:23:36 +00:00
Josh Gao 96fca43c55 adb: don't immediately close a socket when write fails.
am: 7c87b0739a

Change-Id: I81d8e14285a8272ed0cae45a7e366db628939b20
2018-03-30 20:23:10 +00:00
Josh Gao af7659ec43 adb: make fdevent_run_on_main_thread's fd nonblocking.
am: 3b0146cc37

Change-Id: I1c3c7c73dc0231f1dac1448b374ba485b8eb6a42
2018-03-30 20:22:52 +00:00
Josh Gao 4601fce32a adb: skip IPv6 test if IPv6 isn't available.
am: 9edb94fb6b

Change-Id: Ibc539fe9dac59ac207397971384b53905e642292
2018-03-30 20:22:35 +00:00
Josh Gao 7ca8cf70ee adb: add `adb shell exit 42` stress test.
am: fd6ffb8ad5

Change-Id: Iba1c0898f6480b9d94f1cb48b05f969156a550a8
2018-03-30 20:22:16 +00:00
Josh Gao 61c120202f adb: improve socket tests.
am: e523e4e54b

Change-Id: I55f9e76ad16054f3743174a0827d88bfcf91e67e
2018-03-30 20:21:50 +00:00
Josh Gao 7482ca844d adb: implement std::make_unique, start using it.
am: 28589bbe18

Change-Id: I314e03f66d3c798070e8c84f4028f08b406ee852
2018-03-30 20:21:19 +00:00
Josh Gao 3e352df986 [automerger skipped] adb: add test for flushing socket data after a write failure.
am: 1430d39be6  -s ours

Change-Id: I496900027bd34c11b80e50b57bae12765b3f2585
2018-03-30 20:20:43 +00:00
Logan Chien 1585f471e7 Merge "Allow VNDK-SP extensions to use vendor lib" am: 602af1c488
am: 1cf05129c0

Change-Id: I6a33ff42ac895762fe89e1ebe05165f07d0a83d9
2018-03-30 08:37:29 +00:00
Logan Chien 1cf05129c0 Merge "Allow VNDK-SP extensions to use vendor lib"
am: 602af1c488

Change-Id: Ieb4175ab866b48d6b0474066329891020ebe6563
2018-03-30 08:32:45 +00:00
Logan Chien 602af1c488 Merge "Allow VNDK-SP extensions to use vendor lib" 2018-03-30 07:14:51 +00:00
Jaekyun Seok 401313f8f7 Merge "Allow vendor-init-actionable for ro.board.platform and sys.boot_from_charger_mode" am: a5bf7bad2c
am: 63e16c228e

Change-Id: I1f53688bc49fbc0c43bc98a6c0829dd23e7966cf
2018-03-29 22:29:51 +00:00
Ajit Kumar a3846e7011 [automerger skipped] Merge "Enabled SYS_MODULE capability for wifi@1.0-service" am: 61896fc0ee
am: 57b06ffb3d  -s ours

Change-Id: I1f6c7dfbe20776e8a75af3037c4bb58945347f53
2018-03-29 22:16:23 +00:00
Jaekyun Seok 63e16c228e Merge "Allow vendor-init-actionable for ro.board.platform and sys.boot_from_charger_mode"
am: a5bf7bad2c

Change-Id: I804fb0889f947d041be38ca2138eab99296536de
2018-03-29 22:08:17 +00:00
Ajit Kumar 57b06ffb3d Merge "Enabled SYS_MODULE capability for wifi@1.0-service"
am: 61896fc0ee

Change-Id: I094569ea9db01288af4501c4d16c0d915ca24484
2018-03-29 22:00:55 +00:00
Treehugger Robot a5bf7bad2c Merge "Allow vendor-init-actionable for ro.board.platform and sys.boot_from_charger_mode" 2018-03-29 21:12:46 +00:00
Treehugger Robot 61896fc0ee Merge "Enabled SYS_MODULE capability for wifi@1.0-service" 2018-03-29 20:57:42 +00:00
Josh Gao 09f051ff16 Merge "adbd: spawn login shell when run without a command." am: 31ed2a5c04
am: a7a66f40fd

Change-Id: I7389663e6408154dfc4ca0c81349fe6dc9cefd0e
2018-03-29 20:52:34 +00:00
Josh Gao 1702852f60 Merge "adbd: increase oom_score_adj for `adb shell`" am: db9671090d
am: 1919289d12

Change-Id: If584fabf576841b41a52df2c0c9538a6d4262dd3
2018-03-29 20:51:50 +00:00
Josh Gao 26cc303ba0 Merge "adb: restore adb/adb.exe in the list of artifacts." am: 8043633922
am: b0d408f2f3

Change-Id: Ieeb35e8ade7ed7fb0a9e022ad6e799f990849080
2018-03-29 20:51:19 +00:00
Josh Gao a7a66f40fd Merge "adbd: spawn login shell when run without a command."
am: 31ed2a5c04

Change-Id: I133b09a0a153cb660186126106bceca76b0cba24
2018-03-29 20:35:27 +00:00
Josh Gao 1919289d12 Merge "adbd: increase oom_score_adj for `adb shell`"
am: db9671090d

Change-Id: I728eb8d2ab2e2fe1e06e5aa5681ef57c655184b1
2018-03-29 20:34:54 +00:00
Josh Gao b0d408f2f3 Merge "adb: restore adb/adb.exe in the list of artifacts."
am: 8043633922

Change-Id: I911bcee4317a7854a1e694923f7f35415931e2a2
2018-03-29 20:34:30 +00:00
Josh Gao 31ed2a5c04 Merge "adbd: spawn login shell when run without a command." 2018-03-29 20:19:27 +00:00
Josh Gao db9671090d Merge "adbd: increase oom_score_adj for `adb shell`" 2018-03-29 20:19:03 +00:00
Josh Gao 8043633922 Merge "adb: restore adb/adb.exe in the list of artifacts." 2018-03-29 20:18:58 +00:00
Ajit Kumar b0fc2d743b Enabled SYS_MODULE capability for wifi@1.0-service
Add sys_module capability to enabled insmod operation.

Merged-In: I6436c3297e5318bd00ae3582549a11cb82ccbafd
Change-Id: I6436c3297e5318bd00ae3582549a11cb82ccbafd
(cherry picked from commit c2a059fbf0)
2018-03-29 19:34:06 +00:00
Christopher Ferris c169dac2e6 Merge "Cache DWARF location rules for a given pc." am: 95a524460a
am: 3b9e1866c4

Change-Id: Ib7ffb1a60aa4f364f11c08a5f53832222b358b1b
2018-03-29 15:01:49 +00:00
Christopher Ferris 3b9e1866c4 Merge "Cache DWARF location rules for a given pc."
am: 95a524460a

Change-Id: I8374f20b4e20b01347023ea2703d5d8cf522fe26
2018-03-29 14:56:43 +00:00
Christopher Ferris 95a524460a Merge "Cache DWARF location rules for a given pc." 2018-03-29 14:47:35 +00:00
David Srbecky 3386ebade2 Cache DWARF location rules for a given pc.
Decoding the DWARF opcodes is expensive so make sure we cache it.

This speeds unwinding in simpleperf by over a factor of 3x.

Add unit tests for this new behavior.

Bug: 77258731

Test: libbacktrace/libunwindstack unit tests on host and target.
Test: Ran debuggerd -b on various processes on target.
Change-Id: Ia516c0fa5d3e5f76746190bb4b6fdf49fd1c9388
2018-03-29 14:47:13 +00:00
Logan Chien 8667747a0e Allow VNDK-SP extensions to use vendor lib
This commit adds a wildcard linker namespace link between the "vndk"
namespace and the "sphal" namespace of the system processes.  This is
created for VNDK-SP-Ext to load vendor libs in "sphal" namespace.

Bug: 77249955
Test: lunch aosp_walleye-userdebug && make -j8  # runs unit tests
Test: lunch aosp_sailfish-userdebug && make -j8  # runs unit tests
Test: Create a VNDK-SP-Ext, link to vendor libs, and run it.
Change-Id: I71b0fb604a84272156aa119130c272f891847008
2018-03-29 17:18:40 +08:00
Josh Gao 83ebd8da84 adb: fix windows test build.
The switch over to soong unintentionally turned off building the
Windows tests (and there's a bug preventing them from being turned on).
Preemptively fix the build breakages that'll happen when we turn them
back on.

Bug: http://b/74616284
Test: mma with Android.bp 's/cc_test_host/cc_binary_host' hacks
Change-Id: I6582cfc61b96052537d50d8ba90533dbb66e3e1d
(cherry picked from commit 2e1e789e2a)
2018-03-28 23:36:38 -07:00
Josh Gao abb634308f adb: bump the local socket backlog to the maximum.
The listen backlog seems to be more meaningful on Darwin than on Linux,
resulting in connections failing with ECONNRESET. Bump it up to the
maximum supported value to make this less likely. 128 pending
connections ought to be enough for anybody.

Bug: http://b/74616284
Test: python test_device.py
Change-Id: I5fe0205924188cf18ca1fc1204f923ab5523eeb2
(cherry picked from commit bf243a6128)
2018-03-28 23:36:34 -07:00
Josh Gao cc9414eda4 adb: delete vestigial SHELL_EXIT_NOTIFY_FD.
There exists no path through which a value other than -1 can be written
to the SHELL_EXIT_NOTIFY_FD.

Bug: http://b/74616284
Test: adb_test
Test: adbd_test
Test: python test_device.py
Change-Id: I0630c302ba06bc76917f0445aea75d2dbe1dc865
(cherry picked from commit dcc055af64)
2018-03-28 23:36:32 -07:00
Josh Gao 7c87b0739a adb: don't immediately close a socket when write fails.
When we fail to write to a local socket peer, we might still have data
queued up to send to the other side. Defer closing the socket until
we've failed to both read and write.

Bug: http://b/74616284
Test: python test_device.py
Change-Id: Ifc4b8fe95369b4872e475c2ae4ee611dd2d8b9d7
(cherry picked from commit 184f480547)
2018-03-28 23:36:28 -07:00
Josh Gao 3b0146cc37 adb: make fdevent_run_on_main_thread's fd nonblocking.
If we get a ton of fdevent_run_on_main_thread calls while running one
of the handlers, the socket might become full, which will result in a
deadlock in fdevent_run_on_main_thread when a write to the fd blocks
with the mutex taken. Resolve this by making the fd nonblocking, which
is safe because we always write after appending to the list, and read
before emptying the list, which guarantees that if the byte we write is
consumed, the std::function we appended will be run.

Bug: http://b/74616284
Test: adb_test
Test: python test_device.py
Change-Id: I29319bda2ad7b5a5cdcd91d1d0ddf39f7ab7d115
(cherry picked from commit 1222abc75b)
2018-03-28 23:36:24 -07:00
Josh Gao 9edb94fb6b adb: skip IPv6 test if IPv6 isn't available.
Bug: http://b/69813298
Test: none
Change-Id: I0793e793bd52c5f1c639faedf09a513df263db78
(cherry picked from commit 4abb5074be)
2018-03-28 23:36:20 -07:00
Josh Gao fd6ffb8ad5 adb: add `adb shell exit 42` stress test.
Add a test to hammer on `adb shell exit $n` for flakiness.

Bug: http://b/74616284
Test: python test_device.py
Change-Id: I6a842960f5b55ff739044698f5c9683992fc42f1
(cherry picked from commit c970aefada)
2018-03-28 23:36:17 -07:00
Josh Gao e523e4e54b adb: improve socket tests.
Make it so that the socket tests don't leak until your machine blows up
by switching an infinite loop into an assertion failure.

Bug: http://b/74616284
Test: adb_test
Change-Id: If618c26b224b660548454f542cab79bebe46f80e
(cherry picked from commit ecb96ac04d)
2018-03-28 23:36:14 -07:00
Josh Gao 28589bbe18 adb: implement std::make_unique, start using it.
Add an implementation of std::make_unique for Windows, where we're
currently stuck with C++11, and switch some uses of new over to it.

Bug: http://b/74616284
Test: treehugger
Change-Id: I99b85f07754adda7c525243480c3e0bce9a25ce7
(cherry picked from commit 31b5be69f4)
2018-03-28 23:36:12 -07:00
Josh Gao 1430d39be6 adb: add test for flushing socket data after a write failure.
Add a currently failing test that's a reduced case of the 'concurrent
adb shell' flakiness reported in b/74616284.

Bug: http://b/74616284
Test: changed #if 0 to #if 1, test fails
Change-Id: Id170a185f7c5d2ff44f772f7849a73227f9df441
(cherry picked from commit df3bae9f06)
2018-03-28 23:36:09 -07:00
Jaekyun Seok 1f90ccefb6 Allow vendor-init-actionable for ro.board.platform and sys.boot_from_charger_mode
ro.board.platform and sys.boot_from_charger_mode are already
public-readable, but they should be used as action triggers as well for
some products including Android Go devices.

Bug: 75987246
Test: succeeded building and tested with taimen
Change-Id: I140a8f7ef3fa9823ceced94b00a413800518c240
2018-03-29 14:54:51 +09:00
Bowgo Tsai d3ebdd003b [automerger skipped] Merge "Adding odm.img for `fastboot flashall`" into pi-dev
am: 6c4ed57065  -s ours

Change-Id: I72ae9fe578da0416d8834249bf9e869ab0813221
2018-03-29 04:12:23 +00:00
TreeHugger Robot 6c4ed57065 Merge "Adding odm.img for `fastboot flashall`" into pi-dev 2018-03-29 04:07:32 +00:00
Christopher Ferris 1c12571fb6 Merge "Fix null pointer dereference in RegsArm." am: 85d9e67361
am: 80e8231a0b

Change-Id: Ie7a3d60c5d8d4e2b9e4e5141f176d1e3e2e0457a
2018-03-29 03:35:18 +00:00
Christopher Ferris 80e8231a0b Merge "Fix null pointer dereference in RegsArm."
am: 85d9e67361

Change-Id: Ic560cfe4af12ad43ba6a03bacb54e25ebd60e31f
2018-03-29 03:31:40 +00:00
Christopher Ferris 85d9e67361 Merge "Fix null pointer dereference in RegsArm." 2018-03-29 03:22:57 +00:00