Commit Graph

18804 Commits

Author SHA1 Message Date
Elliott Hughes 796ea6a65d Merge "Remove fastboot/genkey.sh." 2015-12-12 02:25:13 +00:00
Elliott Hughes 44b6aefeeb Remove fastboot/genkey.sh.
Some unknown cruft from the pre-cupcake era.

Change-Id: I8964892419cda9781d1506aa7006c51dc00ca33d
2015-12-11 17:57:53 -08:00
Josh Gao 80f3b0438d Merge "adb: handle some edge cases with process environments." 2015-12-12 00:43:38 +00:00
Josh Gao e03c988748 adb: handle some edge cases with process environments.
Change-Id: I0c20e58e14ef756a8c45dd5ea85f7301157a3c8e
2015-12-11 15:58:32 -08:00
Josh Gao 5e15568c07 Merge "adb: don't use setenv after forking." 2015-12-11 23:32:19 +00:00
Josh Gao 9b3fd67213 adb: don't use setenv after forking.
Previously, for `adb shell`, we were using setenv after forking to set
up the child's environment. This would occasionally deadlock in the
child, which would cause the main thread to deadlock waiting for the
child to complete. This patch constructs the environment before forking
and passes it to execle, eliminating the deadlock.

Bug: http://b/25847115
Change-Id: I720d472770564b1449819ddaab945a89844244a8
2015-12-11 15:10:12 -08:00
Mark Salyzyn d2d35df279 Merge "liblog: logprint security ANDROID_LOG_WARN" 2015-12-11 21:43:17 +00:00
Tom Cherry b11afd7741 Merge "Update init documentation to reflect fs_config changes" 2015-12-11 21:23:12 +00:00
Tom Cherry dbddb40c95 Update init documentation to reflect fs_config changes
Change-Id: I00296d90c44af369a51ecb5cbb667567328f0053
2015-12-11 13:20:38 -08:00
Josh Gao c8e793685c Merge "adb: make pulling symlinks and devices work." 2015-12-11 21:04:25 +00:00
Josh Gao f264224191 adb: make pulling symlinks and devices work.
Bug: http://b/25972989
Bug: http://b/26085751
Change-Id: I43842871522ea5f67a8c258dcb6ddafa8dd744c8
2015-12-11 12:51:38 -08:00
Mark Salyzyn 7bc8023857 liblog: logprint security ANDROID_LOG_WARN
Bug: 26029733
Change-Id: I4f0cffc0a45819fb48807bf06ce336316276369d
2015-12-11 12:37:22 -08:00
Mark Salyzyn 86052a5d4f Merge "logd: liblog: logcat: Add LOG_ID_SECURITY" 2015-12-11 17:33:33 +00:00
Mike Frysinger 6945e36060 Merge "adbd: refactor priv dropping logic" 2015-12-11 17:03:19 +00:00
Mark Salyzyn 30edbdce9b Merge changes I598c8c5c,I672b0f4d,Id882978b,Idff5e080,Ib124eca1, ...
* changes:
  logger.h: reduce maximum payload so sum is page size
  liblog: test for maximum payload can not survive change
  liblog: logprint use uid name if length less then 5
  liblog: logprint add uid format modifier
  liblog: readlog apps get logger_entry_v4 for pstore
  logd: readlog apps get logger_entry_v4
  logger.h: Add definition for logger_entry_v4
2015-12-11 16:42:28 +00:00
Mark Salyzyn ad9dac1c27 Merge "logd: best 2/3 filter for timezone glitches" 2015-12-10 23:38:03 +00:00
Todd Poynor f2b8cb9023 Merge "crash_reporter: use libmetricscollectorservice for user crash event reports" 2015-12-10 22:25:33 +00:00
Todd Poynor 5fc82ef714 Merge "metrics_collector: add libmetricscollectorservice binder service" 2015-12-10 22:25:19 +00:00
Todd Poynor 8361935de8 crash_reporter: use libmetricscollectorservice for user crash event reports
Drop dependencies on D-Bus.

Bug: 25929888
Change-Id: Ie21c2feee098887ebb2dac14c866e28689e9343e
2015-12-10 13:34:10 -08:00
Todd Poynor 694553d097 metrics_collector: add libmetricscollectorservice binder service
Switch user crash event notification from D-Bus to this Binder service.

Add a trampoline as a go-between for the -frtti and -fno-rtti sources.

Add MetricsCollectorServiceClient for crash_reporter to use, hiding the
binder proxy details.

Remove D-Bus message filtering from metrics_collector.

Bug: 25929888
Change-Id: Idcdd60ac476340fb11602fc9afab6cd87843e529
2015-12-10 13:34:10 -08:00
Josh Gao aae38d9704 Merge "adb: shell: add -n flag to not read from stdin." 2015-12-10 21:30:19 +00:00
Mark Salyzyn c172d9e204 Merge "logd: logd-reinit exits with 194" 2015-12-10 21:24:45 +00:00
Mark Salyzyn b06247d9a0 logd: best 2/3 filter for timezone glitches
klogd is sensitive to changes in timezone resulting in glitches
surrounding conversion to local realtime logging. logger manages
a map from monotonic to realtime, but the process is racey since
the system can change the timezone at any time, this catches those
cases where it glitches.

Bug: 21868540
Change-Id: I03de6675fcd04f18ba7306a24dc3d9e750d86976
2015-12-10 13:20:48 -08:00
Josh Gao 7d58607360 adb: shell: add -n flag to not read from stdin.
Shell scripts of the following form do not work properly with adb:
    echo "foo\nbar\nbaz" | {
        read FOO
        while [ "$FOO" != "" ]; do
            adb shell echo $FOO
            read FOO
        done
    }
The first run of adb shell will consume all of the contents of stdin,
causing the loop to immediately end. ssh solves this by providing a -n
flag that causes it to not read from stdin. This commit adds the same.

Bug: http://b/25817224
Change-Id: Id74ca62ef520bcf03678b50f4bf203916fd81038
2015-12-10 12:52:06 -08:00
Nick Kralevich ce4bbcfb08 Merge "Revert "adb: Make HOME=/data/local/tmp"" 2015-12-10 20:48:08 +00:00
Nick Kralevich b118762241 Revert "adb: Make HOME=/data/local/tmp"
During early boot, we may be mounting and unmounting /data.
Having the home directory for adb shell commands, such as
"adb shell logcat", on the /data directory prevents unmounting.

This reverts commit 173eb396c7.

Bug: 26132185
Change-Id: Ib7c2f9e696f52bf5bbb79223d90dd76791779587
2015-12-10 20:42:18 +00:00
Mark Salyzyn f011a335f2 logd: logd-reinit exits with 194
Bug: 26115803
Change-Id: I6e8843ce9766756a40e6d176e0a822f62045c2af
2015-12-10 12:26:08 -08:00
Sami Tolvanen 907ec7daa7 Merge "fs_mgr: support upstream dm-verity without error correction" 2015-12-10 20:13:02 +00:00
Sami Tolvanen 0d1214c68e Merge "Set up dm-verity in EIO mode instead of logging mode" 2015-12-10 20:12:49 +00:00
Todd Poynor 59e5c25919 Merge "metricsd binder: Abort if fail to register service" 2015-12-10 19:32:03 +00:00
Mike Frysinger 4120ebc635 adbd: refactor priv dropping logic
Makes the code a little cleaner.

Change-Id: I961b6fc8730c45d8fd4f9fd2981a6d6ab8f51fb6
2015-12-10 13:35:10 -05:00
Josh Gao f31aba9e8d Merge "adb: make the test_pull_dir test actually test something." 2015-12-10 18:09:53 +00:00
Josh Gao 4d0e10b24e Merge "Move adb tests to system/core/adb." 2015-12-10 18:09:47 +00:00
Dimitry Ivanov 028aa205af Merge "Apply permitted path to the classloader-namespace" 2015-12-10 04:34:38 +00:00
Elliott Hughes 9fa5cefea4 Merge "Simplify adb LinePrinter newline handling." 2015-12-10 02:44:13 +00:00
Elliott Hughes 77f539ab49 Simplify adb LinePrinter newline handling.
We had mostly-working hacks before, but it's time to just modify LinePrinter
to suit our needs. If we tell LinePrinter what kind of output we're giving
it, it can manage things automatically.

This fixes the minor bug where we'd sometimes have a blank line after an
error message.

Change-Id: I07ff52437f2402de311e237dd1b2dd338d9b668a
2015-12-09 18:42:41 -08:00
Sami Tolvanen ff980d22d1 fs_mgr: support upstream dm-verity without error correction
Set up dm-verity even if kernel configuration doesn't have
CONFIG_DM_VERITY_FEC set. Fall back to the always safe EIO
mode if dm-verity doesn't support feature arguments.

Bug: 21893453
Change-Id: I4812bd74801c0abc8da479230f48b752858f9cd8
2015-12-10 01:01:29 +00:00
Daniel Rosenberg 98a8257313 Merge "fastboot: Re-add set_active as a command." 2015-12-10 00:54:01 +00:00
Dimitry Ivanov 0d6e59407d Apply permitted path to the classloader-namespace
Bug: http://b/25853516
Bug: http://b/22548808
Change-Id: I283e6ee8d743bc3ab41aab9f36af0abbe729943f
2015-12-09 15:39:36 -08:00
Josh Gao ce8f2cdcd0 adb: make the test_pull_dir test actually test something.
Change-Id: I8b525377557528d5bc70c44d587891fad9f739bd
2015-12-09 14:41:33 -08:00
Alex Vakulenko 919af692c5 Merge "metricsd: Update to use new component/trait APIs from weaved" 2015-12-09 22:11:09 +00:00
Todd Poynor 2862a7843d metricsd binder: Abort if fail to register service
Assert abort metricsd if binder service registration fails.

If the addService() call fails (for reasons that at least include an SELinux
policy denial), the call to joinThreadPool() apparently processes a stale
pending weak dereference that triggers an abort on a probable double-free:

 F libc    : Invalid address 0xbe8bfa30 passed to free: value not allocated
 F libc    : Fatal signal 6 (SIGABRT), code -6 in tid 609 (metricsd)

Since metricsd is severely hobbled if registration fails, abort and see if
things work better the next time.  If not, the crash loop will hopefully
attract attention to the problem.

Change-Id: I520d0eafb9cb25ee225d589bfd87df4e51f6b181
2015-12-09 13:32:37 -08:00
Alex Vakulenko 9fc597b750 metricsd: Update to use new component/trait APIs from weaved
Removed command and state definitions and use trait definitions
instead. Also, create "metrics" component for weave.

BUG: 25916429, 25916428, 25917426

Change-Id: Icc02d1c46c371d3afa8e4723852f182992c62bf2
2015-12-09 12:35:39 -08:00
Tao Bao df13f60ce0 Merge "rootdir: Execute update_verifier for A/B update." 2015-12-09 19:50:31 +00:00
Josh Gao 191c154832 Move adb tests to system/core/adb.
Change-Id: If240f45817a46d1e055a8e5173ee7191b9d6c8ea
2015-12-09 11:26:11 -08:00
Yabin Cui b6345d6efa Merge "libbacktrace: check if elf file paths are valid before reading them." 2015-12-09 18:26:15 +00:00
Mark Salyzyn b6a8d41e2a logger.h: reduce maximum payload so sum is page size
Reduce maximum log payload so that the sum with the maximum
length header logger_entry_v4 is a page size. This is a
performance measure.

Expect side effects, truncates messages 8 bytes earlier. The
length has a long history (2008) so there may be non-C code
somewhere that has it hard-coded rather than reflecting this
header. CTS tests may need to be adjusted.

Bug: 25996918
Change-Id: I598c8c5cc78f6b0afc2c1f30cc6f3c18eb8c4c9d
2015-12-09 08:12:07 -08:00
Mark Salyzyn 42ae82742b liblog: test for maximum payload can not survive change
If we adjusted the maximum log payload, Resolve compile
issues resulting from the changes (gTest).

Bug: 25996918
Change-Id: I672b0f4d9d4a1394a5b2e27bf81a5e906bf92a10
2015-12-09 08:12:07 -08:00
Mark Salyzyn 2aa510e8b4 liblog: logprint use uid name if length less then 5
Bug: 25996918
Change-Id: Id882978b7b0b439e39bedeafc39edf80892f0317
2015-12-09 08:12:07 -08:00
Mark Salyzyn 90e7af30a5 liblog: logprint add uid format modifier
Bug: 25996918
Change-Id: Idff5e080fc5c7b69e0c45d3f596eb9d632451cbd
2015-12-09 08:12:07 -08:00