Test: manual - make sure it works in both IPv4/IPv6 env.
BUG: 31537253
Change-Id: Ica492bff34a8c0441516a213d0e8b78fcdfd3282
Signed-off-by: Tao Wu <lepton@google.com>
HIDL requires file descriptors to be wrapped in native_handle_t. We want
a low overhead way to do that when the number of file descriptors is known
at compile time. Instead of
// wrap an fd in native_handle_t
native_handle_t* fd_handle = native_handle_create(1, 0);
if (!fd_handle) {
// clean up and return error
}
fd_handle->data[0] = fd;
hidl_cb(..., fd_handle);
native_handle_delete(fd_handle);
this change adds native_handle_init to allow for
// wrap an fd in native_handle_t
NATIVE_HANDLE_DECLARE_STORAGE(fd_storage, 1, 0);
native_handle_t* fd_handle = native_handle_init(fd_storage, 1, 0);
fd_handle->data[0] = fd;
hidl_cb(..., fd_handle);
Test: make libcutils
Bug: 32021609
Change-Id: If1fd07482243d37492fdea57c602a1b13c8953cc
Modify BacktracePtrace::Read to use the process_vm_readv syscall
instead of doing multiple ptrace calls.
Test: Ran the backtrace unit tests on host and on x86_64 emulator.
Change-Id: I24c2787f6713d8eb44312f3aa751d1f6d9d34719
Provide more details regarding test failures
Test: manual, forced a failure, reports actual command issued
Bug: 30566487
Change-Id: I2431dbd335685b5eaef54ba6bd688b8588018aa9
bug: 31950237
There are two lists of active ADB transports (devices),
and with the emulator, they can go out of sync.
This CL more conservatively checks if there are no
transports in either list before commiting to
register a new transport for the emulator.
(cherry picked from commit edaedfd5da)
Change-Id: Id1201dc59c70825881dad80925c2e5bcc13dbd5e
Use nasty clone hacks to let us close random file descriptors to be
able to connect to debuggerd when the fd table is full.
Bug: http://b/32013594
Test: crasher exhaustfd-SIGSEGV
Change-Id: I47772e9a5994da4473bd935b105d9c36827c017a
CL in [1] fixed the wrong mode for the root directory from 0644 to 0755.
However it only handles the path by calling mkbootfs with canned
fs_config (i.e. with -f flag). When calling mkbootfs without -f flag, it
still treats the root directory as a file. This renders the generated
boot/recovery images w/ and w/o -f being different, and leads to the
incorrect checksums in /system/bin/install-recovery.sh.
[1] commit aa8f2f65a030f71506277e2a8d64d83a099e9feb.
Bug: 31988535
Test: `make dist` and verify the checksums in /system/bin/install-recovery.sh.
Change-Id: Ib50fadb23367da0b46944ae0579093da21412593
- Add TEMP_FAILURE_RETRY around all relevant system calls.
- Cleanup some of the read calls.
- Add error log messages when read/write calls do not actually read/write the
expected number of bytes.
- Add error messages for write failures in fuse_status/fuse_replay.
Test: Attached to the sdcard process and stepped through most of the modified
Test: code. Also, create/read/write/delete files in /storage/emulated/0
Test: directory.
Change-Id: I73e4c0db861960f4c0af1bf96b06cd61fa74be69
Use fixed length types for structs going over the wire, constify
arguments where possible, use char* instead of unsigned char* for
apacket data, and assorted other refactoring.
Bug: http://b/29273531
Test: python test_device.py with every combination of old/new adb and adbd
Change-Id: I0b6f818a32be5386985aa4519f542003cf427f9d
All of the functions in adb_auth.cpp were used in only one of
adb/adbd. Split up them up into adb_auth_host.cpp and adbd_auth.cpp
respectively.
Bug: http://b/29273531
Test: built and flashed bullhead, adb still works
Change-Id: Ib610c5157522634cc273511175152f1306cc52a7
CHUNK_HEADER structure type allows DATA chunk to be up to MAX_UINT
large.
The write() callback LEN parameter should be unsigned int.
Also:
- write() callback should continue to write data if less than expected
data have been written.
- gzerror() returns LEN on success, 0 otherwise
Test: manual
Change-Id: Id46d664b84c1a506f419524fe28055f784c2ae7a
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Since commit 8ad80763e4 has removed
'#include "ext4_sb.h"', there's no more reference to ext4_utils headers.
Test: `mmma system/core/adb`
Change-Id: I7ca1a6e91f1e0de84238c2a7facbebe9600a3d87
On 64 bit system, calculates to roughly 80 bytes of metadata and
list overhead for each entry.
In unit test example, we report 3388987 bytes of logging data and
overhead total, showmap reports 4652K of dirty data. We still want
to account for the remainder (fragmentation, other sources of
internal allocations etc).
Test: see values and check math
Bug: 31942525
Change-Id: I75f3162ce691faf1ae5a5dec18939fea535ede7e
Undo zero-termination-substitution for linebreaks when logging.
This results in handing the complete log message to the aborter.
Add a test.
Bug: 31893081
Test: mmma system/core/base && $ANDROID_HOST_OUT/nativetest64/libbase_test/libbase_test64
Change-Id: I2ef6c6351db2fd494a02985f634f439104136227