Commit graph

29741 commits

Author SHA1 Message Date
Jayant Chowdhary
a1bdd2412e Mark libsysutils vendor_available.
libsysutils belongs to vndk-cap. Mark it vendor_available to enable vndk
abi stability checks on it.

Details: https://android-review.googlesource.com/368372

Test: mm -j64

Bug: 38244611

Change-Id: I3ef1d09c7e836549eb13ce68ac7cdcd5923bde0f
2017-05-24 13:01:24 -07:00
Treehugger Robot
efb30b0ccd Merge "bootstat: Set up clang-format-2 for bootstat." 2017-05-24 19:02:35 +00:00
James Hawkins
259dc730da bootstat: Set up clang-format-2 for bootstat.
Bug: None
Test: None
Change-Id: I534801dae4baec52687c8bbc563f8d92fca1a106
2017-05-24 10:19:25 -07:00
Treehugger Robot
c408e77095 Merge "liblog: test: enoent requires userdebug or eng to run" 2017-05-24 16:38:46 +00:00
Treehugger Robot
225f0d98c8 Merge "fs_mgr: fix SIGSEGV when ostream << nullptr" 2017-05-24 16:22:33 +00:00
Mark Salyzyn
38dad6c9e4 liblog: test: enoent requires userdebug or eng to run
Bypass test if we do not have all the prerequisites to run this check
of liblog failure propagation.  We need to be root, or be able to
call su, in order to temporarily stop logd to measure the error
response from liblog.  Basically a "user" build can not have the
levers to deny or fail the logger, preventing our ability to run the
liblog.enoent test.

Test: CTS: User: liblog#enoent
Test: remove ro.debuggable line from /default.prop,
      run liblog-unit-tests --gtest_filter=*.enoent
Bug: 62030441
Change-Id: I52177b8dd3c66d433bddf630e840ee088e13cddc
2017-05-24 07:50:29 -07:00
Bowgo Tsai
59af33c9ed fs_mgr: fix SIGSEGV when ostream << nullptr
fstab_rec.fs_options might be nullptr when printing error message.
Use android::base::StringPrintf() to '(null)' when needed.

Bug: 37759782
Test: Boot device and manaully trigger the output
Change-Id: I1bdf4ba57331aaea9dd5e790f6bf9d9b8bdc8b53
2017-05-24 18:57:16 +08:00
Treehugger Robot
5b17d7131b Merge "Always print the initial bugreport progress message." 2017-05-24 02:05:13 +00:00
Felipe Leme
e5d665b46f Always print the initial bugreport progress message.
Otherwise, it might take seconds to display the initial percentage,
and the user might thing something is wrong and CTRL-C the process.

Fixes: 62003852
Test: added BugreportTest.OkProgressZeroPercentIsNotIgnored
Test: m -j32 adb_test && ./out/host/linux-x86/nativetest64/adb_test/adb_test --gtest_filter=BugreportTest.*

Change-Id: I8e7dbb28666c825c1408d5d204f813064fc3048f
2017-05-23 16:58:16 -07:00
Scott Randolph
58620a8d4a Merge "Add AID_EVS for use by the Automotive EVS system" 2017-05-23 23:56:36 +00:00
Treehugger Robot
0e3a3c409a Merge "bootstat: Calculate and log the absolute device boot time." 2017-05-23 23:33:48 +00:00
Treehugger Robot
886e6cac05 Merge "Add host feature for push --sync support." 2017-05-23 23:30:23 +00:00
James Hawkins
1bfcaec1ab bootstat: Calculate and log the absolute device boot time.
Bug: 38345538
Test: None
Change-Id: I76a4b831cc3809d37b7edfcf1b5657cdf363832a
2017-05-23 14:43:49 -07:00
Dan Albert
5176df8d4a Add host feature for push --sync support.
Test: adb host-features | grep push_sync
Bug: None
Change-Id: Ia7a7e9c3c2e6632a9c954fbad8f64602a21d9757
2017-05-23 14:30:00 -07:00
Scott Randolph
d5d3276482 Add AID_EVS for use by the Automotive EVS system
The EVS HAL and related software stack will use this id when running
daemons that monitor car state, capture and display video, and interact
with users.
Test:  visual inspection

Change-Id: I53404c624933b7f55f1292c041c6c712522ab13b
2017-05-23 12:44:24 -07:00
Narayan Kamath
0f185bb148 Merge "tombstoned: Add a shared library version of libtombstoned_client..." 2017-05-23 13:20:32 +00:00
Treehugger Robot
a6bb369cb0 Merge changes I8d0c60e5,Ib8ad0ad6
* changes:
  adb: boolify check_header and check_data.
  adb: redirect stdout/stderr before initializing usb.
2017-05-23 02:51:32 +00:00
Treehugger Robot
2306272142 Merge "libtoolbox_dd / grep: Android.mk -> bp" 2017-05-23 02:43:27 +00:00
Tom Cherry
276f765984 Merge "init: start move to Android.bp" 2017-05-23 02:17:01 +00:00
Yifan Hong
49641ba865 libtoolbox_dd / grep: Android.mk -> bp
Bug: 37512442
Test: links
Change-Id: I98b2b463a69b065eff2bea562ce6be50f8a12341
2017-05-22 18:08:02 -07:00
Treehugger Robot
7d213d08e7 Merge "shell_and_utils: add vendor shell and toybox targets" 2017-05-22 21:00:19 +00:00
Tom Cherry
14fc01301d init: start move to Android.bp
Move libinit, init_tests, and test_service to Android.bp
Leave init in Android.mk as it has unfulfilled dependencies, but
create a comment in Android.bp for future use.
Remove libinit_parser and init_parser_tests as that code was never
used in init.

Bug: 36970783
Bug: 37512442
Test: Build, boot bullhead, init unit tests
Change-Id: Id81cd10ea09453a5fd762ba9189276aad79d5444
2017-05-22 13:30:04 -07:00
Narayan Kamath
2d377cd688 tombstoned: Add a shared library version of libtombstoned_client...
.. for ART and the frameworks to link against. In the new stack dumping
scheme (see related bug), the Java runtime will communicate with
tombstoned in order to obtain a FD to which it can write its traces.

Also move things around to separate headers that are private
implementation details from headers that constitute the public debuggerd
API. There are currently only three such headers :

- tombstoned/tombstoned.h
- debuggerd/client.h
- debuggerd/handler.h

Bug: 32064548
Test: make

Change-Id: If1b8578550e373d84828b180bbe585f1088d1aa3
2017-05-22 16:55:21 +01:00
Sandeep Patil
52b20877dc shell_and_utils: add vendor shell and toybox targets
Bug: 36463595
Test: Build and boot.

Change-Id: I245d1755546fa597e941badce251c2e8293e998e
Signed-off-by: Sandeep Patil <sspatil@google.com>
2017-05-22 08:30:44 -07:00
Treehugger Robot
62db5fcee0 Merge "Add --sync support to push." 2017-05-19 20:26:09 +00:00
Dan Albert
06b0d6b01b Add --sync support to push.
Passing --sync only copies files that are older on the device.

Test: nose2
Bug: None
Change-Id: I2ff6c3d1fe29262c8ee50db316aa92fc38dd7147
2017-05-19 11:09:58 -07:00
Treehugger Robot
5e49fbc547 Merge "Fix test following -p removal." 2017-05-19 17:07:21 +00:00
Treehugger Robot
2623b6c55a Merge "logd: remove start filtration from flushTo (part deux)" 2017-05-19 16:51:59 +00:00
Mark Salyzyn
037d2b71dc Merge changes Iad6ba65e,Ia6a7e8c9,Ida9405cb
* changes:
  libcutils: fs_config: remove aliases
  libcutils: fs_config test report aliases
  libcutils: fs_config: alias "system/<partition>/" to "<partition>/"
2017-05-19 14:17:02 +00:00
Mark Salyzyn
206ed8e2d6 logd: remove start filtration from flushTo (part deux)
We have already searched for the start point, the start filter check
is paranoia that removes out-of-order entries that we are undoubtably
interested in.  Out-of-order entries occur under reader pressure, as
the writer gets pushed back from in-place sorted order and lands it
at the end for the reader to pick it up.  If this occurred during a
batch run or a logger thread wakeup, the entry could be filtered out
and never output to the reader.

We have to treat exact finds for start in the list as terminal when
we search as they represent restarts, depending on the fact that it
is impossible to have the exact same time reported in two log entries
or requested from a batched reader.  This does break down if a log
entry has xxxxxx000 nanoseconds reported, we fix that by making sure
we never log such a case and slip it by a ns.

Found one case where logcat.tail_time* tests failed which was fixed
with this adjustment.

Test: gTest logd-unit-tests, liblog-unit-tests and logcat-unit-tests
Bug: 38046067
Bug: 37791296
Bug: 38341453
Change-Id: I4dd2e2596dd67b8d602160dd79661e01805227a9
2017-05-19 07:15:38 -07:00
Narayan Kamath
24bccbcf98 Merge "tombstoned: Support java trace dumps." 2017-05-19 10:29:37 +00:00
Dan Albert
def4aae26d Fix test following -p removal.
Just use the environment variable.

Test: nose2
Bug: None
Change-Id: I020c737f8aa7416b46794ce387a12f7959a9ca2a
2017-05-19 00:30:51 -07:00
Mark Salyzyn
2cf243528f libcutils: fs_config: remove aliases
Covered by the code automatically now.

Test: gTest libcutils_test --gtest_filter=fs_config.*
Bug: 37703469
Change-Id: Iad6ba65e023845aaea7a181b277a7383c44bd937
2017-05-18 15:56:54 -07:00
Mark Salyzyn
fa39110a8f libcutils: fs_config test report aliases
Instead of requiring aliases, let's report when we see
system/<partition>/ all by itself, or in the company of the alias
<partition>/.  Report if we see duplicate entries.  Add checking for
overrides as well.  Report any simple corruptions in internal table
or in the override files.

Test: gTest libcutils_test --gtest_filter=fs_config.*
Bug: 37703469
Change-Id: Ia6a7e8c9bc9f553d0c1c313937b511b2073318a9
2017-05-18 15:55:48 -07:00
Mark Salyzyn
2d37797b68 libcutils: fs_config: alias "system/<partition>/" to "<partition>/"
For the known partitions entrenched in the build system: vendor, oem
and odm only. We will alias entries that reference system/<partition>
and <partition>/ so that if either are specified, the rule will apply
to both possible paths.

Test: gTest libcutils-tests
Bug: 37703469
Change-Id: Ida9405cbed323489a3d0599c1645e9be2c7b9d08
2017-05-18 15:54:31 -07:00
Treehugger Robot
64e3f88d69 Merge "init should #include <sys/sysmacros.h>" 2017-05-18 22:47:59 +00:00
Keun-young Park
7fe28d9d9a Merge "add ueventd to shutdown critial process" 2017-05-18 20:59:50 +00:00
Keun-young Park
7264bee975 add ueventd to shutdown critial process
- In some devices, some drivers still try to load firmware while shutting
  down, and crashes the kernel. So keep ueventd to prevent such case.

bug: 38203024
Test: reboots
Change-Id: I4f1910723254ccb69f8e9c78e8727fbd8c7eed3e
2017-05-18 20:58:10 +00:00
Josh Gao
36dadca9f0 adb: boolify check_header and check_data.
Test: grep
Change-Id: I8d0c60e500bba855a1afc0877253262246c07fef
2017-05-18 13:40:13 -07:00
Josh Gao
16c5a133ab adb: redirect stdout/stderr before initializing usb.
Avoid printing USB logging to the console.

Test: None
Change-Id: Ib8ad0ad6c559689d0f8feec2e66b42380edd26fb
2017-05-18 13:38:50 -07:00
Tom Cherry
3d33dae74d Merge "fs_mgr: convert libfs_mgr to Android.bp" 2017-05-18 20:18:00 +00:00
Elliott Hughes
51056c49d2 init should #include <sys/sysmacros.h>
Bug: https://github.com/android-ndk/ndk/issues/398
Test: builds
Change-Id: I6428a6344a3ce649bd03ff9e9b0f156425c67f0c
2017-05-18 09:13:15 -07:00
Narayan Kamath
922f6b22fc tombstoned: Support java trace dumps.
The changes here involve :
- Creating and opening a new socket to receive trace dump requests on. Having
  different sockets allows us to install different sets of access control rules.

- A minor refactor to allow us to share common pieces of implementation
  between the java and native dumping code. This will also allow us to
  add a unit test for all file / directory related logic.

There are two java trace specific additions here :
- We use SO_PEERCRED instead of trusting the PID written to the seocket
  because requests come in from untrusted processes.
- Java trace dumps are not interceptible.

kJavaTraceDumpsEnabled is set to false for now but the value of the flag
will be flipped in a future change.

Bug: 32064548
Test: Manual; Currently working on a unit_test for CrashType.

Change-Id: I1d62cc7a7035fd500c3e2b831704a2934d725e35
2017-05-18 12:01:14 +00:00
Treehugger Robot
9397adabd8 Merge "libnetutils: Rename dhcptool to dhcpdbg" 2017-05-18 01:11:32 +00:00
Treehugger Robot
7868a0d82f Merge "Add the functionality for logging counters." 2017-05-17 22:59:55 +00:00
Treehugger Robot
8cfd2971ec Merge "Revert "logd: remove start filtration from flushTo"" 2017-05-17 21:30:20 +00:00
Treehugger Robot
7ce0f00c08 Merge "adb: Allow disabling verity on eng builds when using AVB." 2017-05-17 21:11:46 +00:00
Treehugger Robot
c3b931aad3 Merge "libcutils should #include <sys/sysmacros.h>" 2017-05-17 20:39:39 +00:00
Ruchi Kandoi
b63072e4d0 Add the functionality for logging counters.
Also correct clang-format for libmetricslogger

Test: Run libmetriclogger_test
Change-Id: If61f0bdc394a43e249ec4691da70175eeaf4cec6
2017-05-17 13:18:16 -07:00
Mark Salyzyn
eb45db2cf4 Revert "logd: remove start filtration from flushTo"
Regressed by introducing too much overlap in the results.

This reverts commit 982ad208b5.

Bug: 38341453
Change-Id: I9d630a6b9f3e464f523424b640090f7e268da9bd
2017-05-17 19:55:12 +00:00