Commit graph

8241 commits

Author SHA1 Message Date
Elliott Hughes
1ff2df3f64 am 82a2687a: Merge "Fix cp(1) for files in /proc."
* commit '82a2687a3c7eb39549b07153cf6a87ce5f3b507f':
  Fix cp(1) for files in /proc.
2014-07-22 20:32:13 +00:00
Sreeram Ramachandran
1575e1639c am 34627d82: Merge "Stop and start netd explicitly for "adb shell stop/start"."
* commit '34627d82d784ae2a71a1b2fc66e8eea5a25cd38d':
  Stop and start netd explicitly for "adb shell stop/start".
2014-07-22 20:05:46 +00:00
Sreeram Ramachandran
34627d82d7 Merge "Stop and start netd explicitly for "adb shell stop/start"." 2014-07-22 16:35:00 +00: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
Nick Kralevich
98a6265628 am ec331b1e: Merge "adb: set O_CLOEXEC on lots of file descriptors"
* commit 'ec331b1e401db984c00eb8f265146e889f29ad20':
  adb: set O_CLOEXEC on lots of file descriptors
2014-07-22 02:48:15 +00:00
Colin Cross
5dd4f875c1 am 02c7113d: Merge "adb: replace utimes() with utime()"
* commit '02c7113deea592081c09aca90771670db8918d6c':
  adb: replace utimes() with utime()
2014-07-22 00:14:39 +00:00
Colin Cross
ad1e41d48c am 143b9e3d: Merge changes I1730d1df,I42c18cb5,I03bb5cc1
* commit '143b9e3dd6b86d5ac14b6d57588561aed45ab7ca':
  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 23:24:03 +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
840d4f2c49 am d8b00c89: Merge "Fix implicit declaration of function \'prctl\' in logd."
* commit 'd8b00c89bfe7fb09fa85b458f2232e25127c15dd':
  Fix implicit declaration of function 'prctl' in logd.
2014-07-19 00:43:51 +00:00
Elliott Hughes
c67a642585 am fd62d07d: Merge "Fix implicit declaration of function \'prctl\' in adb."
* commit 'fd62d07db04277bd54485a969b0870221de5c18e':
  Fix implicit declaration of function 'prctl' in adb.
2014-07-18 23:48:27 +00:00
Elliott Hughes
4a95a209e8 am 719fd238: Merge "Added default constructor for log_t."
* commit '719fd238d82cc612843ff2bd12751555d69dd911':
  Added default constructor for log_t.
2014-07-17 23:04:08 +00: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
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
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
Patrick Tjin
7793a10993 am 5328f671: Merge "Scan all descriptors when checking for fastboot"
* commit '5328f671b5601b948b6d0b457119fd9eb3478d35':
  Scan all descriptors when checking for fastboot
2014-07-17 12:30:18 +00:00
Hans Boehm
7e5c7b9567 am baab180c: Merge "Do not typedef char16_t if it is a keyword."
* commit 'baab180c2d37157cef66d1c8fb9b0726477a2e18':
  Do not typedef char16_t if it is a keyword.
2014-07-17 12:30:18 +00:00
Hans Boehm
baab180c2d Merge "Do not typedef char16_t if it is a keyword." 2014-07-16 23:43:15 +00:00
Patrick Tjin
5328f671b5 Merge "Scan all descriptors when checking for fastboot" 2014-07-16 23:31:38 +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
4c3959cabd am 81a64064: Merge "Remove the /dev/.booting file before triggering boot."
* commit '81a640646d3e71dca706cc80579677e35132e365':
  Remove the /dev/.booting file before triggering boot.
2014-07-16 16:02:23 +00: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
1fd286eb64 am a94abb84: Merge "Add SIGFPE to crasher."
* commit 'a94abb8481b98adb5fdc456dd3892f7f9d220094':
  Add SIGFPE to crasher.
2014-07-15 20:22:26 +00:00
Elliott Hughes
0193dc1f55 am c8a37913: Merge "Add missing arm64 registers."
* commit 'c8a37913422503e166dbe8b4ff4d2efd20a1fbe6':
  Add missing arm64 registers.
2014-07-15 00:33:54 +00: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
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
Riley Andrews
c6ac27937c am ebf9f8f1: Merge "Move unlink("/dev/.booting") until after filesystems are mounted."
* commit 'ebf9f8f1e87c5eeb667c4169f7d5c9626e1811c9':
  Move unlink("/dev/.booting") until after filesystems are mounted.
2014-07-14 20:09:10 +00:00
Riley Andrews
ebf9f8f1e8 Merge "Move unlink("/dev/.booting") until after filesystems are mounted." 2014-07-14 17:12:08 +00:00
Hans Boehm
e6b0c56676 am 981dcd79: Merge "Add comment to discourage use of cutils/atomic.h."
* commit '981dcd79d5cbfb2192dc14706e2825b81a467af7':
  Add comment to discourage use of cutils/atomic.h.
2014-07-12 19:33:37 +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
ce61f74f15 am 56cbd19b: Merge "Fix build."
* commit '56cbd19b1b8a42a0011be78aa1051304bc57127d':
  Fix build.
2014-07-11 06:39:03 +00:00
Elliott Hughes
802943ab51 am 8098114c: Merge "Sync with upstream grep."
* commit '8098114c904923d187368a331ed34a9f2d98cac5':
  Sync with upstream grep.
2014-07-11 03:08:36 +00:00
Elliott Hughes
895d674738 am 7a8420ec: Merge "fix duplicated grep usage printing"
* commit '7a8420ec4a7d248028b0a922e2d947f2129b1fe7':
  fix duplicated grep usage printing
2014-07-11 02:12:28 +00:00