Commit graph

7 commits

Author SHA1 Message Date
Josh Gao
3828ebcdd8 adb: report error in copy_to_file.
Previously, if we failed to read a file after successfully opening it,
(e.g. because it's a directory), we would return prematurely without
notifying our caller, which would then wait forever for a response that
isn't coming.

Switch all of the adb install callsites over to checking the result,
but leave the other callsites ignoring the result, because they're
either deprecated, or don't care.

Bug: http://b/145621968
Test: mkdir foo.apk; adb install foo.apk
Change-Id: Ia82f8280b144f7881e067a10cd17f9a89019cf3f
2020-02-04 13:47:57 -08:00
Alex Buynytskyy
665f3ff5a7 FastDeploy refactor: 2+GB APK support, optimizations, tests.
- removed 2GB apk size cap,
- removed zip archive parsing on device (1.1M->236K agent size reduction),
- optimized matching entries search,
- added more robust matching entries search based on hash of CDr entry,
- reduced patch size by reusing Local File Header of matched entries,
- removed extra manifest parsing and extra agent calls,
- added device-side tests for agent,
- fix for Windows patch creation.

Test: atest adb_test fastdeploy_test FastDeployTests

Total time for 0-size patch reduction for 1.7G apk: 1m1.778s->0m36.234s.

Change-Id: I66d2cef1adf5b2be3325e355a7e72e9c99992369
2019-10-02 13:25:03 -07:00
Yurii Zubrytskyi
6eca0e6999 [adb] Speed up the streaming install
1. Use bigger buffer for transfers - 64kb is the default size
   for push, so let it be the same in streaming

2. Use abb when it's available for lower overhead

3. Add a posix_fadvise() on the source APK

4. Increase buffer sizes for the socketpair that's transferring
the data from adbd.

Overall this saves about 25% time for streaming installations
and makes it faster than the legacy push (at last!)

Test: manual
Change-Id: Ieb84284da2058944815e062ef6e4389b842565fa
2019-08-08 12:55:51 -07:00
Idries Hamadi
ed409eaec2 Integrate adb with fastdeploy
Test: lunch sdk-eng && make sdk -j44
Test: lunch aosp_walleye-eng && cd system/core/adb && mm
Test: adb install -r -f --force-agent --local-agent ~/example_apks/example.apk
Test: adb install -r -f --no-streaming --force-agent --local-agent ~/example_apks/example.apk

Change-Id: Ia1c2160f87ea584656f8fdd67e314a260d39d607
2018-08-06 13:57:47 +01:00
Josh Gao
0cee7ccc59 adb: work around adbd push bug.
We shipped (well, are about to ship) an adbd that spuriously fails to
create directories upon push. Work around this in the adb client by
running a mkdir on all of the directories we would have otherwise
created.

On devices where we perform the workaround, this coincidentally fixes
a historic bug where we failed to push empty directories.

Bug: http://b/25566053
Bug: http://b/110953234
Test: python test_device.py
Change-Id: I690ec356c206fed4e5ab2c681c5570c8b231e26b
2018-07-10 13:20:40 -07:00
Elliott Hughes
31f0f1bcee Fix adb logcat return code.
`adb shell logcat` works, and `adb logcat` should too.

Bug: http://b/110202648
Test: suspended the logd process and manually removed the socket
Change-Id: If14de7c2eb178c7b4210d6bdb44df084615db33a
2018-06-14 10:47:00 -07:00
Josh Gao
2776845aa5 adb: switch over to Android.bp.
Rearrange some files while we're doing this.

Bug: http://b/71721338
Test: manually ran adb on windows
Change-Id: Ie47bda82279e4b9521505ad0353bf9ef649fc7d7
2018-02-28 15:29:50 -08:00
Renamed from adb/commandline.h (Browse further)