Commit graph

7453 commits

Author SHA1 Message Date
David 'Digit' Turner
6e7343b899 Merge "adb: implement "adb reverse <local> <remote>"" 2014-05-27 16:30:31 +00:00
David 'Digit' Turner
2525869419 adb: implement "adb reverse <local> <remote>"
This implements the logical opposite of 'adb forward', i.e.
the ability to reverse network connections from the device
to the host.

This feature is very useful for testing various programs
running on an Android device without root or poking at the
host's routing table.

Options and parameters are exactly the same as those for
'adb forward', except that the direction is reversed.

Examples:

  adb reverse tcp:5000 tcp:6000
    connections to localhost:5000 on the device will be
    forwarded to localhost:6000 on the host.

  adb reverse --no-rebind tcp:5000 tcp:6000
    same as above, but fails if the socket is already
    bound through a previous 'adb reverse tcp:5000 ...'
    command.

  adb reverse --list
    list all active reversed connections for the target
    device. Note: there is no command to list all
    reversed connections for all devices at once.

  adb reverse --remove tcp:5000
    remove any reversed connection on the device from
    localhost:5000

  adb reverse --remove-all
    remove all reversed connections form the current
    device.

Reversed connections are tied to a transport, in other
words, they disappear as soon as a device is disconnected.

Simple testing protocol:

  adb forward tcp:5000 tcp:6000
  adb reverse tcp:6000 tcp:7000
  nc -l localhost 7000

in another terminal:
  echo "Hello" | nc localhost 5000

Will print "Hello" on the first terminal.

Change-Id: I761af790cdb06829b68430afa4145a919fa0e6d5
2014-05-27 16:42:13 +02:00
Narayan Kamath
5fe6fcc35d Merge "Add a zygote 64/32 bit config." 2014-05-27 11:00:37 +00:00
Christopher Ferris
d917d64faf Merge "Only copy mcontext data from sigcontext." 2014-05-23 22:23:45 +00:00
Mark Salyzyn
8814bd1d24 Merge "include: cleanup for -Wsystem-header" 2014-05-23 22:19:57 +00:00
Christopher Ferris
e484607622 Only copy mcontext data from sigcontext.
The ucontext_t data structure could be bigger than the kernel data
structure. Since the unwinder only cares about the mcontext data, only
copy that out of the structure. The mcontext data is the same size in
the kernel and in the ucontext_t structure.

Bug: 15189014
Change-Id: I5978169c4425b8212e11db85a57eb319cd0e264b
2014-05-23 15:11:26 -07:00
Mark Salyzyn
4887842c92 include: cleanup for -Wsystem-header
- warnings as errors, or errors introduced when -Wsystem-header
  was experimentally introduced.

Change-Id: Ia8f5b3c1c1096e191741223d52526aa48c7f1cc4
2014-05-23 15:09:57 -07:00
Mark Salyzyn
818f80045f Merge "logd: used before set warning" 2014-05-23 17:42:47 +00:00
Mark Salyzyn
72be6d5eea Merge "cpio: Turn on -Werror" 2014-05-23 17:42:36 +00:00
Mark Salyzyn
ab4b7308ec logd: used before set warning
Change-Id: I30c078f8b22ebe4dcb48d57adf88b3e51b4fa202
2014-05-23 09:48:09 -07:00
Mark Salyzyn
5ce757518b cpio: Turn on -Werror
- Solve st_mode is uint16_t on MAC
- Turn on -Werror

Change-Id: I67b62424245545099ed283c56dae544153b85425
2014-05-23 09:48:09 -07:00
Mark Salyzyn
08c372d18e Merge "libnetutils: Turn on -Werror" 2014-05-23 14:51:07 +00:00
Mark Salyzyn
c829080ba9 libnetutils: Turn on -Werror
- Get rid of a pair of out of range comparison warnings.
- Turn on -Werror for compilation

Change-Id: Ie6754f41f9348852a02cc0ff35befb5a76ac2883
2014-05-23 07:49:29 -07:00
Mark Salyzyn
f5e2dc8967 Merge "libctest: zap" 2014-05-22 22:34:56 +00:00
Mark Salyzyn
d7579650f5 libctest: zap
Related Changes:
- https://android-review.googlesource.com/#/c/95364
- https://googleplex-android-review.git.corp.google.com/#/c/470584
- https://googleplex-android-review.git.corp.google.com/#/c/470591
- https://googleplex-android-review.git.corp.google.com/#/c/470590

Change-Id: I28a017104f48cc4216df876eb9102ecd332d28e3
2014-05-22 22:34:23 +00:00
Colin Cross
617c28b8f2 Merge "Fix list_for_each_safe macro" 2014-05-22 22:27:14 +00:00
Colin Cross
4ecbda41c9 Merge "Add list_add_head to libcutils" 2014-05-22 22:26:43 +00:00
Colin Cross
08befc3a80 Merge "ueventd: support by-name symlinks for PCI block devices" 2014-05-22 19:17:15 +00:00
Mark Salyzyn
0c7e5cdaeb Merge "libusbhost: Turn on -Werror" 2014-05-22 19:06:29 +00:00
Mark Salyzyn
065c2706ab Merge "libsuspend: Turn on -Werror" 2014-05-22 19:06:03 +00:00
Mark Salyzyn
b05866afcc Merge "libion: Turn on -Werror" 2014-05-22 19:05:49 +00:00
Mark Salyzyn
993378832e Merge "sdcard: Turn on -Werror" 2014-05-22 19:05:25 +00:00
Mark Salyzyn
5e9c2b9faa Merge "reboot: Turn on -Werror" 2014-05-22 17:34:06 +00:00
Dan Albert
3b5cd9117d Merge "Remove libstdc++ dependency from host libbacktrace" 2014-05-22 17:21:52 +00:00
Elliott Hughes
e9a6d0a099 Merge "Remove unnecessary #includes of <sys/atomics.h>." 2014-05-22 17:02:25 +00:00
Elliott Hughes
617681d355 Remove unnecessary #includes of <sys/atomics.h>.
Bug: 14903517
Change-Id: I5b0a418dd982f1a2fd90609b12bd8364f7f34996
2014-05-22 10:00:35 -07:00
Mark Salyzyn
80e160693c Merge "libsync: Turn on -Werror" 2014-05-22 16:46:53 +00:00
Elliott Hughes
48ac3d1b14 Merge "Judge mmap failed by MAP_FAILED instead of NULL" 2014-05-22 16:23:20 +00:00
Calin Juravle
cd3897d0af Merge "Move libutils from fdprintf to POSIX dprintf." 2014-05-22 13:37:13 +00:00
Elliott Hughes
dcc98da018 Move libutils from fdprintf to POSIX dprintf.
Bug: 11156955
Change-Id: I70a75c07744d9897d76b180e4940b8717297c53f
2014-05-22 01:23:29 -07:00
Hurri Lu
473a729937 Judge mmap failed by MAP_FAILED instead of NULL
Change-Id: I74422cfdba341fcd1a6235044700cf3986e853d0
Signed-off-by: Hurri Lu <jlu32@marvell.com>
2014-05-22 12:51:39 +08:00
Dan Albert
30291f2119 Merge "Add missing headers" 2014-05-22 03:16:14 +00:00
Dan Albert
a3a8f6d2ab Remove libstdc++ dependency from host libbacktrace
The libc++ version of libbacktrace on the host was still linking against
libstdc++, and this was causing problems in art.

Change-Id: I1d14fb9e18abd074affcf46c8044407041970669
2014-05-21 20:10:02 -07:00
Dan Albert
ac2fe7eb81 Add missing headers
These headers are needed for pid_t and free when using libc++ headers (POSIX
does not require that the symbols be exposed with the previous includes).

Change-Id: Ia51a4fdfdbae7377130a43c401c2d8d241671d1e
2014-05-21 20:08:35 -07:00
Elliott Hughes
21be143a0e Merge "Fix register dump and back trace after a crash." 2014-05-21 23:41:58 +00:00
Douglas Leung
6254f32f21 Fix register dump and back trace after a crash.
Change-Id: Ie5f6624b9dcf81d84769b9cdaf9d8a301c8826f7
Signed-off-by: Douglas Leung <douglas@mips.com>
2014-05-21 16:41:20 -07:00
Mark Salyzyn
5b7bb03ee8 Merge "Revert "libnetutils: Turn on -Werror"" 2014-05-21 22:17:14 +00:00
Mark Salyzyn
07dde4c314 Revert "libnetutils: Turn on -Werror"
This reverts commit 249c26de82.

Change-Id: I2a56c574fa8d842d5f3c51fd57ecf078838fcfec
2014-05-21 22:14:38 +00:00
Mark Salyzyn
d3cd08f831 Merge "libnetutils: Turn on -Werror" 2014-05-21 21:55:29 +00:00
Mark Salyzyn
2f62edf77d Merge "libdiskconfig: Turn on -Werror" 2014-05-21 21:00:53 +00:00
Mark Salyzyn
03b876953a libusbhost: Turn on -Werror
Change-Id: Ia765b56197c28d6cde633db9c429001993f75f17
2014-05-21 12:58:38 -07:00
Mark Salyzyn
6e60d390d0 libsuspend: Turn on -Werror
Change-Id: I4ea982ab7d68a596ac79d93a01c05a109d24672d
2014-05-21 12:58:38 -07:00
Mark Salyzyn
72c22bf69b libion: Turn on -Werror
Change-Id: I0a933623147fb7bfb7251b1d9213cc174619ed42
2014-05-21 12:58:38 -07:00
Mark Salyzyn
676ffd54cb sdcard: Turn on -Werror
Change-Id: I40fce5a69a898e79542aa7688d077ff7bc40ed4f
2014-05-21 12:58:38 -07:00
Mark Salyzyn
efdf49f276 reboot: Turn on -Werror
Change-Id: Ic3186e457b80ee6149ef89321b0d16422872aea7
2014-05-21 12:58:38 -07:00
Mark Salyzyn
af7749891a libsync: Turn on -Werror
Change-Id: Ie34f935694034a069e844be64d6011eb9e3f9869
2014-05-21 12:58:38 -07:00
Mark Salyzyn
249c26de82 libnetutils: Turn on -Werror
Change-Id: Ie6754f41f9348852a02cc0ff35befb5a76ac2882
2014-05-21 12:58:37 -07:00
Mark Salyzyn
42c79fe18b libdiskconfig: Turn on -Werror
Change-Id: Ic0f5871bd434fda78df79b1417f7bc610d99f73e
2014-05-21 12:58:37 -07:00
Colin Cross
1742b7d218 Merge "Modify VID for Compal" 2014-05-21 19:24:53 +00:00
Greg Hackmann
76d057b970 Merge "toolbox: fix x86 build" 2014-05-21 18:10:31 +00:00