Commit graph

12462 commits

Author SHA1 Message Date
Elliott Hughes
bf40396887 Merge "Lose setprop to toybox." 2015-04-08 03:27:20 +00:00
Nick Kralevich
de95795552 Merge "Create /data/system/heapdump for system_server" 2015-04-08 00:07:20 +00:00
Nick Kralevich
9c0437fba7 Create /data/system/heapdump for system_server
Bug: 20073185
Change-Id: I6fd83d33da33d048fdd6b07fa1f675ecb4f4eb2c
2015-04-07 16:44:43 -07:00
Elliott Hughes
3da8e5ea97 Lose setprop to toybox.
Change-Id: Ic0fd9cfb70e117067f4ebc5e120dea4b5fe1d883
2015-04-07 15:59:07 -07:00
Elliott Hughes
5ae7b1e5df Merge "Lose restorecon to toybox." 2015-04-07 22:42:20 +00:00
Elliott Hughes
877dfc2896 Lose restorecon to toybox.
Change-Id: I5460f46700011b7733a1d87a9049e828531627be
2015-04-07 14:45:07 -07:00
Nick Kralevich
5fc47aae33 Merge "logd: Don't embed a flexible array member within another struct" 2015-04-07 17:46:23 +00:00
Nick Kralevich
58ba58a97c logd: Don't embed a flexible array member within another struct
C (but not C++) has a concept of a flexible array member, which
is documented at https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html .
Using a flexible array member indicates that the structure is
really a header for a variable length object.

In logd's case, the variable length structure android_event_string_t
was embedded within another structure called
android_log_event_string_t. This makes gcc's __builtin_object_size()
function really confused. When compiling with C++,
__builtin_object_size(android_log_event_string_t.payload.data, 1)
would return 0, whereas if you compiled the code with C, the same
call would (properly) return -1.

Code which does automatic bounds checking, such as the proposed
patch at https://android-review.googlesource.com/145411 , will
cause problems for logd if this syntax is used.

Don't try to embed a variable length structure within another
structure. This doesn't appear to be valid C nor C++, and
while it's worked, it seems problematic.

Instead, inline the structure so it's one big happy structure.

Change-Id: I8ac02b7142a4f6560f5f80df2effcf720f9896fc
2015-04-07 10:12:20 -07:00
Sami Tolvanen
02f1d80ae2 Merge "Restore verity state when verified partition is reflashed" 2015-04-07 08:45:34 +00:00
Sami Tolvanen
284c5cb2a1 Merge "Set verity mode as the verified property value" 2015-04-07 08:45:24 +00:00
Mark Salyzyn
33c2ad37ca Merge "android_filesystem_config.h: use __BEGIN_DECLS and __END_DECLS" 2015-04-06 22:37:55 +00:00
Mark Salyzyn
16045614fd android_filesystem_config.h: use __BEGIN_DECLS and __END_DECLS
Change-Id: Idb050b9ef4e7947664295b173e1b09d65accd3e9
2015-04-06 14:15:58 -07:00
Mark Salyzyn
08fe38e23b Merge "Allow inputflinger to have CAP_BLOCK_SUSPEND." 2015-04-06 18:01:39 +00:00
Tim Kilbourn
628620c7ba Allow inputflinger to have CAP_BLOCK_SUSPEND.
(Cherry picked from commit 83e6f2606b)

Resolved conflict in include/private/android_filesystem_config.h, content
already in libcutils/fs_config.c.

Change-Id: I817707721786e9b920fef14ebe836fdcd65a8606
2015-04-06 10:57:29 -07:00
Mark Salyzyn
b137dab48c Merge "android_filesystem_config: move fs_config to libcutils" 2015-04-06 17:33:47 +00:00
Mark Salyzyn
d42df56241 Merge "libcutils: add fs_config" 2015-04-06 17:30:59 +00:00
Dan Albert
d1e90c01f6 Merge "Cleanup base/logging." 2015-04-06 17:20:13 +00:00
Mark Salyzyn
a21c29ee81 android_filesystem_config: move fs_config to libcutils
Bug: 19908228
Change-Id: Id51c0c50eb2677824d052882f4263193a08e1402
2015-04-06 10:04:16 -07:00
Mark Salyzyn
8b2c7dee59 libcutils: add fs_config
Bug: 19908228
Change-Id: I78e6a8d780e578a287ffdee7b7120ecc74797e80
2015-04-06 10:04:15 -07:00
Elliott Hughes
101c57f71b Merge "Disable CR/LF translation for adb interactive shell." 2015-04-05 17:03:38 +00:00
Alistair Buxton
dfa09fd635 Disable CR/LF translation for adb interactive shell.
adb shell uses termios to disable canonical input processing in order to
get raw control codes but it does not disable CR/LF translation. The default
for Linux terminals is to convert CR to LF unless the running program
specifically asks for this to be disabled. Since adb does not, there is no
way to send a CR to any program run on adb shell. Many programs do in fact
differentiate and so are broken by this behaviour, notably nano. This patch
sets the termios flags to disable all line ending translation.

Change-Id: I8b950220f7cc52fefaed2ee37d97e0789b40a078
Signed-off-by: Alistair Buxton <a.j.buxton@gmail.com>
2015-04-05 10:02:34 -07:00
Elliott Hughes
6d951c2c3f Merge "Remove execonce." 2015-04-04 15:42:04 +00:00
Elliott Hughes
3a4aedfcd3 Merge "sdcard: Properly handle deleted nodes" 2015-04-04 00:27:46 +00:00
Dan Albert
7a87d05974 Cleanup base/logging.
Some of this code was unused, most didn't need to be exposed, and we
can just use basename(3).

Also use a better default program name than "unknown".

Change-Id: I62d990f64e4fd0c16aa4b7e907dd06e4f26ddcdd
2015-04-03 16:49:55 -07:00
Elliott Hughes
50f192fafa Merge "Fix "adb devices -l"." 2015-04-03 23:30:37 +00:00
Dan Albert
f78ff16aee Merge "Support arbitrary loggers." 2015-04-03 23:23:07 +00:00
Dan Albert
b547c85b5b Support arbitrary loggers.
While the defaults (logd or stderr) make sense for most use cases,
there are places that can only log to the kernel, or need to log to a
file, etc.

Allow the user to pass in an arbitrary logging object, and provide
LogdLogger and StderrLogger as defaults.

Change-Id: I62368acc795ff313242bb205d65017404bf64e88
2015-04-03 16:22:39 -07:00
Elliott Hughes
09a45a1927 Fix "adb devices -l".
Change 055f1aa4ff switched to using isalnum(3)
but didn't take into account that isalnum has the opposite sense to the
function it replaced, so the tests should have been inverted.

Bug: http://b/20056546
Change-Id: I90630c0bea69ddbb4a95dc09f79f49d23fd497de
2015-04-03 16:12:15 -07:00
Elliott Hughes
ea97588011 Merge "Only Windows doesn't have %zd." 2015-04-03 20:16:27 +00:00
Elliott Hughes
146c244613 Only Windows doesn't have %zd.
Change-Id: Ie09619df212cf7c8aa18a6d46c3e6b6ca3f478cf
2015-04-03 12:53:36 -07:00
Dan Albert
eb56013348 Merge "Share log writing code." 2015-04-03 17:51:13 +00:00
Dan Albert
c7aadc49d3 Share log writing code.
__android_log_write() was just a special form of
__android_log_buf_write that used a default log ID and set the abort
message for fatal messages. Presumably the latter was intended to be
set for __android_log_buf_write as well.

Change-Id: I51cff7561a2754676b2088d95fa4f4505ac3c3c2
2015-04-03 10:41:59 -07:00
Dan Albert
87eca3cb4b Merge "Support logging to other log buffers." 2015-04-03 17:21:45 +00:00
Dan Albert
0c055863eb Support logging to other log buffers.
LOGTO(dest, severity) and PLOGTO(dest, severity) log to other log
buffers. For example, `LOGTO(SYSTEM, FATAL) << "Foobar";`.

Change-Id: Id1ca1c8fdae72d69b73945ae9b006525d0be1582
2015-04-03 10:14:48 -07:00
Dan Albert
8ea5dd8c6e Merge "Remove LogMessage::LogLineLowStack." 2015-04-03 16:52:02 +00:00
Dan Albert
cc71951a8a Merge "Don't show lint errors for rvalue references." 2015-04-03 16:51:42 +00:00
Elliott Hughes
e2837a9107 Remove execonce.
Use 'exec' instead.

Change-Id: I1320d1971f7cd8b23753c27aa87089006e112a11
2015-04-03 09:06:52 -07:00
Elliott Hughes
691b44f55f Merge "Lose umount to toybox." 2015-04-03 15:03:02 +00:00
Elliott Hughes
17cb719e10 Lose umount to toybox.
Change-Id: Ide35731c37d70ccb38a5e84b7310434ce6c3aa6e
2015-04-02 21:24:34 -07:00
Elliott Hughes
70df6f85fe Merge "Just use snprintf for android_get_control_socket." 2015-04-03 03:35:24 +00:00
Dan Albert
0cc351b1a7 Remove LogMessage::LogLineLowStack.
This was ported over from ART, but even they only use it in a single
place.

Change-Id: Ia34dc54b56c764ede79b2957bf3dc8df0f1323ee
2015-04-02 18:43:32 -07:00
Dan Albert
da926f0350 Don't show lint errors for rvalue references.
Change-Id: Ic936c9e3778303d1d26813b844ccd3bb26701550
2015-04-02 18:38:01 -07:00
Christopher Ferris
4d9281dae8 Merge "Update the test for better output on error." 2015-04-03 00:53:40 +00:00
Elliott Hughes
edc49d7b98 Just use snprintf for android_get_control_socket.
Change-Id: I3d0da03847f79c9f9b2cfd7189a07f63b17fc4a2
2015-04-02 17:42:56 -07:00
Elliott Hughes
8e192f626e Merge "Fix Windows strlcpy.c build." 2015-04-03 00:22:40 +00:00
Elliott Hughes
8193d41ea6 Fix Windows strlcpy.c build.
Change-Id: I572c553227a5a2cd57ec304de7e898d7c801fe93
2015-04-02 17:21:47 -07:00
Elliott Hughes
4c1d4a0e8e Merge "Be more intention-revealing with libcutils' strlcpy." 2015-04-02 23:43:11 +00:00
Elliott Hughes
2040031f7b Be more intention-revealing with libcutils' strlcpy.
Several people have been independently confused about when this gets
built and why over the past couple of days.

Change-Id: I2d4a02f66e24c0734327585b7d27e50a344b1e94
2015-04-02 15:39:33 -07:00
Christopher Ferris
97e00bb25a Update the test for better output on error.
Change-Id: Id3b0b96a33441ce5d908aac38e639ac3598a7a89
2015-04-02 15:36:09 -07:00
Mark Salyzyn
34efe4cf1a Merge "mkbootfs: move fs_config to libcutils" 2015-04-02 21:46:41 +00:00