Commit graph

14831 commits

Author SHA1 Message Date
Elliott Hughes
9c94aa9982 Switch to toybox ls.
Bug: http://b/21171466
Change-Id: I3fa09db7ca43d337cbda60f10269e7607544982b
2015-05-15 16:54:35 -07:00
Dan Albert
2bbbc709c9 am 8fb4d994: am 4e000812: Merge "adb: win32: fix StringPrintf format string checking of %zd and PRIu64"
* commit '8fb4d99478521aeeab86bdbbcb085bb308d38aa7':
  adb: win32: fix StringPrintf format string checking of %zd and PRIu64
2015-05-15 23:14:11 +00:00
Chih-Hung Hsieh
2d543b7d4b Enable clang compilation.
Previous clang/llvm bug was fixed.

BUG: 18790528
Change-Id: Ib12696030d34ebc3c3ef1bca3cad0139d631417e
(cherry picked from commit 1cd02d3443)
2015-05-15 16:13:19 -07:00
Dan Albert
8fb4d99478 am 4e000812: Merge "adb: win32: fix StringPrintf format string checking of %zd and PRIu64"
* commit '4e0008123d0828e8b8ab31c81ebdbc5dc3656e88':
  adb: win32: fix StringPrintf format string checking of %zd and PRIu64
2015-05-15 22:59:36 +00:00
Dan Albert
4e0008123d Merge "adb: win32: fix StringPrintf format string checking of %zd and PRIu64" 2015-05-15 22:49:59 +00:00
Dan Albert
c76137ddd5 am e9e6eb82: am 0df06907: Merge "adb: win32: fix daemon acknowledgement"
* commit 'e9e6eb82b6720d658c11aeea8177f1cf8d54d5ea':
  adb: win32: fix daemon acknowledgement
2015-05-15 22:24:41 +00:00
Elliott Hughes
dea865b75c am 2181c722: Fix \' escaping in adb.
* commit '2181c722ceac50dde3c4a399950b37e7fd6a5893':
  Fix ' escaping in adb.
2015-05-15 22:15:44 +00:00
Dan Albert
e9e6eb82b6 am 0df06907: Merge "adb: win32: fix daemon acknowledgement"
* commit '0df06907b42d5deea3d55411d98e273e204390ab':
  adb: win32: fix daemon acknowledgement
2015-05-15 21:56:44 +00:00
Elliott Hughes
2181c722ce Fix ' escaping in adb.
You can't just use \' inside a single-quoted string.

Bug: http://b/20323053
Bug: http://b/3090932
Change-Id: I73754b097671d02dc11c35052f0534b6dd789e4f
(cherry picked from commit 84b0bf2264)
2015-05-15 14:50:47 -07:00
Dan Albert
0df06907b4 Merge "adb: win32: fix daemon acknowledgement" 2015-05-15 21:47:07 +00:00
Elliott Hughes
43ed529b45 am d09e3169: am d0008c97: Merge "Fix \' escaping in adb."
* commit 'd09e3169065314a5fddd312fc53f107eff4ccedf':
  Fix ' escaping in adb.
2015-05-15 21:33:45 +00:00
Elliott Hughes
d09e316906 am d0008c97: Merge "Fix \' escaping in adb."
* commit 'd0008c971dce0e90f49426ac79af190514551f1f':
  Fix ' escaping in adb.
2015-05-15 21:19:21 +00:00
Elliott Hughes
d0008c971d Merge "Fix ' escaping in adb." 2015-05-15 21:11:25 +00:00
Elliott Hughes
00c4cc0337 am 651fae3c: Reduce the coldboot timeout to 1s.
* commit '651fae3cbc9183ea1abcccc9b64db49ff76d0e00':
  Reduce the coldboot timeout to 1s.
2015-05-15 20:57:41 +00:00
Christopher Ferris
6938aef388 am eb19e766: Prevent crashes if a map cannot be created.
* commit 'eb19e766322fb57ccde989e0e35b0ac3e28a4ac2':
  Prevent crashes if a map cannot be created.
2015-05-15 20:11:34 +00:00
Adam Lesinski
07edc3b3b3 Prevent integer overflow when allocating native_handle_t
User specified values of numInts and numFds can overflow
and cause malloc to allocate less than we expect, causing
heap corruption in subsequent operations on the allocation.

Bug: 19334482
Change-Id: I43c75f536ea4c08f14ca12ca6288660fd2d1ec55
2015-05-15 13:09:39 -07:00
Elliott Hughes
651fae3cbc Reduce the coldboot timeout to 1s.
5s was already a ridiculously long time to delay booting, and some OEMs are
trying to make it even more insane:

  https://www.codeaurora.org/cgit/quic/la/platform/system/core/commit/?h=lp&id=fd23edd48272976d2fb333f377242173f92aa343

Let's at least ensure that Nexus and Android One devices don't take forever
to boot...

Bug: http://b/19899875
Change-Id: I9680c166a759360f34118e51cd0645e12b6bd5c8
(cherry picked from commit c7331d02d1)
2015-05-15 12:18:41 -07:00
Elliott Hughes
84b0bf2264 Fix ' escaping in adb.
You can't just use \' inside a single-quoted string.

Bug: http://b/20323053
Bug: http://b/3090932
Change-Id: I73754b097671d02dc11c35052f0534b6dd789e4f
2015-05-15 12:06:00 -07:00
Christopher Ferris
e7f817ec0b am 11d78d46: am 3f7e06ae: Merge "Prevent crashes if a map cannot be created."
* commit '11d78d46a670fb3ac933dd4b79be1852a0c48b7f':
  Prevent crashes if a map cannot be created.
2015-05-15 18:45:11 +00:00
Christopher Ferris
eb19e76632 Prevent crashes if a map cannot be created.
Under some conditions, /proc/<pid>/maps might return nothing. If we
try and unwind in this case, we'll crash. Check this case and fail
the unwind.

Add checks that no other functions try and use map_ without
checking for nullptr.

Add logging when an unwind fails so it's clear what happened.

Bug: 21162746
Change-Id: I56ce51dda0cfc9db20475a441f118108196aa07c
(cherry picked from commit 30c942cf10)
2015-05-15 11:32:53 -07:00
Christopher Ferris
11d78d46a6 am 3f7e06ae: Merge "Prevent crashes if a map cannot be created."
* commit '3f7e06aef5376daba7e8790e575da1d7b52f719c':
  Prevent crashes if a map cannot be created.
2015-05-15 18:32:49 +00:00
Christopher Ferris
3f7e06aef5 Merge "Prevent crashes if a map cannot be created." 2015-05-15 18:25:01 +00:00
Andreas Gampe
a6ac9ce98b LibNativeBridge: Version 2
Add a callback function to retrieve "signal handler" from the bridge,
if the bridge wants it to be managed by the runtime. The signal handler
will be invoked after the runtime's own one, and before any other
chained handler.

Add a callback function to check compatibility of the bridge with the
library.

Add a function to expose the native bridge version. Add a test for this
function.

Bug: 20217701
Change-Id: Ic23a60b949f119c7d8b0e7cb27a61e6c16532a23
2015-05-14 20:20:49 -07:00
Christopher Ferris
30c942cf10 Prevent crashes if a map cannot be created.
Under some conditions, /proc/<pid>/maps might return nothing. If we
try and unwind in this case, we'll crash. Check this case and fail
the unwind.

Add checks that no other functions try and use map_ without
checking for nullptr.

Add logging when an unwind fails so it's clear what happened.

Bug: 21162746
Change-Id: I56ce51dda0cfc9db20475a441f118108196aa07c
2015-05-14 17:56:41 -07:00
Elliott Hughes
86920d80b6 am bca8dc6a: am 000c009b: Merge "Reduce the coldboot timeout to 1s."
* commit 'bca8dc6a44b3505e8d72b9247f813f8070211393':
  Reduce the coldboot timeout to 1s.
2015-05-14 20:34:32 +00:00
Andres Morales
96470fdefe am c89a1774: Merge "Move SoftGateKeeper into gatekeeperd" into mnc-dev
* commit 'c89a1774cb483f90f58cb8912e89e58f53dbb6a5':
  Move SoftGateKeeper into gatekeeperd
2015-05-14 20:29:12 +00:00
Elliott Hughes
bca8dc6a44 am 000c009b: Merge "Reduce the coldboot timeout to 1s."
* commit '000c009bcc71bf8218d20c5575d3ae44c8bd4cda':
  Reduce the coldboot timeout to 1s.
2015-05-14 20:22:50 +00:00
Elliott Hughes
000c009bcc Merge "Reduce the coldboot timeout to 1s." 2015-05-14 20:14:32 +00:00
Andres Morales
c89a1774cb Merge "Move SoftGateKeeper into gatekeeperd" into mnc-dev 2015-05-14 20:06:11 +00:00
Andres Morales
33dfdc7bbc Move SoftGateKeeper into gatekeeperd
Allows for easy determination of whether there's a
hardware module in place. Permits tighter coupling of
software implementation with upper-level stack.

Bug:21090356
Change-Id: I275b57cd976c233c43c476c5869c5a4b29fbc175
2015-05-14 12:58:13 -07:00
Chih-Hung Hsieh
239fb56bcf am 6046f418: am 2cc25440: Merge "Enable clang compilation."
* commit '6046f4180d6a333788ccdab21c909f2e40d2b073':
  Enable clang compilation.
2015-05-14 19:40:52 +00:00
Chih-Hung Hsieh
6046f4180d am 2cc25440: Merge "Enable clang compilation."
* commit '2cc2544024364ec532a6d49131cb842fe9b559ae':
  Enable clang compilation.
2015-05-14 19:27:39 +00:00
Chih-Hung Hsieh
2cc2544024 Merge "Enable clang compilation." 2015-05-14 19:21:22 +00:00
Elliott Hughes
c7331d02d1 Reduce the coldboot timeout to 1s.
5s was already a ridiculously long time to delay booting, and some OEMs are
trying to make it even more insane:

  https://www.codeaurora.org/cgit/quic/la/platform/system/core/commit/?h=lp&id=fd23edd48272976d2fb333f377242173f92aa343

Let's at least ensure that Nexus and Android One devices don't take forever
to boot...

Bug: http://b/19899875
Change-Id: I9680c166a759360f34118e51cd0645e12b6bd5c8
2015-05-14 12:03:14 -07:00
Chih-Hung Hsieh
1cd02d3443 Enable clang compilation.
Previous clang/llvm bug was fixed.

BUG: 18790528
Change-Id: Ib12696030d34ebc3c3ef1bca3cad0139d631417e
2015-05-14 10:53:48 -07:00
Spencer Low
6001c87cbc adb: win32: fix StringPrintf format string checking of %zd and PRIu64
At runtime, vsnprintf (and android::base::StringPrintf which calls it)
call a mingw version of vsnprintf, not the vsnprintf from MSVCRT.DLL.
The mingw version properly understands %zd and PRIu64 (the latter,
provided that you #include <inttypes.h>).

The problem was that android::base::StringPrintf was causing
compile-time errors saying that %zd and PRIu64 were not recognized. It
seems that this was because the attribute on the function prototypes
specified `printf' instead of `gnu_printf'. Once that was fixed to match
vsnprintf's attribute, the warnings went away.

This uses similar preprocessor techniques as <android/log.h>.

Also restore a %zd usage to avoid a static_cast<>, and make
print_transfer_progress()'s format string compile-time checkable (and
tweak some types and %llu => PRIu64).

Change-Id: I80b31b9994858a28cb7c6847143b86108b8ab842
Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
2015-05-13 19:30:30 -07:00
Christopher Ferris
97b69018d4 am 684fb77c: Add tests for elf unwinding in memory.
* commit '684fb77c82affca723910e26e8c219c804e00354':
  Add tests for elf unwinding in memory.
2015-05-14 01:44:46 +00:00
Christopher Ferris
6ceca9dcec resolved conflicts for merge of 428fad97 to mnc-dev-plus-aosp
Change-Id: I4f84f751a9d885552d5e59fbfc8aa75bd934768d
2015-05-13 18:41:26 -07:00
Christopher Ferris
6866d32f39 resolved conflicts for merge of cd206b39 to mnc-dev-plus-aosp
Change-Id: Ief3271524b1e8f1950fc202eaa3e8c1bf248f41b
2015-05-13 17:59:20 -07:00
Christopher Ferris
684fb77c82 Add tests for elf unwinding in memory.
Bug: 19517541
(cherry picked from commit 67aba6881d)

Change-Id: I914636ccd814e041475b6b2d81119cac1745a9ff
2015-05-13 13:44:47 -07:00
Dan Albert
428fad97a0 Remove libbacktrace definition of gettid.
Also simplifies the Darwin implementation of gettid, because
apparently libbacktrace had a better way of doing it.

Bug: 19517541

(cherry picked from commit 23f750b068)

Change-Id: I2f888e8ed7a2f5719973786cbcbb399a81867ee9
2015-05-13 13:44:34 -07:00
Dan Albert
cd206b3900 Fix gettid() on Windows.
Accidentally had this all hidden by an #ifndef _WIN32 when I wrote it.

Bug: 19517541

(cherry picked from commit b3a36ca5ee)

Change-Id: Ifbd5d19e506e7313700e2e29a2dae5736e049844
2015-05-13 13:43:32 -07:00
Christopher Ferris
6a61120484 am 44b4d347: am 34804b90: Merge "Add tests for elf unwinding in memory."
* commit '44b4d34753bd2274a145b21c609bf27693d35a21':
  Add tests for elf unwinding in memory.
2015-05-13 18:36:02 +00:00
Christopher Ferris
44b4d34753 am 34804b90: Merge "Add tests for elf unwinding in memory."
* commit '34804b90ecc8d4d39e22b70ee7110e7f7df5daea':
  Add tests for elf unwinding in memory.
2015-05-13 18:13:24 +00:00
Christopher Ferris
34804b90ec Merge "Add tests for elf unwinding in memory." 2015-05-13 17:58:13 +00:00
Iliyan Malchev
355bd1fd98 am b33118ac: am 2557cd21: am 8b448629: am 16092b7a: Merge "fs_mgr: allow for zramsize to be specified as percentage of total memory" into lmp-mr1-dev
* commit 'b33118ac7603b459d690f524e0c64161f8ab5c0d':
  fs_mgr: allow for zramsize to be specified as percentage of total memory
2015-05-13 17:29:05 +00:00
Mark Salyzyn
79128a8c23 am e97b11bc: liblog: gtest open("/dev/pmsg0", "a")
* commit 'e97b11bc42eb300d140ae43f1d4a2f025d57ac1c':
  liblog: gtest open("/dev/pmsg0", "a")
2015-05-13 17:29:04 +00:00
Mark Salyzyn
5226cb99f6 am 654904f0: logd: Add TID statistics
* commit '654904f0f9c42458cae2b1931265f97f8fb6cb95':
  logd: Add TID statistics
2015-05-13 17:15:31 +00:00
Mark Salyzyn
2ddb51c854 am 66091f11: logd: Cleanup
* commit '66091f11f427587bf810d89b0f64be556e1cd168':
  logd: Cleanup
2015-05-13 17:15:30 +00:00
Mark Salyzyn
812a15f659 am 79c3815c: logcat: liblog: Add "usec" format argument
* commit '79c3815ca191033bd97e7d4458970b606f661a18':
  logcat: liblog: Add "usec" format argument
2015-05-13 17:15:29 +00:00