Commit graph

11434 commits

Author SHA1 Message Date
Mark Salyzyn
91581f1990 Merge "liblog: add pstore write" 2015-01-23 23:33:43 +00:00
Mark Salyzyn
d91ab5815d liblog: add pstore write
Used to push the Android log messages into pstore
(when available, and no propagation of error).

Change-Id: I9def8cf796d35d347f502d9745d5f42ec1200253
2015-01-23 23:33:31 +00:00
Mark Salyzyn
69bdba21f6 Merge "liblog: use private/android_logger.h" 2015-01-23 23:33:08 +00:00
Mark Salyzyn
7a80940121 liblog: use private/android_logger.h
- fix a latent issue with retransmitting on failure.

Change-Id: I2d0e5c3531c279f2dc1fbd74807210ff8d804de1
2015-01-23 23:32:50 +00:00
Mark Salyzyn
4730328da7 Merge "logd: create private/android_logger.h" 2015-01-23 23:32:23 +00:00
Mark Salyzyn
b5f6e45d6b logd: create private/android_logger.h
- create a structure to depict the private header
  expected at logd end of socket.
- utilize this new structure instead of unscalable
  byte stream technique used to unpack in logd.

Change-Id: I2d0e5c3531c279f2dc1fbd74807210ff8d804de0
2015-01-23 23:32:11 +00:00
Chih-Hung Hsieh
2c7f05d88c Merge "Remove unused -ldl to link true statically." 2015-01-23 23:20:58 +00:00
Chih-Hung Hsieh
87997bf8e7 Remove unused -ldl to link true statically.
LOCAL_FORCE_STATIC_EXECUTABLE=true failed with -ldl.

Change-Id: Id42031ba8e86279b5229ed11cd82e86a5f833ff9
2015-01-23 14:39:54 -08:00
Elliott Hughes
4e0bdd1034 Merge "fs_mgr: Support filesystem labels in fstab" 2015-01-23 18:11:26 +00:00
Christoffer Dall
8298234847 fs_mgr: Support filesystem labels in fstab
When mounting fstab entries it is practical to be able to specify
for example LABEL=data instead of a specific block device.

This is particularly important for the new Android Emulator code base,
which uses virtio block devices for the various partitions
(system,data,cache), because there is no defined ordering between the
way the filesystems are specified to the emulator and how they are
enumerated by the android kernel as /dev/vdX.

Change-Id: I7aef95f12e8f7b02ac2e33804ba7897fdcb9ad7f
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
2015-01-23 17:47:39 +00:00
David 'Digit' Turner
1bc38a4cdc Merge "adb: Fix 'adb forward --no-rebind'." 2015-01-23 16:45:46 +00:00
David 'Digit' Turner
f0e0c2e458 adb: Fix 'adb forward --no-rebind'.
Due to a typo, the --no-rebind option never worked (it always failed).
The root of the problem was that the client was sending on the wire
a command like:

  host:forward:norebind::tcp:<port>;tcp:<port>
                       ^^
Instead of:

  host:forward:norebind:tcp:<port>;tcp:<port>
                       ^

Note the erroneous double-column.

The fix is local to the adb client and thus doesn't require a new
version of the server or guest adbd on the device-side.

This also fixes 'adb reverse --no-rebind'.

See https://code.google.com/p/chromium/issues/detail?id=451109

Change-Id: I680fd432b5470072f6a9968ca32a7f90c600ac68
2015-01-23 10:02:58 +01:00
Elliott Hughes
4083ed7dff Merge "Revert "fs_mgr: Support filesystem labels in fstab"" 2015-01-23 00:34:08 +00:00
Elliott Hughes
572226c25c Revert "fs_mgr: Support filesystem labels in fstab"
This reverts commit 69407ccb02.

Change-Id: I537a3b4257b7bc2a69f1f4d62b4e18e91f2dc713
2015-01-23 00:33:43 +00:00
JP Abgrall
f9e2339553 Merge "fs_mgr: Support filesystem labels in fstab" 2015-01-22 23:59:05 +00:00
Chih-Hung Hsieh
d3d4741584 Enable clang for init, after fix of global .mk files.
LOCAL_FORCE_STATIC_EXECUTABLE was not working properly for clang
because -Bstatic was ignored by clang. We can now enable clang
for init after the -static flag is added to link static executable
files in build/core/definitions.mk.

BUG: 18008984
Change-Id: I3f361b83c1e0b313914603dff33fd090cd3b116a
2015-01-22 15:28:56 -08:00
Mark Salyzyn
045be135de Merge "liblog: logcat color output corrupted on 32-bit" 2015-01-22 18:12:14 +00:00
Mark Salyzyn
e2428429e0 liblog: logcat color output corrupted on 32-bit
sizeof(suffixBuf), not sizeof(suffixLen)!

Change-Id: I6e085089237585bb8b406372639b644556747699
2015-01-22 10:00:04 -08:00
Christopher Ferris
d426a4e7b6 Merge "Move 32 bit/64 bit check into debuggerd." 2015-01-21 18:39:49 +00:00
Christopher Ferris
9774df6134 Move 32 bit/64 bit check into debuggerd.
On 64 bit systems, calls to dump_backtrace_to_file or dump_tombstone
try and directly contact the correct debuggerd (32 bit vs 64 bit)
by reading the elf information for the executable.
Unfortunately, system_server makes a call to dump_backtrace_to_file
and it doesn't have permissions to read the executable data, so it
defaults to always contacting the 64 bit debuggerd.
This CL changes the code so that all dump requests go to the 64 bit
debuggerd, which reads the elf information and redirects requests for
32 bit processes to the 32 bit debuggerd.

Testing:

- Forced the watchdog code in system_server to dump stacks and
  verified that all native stacks are dumped correctly.
- Verified that dumpstate and bugreport still properly dump the native
  processes on a 64 bit and 32 bit system.
- Intentionally forced the 64 bit to 32 bit redirect to write only a
  byte at a time and verified there are no errors, and no dropped data.
- Used debuggerd and debuggerd64 to dump 32 bit and 64 bit processes
  seemlessly.
- Used debuggerd on a 32 bit system to dump native stacks.

Bug: https://code.google.com/p/android/issues/detail?id=97024
Change-Id: Ie01945153bdc1c4ded696c7334b61d58575314d1
2015-01-20 17:22:07 -08:00
Christoffer Dall
69407ccb02 fs_mgr: Support filesystem labels in fstab
When mounting fstab entries it is practical to be able to specify
for example LABEL=data instead of a specific block device.

This is particularly important for the new Android Emulator code base,
which uses virtio block devices for the various partitions
(system,data,cache), because there is no defined ordering between the
way the filesystems are specified to the emulator and how they are
enumerated by the android kernel as /dev/vdX.

Change-Id: I12c3db0ba6a515dc8e917e0349afd257888d3aef
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
2015-01-17 21:05:39 +01:00
Elliott Hughes
ce34551ce6 Merge "Lose id to toybox." 2015-01-17 03:38:31 +00:00
Elliott Hughes
1bf5054342 Lose id to toybox.
Change-Id: I0b92482d06055207e133112e74c58964c7ef0362
2015-01-16 19:24:26 -08:00
Elliott Hughes
45c4c06ffe Merge "Remove unused cruft from libcutils." 2015-01-16 15:52:17 +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
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
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
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
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
Elliott Hughes
41341eea6b Merge "Lose date to toybox (as date and hwclock)." 2015-01-14 23:01:05 +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
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
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
3802b5d4c5 Merge "rootdir: add pstore" 2015-01-14 17:36:21 +00: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
Andres Morales
49beb7e01b Merge "property_service: Added vendor build properties to load_all_props" 2015-01-14 15:56:04 +00:00
Andres Morales
1f1b058e35 property_service: Added vendor build properties to load_all_props
Change-Id: Id50a6dd7fd40752efff8a327ea6b4a45b07fc1b2
2015-01-13 18:18:41 -08:00
Riley Andrews
fc2bdfa395 Merge "Python unit test for adb." 2015-01-13 23:32:09 +00:00