| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Renamed readx/writex to ReadFdExactly/WriteFdExactly respectively.
These read/write a full fixed-size buffer. If the whole buffer cannot
be read/written, these functions return an error.
Rename write_string to WriteStringFully.
Move the TEMP_FAILURE_RETRY definition in sysdeps.h out of the
!Windows section. It seems Windows won't actually interrupt a call,
but it's easier to just define it than to #ifdef each call.
Change-Id: Ia8ddffa2a52764a2f9a281c96c937660e002b9b9
|
|
|
|
|
|
| |
There are a few cloexec issues in here as an added bonus.
Change-Id: I1699d719d733f47878bdba0454230cf5ab6a60b6
|
|
|
|
| |
Change-Id: Ice6b94a71a62648ac073d129914a07372411fb25
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On Windows, adb_socket_setbufsize() was taking a file descriptor value
from the compatibility layer in sysdeps_win32.c (namely, an index into
the _win32_fhs array) and passing it to the Winsock setsockopt() call,
which wants a Winsock SOCKET handle. Basically, adb_socket_setbufsize()
was passing `fd` instead of `_fh_from_int(fd)->fh_socket`, resulting in
adb effectively setting a socket buffer size on a random socket in the
process.
The fix is to introduce adb_setsockopt() which just calls setsockopt()
on non-Win32, and which uses the Winsock SOCKET handle on Win32. The
change also moves Win32 disable_tcp_nagle() to a header and adds an
extra sanity check to adb_shutdown().
Change-Id: I4354e818d27538f7ff5b0e70b28bdb6300e1b98b
Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Change-Id: I8ed7899e7e137405594b3f3cbb0a87eae411dfc9
|
|
|
|
| |
Change-Id: I3412ac473abc4efa51a6275658e65f7191b5439d
|
|
|
|
|
|
|
|
|
|
|
| |
Note that it is *easy* to break your phone with this feature. It is
not a bug that reenabling verity after changing one byte of the system
partition stops the device booting.
(cherry-pick of 7c442e1700e6312727283db402dec6f666f1b55a.)
Bug: 18529433
Change-Id: I632e91281884471a362960f1ba30312d2669b8ff
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 152d2d4234ba89e0c20c4af13e291b6049a7bc33.
Fixed build error, and also fixed memory leak spotted from warning.
(cherry-pick of bbb36319119edde9377fb80015235893c30d2bc9.)
Bug: 17691572
Change-Id: I23b5ba537f7b557432041d4338b38b9be434e981
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce the "adb keygen" command.
Usage: adb keygen <filename>
This command creates an adb public/private key pair in a user
specified file. This can be used to create new adb keys, or rotate
existing keys.
Modify adb's key generation routines to use the HOSTNAME/LOGNAME
environment variables if available. This allows someone to override
the username/hostname embedded within the adb public key file if
desired. Fallback to the old mechanisms if those environment
variables aren't available.
Bug: 18342715
Change-Id: Ibccee6088d4609aa05ad6687d3a1d8a8689d3e8a
(cherry picked from commit af782b9f2ac4fb817ded80d4317a45345bb3f992)
Change-Id: Ic76ffc9412171dddc879af0bbf6e20fbe1a8f057
|
|
|
|
|
| |
Bug: 18398307
Change-Id: Idbb89a074cdf16869cae3f667e89472781f37a5f
|
|
|
|
|
| |
Bug: 18317407
Change-Id: I4eecb3c9d745e3dabfc46fa595aac7f94f6d93e3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bug: 14416410
1. The new mingw-w64 toolchain x86_64-w64-mingw32-4.8 has ddk
in x86_64-w64-mingw32/include/ddk
2. Add -Wno-error=cpp to suppress a warning that turns into error
thanks to -Werror:
Please include winsock2.h before windows.h
3. Cast GetLastError() return type DWORD to "int"
4. Include direct.h for _mkdir
5. Include stdint.h for uint8_t on Windows
Change-Id: I4bec0587f6573692f08c760da6c98ae551b8b5eb
|
|
|
|
|
|
|
|
| |
It's a shell command with a pty, but it's not really interactive,
so force the removal to avoid giving users dead-end prompts.
Bug: 17339227
Change-Id: Iaf5d95c49f032066aa741a711a2c45557d93c598
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Without this patch we get:
system/core/adb/commandline.c:1629:16: error: array subscript is above
array bounds [-Werror=array-bounds]
Signed-off-by: Alexander Ivchenko <alexander.ivchenko@intel.com>
(cherry picked from commit 53723338858772a0189aa3f92f4d4bbdaa9b6772)
Change-Id: I920c1de933ce5ba0a0d57eb8a9b557325a767a2a
|
|
|
|
| |
Change-Id: I9ca59e400c199d497a1a18d5e64c2cafe628097b
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Verified that these use-cases continue working:
$ adb shell arg a a 'b b'
$ adb shell arg a a "b b"
|arg|a|a|b b|
$ adb shell arg "a a 'b b'"
|arg|a a 'b b'|
$ adb shell arg 'a a "b b"'
|arg|a a "b b"|
$ adb shell arg a\"b\'c
|arg|a"b'c|
$ adb shell "arg a && arg b"
|arg|a|
|arg|b|
$ adb shell "arg 'a' \"b\" c"
|arg|a|b|c|
Bug: 16139781
Change-Id: I3b010b6cdf57281695c11fda318c9bea0a7221cc
|
|
|
|
|
| |
Bug: 16543552
Change-Id: I1f54254813fd7d7f4341b8815f816535a39de079
|
|
|
|
|
|
|
| |
"fprintf(stderr, buf)" is a warning in some compilers, and we're
building with all warnings promoted to error.
Change-Id: Ie3c6ddcd74cf4dda40cf7b742df955dde1d1a5ff
|
|
|
|
| |
Change-Id: I1ff5c9c3dc8d870aef2885f8a1989c6c913ccb3d
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new install-multiple command automates creating an install
session, streaming multiple files into place, and then committing
or destroying the session. This uses the recent "exec" feature to
stream APK contents over stdin directly into their final resting
place, requiring no extra copies.
Blindly pass through command line arguments to "pm" to make adding
new flags easier in future.
Remove support for verifying APK before sending across wire, since it
was reading the entire APK into memory (!) before sending. Also
remove encrypted APKs, since they are no longer supported. Drop
support for undocumented verification files.
Bug: 14975160
Change-Id: I0c538471873061798160e2e47cec4c0424c27361
|
|
|
|
| |
Change-Id: Ia7b236f1a915630fe85d488072efb9784ba10dad
|
|
|
|
|
|
|
| |
strlen returns a size_t, but the * modifier in printf expects an int.
On arm64 size_t != int.
Change-Id: I11e84a7b62c935162abc0aba910d14e63d11efd3
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The sideload-host mode turns the host into a server capable of sending
the device various pieces of the file on request, rather than
downloading it all in one transfer. It's used to support sideloading
OTA packages to devices without the need for them to hold the whole
package in RAM.
If the connected device doesn't support sideload-host mode, we fall
back to the older sideload connection.
Change-Id: I5adaedd8243dc3b76414bba0149879ca2bbf35fa
|
|/
|
|
|
|
|
|
|
| |
Remount will now remount the vendor partition as well, if it exists.
Sync will also allow you to sync vendor, and will include it by
default if it exists.
Change-Id: Iea1e8212f445e96233438a8d8a9d3266bf3d6557
Signed-off-by: Daniel Rosenberg <drosen@google.com>
|
|
|
|
|
|
|
|
| |
Commands chained with && need to be passed through literally instead
of always being quoted.
Bug: 15479704
Change-Id: I2998e40a92a3bfd092098cd526403b469c86c9a6
|
|
|
|
|
|
|
|
|
| |
Arguments with embedded spaces need to be wrapped in quotes, which
changes the overall escaping strategy. Instead of mixing the two
strategies, just always wrap arguments in quotes.
Bug: 15479704
Change-Id: I03eacfa1bd6c220d4ec6617b825ebb0c43c7221e
|
|\
| |
| |
| |
| |
| |
| | |
present."
* commit '7cf8e1cb88c44963ccb2128113d8a804d85645b9':
Skip the "--abi" flag on "adb install" if present.
|
| |\
| | |
| | |
| | |
| | | |
* commit '4e26c95a6363da4885bb9178c9d42c273b357043':
Skip the "--abi" flag on "adb install" if present.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This flag needs to be passed through to the package manager.
Without this change, the argument to this flag is interpreted
as a filename.
NOTE: If we don't want to add special treatment for this flag,
we'll have to assume that all flags with a -- prefix have an
argument, and that isn't necessarily true.
Change-Id: I78c3fa842bc24148d83d7278e6dee395686240a0
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
Change-Id: I5993049803519d3959761f2363037b02c50920ee
|
|\ \ \ \
| |/ / /
|/| / /
| |/ /
| | |
| | |
| | | |
<local> <remote>""
* commit '972677557bd2c3a0678a945765783e85c7ec7b9c':
adb: implement "adb reverse <local> <remote>"
|
| |\ \
| | |/
| | |
| | |
| | | |
* commit 'c3358875169b920847a72428f4e8b8f09f7bdf05':
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
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Idfd1a114,If725a1cb,I61211165,If9a05ccb
* commit 'e75971157c46a0fc57194a75d4dde0920f60f427':
adb: turn on -Werror
netcfg: turn on -Werror
mkbootimg: turn on -Werror
gpttool: turn on -Werror
|
| |\ \
| | |/
| | |
| | |
| | |
| | |
| | |
| | | |
* commit '328746da8090a549e432da2358585b101e30d753':
adb: turn on -Werror
netcfg: turn on -Werror
mkbootimg: turn on -Werror
gpttool: turn on -Werror
|
| | |
| | |
| | |
| | |
| | |
| | | |
- Deal with some -Wunused issues
Change-Id: Idfd1a114e68ae637978b52fde5144d0dca0ec79f
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
Change-Id: I37c0b94741ed464f19025d25dea3ff2f6ac43e7f
Signed-off-by: Lajos Molnar <lajos@google.com>
|
|\ \
| |/
|/|
| |
| | |
* commit 'a77bef47decf2c0818397aced983999e235aa82f':
Document the adb install -d option.
|
| |
| |
| |
| | |
Change-Id: Ife0da42c22e4408dc5c07ac0f20e0ecbbde20832
|
|/
|
|
|
|
|
|
|
|
| |
Added a new '-p' switch to the 'push' and 'pull' commands that outputs
the file transfer progress (bytes transmitted, total bytes, and % done).
This provides useful feedback when transferring large files, and also
makes it possible for other tools to easily monitor the progress of a
forked push/pull command.
Change-Id: Iee6f42f5bd41292e5bc80fba779f526f0072e356
|
|
|
|
|
| |
Bug: 11290643
Change-Id: Ibad4e9f0b69421cd6017b70a52237e7f27aab848
|
|
|
|
|
|
|
|
| |
Now that adb backup handles OBB file backup/restore.
(Cherrypicked)
Change-Id: Ie92b546e3898b62d74f552ab577b7756ad176ee6
|
|
|
|
|
|
|
|
| |
The adb sideload utility referes to the filename as 'sideload' in some
places. This patch changes the printouts to display the filename instead.
Change-Id: I38ada01a08bed53a8d9697c03f55ce8cee2abe12
Signed-off-by: Magnus Eriksson <eriksson.mag@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ADB client: allow user to specify hostname and port number of remote
adb server.
ADB server: bind server to all network interfaces instead of just
localhost when user gives -a flag.
Primary use-case for this change is to support remote testing of USB
devices. HostA is running some test automation software which invokes adb
client. HostB has USB-only device attached and is running adb server. adb
client on HostA makes connection to adb server on HostB to talk to the
USB device.
Change-Id: I845cc8c00350b400317f8c18f813e6fd79bd5470
Signed-off-by: Dean Kwon <daex.i.kwon@intel.com>
Signed-off-by: Jim Bride <jim.bride@intel.com>
Signed-off-by: Matt Gumbel <matthew.k.gumbel@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a few new options/modes to 'adb forward':
adb forward --list
adb forward --remove <local>
adb forward --remove-all
adb forward --no-rebind <local> <remote>
For more context, see http://code.google.com/p/android/issues/detail?id=39631
Note that this only affects the host adb client and server programs,
i.e. it's compatible with devices running older adbd versions.
Change-Id: I9cda3ba12b5a8560a2061620bc7f948e5c1e70f7
|
|\
| |
| |
| |
| |
| |
| | |
command line it follows -p"
* commit '42900c30cf39ea4cdc41cc3671584b7f4f39b8bc':
adb: Pick desired product value from command line it follows -p
|
| |\ |
|