Commit Graph

24163 Commits

Author SHA1 Message Date
Treehugger Robot 14a7725f26 Merge "Continue using the legacy NDK android/log.h." 2016-10-14 21:03:54 +00:00
Dan Albert b7c3996f7c Continue using the legacy NDK android/log.h.
system/core/android/log.h needs some work before it can be included in
the NDK. It defines a *lot* of macros that previously were usable
names in NDK sources that used android/log.h. As an example, the
following file defines LOG_TAG as a variable, but the variable name
gets macro replaced if we use the current android/log.h.
4adc1515f8/framework/platform/android/tcuTestLogParserJNI.cpp (41)

For now, we keep a copy of the old NDK android/log.h in
legacy-ndk-includes.

Test: make checkbuild
Bug: http://b/30465923
Change-Id: I8ce942d1ee2f8f0d4c27130802c03992a1b85ec4
2016-10-14 13:12:29 -07:00
Treehugger Robot 5171bebf41 Merge "Remove socket_loopback_client." 2016-10-14 18:21:38 +00:00
Treehugger Robot 955648a915 Merge "Rely on the platform -std default." 2016-10-14 02:28:38 +00:00
Elliott Hughes a4398c1abe Merge "Move off std::sto* function which abort on failure." 2016-10-14 01:51:10 +00:00
Treehugger Robot c32d7fd66f Merge "Fallback to IPv6 when IPv4 is not available in adb" 2016-10-14 01:35:43 +00:00
Elliott Hughes dd92a0a812 Remove socket_loopback_client.
Bug: http://b/31537253
Test: builds
Change-Id: If02c8107206fb60e4622f8937bee0d0a362e1c7d
2016-10-13 16:51:46 -07:00
Elliott Hughes da46b392f1 Move off std::sto* function which abort on failure.
Bug: http://b/31403370
Test: builds, boots, libbase tests pass
Change-Id: I89cd7ca3d8f1c8a1bad0ddf3043439449d19a293
2016-10-13 15:34:05 -07:00
Chia-I Wu d790aae4bc Merge "Add native_handle_init" 2016-10-13 22:18:11 +00:00
Treehugger Robot bf0cf4e22d Merge "Use process_vm_readv to read memory." 2016-10-13 17:14:31 +00:00
Tao Wu 7b700763f5 Fallback to IPv6 when IPv4 is not available in adb
Test: manual - make sure it works in both IPv4/IPv6 env.
BUG: 31537253
Change-Id: Ica492bff34a8c0441516a213d0e8b78fcdfd3282
Signed-off-by: Tao Wu <lepton@google.com>
2016-10-13 08:54:43 -07:00
Elliott Hughes 58f7f61266 Merge "Start retiring socket_loopback_client." 2016-10-13 14:38:48 +00:00
Chia-I Wu b843791b61 Add native_handle_init
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
2016-10-12 18:04:41 -07:00
Treehugger Robot 5980fe4aff Merge "logcat: test: report system(command) details" 2016-10-12 21:28:49 +00:00
Christopher Ferris 279843e139 Use process_vm_readv to read memory.
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
2016-10-12 12:43:55 -07:00
Mark Salyzyn 56cddcd72e logcat: test: report system(command) details
Provide more details regarding test failures

Test: manual, forced a failure, reports actual command issued
Bug: 30566487
Change-Id: I2431dbd335685b5eaef54ba6bd688b8588018aa9
2016-10-12 12:10:08 -07:00
Treehugger Robot f7a1c476ff Merge "Fix adb flakiness on reboot" 2016-10-12 00:25:11 +00:00
Lingfeng Yang 1197952e71 Fix adb flakiness on reboot
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
2016-10-11 23:19:51 +00:00
Elliott Hughes 139b372fab Start retiring socket_loopback_client.
Bug: http://b/31537253
Test: can still talk to adb
Change-Id: Icfd7f00d35cf963befc139e81904790b4b8b67c0
2016-10-11 13:45:03 -07:00
Treehugger Robot bd6c6eb0e4 Merge "Remove useless arguments from is_adb_interface." 2016-10-10 22:50:13 +00:00
Treehugger Robot 09dac589f1 Merge "liblog: adb: move security interfaces to private" 2016-10-10 21:54:31 +00:00
Elliott Hughes 36e0d390a2 Rely on the platform -std default.
Bug: http://b/32019064
Test: builds
Change-Id: I18a1d816d63b64601485045070851f32d44e85eb
2016-10-10 14:31:12 -07:00
Treehugger Robot 06928658c4 Merge "debuggerd: report crashes even when out of file descriptors." 2016-10-10 21:22:27 +00:00
Josh Gao 30186df0f0 Remove useless arguments from is_adb_interface.
Test: mma
Change-Id: I8b7b411d7d5ec9d401b61ed8f817b98c61114d4f
2016-10-10 13:44:00 -07:00
Tao Bao 5bc3ce85cf Merge "Update the header path for ext4_utils." 2016-10-10 20:07:32 +00:00
Christopher Ferris 54c211db2e Merge "Small clean up of fuse code." 2016-10-10 19:22:24 +00:00
Mark Salyzyn 6debf985aa liblog: adb: move security interfaces to private
Test: Compile & adb functioning
Bug: 19235719
Bug: 26552300
Bug: 31289077
Bug: 31456426
Change-Id: I7ad8963bcca3d8b5c37b547c11d163b652d35556
2016-10-10 15:15:45 +00:00
Tao Bao 6d881d6db4 Update the header path for ext4_utils.
Test: `mmma system/core`

Change-Id: I6291d10d6c8d4972aeca55596baa83f555496193
2016-10-09 10:23:36 -07:00
Glenn Kasten db7715c7dd Merge "Traverse /etc/init in a well-defined order" 2016-10-09 17:11:03 +00:00
Treehugger Robot 3dee9f1f6f Merge "mkbootfs: Fix the default st_mode for root directory." 2016-10-08 20:16:57 +00:00
Treehugger Robot 392a2c8f0f Merge "Add 0X as a valid hex prefix for parseint" 2016-10-08 10:36:02 +00:00
Dimitry Ivanov afda14e61d Merge "Revert "Revert "Revert "Revert "Remove liblog from libcutils as a whole static lib""""" 2016-10-08 07:51:33 +00:00
Chia-I Wu e8f6c7398b Merge "Add native_handle_clone" 2016-10-08 01:25:35 +00:00
Josh Gao 218f7fb68e debuggerd: report crashes even when out of file descriptors.
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
2016-10-07 18:04:05 -07:00
Yifan Hong 89fbd6349f Add 0X as a valid hex prefix for parseint
Bug: 31983995

Test: make android.hardware.tests.expression@1.0
Change-Id: I526d73f96c519f84dec93befa442b1d2fff7979b
2016-10-07 16:50:16 -07:00
Tao Bao 3b5fbd8331 mkbootfs: Fix the default st_mode for root directory.
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
2016-10-07 16:14:27 -07:00
Glenn Kasten 2de796491a Traverse /etc/init in a well-defined order
Bug: 31996208
Test: will need a CTS, not yet done
Change-Id: I5ecc7f0519d42a83065b7b97a31cdb5b33549cda
2016-10-07 13:56:37 -07:00
Treehugger Robot 8caf4e7443 Merge "adb: rationalize types." 2016-10-07 20:35:00 +00:00
Christopher Ferris d6b0d37549 Small clean up of fuse code.
- 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
2016-10-07 12:16:00 -07:00
Dimitry Ivanov 625484ddfa Revert "Revert "Revert "Revert "Remove liblog from libcutils as a whole static lib""""
This reverts commit 6a452917b3.

Bug: http://b/31289077
Bug: http://b/27171986
Change-Id: Id020fa10c50847bf16a2fcbc7d5e72cf8766b711
2016-10-07 18:43:37 +00:00
Colin Cross 62c9101646 Merge "libsparse: output_file.c, fix large data chunk issue" 2016-10-07 17:17:10 +00:00
John Reck b02a355d10 Merge "Revert "Revert "Revert "Remove liblog from libcutils as a whole static lib"""" 2016-10-07 16:32:38 +00:00
John Reck 6a452917b3 Revert "Revert "Revert "Remove liblog from libcutils as a whole static lib"""
This reverts commit 595c1480d0.

Revert reason: broke bullhead-eng build in master

Change-Id: Ie64fc31c3c971366ab9f2543b91b8f5d2040868b
2016-10-07 16:22:38 +00:00
Josh Gao 06d61d4d96 adb: rationalize types.
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
2016-10-06 14:50:02 -07:00
Treehugger Robot 4a8b178c97 Merge "adb: split up adb_auth.cpp." 2016-10-06 19:37:31 +00:00
Josh Gao 3bd2879d8e adb: split up adb_auth.cpp.
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
2016-10-06 12:36:26 -07:00
Jeremy Compostella fca594c2de libsparse: output_file.c, fix large data chunk issue
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>
2016-10-06 09:53:42 -07:00
Treehugger Robot 8949696d33 Merge "Revert "Revert "Remove liblog from libcutils as a whole static lib""" 2016-10-06 14:20:41 +00:00
Treehugger Robot d3754ff696 Merge "logd: report logging memory overhead" 2016-10-06 14:15:48 +00:00
Dimitry Ivanov 595c1480d0 Revert "Revert "Remove liblog from libcutils as a whole static lib""
This reverts commit f93d732a45.

Bug: http://b/31289077
Bug: http://b/27171986
Change-Id: Ib6e6c0a01296f0a01d98cbf1a9d2659883280d44
2016-10-06 12:47:07 +00:00