Commit graph

11724 commits

Author SHA1 Message Date
Jeff Sharkey
7c42c7f84f am 9f72ef89: Merge "Extend to receive NFLOG packets."
* commit '9f72ef8944a93bd333c6c7f87c7f7d79207ae663':
  Extend to receive NFLOG packets.
2015-01-16 06:07:29 +00:00
Elliott Hughes
f21717cd87 Remove unused cruft from libcutils.
Change-Id: I316d39e8e0a9aa385d8e1f37678b8bf2c03441eb
2015-01-15 21:16:03 -08:00
Jeff Sharkey
9f72ef8944 Merge "Extend to receive NFLOG packets." 2015-01-16 01:11:02 +00:00
Elliott Hughes
f5a6c6bbb5 am 17e2f436: Merge "Lose cmp to toybox."
* commit '17e2f436f0da70673498482921a642c8917677aa':
  Lose cmp to toybox.
2015-01-15 23:55:45 +00:00
Christopher Ferris
f4f4d10950 am 791a6905: Merge "Add timed versions of stack dumping functions."
* commit '791a690596a221c6cf05135c517e2f1834b86425':
  Add timed versions of stack dumping functions.
2015-01-15 23:51:56 +00:00
Elliott Hughes
17e2f436f0 Merge "Lose cmp to toybox." 2015-01-15 23:45:51 +00:00
Christopher Ferris
791a690596 Merge "Add timed versions of stack dumping functions." 2015-01-15 23:40:19 +00:00
Christopher Ferris
fa41e0f5c8 Add timed versions of stack dumping functions.
Under some unknown circumstances, debuggerd could become unresponsive.
If you try and take a bugreport during this time, it will hang forever.
Adding functions that have a timeout will allow dumpstate to stop if
dumping is taking too long.

Bug: 18766581

(cherry picked from commit 5f2ff6a910)

Change-Id: I39e8e9c60209e3ef9efac795fedb8e1edce2bd3e
2015-01-15 15:34:21 -08:00
Elliott Hughes
b546991685 Lose cmp to toybox.
Change-Id: Ib8b078565e4951f7621d21fbe3573bfcf2435879
2015-01-15 14:59:22 -08:00
Elliott Hughes
d5c46b6370 am 3d7951d4: Merge "Lose chown to toybox."
* commit '3d7951d4a43af35fc7d61a8a69fb2acf4bc50f1b':
  Lose chown to toybox.
2015-01-15 22:58:23 +00:00
Elliott Hughes
3d7951d4a4 Merge "Lose chown to toybox." 2015-01-15 22:47:38 +00:00
Elliott Hughes
6eb88b2c1d Lose chown to toybox.
Change-Id: Ic56addb183ce7f1d289b807527047c37924c1aa6
2015-01-15 13:47:00 -08:00
Dmitry Shmidt
2901b30a58 am 70f6dea9: Merge "android_filesystem: Remove setuid bits from tcpdump" into lmp-mr1-dev
* commit '70f6dea9d06876bc65181c40ee9e623be196fb4c':
  android_filesystem: Remove setuid bits from tcpdump
2015-01-15 20:51:35 +00:00
Jeff Sharkey
9a20e67fa6 Extend to receive NFLOG packets.
Packets captured and logged by the NFLOG target are unicast, so
extend to catch and decode them.  To avoid escaping issues, the raw
contents are passed around as hex strings.

Bug: 18335678
Change-Id: Ib7299500baa00080a1f000f9da843eb527363353
2015-01-15 12:50:59 -08:00
Dmitry Shmidt
70f6dea9d0 Merge "android_filesystem: Remove setuid bits from tcpdump" into lmp-mr1-dev 2015-01-15 20:45:06 +00:00
Dmitry Shmidt
33e4f4d81a android_filesystem: Remove setuid bits from tcpdump
Bug: 18669116

Change-Id: I25486f2fe0e994f569b788fc9f03ef6d383f54d4
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2015-01-15 10:35:54 -08:00
Jean-Michel Trivi
a2c6f6cdcf am c6c3c7d4: Merge "Remove explict use of ASCII encoding" into lmp-mr1-dev
* commit 'c6c3c7d44508dc8a80be794cbb97ed416b0eb539':
  Remove explict use of ASCII encoding
2015-01-15 18:24:02 +00:00
Jean-Michel Trivi
827f19154c am 6c555ea3: (-s ours) Merge "Return path including executable instead of without" into lmp-mr1-dev
* commit '6c555ea3058d957795c40bc07b264701427453a2':
  Return path including executable instead of without
2015-01-15 18:24:01 +00:00
Jean-Michel Trivi
b6327778e0 am 1a65d5b3: (-s ours) Merge "Fix building on modern versions of Xcode and OS X." into lmp-mr1-dev
* commit '1a65d5b3516ba5750e17b3cb5bc64a585b17f69a':
  Fix building on modern versions of Xcode and OS X.
2015-01-15 18:07:08 +00:00
Jean-Michel Trivi
c6c3c7d445 Merge "Remove explict use of ASCII encoding" into lmp-mr1-dev 2015-01-15 17:16:22 +00:00
Jean-Michel Trivi
6c555ea305 Merge "Return path including executable instead of without" into lmp-mr1-dev 2015-01-15 17:16:01 +00:00
Jean-Michel Trivi
1a65d5b351 Merge "Fix building on modern versions of Xcode and OS X." into lmp-mr1-dev 2015-01-15 17:15:33 +00:00
Narayan Kamath
50481146a9 am e232949c: Merge "sdcard : inode numbers must be fully representable as uint32_t."
* commit 'e232949c898c940d3528aaf187d7a359c430a311':
  sdcard : inode numbers must be fully representable as uint32_t.
2015-01-15 12:14:12 +00:00
Narayan Kamath
e232949c89 Merge "sdcard : inode numbers must be fully representable as uint32_t." 2015-01-15 11:59:45 +00:00
Narayan Kamath
5aadceb56f sdcard : inode numbers must be fully representable as uint32_t.
This works around a bug on on 64 bit kernels + sdcard daemons
where we were using memory addresses as inode numbers.

bug: 19012244

(cherry picked from commit faa0935ffb)

Change-Id: Idbf9e285e507e702e04e7461a10153df68ef2322
2015-01-15 11:58:53 +00:00
Narayan Kamath
4b69d15c03 am 0f86444b: Merge "sdcard : inode numbers must be fully representable as uint32_t." into lmp-mr1-dev
* commit '0f86444b3912cadb4227755f3b80d2ff74841575':
  sdcard : inode numbers must be fully representable as uint32_t.
2015-01-15 10:26:27 +00:00
Narayan Kamath
0f86444b39 Merge "sdcard : inode numbers must be fully representable as uint32_t." into lmp-mr1-dev 2015-01-15 09:43:10 +00:00
Christopher Ferris
844c7ccc0a am 5f2ff6a9: Add timed versions of stack dumping functions.
* commit '5f2ff6a9106083e2a79b8600a0bf6a5341c6ca38':
  Add timed versions of stack dumping functions.
2015-01-15 01:48:27 +00:00
Elliott Hughes
776158fed3 am 41341eea: Merge "Lose date to toybox (as date and hwclock)."
* commit '41341eea6b32b1c3012a976cfb75704007c39449':
  Lose date to toybox (as date and hwclock).
2015-01-15 00:42:41 +00:00
Christopher Ferris
5f2ff6a910 Add timed versions of stack dumping functions.
Under some unknown circumstances, debuggerd could become unresponsive.
If you try and take a bugreport during this time, it will hang forever.
Adding functions that have a timeout will allow dumpstate to stop if
dumping is taking too long.

Bug: 18766581
Change-Id: I85053b8dcfe6224e2b64b4d8f7f2ef448b3cda34
2015-01-14 15:24:33 -08:00
Elliott Hughes
41341eea6b Merge "Lose date to toybox (as date and hwclock)." 2015-01-14 23:01:05 +00:00
Elliott Hughes
587e30c91c am 3bb5654a: Merge "Lose ifconfig to toybox."
* commit '3bb5654a46f062b87f6bdbbf8b8945bc9e99947b':
  Lose ifconfig to toybox.
2015-01-14 20:24:51 +00:00
Elliott Hughes
f8bf054fab Lose date to toybox (as date and hwclock).
Change-Id: I7015454edd2240413d93509a96ad884592fcaae9
2015-01-14 12:24:23 -08:00
Elliott Hughes
3bb5654a46 Merge "Lose ifconfig to toybox." 2015-01-14 20:14:27 +00:00
Mark Salyzyn
84d3ad60d7 am 31399f4f: Merge "logd: Fix pruning"
* commit '31399f4f06c4e5c965c518f0499e4e19316042cd':
  logd: Fix pruning
2015-01-14 19:23:32 +00:00
Elliott Hughes
e5efa98207 am da3dec3c: Merge "Lose toolbox notify in favor of toybox inotifyd."
* commit 'da3dec3c19d1489f5997aea9dafd34b68c2b515b':
  Lose toolbox notify in favor of toybox inotifyd.
2015-01-14 19:14:12 +00:00
Mark Salyzyn
31399f4f06 Merge "logd: Fix pruning" 2015-01-14 19:13:11 +00:00
TraianX Schiau
da6495d06f logd: Fix pruning
In a scenario in which an on-line (blocking) client is running and
a clean is attempted (logcat -c), the following can be observed:

1) the on-line logger seems to freeze
2) any other clear attempt will have no effect

What is actually happening:

In this case prune function will "instruct" the oldest timeEntry
to skip a huge number (very close to ULONG_MAX) of messages, this
being the cause of 1.

Since the consumer thread will skip all the log entries, mStart
updating will also be skipped. So a new cleaning attempt will have
the same oldest entry, nothing will be done.

Fix description:
a. keep a separated skipAhead count for individual log buffers (log_id_t)
      LogTimeEntry::LogTimeEntry
      LogTimeEntry::FilterSecondPass
      LogTimeEntry::skipAhead
      LogTimeEntry::riggerSkip_Locked

b. update LogTimeEntry::mStart even if the current message is skipped
      LogTimeEntry::FilterSecondPass

c. while pruning, only take into account the LogTimeEntrys that are monitoring
   the log_id in question, and provide a public method of checking this.
      LogTimeEntry::isWatching
      LogTimeEntry::FilterFirstPass
      LogTimeEntry::FilterSecondPass

d. Reset the skip cont befor the client thtread starts to sleep, at this point
   we should be up to date.
      LogTimeEntry::cleanSkip_Locked
      LogTimeEntry::threadStart

Change-Id: I1b369dc5b02476e633e52578266a644e37e188a5
Signed-off-by: TraianX Schiau <traianx.schiau@intel.com>
2015-01-14 19:12:47 +00:00
Elliott Hughes
f84994ba0d Lose ifconfig to toybox.
Change-Id: Id3fd2898e137d3a70a3dc5ed65689ef5e029c8cd
2015-01-14 11:05:05 -08:00
Elliott Hughes
da3dec3c19 Merge "Lose toolbox notify in favor of toybox inotifyd." 2015-01-14 19:02:49 +00:00
Elliott Hughes
c5d17fde1e am 4503a145: Merge "Switch to toybox cat."
* commit '4503a1450ce9b2ed86fd9bd3eb3c34c845e8ed08':
  Switch to toybox cat.
2015-01-14 18:56:07 +00:00
Elliott Hughes
30286c8467 Lose toolbox notify in favor of toybox inotifyd.
Change-Id: I02e3849c0b944289c6541ff14f1e80a7f8041829
2015-01-14 10:50:17 -08:00
Elliott Hughes
4503a1450c Merge "Switch to toybox cat." 2015-01-14 18:44:39 +00:00
Elliott Hughes
532bb72a84 Switch to toybox cat.
Change-Id: I0bab6018010c71f6c17eb10bea20dceb470c5242
2015-01-14 10:37:43 -08:00
Mark Salyzyn
8c7380b476 am 3802b5d4: Merge "rootdir: add pstore"
* commit '3802b5d4c5cb14864dcdd8820e9140b81a2d7d78':
  rootdir: add pstore
2015-01-14 17:46:46 +00:00
Al Sutton
77262e7db2 Remove explict use of ASCII encoding
Replace the use of CFStringGetCString with kCFStringEncodingASCII specified
with CFStringGetFileSystemRepresentation which will ensure the correct
character encoding is used to conver the CFString into a NULL terminated
char array suitable for use with POSIX APIs.

(cherry picked from commit 2a4b5f9e80)

Change-Id: Ie6e2027e59b49ca634c7308bcda7bb492d372f46
2015-01-14 09:41:33 -08:00
Al Sutton
d5b4176788 Return path including executable instead of without
The previous implementation returned the path the executable was in instead
of returning the path including the executable (i.e. it returned ...bin
instead of ...bin/executable). This is not what the original methods did
and caused the process forking of adb to fail.

This patch corrects the implementation.

(cherry picked from commit 26b53bb75e)

Change-Id: Icad6870bbb0a88f611ca71d90fff30f7b576c367
2015-01-14 09:39:58 -08:00
Mark Salyzyn
3802b5d4c5 Merge "rootdir: add pstore" 2015-01-14 17:36:21 +00:00
Al Sutton
017c97a5b1 Fix building on modern versions of Xcode and OS X.
Recent versions of XCode fail to compile the adb and fastboot binaries due to
two functions being deprecated in 10.9 (GetCurrentProcess and
ProcessInformationCopyDictionary), and the use of -Werrror.

This patch replaces the method implementations which use calls to methods
deprecated in the 10.9 SDK with versions which only call non-deprecated methods.

(cherry picked from commit f456d47c50)

Change-Id: Ibd80dda73ccdd7c561b50b4065581e645d9855d6
2015-01-14 09:32:36 -08:00
Mark Salyzyn
4b0313e4d3 rootdir: add pstore
/dev/pmsg0 used to record the Android log messages, then
on reboot /sys/fs/pstore/pmsg-ramoops-0 provides a means
to pull and triage user-space activities leading
up to a panic. A companion to the pstore console logs.

Change-Id: Id92cacb8a30339ae10b8bf9e5d46bb0bd4a284c4
2015-01-14 17:15:39 +00:00