Commit graph

28488 commits

Author SHA1 Message Date
Bin Chen
fd6496fbeb Merge "init: minor fix to READEME.md" am: a20c678d45
am: 9fc353f608

Change-Id: I644b86bda3932a0b056f10aebf70b841ce5fb124
2017-02-22 00:31:09 +00:00
Bin Chen
9fc353f608 Merge "init: minor fix to READEME.md"
am: a20c678d45

Change-Id: I2b949b6e96754afc313795f23d35ea1f828d6e8a
2017-02-22 00:28:10 +00:00
Treehugger Robot
a20c678d45 Merge "init: minor fix to READEME.md" 2017-02-22 00:22:28 +00:00
Mark Salyzyn
3ecffa294f Merge "liblog: Harden log_id check." am: c280143d9b
am: cafb1b7776

Change-Id: I49af30395f3904a9e987b01150417ea449d4da3e
2017-02-21 23:13:04 +00:00
Mark Salyzyn
cafb1b7776 Merge "liblog: Harden log_id check."
am: c280143d9b

Change-Id: I2a87f95287be7ee8009cc9c56c7bbc82f1673b99
2017-02-21 23:10:58 +00:00
Mark Salyzyn
c280143d9b Merge "liblog: Harden log_id check." 2017-02-21 23:06:34 +00:00
Jerry Zhang
dd01d2f779 Merge "adb: set max_rw to USB_FFS_BULK_SIZE explicitly" am: b63d47356a
am: d59b93a5f5

Change-Id: I7c515a34977c172babb80929a0f41bc4cb0e4148
2017-02-21 22:59:04 +00:00
Jerry Zhang
d59b93a5f5 Merge "adb: set max_rw to USB_FFS_BULK_SIZE explicitly"
am: b63d47356a

Change-Id: I84f691f38c05a42fc7e4fd326b3be6d4732c32ca
2017-02-21 22:57:05 +00:00
Jerry Zhang
b63d47356a Merge "adb: set max_rw to USB_FFS_BULK_SIZE explicitly" 2017-02-21 22:52:57 +00:00
Bin Chen
a08f002c23 init: minor fix to READEME.md
Change-Id: I149c2a8f2053ac4dcc61bea6fa8c57f4c7b73c9e
Signed-off-by: Bin Chen <bin.chen@linaro.org>
2017-02-22 09:38:25 +11:00
Jerry Zhang
f3fb7de3c8 adb: set max_rw to USB_FFS_BULK_SIZE explicitly
Sometimes when endpoint_alloc returns ENODEV,
max_rw will end up being a value that is too
big.

Bug: 35634401
Test: push/pull files
Change-Id: Iaa81a3311b1855e2a835562cdf7a46ff4399feb1
2017-02-21 14:37:07 -08:00
Mark Salyzyn
d69e801fe8 liblog: Harden log_id check.
Logd currently checks against LOG_ID_MAX and LOG_ID_KERNEL to
determine if a given log_id is available.  liblog uses only
LOG_ID_KERNEL.  While this matches with the comments in log/log_id.h
to always keep LOG_ID_KERNEL at the end it does not match with other
checks that logd makes, causing inconsistent behavior.  This
inconsistency is noticable on devices that errantly rewrite
LOG_ID_MAX to not equal LOG_ID_KERNEL + 1.  For log buffers with
id's greater than LOG_ID_KERNEL, liblog reports that logd is
unavailable while logd would accept the request.

The guideline is to not use buffer ids above LOG_ID_KERNEL.
This hardening change prevents an inconsistency that results if these
guidelines are not followed.  Partners are urged instead to increase
LOG_ID_KERNEL locally to match their LOG_ID_MAX - 1 when they add new
local log buffers in their private builds.

Signed-off-by: Evan Ralston <eralston@amazon.com>
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Test: compiles. no functional change
Change-Id: Icd4b12ac79c1e5cd1d8a32f67a9795797580aad5
2017-02-21 22:29:19 +00:00
Mark Salyzyn
dc5d05ba5a Merge "liblogcat: LOCAL_C_INCLUDE_DIRS correction" am: 01815fdcc5
am: 88af7ccd58

Change-Id: I42228da35c3b2adb5c22fa18f005d28a23c74efc
2017-02-21 19:44:56 +00:00
Mark Salyzyn
88af7ccd58 Merge "liblogcat: LOCAL_C_INCLUDE_DIRS correction"
am: 01815fdcc5

Change-Id: I28a7645ab5375f234b74c6555f774510cb364a8e
2017-02-21 19:41:50 +00:00
Treehugger Robot
01815fdcc5 Merge "liblogcat: LOCAL_C_INCLUDE_DIRS correction" 2017-02-21 19:36:30 +00:00
Michael Wright
ba1f83d70c Merge "Revert "Only allow system to write to existing input nodes."" am: 05009d9336
am: 8eef0a5dfb

Change-Id: Ic821d533028d8d6573f352f1ce3bb039f8aadc55
2017-02-21 19:04:51 +00:00
Michael Wright
8eef0a5dfb Merge "Revert "Only allow system to write to existing input nodes.""
am: 05009d9336

Change-Id: I74bc2d510ab4f978df3e90402b59681f8cbe7be2
2017-02-21 19:02:47 +00:00
Treehugger Robot
05009d9336 Merge "Revert "Only allow system to write to existing input nodes."" 2017-02-21 18:56:05 +00:00
Mark Salyzyn
b69d774a0e Merge changes I9494ce71,Idc14e4ad,I30de692e,Ieed3223b,I63d0667a am: ee57bbd9f8
am: 2a03cd7158

Change-Id: I34adb6be48b36b4d97dbce2995fb8608b36a9128
2017-02-21 18:10:23 +00:00
Isaac Chen
a0e845a1b6 Merge "Removed cpusets/schedboost build time dependency." am: d3f8d28db2
am: e60efc1b0b

Change-Id: Ie2d15917ea237c026bee7a526a75bf2544313580
2017-02-21 18:03:15 +00:00
Mark Salyzyn
2a03cd7158 Merge changes I9494ce71,Idc14e4ad,I30de692e,Ieed3223b,I63d0667a
am: ee57bbd9f8

Change-Id: I382a3a1e9c95a5e94a7930ed5a508f5e2b157349
2017-02-21 18:01:32 +00:00
Isaac Chen
e60efc1b0b Merge "Removed cpusets/schedboost build time dependency."
am: d3f8d28db2

Change-Id: Ic864fd54b2ddc225ce54050efb116c87cbf1180f
2017-02-21 17:52:41 +00:00
Michael Wright
14667c19cd Revert "Only allow system to write to existing input nodes."
This reverts commit 344e929e6d.

Bug: 35301292
Change-Id: Ib6805c986c0aa88d14652de59ad4602b1cce8b56
2017-02-21 17:12:59 +00:00
Mark Salyzyn
eb40816fb8 liblogcat: LOCAL_C_INCLUDE_DIRS correction
Test: compile
Bug: 35326290
Change-Id: I62b46443a6b9149577e85d4f512c3946b467a1fb
2017-02-21 08:48:29 -08:00
Mark Salyzyn
ee57bbd9f8 Merge changes I9494ce71,Idc14e4ad,I30de692e,Ieed3223b,I63d0667a
* changes:
  liblogcat: add android_logcat_popen and android_logcat_system
  liblogcat: add android_logcat_run_command_thread
  logcat: Create liblogcat
  logcat: Use std::string instead of large static buffer for -Q
  logcat: Add coding style
2017-02-21 15:35:01 +00:00
Isaac Chen
d3f8d28db2 Merge "Removed cpusets/schedboost build time dependency." 2017-02-21 02:05:24 +00:00
Isaac Chen
795267d4c7 Removed cpusets/schedboost build time dependency.
These two Soong product_variables were usually controlled by
ENABLE_CPUSETS and ENABLE_SCHEDBOOST in BoardConfig.mk. This change
turns the build time variables into runtime decision by checking if
a special file, "tasks", can be found under the mount points,
/dev/cpuset and /dev/stune, for cpusets and schedboost, respectively.

That special file only exists when the corresponding Linux kernel
configurations, CONFIG_CPUSETS and CONFIG_SCHEDTUNE, are set.

Bug: 34726944

Test: Tested on Sailfish with following configurations
          neither cpuset nor schedtune enabled in the kernel
          cpuset enabled, but schedtune disabled in the kernel
          both cpuset and schedtune enabled in the kernel

Change-Id: I6695b8b32b2fecb4fd995018418bbe2edc5d590f
2017-02-20 20:53:24 +08:00
Bowgo Tsai
13fc1463a9 Merge "Fix-up coding style" am: 4a534ebc91
am: cfcaca92d1

Change-Id: Ib10ba26be56b2c520bb764d9e961e539f2444c1f
2017-02-19 00:30:01 +00:00
Bowgo Tsai
cfcaca92d1 Merge "Fix-up coding style"
am: 4a534ebc91

Change-Id: Iab8691835c77b3d65ed33b1065946cc6fae64208
2017-02-19 00:27:09 +00:00
Treehugger Robot
4a534ebc91 Merge "Fix-up coding style" 2017-02-19 00:23:05 +00:00
Bowgo Tsai
4caf4c03c1 Fix-up coding style
The .clang-format is a symlink to ../init/.clang-format, which is merged
recently. As init is the major user of fs_mgr, it's better to keep the
style consistent.

Only recent newly-added files written by me are formatted. For other
files, let's format them gradually to keep 'git blame' intact.

Bug: None
Test: Device can boot with AVB

Change-Id: I5c72f23b38534d5bcef3e4f9f0f477fa40496433
2017-02-18 12:33:36 +08:00
Steven Moreland
4fbff753ba Merge "Vector.h: remove unused import <new>" am: 1a4e2dfdf5
am: c50fce7dac

Change-Id: Ic88e35637d9001e17e538ced0a35b47579da86cf
2017-02-17 23:44:13 +00:00
Steven Moreland
c50fce7dac Merge "Vector.h: remove unused import <new>"
am: 1a4e2dfdf5

Change-Id: I6177387a43353d5f9b4bd7fe9cc9fd7a4a10e997
2017-02-17 23:42:30 +00:00
Treehugger Robot
1a4e2dfdf5 Merge "Vector.h: remove unused import <new>" 2017-02-17 23:37:06 +00:00
Mark Salyzyn
6dabc81a0b liblogcat: add android_logcat_popen and android_logcat_system
Supply a wrapper to the logcat API that provides some analogous
functionality to popen and system libc calls with some bits of
KISS shell-like parsing for environment, quotes and error
redirection handling.

Test: gTest logcat-unit-tests
Bug: 35326290
Change-Id: I9494ce71267ad2b2bec7fcccfc7d4beddae9aea6
2017-02-17 14:42:14 -08:00
Mark Salyzyn
1d6928b736 liblogcat: add android_logcat_run_command_thread
A non-blocking API to run a logcat function in a background thread.
Returns a read end of a pipe to collect the output.

Test: gTest logcat-unit-tests
Bug: 35326290
Change-Id: Idc14e4ad955e0b2b9fafa5d3aeed8cd7fb4069fb
2017-02-17 14:42:14 -08:00
Mark Salyzyn
c0cf90d1fb logcat: Create liblogcat
Try to leverage as much of logcat as-is and produce a viable
library API that others can use for their own logcat execution.

Added a test to check ANDROID_PRINTF_LOG environment variable.

Test: gTest logcat-unit-tests
Bug: 35326290
Change-Id: I30de692ea9d83e6fd6e5d9e7cf93d31401a88a40
2017-02-17 14:42:14 -08:00
Mark Salyzyn
f329029081 logcat: Use std::string instead of large static buffer for -Q
Test: gTest logcat-unit-tests
Bug: 35326290
Change-Id: Ieed3223be2d1386897cfba5fa4d04549e72e4e50
2017-02-17 14:42:14 -08:00
Mark Salyzyn
5f606605ed logcat: Add coding style
- Android coding standard compliance with an eye to reducing merge
  impact.
- resolve a few misbehaviors in logcat_test.

SideEffects: none
Test: gTest logcat-unit-tests
Bug: 35326290
Change-Id: I63d0667ad34c0df11086a6ffe94b7030430b865b
2017-02-17 14:42:14 -08:00
Josh Gao
8a5c2176e0 Merge "debuggerd_test: add capability test." am: 94aabe47db
am: 8a69231cda

Change-Id: Ibffd13e7decc6b5d73acbba99f50c9dd1ed4c481
2017-02-17 22:38:17 +00:00
Josh Gao
8a69231cda Merge "debuggerd_test: add capability test."
am: 94aabe47db

Change-Id: I7316d51dc2d5ad0a98d64710427a9cbfe5b4a44d
2017-02-17 22:29:26 +00:00
Treehugger Robot
94aabe47db Merge "debuggerd_test: add capability test." 2017-02-17 21:20:11 +00:00
Steven Moreland
40c7ddfc09 Vector.h: remove unused import <new>
Test: pass
Change-Id: I9d04c909a1bc82352f1eebe36602bf095ec3ca30
2017-02-17 13:19:08 -08:00
Elliott Hughes
b343338459 Merge "adbd's children should have SIGPIPE set to SIG_DFL." am: 81c6ff3b96
am: 10ecd9de62

Change-Id: I204df35416733257c8ff2b2eb6f1ba22a17098bb
2017-02-17 20:59:29 +00:00
Elliott Hughes
10ecd9de62 Merge "adbd's children should have SIGPIPE set to SIG_DFL."
am: 81c6ff3b96

Change-Id: I5aaec2b05566d6885b11080a8de943dde838031f
2017-02-17 20:57:59 +00:00
Treehugger Robot
81c6ff3b96 Merge "adbd's children should have SIGPIPE set to SIG_DFL." 2017-02-17 20:55:55 +00:00
Elliott Hughes
1373a6c75c Merge "Add crasher check for passing a bad pthread_t to pthread_join." am: fac6d83d36
am: 1b607e7f6f

Change-Id: I4395eb6966dcc387d0da5b6de5eca2aa1984fe04
2017-02-17 20:50:58 +00:00
Elliott Hughes
1b607e7f6f Merge "Add crasher check for passing a bad pthread_t to pthread_join."
am: fac6d83d36

Change-Id: Icfa86004a6e15f80a25ed128be8f3496312a3e3b
2017-02-17 20:49:35 +00:00
Treehugger Robot
fac6d83d36 Merge "Add crasher check for passing a bad pthread_t to pthread_join." 2017-02-17 20:44:44 +00:00
Josh Gao
502cfd22ba debuggerd_test: add capability test.
Also, remove the dependency on crasher.

Bug: http://b/35100921
Bug: http://b/35241370
Test: /data/nativetest/debuggerd_test/debuggerd_test32
Test: /data/nativetest64/debuggerd_test/debuggerd_test64
Change-Id: I318f6de764d435251417953bf175ba321b59981f
2017-02-17 11:22:21 -08:00