Commit graph

21674 commits

Author SHA1 Message Date
Mohamad Ayyash
8c788588f4 Move canned_fs_config into libcutils
It's no longer specific to make_ext4fs, will be used for mksquashfs as
well.

BUG: 27467028
Change-Id: I41b8c2b168ada45c8378dee522391edfb8f6b9a6
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
2016-04-07 22:44:00 -07:00
Daniel Rosenberg
71f6b9569c Merge "Revert "Revert "sdcard: Support sdcardfs""" into nyc-dev 2016-03-31 22:33:57 +00:00
Daniel Rosenberg
3aa261c05a Revert "Revert "sdcard: Support sdcardfs""
Issue resolved by commit
6855c48093e109c92df39340a8355a3be2540b8e
"Skip mounting sdcardfs in core mode."

This reverts commit f8fccd2f5a.

Bug: 27932087
Change-Id: Ibdb72ad16a1e6c3a01edcb03d003c42de7a03cd6
2016-03-31 22:01:41 +00:00
Mark Salyzyn
f58e58a15c liblog: suppress pmsg on user builds
(cherry pick from commit 7ef5249afa)

- add optimized & cached LIBLOG_HIDDEN __android_log_is_debuggable()
- check when writing, either LOG_ID_SECURITY, SafetyNet or
  debuggable when pushing content to the pmsg buffer.

Bug: 27566046
Change-Id: I85f1b55ec329b38e00f4183836b6ed53046c323d
2016-03-31 13:58:56 -07:00
Mark Salyzyn
6267d70b26 Merge "Revert "sdcard: Support sdcardfs"" into nyc-dev 2016-03-31 16:10:14 +00:00
Mark Salyzyn
f8fccd2f5a Revert "sdcard: Support sdcardfs"
This reverts commit 2bd0efa89c.

Bug: 27932087
Change-Id: Ie27f17c1f283514b90ce9da0c895b528d87e5f47
2016-03-31 16:03:22 +00:00
Erik Kline
e3a769529b Set IFA_BROADCAST during IPv4 RTM_NEWADDRs
Bug: 27194345
Bug: 27732412
Bug: 27786864
Change-Id: I5a5b41422bbaab4582c268c213b788f61cb0e169
(cherry picked from commit 06cb8e9203)
2016-03-31 16:00:40 +09:00
Josh Gao
0b5556b5f0 Merge "debuggerd: set the name of the signal sender." into nyc-dev 2016-03-30 23:48:44 +00:00
Mark Salyzyn
3bef8973aa logcat: add --print flag
(cherry pick from commit c9202777cf)

To be used in combination with --regex and --max-count flags
to allow all prints to pass through, but still stop when
max-count is hit.

Bug: 27706081
Change-Id: Idaa9f0b44586a885b9d9f367824b0072c0853227
2016-03-30 16:31:35 -07:00
Mark Salyzyn
7ec59405ce logcat: posixize and extend long arguments
(cherry pick from commit d85f6461b6)

- change _ to - for long arguments
- added --tail as hidden undocumented alias for -t
- added --head as hidden undocumented alias for --max-count

Bug: 27706081
Change-Id: I614cc83ae56b305b267f64ed05dc3ed3027dabd4
2016-03-30 16:29:56 -07:00
Mark Salyzyn
df42ce4cf3 logcat: support --regex on binary buffers as-is
(cherry pick from commit aa730c1145)

- Do not restrict regex on LOG_ID_EVENTS or LOG_ID_SECURITY.
- some logcat_panic messages need to incorporate a newline.
- deal with some coding standards issues.

Bug: 27706081
Change-Id: Ie647fd62d027b01004177559d68b8e5a346705e6
2016-03-30 16:28:34 -07:00
Mark Salyzyn
9cc9cf0280 logcat: do not assign 0 or NULL to global variables
(cherry pick from commit c6d6652df5)

Bug: 27706081
Change-Id: If29d8d688ca7cce9b22227eeff1e9b500e728a50
2016-03-30 16:27:18 -07:00
Casey Dahlin
1164ef6a73 logcat: Add --max-count option
(cherry pick from commit 6ac498d4bb)

This new option causes logcat to quit after it prints N messages.

Test: New unit test passes
Bug: 27706081
Change-Id: Ie52ddf300160a041e68a6bac0ae7ade68bb28a7c
2016-03-30 16:25:40 -07:00
Casey Dahlin
0f7732d708 logcat: Add --regex option
(cherry pick from commit dc42a8734e)

You can now filter log output by a regex on the messages.

Test: New unit test passes
Bug: 27706081
Change-Id: Idfa637f62a25fb1b92e9b49b89572dff0fec6e08
2016-03-30 16:24:26 -07:00
Josh Gao
70335deb59 debuggerd: set the name of the signal sender.
Bug: http://b/27925028
Change-Id: I6bff938e229d2368250d4b5c268fa24bd4badea0
(cherry picked from commit f3dde2f869)
2016-03-30 14:22:41 -07:00
Paul Lawrence
dc6893ce9f Merge "Revert "HACK: Run e2fsck with -f"" into nyc-dev 2016-03-30 20:46:00 +00:00
James Hawkins
4b71388896 bootstat: Two changes to aid in debugging TimeSinceFactoryReset.
* Also log to the BootEventRecordStore to check lossiness.
* Log factory_reset_current_time_failure separately.

Bug: 27550578
Change-Id: Id3d579a74a59ac28290cb7d6048765519f9ba59b
(cherry picked from commit fff95ba5dd)
2016-03-30 13:32:22 -07:00
Yabin Cui
dceb7fc87a Merge "base: Avoid compilation error when compiled with -Wdangling-else." into nyc-dev 2016-03-30 19:29:11 +00:00
Yabin Cui
dd4c75e6e3 base: Avoid compilation error when compiled with -Wdangling-else.
As logging macros uses `if xxx else yyy` style, it is reported as an
error when DCHECK() is compiled with -Wdangling-else option. Because
after preprocess, DCHECK(x) becomes:
if (EnableDChecks)
  if (x)
    ;
  else
    LogMessage(FATAL) << yyy;

This CL avoids compilation error by replacing `if xxx else yyy`
with `xxx && yyy` or `!(xxx) || yyy`.

Bug: 26962895

Change-Id: Ib0bf242cc04a238ec31a1ab66b53fc8a5b5ed28f
(cherry picked from commit 2527628eda)
2016-03-30 11:13:40 -07:00
Pierre Imai
77746f2eab Merge "Add C++ thread annotations support to core." into nyc-dev 2016-03-30 07:40:06 +00:00
Sami Tolvanen
bebd38114c Merge "mkbootimg: use int for os_version and os_patch_level" into nyc-dev 2016-03-30 03:25:21 +00:00
Dimitry Ivanov
f2c2c07354 Merge "Adjust check for target_sdk_version for workarounds" into nyc-dev 2016-03-30 01:59:07 +00:00
Sami Tolvanen
fa0b90aa79 mkbootimg: use int for os_version and os_patch_level
The parse_int function attempts to interpret the string to detect
base, which leads to it assuming strings starting with 0 are base
8. This obviously fails for certain dates, so use int instead.

Bug: 27498078
Bug: 22914603
Change-Id: I50b1fb3d7876f2ec17d00649cc9a2d23af2aec2b
(cherry picked from commit 294eb9dac3)
2016-03-29 18:27:13 -07:00
Pierre Imai
3c94aeef53 Add C++ thread annotations support to core.
Change-Id: I7b8940c12e0f3121d8c09d86d2d4077b0a0ce376
(cherry picked from commit 021ea2d176)
2016-03-30 10:06:33 +09:00
Yabin Cui
901be39dc4 Merge "libbacktrace_offline: support unwinding of shared libraries in apk file." into nyc-dev 2016-03-30 00:59:27 +00:00
Dimitry Ivanov
4f8bb2577a Adjust check for target_sdk_version for workarounds
target_sdk_version=0 is a valid version, it basically
means 1 (the very first version of android) not current one.

Bug: http://b/27702070
Change-Id: Ib7843718f364b975e1d09a05377bf8580b407d9d
2016-03-29 16:12:40 -07:00
Yabin Cui
02092b36da libbacktrace_offline: support unwinding of shared libraries in apk file.
Bug: 26962895
Change-Id: I009080f26e7323247c3ab24eea614eec4432ca6a
(cherry picked from commit b791a76ed7)
2016-03-29 14:04:34 -07:00
Mark Salyzyn
5e635f7c06 liblog: gate write on log id available
(cherry pick from commit c33103c440)

- Secure LOG_ID_KERNEL in writer
- Secure LOG_ID_SECURITY in reader and writer
- if writer transport says not available, do not write to that log id

Bug: 27566046
Bug: 27896341
Change-Id: If63a78a56fb94adfbf9979454c4cadb81af45c19
2016-03-29 12:53:44 -07:00
Dimitry Ivanov
7f9a1aaf05 A workaround for apps using custom classloaders
Allow custom classloaders to load native libraries
from anywhere under /data

Bug: http://b/27588281
Change-Id: Idb87b33361903f52b734ddd0ceaabe1ff9c281eb
2016-03-29 11:12:18 -07:00
Paul Lawrence
07068de789 Revert "HACK: Run e2fsck with -f"
This reverts commit 2cd762d932.

This change adds 12 seconds or so to boot times - we need to revert it
and see if we can find a proper fix to the original problem if it is
still occurring.

Bug: 27849759
Change-Id: Ib3692e436c08468a51529f256f2ce5e9ccd2d35d
2016-03-29 18:02:33 +00:00
James Hawkins
c1b10a9e84 Merge "Revert "Revert "bootstat: Handle v1 record files which do not contain file contents.""" into nyc-dev 2016-03-28 20:59:19 +00:00
James Hawkins
6105846a0e Revert "Revert "bootstat: Handle v1 record files which do not contain file contents.""
This reverts commit 756b6a53a7.

The change is updated to use utimes (instead of futimens) since only
support for seconds resolution is required.

Bug: 27836969
Change-Id: I7134f759fb643e1a149158fcf6e20f76538b57d3
(cherry picked from commit c0dc139b4a)
2016-03-28 13:37:16 -07:00
Pablo Ceballos
0e28c1fa4a Merge "Rename single buffer mode to shared buffer mode" into nyc-dev 2016-03-28 19:34:27 +00:00
James Hawkins
197b62852b Merge "Revert "bootstat: Handle v1 record files which do not contain file contents."" into nyc-dev 2016-03-28 18:29:36 +00:00
James Hawkins
77fc4bac4e Revert "bootstat: Handle v1 record files which do not contain file contents."
This reverts commit 13b42bf8a8.

I accidentally merged the wrong version of this change (this version had to be reverted on master).

Change-Id: I651e3bf50515daed08464a49ace2eefefdad89c0
2016-03-28 18:25:41 +00:00
James Hawkins
c52b70d289 Merge "bootstat: Handle v1 record files which do not contain file contents." into nyc-dev 2016-03-28 17:27:17 +00:00
Josh Gao
dfa163df50 debuggerd: add SIGSYS to the list of handled signals.
Processes using seccomp will get SIGSYS when attempting to use a
disallowed syscall. We're currently not handling SIGSYS in bionic's
signal handler, but this change will let us dump a backtrace pointing at
rt_tgsigqueueinfo in our signal handler if seccomp policies block it
during a real crash.

Bug: http://b/27853687
Change-Id: I4e4aacc95eeef7249d895e19dc4ccd77a51c7a17
2016-03-25 14:34:22 -07:00
Colin Cross
033bc9f3e7 Merge "liblog: update Android.bp" into nyc-dev 2016-03-25 19:54:24 +00:00
James Hawkins
13b42bf8a8 bootstat: Handle v1 record files which do not contain file contents.
Bug: 27836969
Change-Id: I18fcdab7ca32d00af3f8827f42d47868492ed719
(cherry picked from commit 84fda19c83)
2016-03-25 10:42:50 -07:00
Joe Onorato
e0e941e349 Merge "Turn off duplicate log" into nyc-dev 2016-03-24 23:19:55 +00:00
Dan Stoza
beda52b32a Merge "graphics.h: Add android_color_transform_t" into nyc-dev 2016-03-24 21:44:38 +00:00
Mark Salyzyn
93101bea8b liblog: update Android.bp
Update Android.bp to match the version in AOSP.

Change-Id: I93aba0f93a7a8d255073661331f1d966a53e20aa
(cherry picked from commit c457a4b73e)
2016-03-24 13:45:00 -07:00
Mark Salyzyn
476b771bda liblog: logprint: deal with malformed log messages
(cherry picked from commit 083c53462a)

Try to print as much content as possible should the application
logging only submit content as part of a tag with an empty message.
We search for the first non-printable ascii character in the tag, in
order to split it up for printing.

Applications (such as com.yahoo.mobile.client.android.weather) that
malform their log messages will no longer be punished by truncating
the content, but this should never be considered advocacy for their
bad behavior.

Bug: 27585978
Change-Id: Idb0680e8d6a6ad2bef5150661905acccb5b70afb
2016-03-24 12:21:53 -07:00
Joe Onorato
b03b6ac61e Turn off duplicate log
Bug: 27744135
Change-Id: Iaf5787d36c983f19586e1d1a40f35091fb168cfe
2016-03-24 11:33:15 -07:00
Dan Stoza
bb1deda59b graphics.h: Add android_color_transform_t
Adds android_color_transform_t, which specifies a range of color
transforms which may be applied to the whole display.

Bug: 22767098
Change-Id: Iaf03915c09ac0bdd18512b5f78c39da1705bda08
2016-03-24 10:38:46 -07:00
Josh Gao
6eb4eab106 debuggerd: waitpid for all children, and log the result.
Change-Id: Ic575e6db76ab153b4b238589a8cd299812d0e046
(cherry picked from commit 2808005521)
2016-03-23 14:28:01 -07:00
Josh Gao
a6219eae8d debuggerd: always send SIGCONT after detaching.
Bug: http://b/27330889
Change-Id: I104248af1cde03dbdbacc03c87fe7e2dffd6c037
(cherry picked from commit 24464185eb)
2016-03-23 14:27:57 -07:00
Josh Gao
05e1e1fb41 Don\'t demangle symbol names. am: fbbc744 am: 0edda64 am: 9bf0b81
am: 0fb3191

* commit '0fb3191840680f7e084aa9ee53a1906074a16b68':
  Don't demangle symbol names.
2016-03-23 20:52:26 +00:00
Josh Gao
0fb3191840 Don\'t demangle symbol names. am: fbbc744 am: 0edda64
am: 9bf0b81

* commit '9bf0b815ad6701b6a3813fc1da1ecec61affb18c':
  Don't demangle symbol names.
2016-03-23 20:48:58 +00:00
Josh Gao
9bf0b815ad Don\'t demangle symbol names. am: fbbc744
am: 0edda64

* commit '0edda648fb7793c58ff76ceb0c740571b25d16fd':
  Don't demangle symbol names.
2016-03-23 20:44:20 +00:00