Previously, when push --sync was used with multiple files, we tried to
stat a remote file with pending acknowledgements still in the socket
buffer, which leads to an abort when we read ID_OKAY instead of the
response we were expecting.
This patch changes the behavior to always wait for acknowledgements if
we're pushing with --sync (or `adb sync`). This results in a ~100ms
regression during a 10 second sync of every file on the system image,
but that's not very much, so perhaps we should consider doing this
always.
Bug: http://b/166155032
Test: test_device.py
Change-Id: I7110243071ba5fbaa77dcc76f42a19d9ed2b4195
During boot sequence there can be multiple calls to mount_all. For the
userspace reboot to correctly remount userdata, we need to store the
return code of the one that was responsible in mounting userdata.
Test: adb root
Test: adb shell setprop init.userspace_reboot.is_supported 1
Test: adb reboot userspace
Test: checked dmsg
Bug: 166353152
Change-Id: Id0ae15f3bcf65fa54e4e72b76f64716c053af7fb
This tool allows users to estimate the COW size for a non-A/B update.
It works by scanning the partitions of two target-files packages, and
identifying moved or copied blocks, and simulating the impact in the new
COW format.
It has two modes:
estimate_cow_from_non_ab_ota -ota_tf <path>
Will estimate the COW size for a full OTA. For an incremental OTA, you
need two target files packages:
estimate_cow_from_non_ab_ota -source_tf <path> -ota_tf <path>
There is an optional -compression argument which accepts either "none"
or "gz".
Bug: 161497962
Test: manual test
Change-Id: I335059cd870a464f34c5d644eefefdc76775386e
delta_generator in update_engine needs to know number of bytes written
to estimate cow image sizes. This change modifies CowWriter::Finalize to
return relevant information.
Test: unnitest
Change-Id: I7cf6b9124b90f089a7c5f3850c38200f82da18e6
Fix the memfd_create(2) path and add the missing unit test.
Bug: https://issuetracker.google.com/165667331
Test: treehugger
Change-Id: Ibb5c1d0f9d7caba1df04d1f03e82e55026d9f86a
We are porting cuttlefish to Android, it currently uses libsparse to
desparse Android filesystems to be used directly as disk images by
crosvm. Making this library available to 'vendor' enables us to support
desparsing downloaded images on-device as well.
Bug: 167675429
Change-Id: I8ae4a916cfb0b2002dd9e462f32e8cb0e533d821
The input code is the only customer of PropertyMap. For easier
maintenance and eventual removal of it, move it to libinput.
Currently, the caller is responsible for managing the lifecycle of the
returned outMap when calling PropertyMap::load. However, the fact that
the function call allocates new memory is not obvious from the function
signature.
In a separate commit, I will refactor the function to return
Result<unique_ptr<>> to make it less errorprone.
In this commit, only move the files around to make code reviews easier.
Bug: 163171599
Test: atest inputflinger_tests
Change-Id: I316084886c3f09a1776fdb449d2f03d0563b66c1
1) `logcat -g` now contains 'readable', so fix sscanf() appropriately
2) Remove tests that the security buffer isn't returned as an error,
since it's not important to hide this buffer from the logging front
end, and more importantly: the expected failures no longer happen.
3) Update invalid_buffer for the new error format.
Test: logcat-unit-tests
Change-Id: I1a607815bdc7b1135e9a0e97f8b7334f2d259e31
This is not possible in the real world, so prevent this particular case
to avoid leaking memory and any other issues.
Bug: 165619316
Test: Verified the fuzzer test case that caused a leak no longer leaks.
Change-Id: I352b3bd21a4931432e015af89c256ddbcdaa1070
Create directories under /data/local/tests at boot for atest to use
to execute tests on the device.
Bug: 138450837
Test: atest binderVendorDoubleLoadTest memunreachable_unit_test memunreachable_binder_test
Change-Id: Ic8e5031ad8701a063be14b6db760feb78f3eb412
The build system has added the new target named 'linux_cross' which is
the cross-compiled (i.e. arm on x86) host target. libfastboot is now
configured to use usb_linux.cpp not only for linux_glibc (which is the
native host target using glibc), but for all Linux-based host targets
including linux_glibc, linux_bionic, and the new linux_cross.
Note that the device target 'android' is also included in the 'linux'
target. But that doesn't cause a problem because libfastboot is a host
library which is not enabled for the device target.
Bug: 159685774
Test: HOST_CROSS_OS=linux_cross m
out/soong/host/linux_cross-arm64/bin/fastboot
Change-Id: I3a2191b0878a26914cb0282ecf41a45296827c04
When use_version_lib is set to true, but build::GetBuildNumber() isn't
used, the library can't be processed by symbol_inject. For example,
$ m out/soong/.intermediates/system/core/adb/libadb_sysdeps/android/arm64_armv8-a_shared/versioned/libadb_sysdeps.so
FAILED:
out/soong/.intermediates/system/core/adb/libadb_sysdeps/android_arm64_armv8-a_shared/versioned/libadb_sysdeps.so
out/soong/host/linux-x86/bin/symbol_inject -i
out/soong/.intermediates/system/core/adb/libadb_sysdeps/android_arm64_armv8-a_shared/unstripped/libadb_sysdeps.so
-o
out/soong/.intermediates/system/core/adb/libadb_sysdeps/android_arm64_armv8-a_shared/versioned/libadb_sysdeps.so
-s soong_build_number -from 'SOONG BUILD NUMBER PLACEHOLDER' -v $(cat
out/soong/build_number.txt)
symbol not found
17:09:10 ninja failed with: exit status 1
This is because the visibility of the symbol `soong_build_number` in
libbuildversion.a is hidden via the -fvisibility=hidden flag for the
library. In addition, -Wl,--gc-sections strips the hidden symbol when
it is not referenced.
This fortunately hasn't caused a problem because, for the device target,
the output of symbol_inject was used only for dist outputs.
libadb_sysdeps wasn't registered as dists. So
versioned/libadb_sysprops.so never had a chance to be built. For the
host target, in the other hand, the output of symbol_inject is used
always, but --gc-sections is not used for host targets. So the symbol
wasn't stripped and therefore symbol_inject could always find the
symbol.
This however is expected to cause a problem when the support for
LinuxCross is added. It is one of the host targets, therefore
symbol_inject is always used. However, unlike other host targets,
--gc-sections is turned on because it inherits most of the flags from
Android/ARM64.
To avoid the problem, we might want to disable --gc-sections for the
target. But regardless of the decision, having a build rule that always
fails is not desirable - even though the build rule is essentially never
triggered. Therefore, we choose to not use version lib for
libadb_sysdeps because GetBuildNumber() is not used in the lib.
Bug: 159685774
Test: m \
out/soong/.intermediates/system/core/adb/libadb_sysdeps/android/\
arm64_armv8-a_shared/versioned/libadb_sysdeps.so
Change-Id: Ide1056b5b55e409ab809e302a697d10d759c92ce
There are a few bugs in this routine, so fix them and add unit tests
to cover the cases.
Test: Unit tests pass.
Change-Id: I9bcb9b9fbe33d56a17a613ae3aa88036bd1d0ef1
A previous cl missed adding a return in the new path which could result
in a crash if the map info is null. Add the return back.
Added a new test to catch this case.
Bug: 166188440
Test: Unit tests pass. Verified the new test crashes on the old code.
Change-Id: I9420b47dae0f880493c0e6a60d97bb3468ff2906