Commit Graph

30916 Commits

Author SHA1 Message Date
Badhri Jagan Sridharan eab4c62e22 Merge "adb: Do not signal gaget stack unless descriptors are written" 2017-03-08 19:33:10 +00:00
David Lin ae31fd48b0 Merge "init.rc: remove duplicated chown entry for timed_output" am: e88882e16e am: 9c23fcbcd9
am: 197b3f736c

Change-Id: I4a87933290c31305b03fbcaa5c719503d8928b32
2017-03-08 18:50:09 +00:00
David Lin 197b3f736c Merge "init.rc: remove duplicated chown entry for timed_output" am: e88882e16e
am: 9c23fcbcd9

Change-Id: Ic49ddfe13a7d0c0d56fe6b39c9cd882da740ce27
2017-03-08 18:47:39 +00:00
David Lin 9c23fcbcd9 Merge "init.rc: remove duplicated chown entry for timed_output"
am: e88882e16e

Change-Id: I2ba4ad3c1dd4ce0b4fd5f16d16b986d70b73985d
2017-03-08 18:44:39 +00:00
Treehugger Robot e88882e16e Merge "init.rc: remove duplicated chown entry for timed_output" 2017-03-08 18:39:49 +00:00
Mark Salyzyn 43c1d5c4e3 Merge "liblog: add LOGGER_STDERR frontend" am: 6471b85143 am: af4e750023
am: 5d55e7c8b3

Change-Id: I6b84784997e555b6070b2b2d68e74a4581cab542
2017-03-08 17:13:04 +00:00
Mark Salyzyn 5d55e7c8b3 Merge "liblog: add LOGGER_STDERR frontend" am: 6471b85143
am: af4e750023

Change-Id: I3a9749a5700a6512a200c75ab99ad1f2ec35bed9
2017-03-08 17:10:34 +00:00
Mark Salyzyn af4e750023 Merge "liblog: add LOGGER_STDERR frontend"
am: 6471b85143

Change-Id: I5098977938e0daae2300ba00d4ac786d51ccf580
2017-03-08 17:08:02 +00:00
Mark Salyzyn 6471b85143 Merge "liblog: add LOGGER_STDERR frontend" 2017-03-08 17:03:44 +00:00
Mark Salyzyn 4f5fa378c7 Merge "liblogcat: free up log_device_t structures" am: e1bfafd241 am: 3f09ed635b
am: f8b695d051

Change-Id: I0a9bb1b65ff711a69d326e242315e7d40a258302
2017-03-08 15:20:57 +00:00
Mark Salyzyn f8b695d051 Merge "liblogcat: free up log_device_t structures" am: e1bfafd241
am: 3f09ed635b

Change-Id: I529f252d6c43359c042d7f234e1fb04dc0b970ef
2017-03-08 15:18:27 +00:00
Mark Salyzyn 4d99c986d9 liblog: add LOGGER_STDERR frontend
Standalone, this logger provides no end-to-end capability.  Only
provides a writer, no reader transport.  All output goes, logcat-like,
into the stderr stream.  Output can be adjusted with environment
variables ANDROID_PRINTF_LOG and ANDROID_LOG_TAGS.

liblog_*.__android_log_bswrite_and_print___max print fails if a string
member is truncated with "Binary log entry conversion failed" and -1.
We expose the truncated content in the tests and in LOGGER_STDERR.

The purpose of this transport selection is for command-line tools,
providing a means to shunt the logs to be mixed in with the tool's
error stream.

Test: gTest liblog-unit-tests
Bug: 27405083
Change-Id: If344b6e3e67df2dc86ce317cfad8af8e857727b7
2017-03-08 07:17:31 -08:00
Mark Salyzyn 3f09ed635b Merge "liblogcat: free up log_device_t structures"
am: e1bfafd241

Change-Id: I93377527aae460aec9d02f13c868d7998d182693
2017-03-08 15:15:57 +00:00
Treehugger Robot e1bfafd241 Merge "liblogcat: free up log_device_t structures" 2017-03-08 15:11:28 +00:00
Bowgo Tsai 1aeb8d2107 Add a PREUPLOAD.cfg file to run git-clang-format on every commit
The style file .clang-format is copied from adb/.clang-format.
Each sub folders still can have different style by adding their own
.clang-format because git-clang-format uses the style file located
in one of the parent directories of the *source file*.

Also see the following link for previous discussions:

  https://android-review.googlesource.com/#/c/340106

Bug: 36046320
Test: repo upload, checks pre-submit fails when the uploading commit
      doesn't meet the style

Change-Id: I94369af197da1ccce581bbd861c8737f6a197429
2017-03-08 16:51:26 +08:00
David Lin 489450abe3 init.rc: remove duplicated chown entry for timed_output
Test: build

Change-Id: Ib15be4188cdce270a15bd90304be0704d9e54cbf
Signed-off-by: David Lin <dtwlin@google.com>
2017-03-07 21:31:42 -08:00
Badhri Jagan Sridharan 43fd1a4ea7 adb: Do not signal gaget stack unless descriptors are written
While recovering from endpoint errors, the gadget stack was being
signalled even when desriptors were NOT being rewritten. Avoid this
as this might cause enumeration loops.

Bug: 36036550
Change-Id: Iff2b2fc8cded001ef3c77dc170dce3b96848970c
2017-03-07 19:20:54 -08:00
Casey Dahlin 304150a521 Enable mDNS on Darwin
We have to disable IPv6 to get this going, but nobody was yet using
IPv6, so that should be fine for now.

Test: Verified mDNS discovery on a MacBook
Bug: 31042497
(cherry picked from 9ae65de087171072f3890a81b074ae27db319508)

Change-Id: I628f0a1e9c4784db42fa56f5faf2904b6e1cf548
2017-03-07 14:45:52 -08:00
Casey Dahlin d6c8091e9f Don't include mDNS support on platforms other than Linux
Test: Shamu build now passes
Bug: None
(cherry picked from 122a7738606d854d6dc10fa361c1d7296cc9670a)

Change-Id: I650adf0bca96fb655163f5e9b27d9995ae448ec2
2017-03-07 14:45:52 -08:00
Casey Dahlin 2fe9b60475 Make ADB over mDNS work on Windows
Test: Verified ADB over mDNS on a Windows machine
Bug: 30482671
(cherry picked from 9fdd77101f49d03ff29342e12e23edf241f68522)

Change-Id: If955ca304db71a5b08c5a9654f1e27ab74af9af8
2017-03-07 14:45:52 -08:00
Casey Dahlin 13a269ea24 Add mDNS device discovery for adb client
Test: Was able to discover a raspberry pi.
Bug: 28074466
(cherry picked from e292cd16760321fccc99c8c261cb92fa4b6462ab)

Change-Id: Id9571576457a4a0a078e48a274a4e8eac78bfe2b
2017-03-07 14:45:51 -08:00
Casey Dahlin 1fe3cae67e adb: Set a hostname for mDNS
Now all devices won't appear as "Android." Should make it easier to
multiplex.

Test: Verified locally on a raspberry pi 3
Bug: 28887278
(cherry picked from 815b23319635d264ae0ce2c8c29a5776a57b8051)

Change-Id: Icfd0116477543af6a3049c14d818c1cff7fc3b93
2017-03-07 14:44:38 -08:00
Casey Dahlin 6cd5e0b4ef Make ADBD announce its presence over mDNS
We now request mdnsd from adb and register a service of type _adb._tcp
for clients to connect to.

Test: Verified service appears in avahi-browse
Bug: 28074466
(cherry picked from 379ac414e4d9f53388d903913022a55695292775)

Change-Id: Ie871b9c8b40e86063cc1e68e8f3e4290ead2d279
2017-03-07 14:42:06 -08:00
Mark Salyzyn 13e4735526 liblogcat: free up log_device_t structures
Was leaking log_device_t in command path.  Cleanup leak in command
path and add thorough clean up on destroy for insurance.

Start grouping related like-type variables in the context structure
for more effective layout.

Test: gTest logcat-unit-tests
Bug: 35326290
Change-Id: Ibfbddec2d0e1bce24b87b035d67726cac1395574
2017-03-07 14:23:43 -08:00
GuangHui Liu c937c77e04 Merge "Create command to run adb tests and output results" 2017-03-07 21:42:35 +00:00
TreeHugger Robot d96cfde400 Merge "port metrics_logger to v2 format" 2017-03-07 21:26:53 +00:00
Christopher Ferris 9323b7219c Implement a simple demangler.
The purpose of this demangler is to avoid crashes for any string.

- It does one pass and should avoid going past the end of the string.
- The code avoids recursion to minimize the amount of stack required.
- It cannot demangle all mangled names, but it should be able to work
  on nearly all names in normal stack traces.
- If the mangled name is too large, it will stop demangling and return
  as if the name is not a demangled name.

Test: Passes new unit tests.

Change-Id: I596f74a533c0e093d1517c6bd11cced07009d321
2017-03-07 13:04:32 -08:00
Keun-young Park 19761b8ea7 Merge "collect fs stat for ext4" am: 5811a434fc am: f3fcb883b2
am: 820d28b3e2

Change-Id: I90f95321b133305a16e3abe0fc3885992e99d890
2017-03-07 19:37:40 +00:00
Keun-young Park 820d28b3e2 Merge "collect fs stat for ext4" am: 5811a434fc
am: f3fcb883b2

Change-Id: I96f2438120754f07b0ca6218278bb580d95be229
2017-03-07 19:35:10 +00:00
Keun-young Park f3fcb883b2 Merge "collect fs stat for ext4"
am: 5811a434fc

Change-Id: I7dafd4b35ac3efcf59bb940fb582694144056f2b
2017-03-07 19:32:40 +00:00
Keun-young Park 5811a434fc Merge "collect fs stat for ext4" 2017-03-07 19:30:54 +00:00
Jeremy Compostella 937309d3e3 ueventd: support by-name symlinks for virtual block devices
This patch makes ueventd create by-name symlinks for virtual block
devices when Android is running as a Xen guest OS.

The symlinks will be created under /dev/block/vbd/. For example:
/dev/block/vbd/768/by-name/

Change-Id: Id45da560d13f641d7c8419511c154de9ae8a4ec9
Test: manual
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
2017-03-07 10:55:19 +01:00
Keun-young Park 3fbf94e19a collect fs stat for ext4
- This is to collect data to understand if e2fsck -f option
  can be dropped wholly based on information from fs.
- Ideally e2fsck should not fix fs if it was clean shutdown
  or if it is not enabling quota.
- The log is added to /dev/fscklogs/log and other system components
  can collect it later.

TODO: add mechanism to distinguish old vs new fs generation tool.

bug: 32246772
Test: reboot and check saved logs under different shutdown conditions (clean, non-clean)

Change-Id: Id00fad4c5f8ebbb9f9908164a1026e415df06721
2017-03-06 19:39:58 -08:00
Chenjie Luo 9d75a6bb42 Merge "Define _LOG as a weak symbol." am: 6684ec8d97 am: 00c9fcdca9
am: f44debfc03

Change-Id: Ibbcc0ea47ff4aef54801b14df4cacfa8927d4775
2017-03-07 03:10:59 +00:00
bohu 56dc72ea32 Merge changes If9782396,If033c815 am: 5e148a58b8 am: 8e0c8c0dec
am: ec20cd61f6

Change-Id: I6fb101489a8f553b3d49d9757c73532d36a20974
2017-03-07 03:10:38 +00:00
bohu a195b51bf3 DO NOT MERGE ANYWHERE Qemu: make the qemu_pipe_open compatible with old apis am: f7d64fd8e1 -s ours am: 3f76473030 -s ours
am: d36485930b  -s ours

Change-Id: Id39c11f16d7efa5083ad350a50a4878a9202c79a
2017-03-07 03:10:23 +00:00
Chenjie Luo f44debfc03 Merge "Define _LOG as a weak symbol." am: 6684ec8d97
am: 00c9fcdca9

Change-Id: Icca915a794d21c69b19b9efa277dd95f6a150e86
2017-03-07 03:01:09 +00:00
bohu ec20cd61f6 Merge changes If9782396,If033c815 am: 5e148a58b8
am: 8e0c8c0dec

Change-Id: I3de93a4305b567d48e103fd7df78d8effcbd365d
2017-03-07 03:00:44 +00:00
bohu d36485930b DO NOT MERGE ANYWHERE Qemu: make the qemu_pipe_open compatible with old apis am: f7d64fd8e1 -s ours
am: 3f76473030  -s ours

Change-Id: I88757bf94c9e6ee6ec8e46b4993aee35c6b8f300
2017-03-07 03:00:30 +00:00
Chenjie Luo 00c9fcdca9 Merge "Define _LOG as a weak symbol."
am: 6684ec8d97

Change-Id: Ibb3804ff53490abd2743ce8ba33c6833ac2a71ab
2017-03-07 02:52:53 +00:00
bohu 8e0c8c0dec Merge changes If9782396,If033c815
am: 5e148a58b8

Change-Id: I71a3305151dd8c9115f4922f13aea0fa90b82941
2017-03-07 02:52:33 +00:00
bohu 3f76473030 DO NOT MERGE ANYWHERE Qemu: make the qemu_pipe_open compatible with old apis
am: f7d64fd8e1  -s ours

Change-Id: Ieb68057b7563c9a14a3046b27324303b325095a8
2017-03-07 02:52:30 +00:00
Chenjie Luo 6684ec8d97 Merge "Define _LOG as a weak symbol." 2017-03-07 02:08:36 +00:00
Josh Gao b32318a6e3 Merge changes Ib69a206f,If57cc175 am: 56e89ade33 am: c0a62dda08
am: d304945b8b

Change-Id: Ibb85e34c2d0541ecfba16fa9525e362ec44eb5a9
2017-03-07 01:59:11 +00:00
Josh Gao d304945b8b Merge changes Ib69a206f,If57cc175 am: 56e89ade33
am: c0a62dda08

Change-Id: I53ea78a0035d402536dd86079f89b86f39fce21a
2017-03-07 01:57:10 +00:00
Josh Gao c0a62dda08 Merge changes Ib69a206f,If57cc175
am: 56e89ade33

Change-Id: Id6d1428be5519ab3ad4694cc4dea9ea96ff62d2e
2017-03-07 01:55:11 +00:00
Treehugger Robot 5e148a58b8 Merge changes If9782396,If033c815
* changes:
  DO NOT MERGE ANYWHERE Qemu: make the qemu_pipe_open compatible with old apis
  DO NOT MERGE ANYWHERE Emulator: Enhance qemu_pipe.h to handle partial read and write
2017-03-07 00:59:10 +00:00
TreeHugger Robot 068e00b3c9 Merge "Revert "Add BMS as a Battery type"" 2017-03-06 23:34:59 +00:00
Chenjie Luo 97258aad8a Define _LOG as a weak symbol.
So _LOG could be overridden by customized logging
implementations in non-Android systems.

Bug: 35919515
Test: Test on device
Change-Id: I0885c15353c0b1bf66f6f156e7f502f326b85d57
2017-03-06 15:04:32 -08:00
Treehugger Robot 56e89ade33 Merge changes Ib69a206f,If57cc175
* changes:
  tombstoned: turn off signal handlers.
  tombstoned: create tombstones with 0640 permissions.
2017-03-06 22:26:17 +00:00