Commit graph

8149 commits

Author SHA1 Message Date
Mark Salyzyn
d03caa23dd logcat: test: logrotate flags
- test -f -n and -r flags
- fix issue with parse error for sizes in bytes (no multiplier)

Bug: 16147190
Change-Id: Iadf2fd903d5e881d02f1d2b491441cc8090ee1c9
2014-07-24 22:14:11 +00:00
Tim Murray
4795ce0660 Merge "Update makefiles for host clang." 2014-07-24 20:55:36 +00:00
Tim Murray
06fce9db05 Update makefiles for host clang.
bug 16172793

Change-Id: If7484c5dbcccce7d925bec97bff0a3e4c30e9434
2014-07-24 12:18:22 -07:00
Nick Kralevich
6bc762b2a1 Merge "Add SELinux MAC to debuggerd." 2014-07-23 18:45:08 +00:00
Stephen Smalley
69b800391c Add SELinux MAC to debuggerd.
debuggerd allows uid-0 processes to dump tombstones or backtraces
of any process, and uid-system processes to dump backtraces of any
processes.  Restrict these operations via SELinux based on the
client context, the target process context, and the action.

Depends on I8e120d319512ff207ed22ed87cde4e0432a13dda for the
corresponding policy definitions.

Change-Id: Ib317564e54e07cc21f259e75124b762ad17c6e16
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2014-07-24 16:01:56 -04:00
Elliott Hughes
bf300e1e04 Merge "Correction to TRACE format strings" 2014-07-23 18:04:01 +00:00
Marcus Oakland
d33308752f Correction to TRACE format strings
When built with "#define FUSE_TRACE 1" numerous TRACE statements
failed to compile because of mismatches between format strings and
types (uint64_t and size_t). These have been corrected by using the
format strings from the inttype.h header file, or %zu.

Change-Id: I36cd6f8da0790f1218d7dbaaa5b3bbfa4df7fdee
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>
2014-07-24 11:30:19 -07:00
Stephen Hines
73290cd136 Merge "Remove invalid 64-bit host objects." 2014-07-22 16:35:00 +00:00
Stephen Hines
03cc1f747c Remove invalid 64-bit host objects.
Bug: 16408818

These targets are no longer in use, since we have a proper way to create both
32-bit and 64-bit host libraries in a single build now.

Change-Id: Icd09f795acd220de5b5e956a8d8e1b4ab4864fa9
2014-07-22 13:36:16 -07:00
Elliott Hughes
2fd1fec619 Merge "Switch to NetBSD's kill(1)." 2014-07-22 16:25:43 +00:00
Elliott Hughes
5054c0db70 Switch to NetBSD's kill(1).
Change-Id: Idd1635673e01758b5a7d34f1fdfbb695296c6164
2014-07-22 10:46:15 -07:00
Elliott Hughes
82a2687a3c Merge "Fix cp(1) for files in /proc." 2014-07-22 16:18:32 +00:00
Elliott Hughes
1dc64f7a46 Fix cp(1) for files in /proc.
Also modernize the Android-specific hacks.

Bug: https://code.google.com/p/android/issues/detail?id=70793
Change-Id: I2aebcd2ff10ca2466017379d87f5fabdb77c05e2
2014-07-22 13:27:16 -07:00
Sreeram Ramachandran
34627d82d7 Merge "Stop and start netd explicitly for "adb shell stop/start"." 2014-07-22 16:35:00 +00:00
Nick Kralevich
ec331b1e40 Merge "adb: set O_CLOEXEC on lots of file descriptors" 2014-07-21 15:45:44 +00:00
Nick Kralevich
9866a66d6d adb: set O_CLOEXEC on lots of file descriptors
Too many leaking FDs.

Fixes bug: https://code.google.com/p/android/issues/detail?id=65857
(and more)

(cherrypicked from commit fe8d7f4f2e)

Change-Id: I67d8683244e54288a8105f6f65ee40abe2378d7e
2014-07-21 19:34:31 -07:00
Colin Cross
02c7113dee Merge "adb: replace utimes() with utime()" 2014-07-21 15:45:44 +00:00
Greg Hackmann
7046773595 adb: replace utimes() with utime()
Fix the win_sdk host build by replacing utimes() with utime().  utime()
is functionally equivalent to utimes() when dealing with non-fractional
second timestamps, and is supported by the Windows CRT.

(The Windows CRT uses the nonstandard name _utime(), but mingw creates
aliases to the POSIX names.)

Change-Id: I513c6c5de05376c34cbb0894a94259acba8ae6f1
2014-07-21 17:10:34 -07:00
Colin Cross
143b9e3dd6 Merge changes I1730d1df,I42c18cb5,I03bb5cc1
* changes:
  adb: use oom_score_adj instead of oom_adj
  Add "exec" service: shell commands with no pty.
  adb: added support for adb pull -a to preserve time stamps and mode
2014-07-21 15:45:37 +00:00
Sreeram Ramachandran
018c6a57f3 Stop and start netd explicitly for "adb shell stop/start".
netd is supposed to be restarted when the zygote is restarted (see the
"onrestart" section for "service zygote" in init.zygote*.rc). But this
only works if you send a restart command (say via "ctl.restart").

"stop && start" != "restart". It seems ingrained in developers to do
"stop && start", so we don't have much hope of convincing everyone to
switch to "adb shell restart", even if we did add such a toolbox command.

Bug: 15855807
Change-Id: I387fe86600f4a2862abc3a05a2ef9a1e7374e21d
2014-07-19 18:36:32 +00:00
Rom Lemarchand
1b3f2ff028 adb: use oom_score_adj instead of oom_adj
(cherry picked from commit 07ce7cab72)

Change-Id: I1730d1df34039a5502200002ac813ce96a3eaa1a
2014-07-18 21:55:38 -07:00
Jeff Sharkey
eb97987332 Add "exec" service: shell commands with no pty.
To facilitate device scripts that want to read/write binary data from
the host side, this change introduces a new "exec" service that
behaves like "shell" but without creating a pty, which would otherwise
mangle binary data.

After forking, it hooks up stdin/stdout of the child process to
the socket connected through to the host.  The adb transport doesn't
support shutdown(), so the host can't half-close the socket and wait
for device termination.  Instead, the host side now has two explicit
commands "exec-in" and "exec-out" for either sending or receiving
data.

Teach host side copy_to_file() to deal with stdin/stdout special
cases.  Switch device side backup/restore services to use the new
create_subproc_raw under the hood.

(cherry picked from commit 5d9d434efa)

Change-Id: I42c18cb5bb907449b458c94450ef6c584d84ecdb
2014-07-18 21:46:23 -07:00
Lajos Molnar
4b35c01e3e adb: added support for adb pull -a to preserve time stamps and mode
Added -a flag to adb pull that preserves time and mode.  Mode is
subjected to umask for security.  We only receive modification
time from adb server, so creation time will be set to the modification
time as well.

Signed-off-by: Lajos Molnar <lajos@google.com>

(cherry picked from commit de8ff4adca)

Change-Id: I03bb5cc14ce542299cf3b221a8be318a28ee8a8d
2014-07-18 21:46:18 -07:00
Elliott Hughes
d8b00c89bf Merge "Fix implicit declaration of function 'prctl' in logd." 2014-07-17 22:33:42 +00:00
Elliott Hughes
e5a0f2064b Fix implicit declaration of function 'prctl' in logd.
Change-Id: I0f655ad15295739adb8f04ec62c88a220413875e
2014-07-18 17:39:41 -07:00
Elliott Hughes
fd62d07db0 Merge "Fix implicit declaration of function 'prctl' in adb." 2014-07-17 22:33:54 +00:00
Elliott Hughes
b4dd6ef223 Fix implicit declaration of function 'prctl' in adb.
Change-Id: I9f14cabbb36d658510c11833b3314565a2445e10
2014-07-18 16:44:58 -07:00
Elliott Hughes
719fd238d8 Merge "Added default constructor for log_t." 2014-07-17 22:34:52 +00:00
Brigid Smith
c75a02fe3f Added default constructor for log_t.
Bug: 16357258
Change-Id: I39169b35653d2b717fadbcff75978db01cc375ef
2014-07-17 15:49:39 -07:00
Patrick Tjin
5328f671b5 Merge "Scan all descriptors when checking for fastboot" 2014-07-16 23:31:38 +00:00
Hans Boehm
baab180c2d Merge "Do not typedef char16_t if it is a keyword." 2014-07-16 23:43:15 +00:00
Hans Boehm
dfdbe61d28 Do not typedef char16_t if it is a keyword.
Don't define char16_t on platforms where char16_t is a keyword, as
C11 and C++11 define it to be.

Change-Id: I6717bc2133c1363ecd85861f3869e1eabd2ce96a
2014-07-16 16:09:37 -07:00
Riley Andrews
81a640646d Merge "Remove the /dev/.booting file before triggering boot." 2014-07-16 13:13:16 +00:00
Riley Andrews
d721f5fc21 Remove the /dev/.booting file before triggering boot.
On mako only, there is a race condition such that
core + main services must be started after releasing
ueventd (by removing /dev/.booting).

bug 16304711
bug 16333352
2014-07-16 03:59:53 +00:00
Elliott Hughes
a94abb8481 Merge "Add SIGFPE to crasher." 2014-07-15 00:03:29 +00:00
Elliott Hughes
3ecc42106e Add SIGFPE to crasher.
Bug: 3399996
Change-Id: I115caf846a47f57984c1b1844104e37d29e6f24e
2014-07-15 11:38:47 -07:00
Elliott Hughes
c8a3791342 Merge "Add missing arm64 registers." 2014-07-15 00:17:18 +00:00
Elliott Hughes
b40c50351e Add missing arm64 registers.
Also fix dumping of arm64's vector registers, which are actually 128 bits wide.

Also move the arm/arm64 FP registers to the tombstone. (We've never dumped
them at all for the other architectures.)

Change-Id: I239a86dd225b47fa90109bc824b7610df67ad812
2014-07-14 17:12:20 -07:00
Riley Andrews
ebf9f8f1e8 Merge "Move unlink("/dev/.booting") until after filesystems are mounted." 2014-07-14 17:12:08 +00:00
Hans Boehm
981dcd79d5 Merge "Add comment to discourage use of cutils/atomic.h." 2014-07-11 23:26:34 +00:00
Hans Boehm
5af7877950 Add comment to discourage use of cutils/atomic.h.
Change-Id: Ib05c745158fdf5a11fd4697c3665a6370ffc04f5
2014-07-11 18:30:13 -07:00
Riley Andrews
9464e5a58d Move unlink("/dev/.booting") until after filesystems are mounted.
Move the unlink out of init.c and into init.rc, so that the file
will be removed after all the filesystems with firmware are up.

Change-Id: I7442df2042cc2788d0301f00e3c2fba7d6e0e1c7
2014-07-11 15:47:15 -07:00
Patrick Tjin
aac89db8a5 Scan all descriptors when checking for fastboot
For Linux, the USB code was only looking at the first
descriptor when searching for the fastboot interface
which caused some devices to not be found.

Also clarify some code by using the actual USB structures
instead of void or char pointers.

Change-Id: I9e4871c4d477ac10ba75bb17a955f176809af289
Signed-off-by: Patrick Tjin <pattjin@google.com>
2014-07-11 14:15:30 -07:00
Christopher Ferris
56cbd19b1b Merge "Fix build." 2014-07-10 20:43:44 +00:00
Christopher Ferris
3cbea9f056 Fix build.
Change-Id: Ied4adacde94ee10deb30647156f07d46a38fbe1f
2014-07-10 23:12:49 -07:00
Elliott Hughes
8098114c90 Merge "Sync with upstream grep." 2014-07-10 21:39:36 +00:00
Elliott Hughes
04650ef7f6 Sync with upstream grep.
Change-Id: Ie1da2e95ee7e3513afb87f357be983dc80cd1515
2014-07-10 19:38:01 -07:00
Elliott Hughes
7a8420ec4a Merge "fix duplicated grep usage printing" 2014-07-10 21:14:09 +00:00
Rocky Zhang
b34b1fcb2b fix duplicated grep usage printing
Change-Id: I579d2046f96ba8ae9fd0bf8f36e2e2f64da622ea
Signed-off-by: Rocky Zhang <zhangyan.hit@gmail.com>
2014-07-11 09:49:35 +08:00
Mark Salyzyn
755df2956f Merge "logd: test: disable kernel LOGGER" 2014-07-10 20:49:23 +00:00