| Commit message (Collapse) | Author | Age | Files | Lines |
| |\ |
|
| | |
| |
| |
| |
| |
| |
| | |
Bug: http://b/78793027
Test: treehugger
Change-Id: Ie66d12e70bdaf09148e3d672e3c7c3da9e8ab2fe
(cherry picked from commit b7a9956cbc1cd8b1ffff86d13c6bea893a65c74d)
|
| |/
|
|
|
|
|
|
| |
Test: m -j32 adb && ./out/host/linux-x86/bin/adb help 2>&1 | grep instant
Bug: 79422318
Change-Id: I2830a9e3cf81becac1a6334670d8dc487fe72322
(cherry picked from commit 807be77c25276cecd8a939dad2cdb3c7ac1db975)
|
| |
|
|
|
|
|
|
|
|
|
| |
Host services are attempted after handle_host_request, which means that
failing to find a transport to give to handle_forward_request shouldn't
send an error over to the other end.
Bug: http://b/78294734
Test: `adb track-devices` with multiple devices connected
Change-Id: I46c89cc1894b51d48fea7d4e629b1d57f73e3fd6
(cherry picked from commit 78f133d7d46386a2215cd45836354260265ade26)
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Plumb the transport that we received the adb reverse request on through
to reverse_service, instead of trying to get a unique transport on
devices that have multiple active transports (e.g. a device with USB
(even unplugged) connected via TCP).
Bug: http://b/37066218
Bug: http://b/71898863
Test: `echo foo | nc -l 12345 & adb reverse tcp:12345 tcp:12345; adb shell nc localhost 12345` on a device connected via TCP
Change-Id: Iae199ae787f2e344126bbcacca8544cfc9844a4c
(cherry picked from commit 44899eeb53eb6260c20891723709ab38ed246349)
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, processes started via `adb shell` have an oom_score_adj of
-1000, making them invisible to the oom killer. This makes running a
process that consumes all memory (e.g. by leaking in a loop) lead to
the entire rest of the system (including adbd, because of bad
heuristics in the kernel) being oom killed before getting to it.
Bug: http://b/63143027
Test: `adb shell cat /proc/self/oom_score_adj` with adb root
Change-Id: I59111134e36dc271adf4c1dd4bd4400d4fe6aee0
(cherry picked from commit 2de2ade387774effee209a1498f16babab81e4ee)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
OS X reports maxPacketSize as wMaxPacketSize * (bMaxBurst + 1) in the
deprecated GetPipeProperties function. Use the also-deprecated
GetPipePropetiesV2 API to get bMaxBurst and figure out what
wMaxPacketSize is. (This file is going to go away eventually, so don't
bother with switching to the recommended GetPipePropertiesV3, since
it would be a substantially larger charge.)
libusb is unaffected.
Bug: http://b/77733422
Test: python test_device.py
Change-Id: I66517d699a4f39b93ba5eb7882bd8ee6c70f3672
(cherry picked from commit 2ea46521f3c6a275b100737ea071ecd473a38aaa)
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Bug: http://b/77587036
Test: `adb remount` and `adb sync` still work on hikey
(cherry picked from commit 57e97cb7aac9873745ca14dcb005d61fda6a65d0)
Change-Id: Ie49d703dac04e2fb8eda420b9253b8d45b6e1479
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change splits the capability-dropping step of adbd into two. This
is more robust when ambient capabilities are being used, since minijail
cannot currently handle that case.
Bug: 77146512
Test: grep Cap /proc/`pidof adbd`/status
CapInh: 0000000000000000
CapPrm: 0000000000000000
CapEff: 0000000000000000
CapBnd: 00000000000000c0
CapAmb: 0000000000000000
Change-Id: I0476a8d80f7a2497600196932542045f3bc87537
Merged-In: I0476a8d80f7a2497600196932542045f3bc87537
(cherry picked from commit daacf4f6f3aba6e0584103820100da7a7ea81123)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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 2e1e789e2ac34402810321334537a3dd4992705c)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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 bf243a61289b7a4aa87962f1b697472bbd4f07fa)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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 dcc055af644ce87f1590ab82680f3e0ca4cee54c)
|
| |
|
|
|
|
|
|
|
|
|
| |
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 184f4805476af19c2e58dd96c2ce6aa241efaacf)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 1222abc75b7854979e6a9f982004985179bcbede)
|
| |
|
|
|
|
|
| |
Bug: http://b/69813298
Test: none
Change-Id: I0793e793bd52c5f1c639faedf09a513df263db78
(cherry picked from commit 4abb5074bebe7e001ff4a8373718b3ce7fcfdc61)
|
| |
|
|
|
|
|
|
|
| |
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 c970aefadace2203f23f0b028b6c6be16e55dd04)
|
| |
|
|
|
|
|
|
|
|
| |
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 ecb96ac04d7be37eae168658d50003434407b1ac)
|
| |
|
|
|
|
|
|
|
|
| |
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 31b5be69f4f39365ce0faad85faba604a2509022)
|
| |
|
|
|
|
|
|
|
|
| |
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 df3bae9f0675f6cfbe68e64600166e62a403ce7d)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
io_submit sleeps waiting for the gadget
to be enabled. Currently if that sleep
is interrupted it will shut down adb,
causing it to have to start back up again.
Rather than return EINTR if interrupted,
io_submit actually completes and the EINTR
is found later when looking through events.
Since an io that is interrupted will be
small anyway, add a loop to retry small ios.
Also upgrade aio logs in accordance with
their importance.
Fixes: 75981904
Test: adb works, logs show successful interrupt handling
Change-Id: I35973fce130ee849ce59fef80d15b65afb816ba4
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
adb disable-verity will toggle a flag in /vbmeta and introduce AVB
verification error on next boot. If the device is LOCKED, it will make
the device unbootable because verification error isn't allowed when the
device is locked.
Also indicating 'adb root' when failed to get verity state.
Bug: 70969453
Test: adb disable-verity should pop-up warning if the device is locked.
Change-Id: I1ed705e34334ea2231c96b16ddb8d225067af2f0
Merged-In: I1ed705e34334ea2231c96b16ddb8d225067af2f0
(cherry picked from commit 8cc9c3835a7052621b4829324b30f21f0307510e)
|
| |
|
|
|
|
|
|
|
|
|
| |
All devices that previously used ENDPOINT_ALLOC
are on the new async io routines. None of the devices
using aio_compat have ENDPOINT_ALLOC so remove the
code to stop logging failures.
Fixes: 74213465
Test: adb works
Change-Id: I0c903eb76b006b6bcce48cec24f5353fa47cc128
|
| |\
| |
| |
| |
| |
| | |
am: ad4025b35b
Change-Id: I1d4831bc70b8874e66583f4a130b3a711c24b019
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Added by I7255d45335fa009dc9e5de99dff67af52bd70e06
Bug: None
Test: Ran the analyzer. Complaint is gone.
Change-Id: Id9b8debd8b9690210f5a8e19154ee3a5095b8fbd
|
| |\|
| |
| |
| |
| |
| |
| |
| | |
am: 9ba182e3bb
am: 399c3591f2
Change-Id: Ifa340ad4f3ce53786391722a7d4f8b97816dfd20
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Add a way to test LeakSanitizer with the server by adding an
environment variable that intentionally leaks.
Test: ASAN_OPTIONS=detect_leaks=1:leak_check_at_exit=1 ADB_LEAK=1 adb server nodaemon
Change-Id: I7255d45335fa009dc9e5de99dff67af52bd70e06
|
| |\|
| |
| |
| |
| |
| |
| |
| | |
d24c8484c8 am: 677288c80a
am: d12cf88945
Change-Id: Ie9986fe8723ed34ecc787deb72bd75c89f1e8554
|
| | |\ |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Passing in MS_REMOUNT | MS_BIND tells the kernel to only remove the
MS_RDONLY flag and keep all the other flags the same. This is also the
only kind of remount that is allowed in Linux containers (to be more
precise, within user namespaces).
This change also attempts to always run the remount command when dealing
with /, since containers will almost always run a loop device, and since
the number of the device changes, it is not convenient to put it in the
fstab. Plus, the container won't have permission to modify it, but might
be able to perform the remount.
Bug: 72178046
Test: `adb remount` works in both sailfish and Chrome OS
Change-Id: I9e8ec8afcd57f67875a312824667768b3aa89faa
|
| |\| |
| | |
| | |
| | |
| | |
| | | |
am: d8b711e16b
Change-Id: Ifa679ee1857fddf693f9e9b994bb4d9dff3f6c8a
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Previously, reentrant calls to fdevent_run_on_main_thread would
deadlock.
Test: adb_test on host
Change-Id: I0783be0558dcaf61ddbe76d13ac6917fc2de0be0
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We don't actually need to use quick_exit to avoid calling static
destructors, since we have -Wexit-time-destructors to guarantee we
don't actually have any, and this precludes the use of asan's exit time
leak checking, so switch back to atexit/exit.
Test: ASAN_OPTIONS=detect_leaks=1:leak_check_at_exit=1 adb server nodaemon with a manually inserted leak
Change-Id: Id8178913f64cb02c820c5073351369a9e4d8c74d
|
| |\| |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
am: 4d74066425
am: ea9359a957
Change-Id: Ib9b1f7c9c3e59e3cfd3ea492360703d2b7a68119
|
| | |/
| |
| |
| |
| | |
Test: python test_device.py with walleye/x86_64 emulator
Change-Id: I0a18941af1cb2279e5019a24ace25741def1202f
|
| |\|
| |
| |
| |
| |
| | |
am: a91867a788
Change-Id: Ieb0985434e2464e47b3adb93fb27fe5042e91657
|
| | |\ |
|
| | | |
| | |
| | |
| | |
| | |
| | | |
Bug: N/A
Test: builds
Change-Id: I89ad00e1c4c7e0767bc80a7ac7935a4d55e090ac
|
| |\| |
| | |
| | |
| | |
| | |
| | | |
am: 2a7d34014a
Change-Id: I2b763775555659f77e969f1d4d5bc73363afc53b
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If create_service_thread fails, we'll leak `arg`.
This fixes a static analyzer complaint:
system/core/adb/services.cpp:298:13: warning: Potential leak of memory
pointed to by 'arg'
Bug: None
Test: Reran the static analyzer. No more complaints about this leak.
Change-Id: I5aec7fd78f2cc775b650501b02bdf0039d1647ca
|
| |\|
| |
| |
| |
| |
| |
| |
| | |
f6a2296aff
am: 33bedcde5b
Change-Id: I8317d035fe4d65e06bcd849b64654419c051c021
|
| | |\ |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Don't go through a pointless conversion to hex that reduces our maximum
pid to 64k.
Bug: http://b/17661822
Test: `adb jdwp`
Change-Id: Idd572eac827f3ed3825ac2cf55fc4db109e70854
|
| |\| |
| | |
| | |
| | |
| | |
| | | |
am: 07de47eeb3
Change-Id: I935612655924b3263883e0f4bfdba2bdbd9d5386
|
| | | |
| | |
| | |
| | |
| | | |
Test: mma
Change-Id: Id8e7ffd2212449bbac5b64b50e7b3aef7e97d649
|
| |\| |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
854879ecdc
am: 84cd5de121
Change-Id: I33b77e3daef7e7778cce6b05a36b9710f6209af5
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| | |
asocket has a destructor now, so we have to delete it, or leak the
data pointed to by its std::string.
Bug: http://b/73257049
Test: manual testing with asan
Change-Id: Ia88199292cc74e10032a9a16226d3afc61c3e0be
|
| |\|
| |
| |
| |
| |
| |
| |
| | |
e523a6c94f
am: 16bbf3b4cd
Change-Id: Ie46218fe0fff30999f1ca40c509bb7e27fe2cb42
|
| | |\ |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Switch asocket over to taking a std::string instead of apacket* for
data. This allows us to remove asocket specific fields from apacket*.
Test: python test_device.py with x86_64 emulator, walleye
Test: adb_test on host
Change-Id: I9d157ff331a75ba49a54fdd4194e3f6cdff722f4
|