Inefficient to always update the symlinks to overlayfs, can
also lead to
failed to copy 'xxx' to 'yyy': remote symlink failed: File exists
on older variants of overlayfs that do not effectively mark them
deleted.
Test: manual
Bug: 109821005
Change-Id: If1286d76f45ce14087cdb515fe8d2fed198fd9d8
This reverts commit 04b9ca8c31.
The original incarnation of this patch was falsely triggering when our
poll would block with no activity happening for an extended amount of
time. When the poll returned, we would immediately flag that as a spin
loop. Solve this by tracking the last time we looped, to detect this.
While we're at it, switch from CLOCK_MONOTONIC to CLOCK_BOOTTIME, for
the same reason.
Change-Id: Ibcdf69d93f7b6012142cafd72066f39494c1f84b
Test: ./test_device.py
Removed call to external aapt2 process
Replaced several layers of error handling with calls to fatal()
Changed output messages for failures to be more useful for diagnostics
Bug: 116753196
Test: mm
Test: adb install -r --fastdeploy --force-agent --local-agent ~/example_apks/example.apk
Test: adb install -r --fastdeploy --no-streaming --force-agent --local-agent ~/example_apks/example.apk
Change-Id: I6006d8aa584e789a086a31e79a41d1416e54402a
The standard (RFC 1122 - 4.2.2.13) says that if we call close on a
socket while we have pending data, a TCP RST should be sent to the
other end to notify it that we didn't read all of its data. However,
this can result in data that we've succesfully written out to be dropped
on the other end. To avoid this, instead of immediately closing a
socket, call shutdown on it instead, and then read from the file
descriptor until we hit EOF or an error before closing.
Bug: http://b/74616284
Test: ./test_adb.py
Test: ./test_device.py
Change-Id: I36f72bd14965821dc23de82774b0806b2db24f13
Currently `adb remount` won't remount symlink mount points.
In Android Generic System Image, there is a symlink
/product -> /system/product for devices with and without a physical
/product partition to work, respectively:
- Mount product partition under /system/product via
'mount /product' OR
- Keep using /product -> /system/product symlink,
when no product partition
Currently find_proc_mount() is seeking "/product" under /proc/mounts.
But the actual mount path is "/system/product" when GSI is used
on a device with product partition.
Bug: 111539442
Test: adb remount && touch /product/abc on both GSI and non-GSI
Change-Id: I8f15a67109d0a3f4ee18596ef7eb4280c5631b11
Also stop using size_t (which will be 32-bit on Win32) for offsets in
adb_sideload_host, and stop truncating large file sizes in our
"sideload-host" messages.
Bug: http://b/112003354
Test: builds
Change-Id: If5b7cc9d1fc7ff7ca6eaebd20418f7b061846203
Implement a version of fdevent_destroy that returns the file descriptor
previously owned by the fdevent, instead of closing it.
Bug: http://b/74616284
Test: treehugger
Change-Id: I6a14ac96e6b8c801bc71bfcc9094851c158510ae
It was doing a test with `[ -d foo`, without the closing square bracket.
Test: python -m unittest test_device.FileOperationsTest.test_push_empty
Change-Id: I996b98850cf916986ef969768a7235547fcc404a
We can not mount overlayfs on root / as it will intercept all file
transactions. Thus must remount /system instead.
Test: manual
Bug: 109821005
Bug: 115751838
Change-Id: Idf646b8c1ca8a0d006bf64e23a76a7e909f9162a
Add an fstab argument for fs_mgr_overlayfs_mount_all so that it can
leverage the locally and timely acquired fstab entries. Affects all
callers, adb and init.
Test: manual
Bug: 109821005
Bug: 115751838
Change-Id: I96e2045d88525a6ce39bef63327a0fcf0704e9bc
Devices not supporting logical partitions do not require the command.
Bug: 78793464
Test: 'adb reboot fastboot' reboots to bootloader for a device
not supporting logical partitions.
Change-Id: I0a7b6d4335040e24efbf461e2dd2d56ab1985b7f
Bug: http://b/91353691
- libcxx has ETXTBSY for Windows
- adb/sysdeps/memory.h is no longer needed
Test: Build and test Windows binaries under Wine.
Change-Id: I9c27087d46c49cb25b391c4adae8d9e24724784d
For symmetry with test_adb.py, since they have different interpreter
requirements now.
Test: ./test_device.py
Change-Id: I02fe659a7216a619383661c8019d356f9ccfb34d
The system image is now a root image, even on devices that don't use
system-as-root. Fix remount to always remount /, to account for this.
Bug: http://b/115751838
Test: `adb remount; adb shell mount | grep " / "`
Change-Id: I2d89a795bd0bc53af33fe69c9d049bbb64d26f3b
Removed support for -f shortcut flag as this conflicts with some package manager flags
Renamed use_localagent global to match conventions
Fixed case where tmp files were created unnecessarily
Removed dead code (delete_host_file)
Cleaned up multiple layers of error handling by using fatal() as soon as error conditions occur
Fix: 113631900
Test: mm
Test: adb install -r --fastdeploy --nostreaming --force-agent --local-agent ~/example_apks/example.apk
Test: adb install -r --fastdeploy --no-streaming --force-agent --local-agent ~/example_apks/example.apk
Test: observe that fast deploy works as usual
Test: adb install -r -f --nostreaming --force-agent --local-agent ~/example_apks/example.apk
Test: adb install -r -f --no-streaming --force-agent --local-agent ~/example_apks/example.apk
Test: observe that fast deploy is no longer invoked by -f
Change-Id: Ic719df1003ac319e48b32f7f377f6f91d17f6a6f
(cherry picked from commit 0584689beaff604ceeccaf706dc368213d07b977)
deploypatchgenerator is now a dependency of adb
deployagent is now a java_binary target and uses the built in 'wrapper' parameter to bundle deployagent.sh
fastdeploy.cpp code in adb modified to reference deployagent rather than deployagent.sh (required to work with built in wrapper functionality).
removed near-redundant fastdeploy_init and TFastDeployConfig singleton as per:
https://android-review.googlesource.com/c/platform/system/core/+/740521/12/adb/client/fastdeploy.cpp#36
relocated kFastDeployMinApi to more appropriate location
Test: rm -rf $ANDROID_ROOT/out
Test: make sdk -j40
Test: find out/ -iname deploypatchgenerator
Test: observe that deploypatchgenerator.jar has been built as a dependency of the sdk target
Test: 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: I4e52d32f87774b44845bf6b5be0bae331a0b2324