Commit graph

8275 commits

Author SHA1 Message Date
Simon Ye
dc22c3c7a8 Move host 'get-state' service up so that it works.
Due to previous bad merge, the get-state service was moved out of the
ADB_HOST #ifdef block.

Change-Id: Id4b72a051ff04104659925e63a02eb340db2f807
2014-07-28 11:44:46 -07:00
Elliott Hughes
47a123895b Merge "Fix adb "ptsname is not thread-safe; use ptsname_r instead" build break." 2014-07-25 21:16:27 +00:00
Elliott Hughes
d235288553 Fix adb "ptsname is not thread-safe; use ptsname_r instead" build break.
Change-Id: I633dc4d6d421862473e7267cc0d2c1b0933392e0
2014-07-29 11:32:16 -07:00
Elliott Hughes
f630473387 Merge "Fix "ptsname is not thread-safe; use ptsname_r instead" build break." 2014-07-28 22:45:44 +00:00
Elliott Hughes
84cfd1092d Fix "ptsname is not thread-safe; use ptsname_r instead" build break.
Change-Id: I8fdca8e85056e99e943bdcf93a48574d76addcdc
2014-07-29 11:06:53 -07:00
Elliott Hughes
bce3c0c7bd Merge "Clarify init's write command." 2014-07-24 20:55:36 +00:00
Elliott Hughes
afc08ce392 Clarify init's write command.
Bug: https://code.google.com/p/android/issues/detail?id=73996
Change-Id: I4f8d3927d17a4021a2436c2859aa732479c5a118
2014-07-25 14:57:47 -07:00
Tim Murray
721f189a05 Merge "fix adb build on Darwin" 2014-07-24 20:55:36 +00:00
Tim Murray
1efcdeffe5 fix adb build on Darwin
bug 16172793

Change-Id: Ia34b7148afc4c909f29037df91c04d6fd29a731e
2014-07-24 18:33:12 -07:00
Elliott Hughes
525080910e Merge "Silence healthd warnings." 2014-07-23 22:55:49 +00:00
Elliott Hughes
82044f843c Silence healthd warnings.
Change-Id: I339cf62ce93cb268e00ba26f1c310d0586899476
2014-07-24 17:19:46 -07:00
Tim Murray
6698ebf928 Merge "Fix Darwin build caused by -Wunused-parameter." 2014-07-24 22:07:52 +00:00
Tim Murray
b37009fa77 Fix Darwin build caused by -Wunused-parameter.
bug 16172793

Change-Id: I1d0514c00085cb5d18ebdd064e96885d6eaa1e59
2014-07-24 17:22:09 -07:00
Elliott Hughes
d629c7892f Merge "Remove <cutils/tztime.h>." 2014-07-23 22:55:49 +00:00
Elliott Hughes
f2e4b411e6 Remove <cutils/tztime.h>.
Change-Id: I043c6686361bda9e85b82408511bf241a42b9229
2014-07-24 16:13:39 -07:00
Mark Salyzyn
74ee1c05d4 Merge "logcat: test: logrotate flags" 2014-07-23 22:55:49 +00:00
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
Elliott Hughes
c9343cfe40 Merge "Refresh toolbox." 2014-07-23 17:53:27 +00:00
Elliott Hughes
fd4c6b0a3a Refresh toolbox.
Use more upstream NetBSD, and update those things that were already NetBSD.

Note that unlike bionic, the upstream-netbsd directory isn't pristine; we have
changes marked by __ANDROID__.

Bug: 16493461
Change-Id: I99762bfe02caa0945ea4a184670888a4b5435a1d
2014-07-24 17:20:51 -07:00
Nick Kralevich
66083ae834 Merge "sdcard: ensure installd fs upgrade has completed" 2014-07-24 20:55:36 +00:00
Nick Kralevich
506edb5f7c sdcard: ensure installd fs upgrade has completed
Before running the sdcard daemon, make sure that installd has
completed all upgrades to /data that it needs to complete.
This avoids race conditions between installd and the sdcard daemon.

Maybe fixes bug 16329437.

(cherrypicked from commit 8d28fa71fc)

Bug: 16329437
Change-Id: I5e164f08009c1036469f8734ec07cbae9c5e262b
2014-07-25 09:44:29 -07:00
Neil Fuller
e91d9d80d1 Merge "Prevent the accidental closure of fd[0] for missing zip files." 2014-07-23 19:33:25 +00:00
Neil Fuller
b1a113f618 Prevent the accidental closure of fd[0] for missing zip files.
Bug: 16530747
Change-Id: I3593f2bc4d56a2f91252ea795c90ce3c78e1ec06
2014-07-25 16:06:20 +01:00
Colin Cross
8d9d362b0c Merge "adb: Add USB vendor ID for SONIM TECHNOLOGIES, INC." 2014-07-25 00:30:15 +00:00
DanielMo
43222b3f0a adb: Add USB vendor ID for SONIM TECHNOLOGIES, INC.
Change-Id: Id66997709fec55b1efd389abf2efa644b9a8ccf4
Signed-off-by: DanielMo <DanielMo@fih-foxconn.com>
2014-07-25 11:17:55 +08:00
Tim Murray
c894ced183 Merge "Fix fastboot for Darwin." 2014-07-24 22:43:23 +00:00
Tim Murray
bd87944805 Fix fastboot for Darwin.
bug 16172793

Change-Id: Ib58446effc13a6e465d176da141b025d36841b8f
2014-07-24 19:27:37 -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