Commit graph

767 commits

Author SHA1 Message Date
Christopher Ferris
67a7a4ae27 Fix adb/fastboot windows compilations.
Many of the windows files where not including stdlib.h even though they
are using malloc/free calls.

(cherry-pick of ae7bf0959bd3f79afbf365e41f015ed1c304afdc.)

Change-Id: If6959df9909d9d9928e9f4a2a96018166361cf3c
2014-12-09 16:03:29 -08:00
Elliott Hughes
02ef15f1d7 Merge "Introduce "adb keygen"" 2014-12-10 00:01:06 +00:00
Elliott Hughes
dbb7c46d68 Merge "ADB on linux: Handle USB SuperSpeed extra Descriptors" 2014-12-08 22:35:41 +00:00
Nick Kralevich
bea3f9c345 Introduce "adb keygen"
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 af782b9f2a)

Change-Id: Ic76ffc9412171dddc879af0bbf6e20fbe1a8f057
2014-12-08 13:44:39 -08:00
Elliott Hughes
a5e9b065ef Merge "adb: enable superspeed support" 2014-12-08 19:23:30 +00:00
Zhuang Jin Can
d6ee9f26a5 adb: enable superspeed support
Change-Id: I5a350bfa5641365d7a0939d89c6f477c335e948a
Signed-off-by: Zhuang Jin Can <jin.can.zhuang@intel.com>
Signed-off-by: Robert Chiras <robert.chiras@intel.com>
2014-12-08 16:31:18 +02:00
Trevor Drake
b79a2d55f7 Clean up adb/Android.mk
Removed redundant LOCAL_C_INCLUDES.
Switch from using libunz to libz

Change-Id: Ic90c582fa56453bbac09561158e73f240dd47503
2014-12-07 15:13:29 +00:00
Elliott Hughes
023bc0a426 Merge "Fix deadlocks." 2014-12-03 18:38:05 +00:00
Elliott Hughes
97ac0e1bb4 Kill HAVE_BIG_ENDIAN, HAVE_ENDIAN_H, and HAVE_LITTLE_ENDIAN.
Change-Id: I9e25ac9d27e95b04fb8bf7a66c619af0139d8b8f
2014-11-21 23:10:45 -08:00
Ajay Dudani
8432ddc822 system/core: Remove AID_GRAPHICS from adb groups
Remove AID_GRAPHICS from adb access groups to limit framebuffer
access.

Change-Id: I7fc6dca8b02a45d67d1ecc4a4daf6c38741ffb94
2014-11-21 18:08:05 -08:00
Elliott Hughes
c66aed8a14 Remove the adb usb vendor id whitelist.
If there are bad vendors, we should blacklist them. Whitelisting the entire
world is crazy.

Change-Id: I1f4c27fd34fc420e2a3b4b2c8749198030db69f1
2014-11-21 10:44:10 -08:00
Elliott Hughes
97e1e17042 Merge "Disable vendor id filtering for OS X." 2014-11-21 18:42:28 +00:00
Elliott Hughes
0750f78659 Merge "Remove explict use of ASCII encoding" 2014-11-21 18:37:19 +00:00
Elliott Hughes
01d49e854f Merge "adb: Add USB vendor ID for Ubiquiti Networks, Inc." 2014-11-21 17:44:06 +00:00
Al Sutton
2a4b5f9e80 Remove explict use of ASCII encoding
Replace the use of CFStringGetCString with kCFStringEncodingASCII specified
with CFStringGetFileSystemRepresentation which will ensure the correct
character encoding is used to conver the CFString into a NULL terminated
char array suitable for use with POSIX APIs.

Change-Id: Ibab1dc05c4f4db8604d329a493b4241992b8e69d
2014-11-21 15:56:59 +00:00
Al Sutton
8e01cc6e0b Disable vendor id filtering for OS X.
Companion patch for change I2bf583a27f9a3f98ef006ea62b906a4f89960507.

Due to the use of USB class 0xff it's not possible to register a listener
which uses the OS methods for filtering notifications, so this patch
also introduces a check in the notification listener which checks the
class, subclass, and protocol for the interface each notification relates 
to.

Change-Id: I380cc80f96addc5057660efb2179b35f9378886a
2014-11-21 14:14:58 +00:00
Elliott Hughes
aa3e17e1b6 Merge "Return path including executable instead of without" 2014-11-20 18:35:12 +00:00
Al Sutton
26b53bb75e Return path including executable instead of without
The previous implementation returned the path the executable was in instead
of returning the path including the executable (i.e. it returned ...bin
instead of ...bin/executable). This is not what the original methods did
and caused the process forking of adb to fail.

This patch corrects the implementation.

Change-Id: Ib58497cab35706041f170c1bc97c31fd5d965f90
2014-11-20 13:33:57 +00:00
Elliott Hughes
55664906a8 Disable vendor id filtering for Linux.
It's time we switched to blacklisting any problematic devices rather than
slowly whitelisting the entire world. This seems to work for me, but let's
see how other people get on before coming back to actually remove the list.

We'll also need to find a Mac to test the equivalent Mac change.

Change-Id: I2bf583a27f9a3f98ef006ea62b906a4f89960507
2014-11-19 22:07:34 -08:00
Al Sutton
f456d47c50 Fix building on modern versions of Xcode and OS X.
Recent versions of XCode fail to compile the adb and fastboot binaries due to
two functions being deprecated in 10.9 (GetCurrentProcess and
ProcessInformationCopyDictionary), and the use of -Werrror.

This patch replaces the method implementations which use calls to methods
deprecated in the 10.9 SDK with versions which only call non-deprecated methods.

Change-Id: I855bf26aff45093ca9022924f3ecd1b80f2305a8
2014-11-19 19:50:48 +00:00
Jeremy Chang
868cf42557 adb: Add USB vendor ID for Ubiquiti Networks, Inc.
Change-Id: Iedb86b9ff8dc55aea5d0df201a98c96418002207
Signed-off-by: Jeremy Chang <jeremy@ubnt.com>
2014-11-19 22:13:24 +08:00
Elliott Hughes
0655d38b0c Merge "Revert "adb: Add USB vendor ID for Honeywell"" 2014-11-18 21:15:44 +00:00
Elliott Hughes
3e01bb85d6 Revert "adb: Add USB vendor ID for Honeywell"
This reverts commit 8c4c8e8988.

Change-Id: Ia1cad862f42e5bea3174ed2cc0eea5232fc0a858
2014-11-18 21:15:28 +00:00
Yabin Cui
d325e866c4 kill HAVE_TERMIO_H
Bug: 18398307
Change-Id: Idbb89a074cdf16869cae3f667e89472781f37a5f
2014-11-17 18:19:11 -08:00
Yabin Cui
e77b6a0862 kill HAVE_FORKEXEC
Bug: 18317407
Change-Id: I4eecb3c9d745e3dabfc46fa595aac7f94f6d93e3
2014-11-12 17:06:27 -08:00
Elliott Hughes
2655256570 am 452f08a0: Merge "Add razer usb vid for future use with adb"
* commit '452f08a0b78e65cbd7e4cddac133e59f94d5db4c':
  Add razer usb vid for future use with adb
2014-11-05 02:42:04 +00:00
Stuart Wells
3410d33dc4 Add razer usb vid for future use with adb
Change-Id: I6b76c297de900da050473b764517cfd15c64b838
Signed-off-by: Stuart Wells <stuart.wells@razerzone.com>
2014-11-03 09:32:30 -08:00
JP Abgrall
cb3739b545 am 7e38ab47: am 951c48c5: Merge "adb: Add USB vendor ID for TrekStor GmbH"
* commit '7e38ab476f808f84f0755ccbceb4cd7d8a1982a3':
  adb: Add USB vendor ID for TrekStor GmbH
2014-10-20 18:38:24 +00:00
Thorsten Koroscha
4fa99e542f adb: Add USB vendor ID for TrekStor GmbH
Change-Id: I1d7fc14e691b4ab504c5205b21c93939499cdff9
Signed-off-by: Thorsten Koroscha <t.koroscha@trekstor.de>
2014-10-20 10:26:20 +02:00
Stephen Hines
f17c42f68a am 2f431a8d: Fix windows-specific error without messing up Makefile flags.
* commit '2f431a8d5a1c2029af470a7336751a555131ee51':
  Fix windows-specific error without messing up Makefile flags.
2014-10-02 00:53:27 +00:00
Stephen Hines
2f431a8d5a Fix windows-specific error without messing up Makefile flags.
Bug: 14416410

The proper fix for the error/warning we encountered is to move winsock2.h
in front of windows.h.

Change-Id: I29504ba3a184a85c6636d06c2ad900828fdb5436
2014-10-01 17:37:06 -07:00
Stephen Hines
d2ee707586 am 3ea87c33: Fix build breakage for missing -Wcpp option on old GCC versions.
* commit '3ea87c33a1c6e940322f5436cf0dd70a0bdadd75':
  Fix build breakage for missing -Wcpp option on old GCC versions.
2014-10-02 00:31:50 +00:00
Stephen Hines
3ea87c33a1 Fix build breakage for missing -Wcpp option on old GCC versions.
Bug: 14416410
Change-Id: Ib30c3739d50d6122b3b4643051c72f2fa4985686
2014-10-01 17:16:37 -07:00
Stephen Hines
1e95e0b19c am 64f44b84: Merge "Remove obsolete reference to ddk; Fixes for -Werror" into lmp-dev
* commit '64f44b8444dabd69cf391d42e10d44e8e926a79d':
  Remove obsolete reference to ddk; Fixes for -Werror
2014-10-01 23:21:09 +00:00
Stephen Hines
64f44b8444 Merge "Remove obsolete reference to ddk; Fixes for -Werror" into lmp-dev 2014-10-01 22:53:51 +00:00
Vince Harron
43aecc5436 am c75dac39: Merge "fix for adbd pinning CPU" into lmp-dev
* commit 'c75dac394e3fcd9760841a820d8a0c93dd0c276e':
  fix for adbd pinning CPU
2014-09-30 14:56:25 +00:00
Andrew Hsieh
b75d6f1429 Remove obsolete reference to ddk; Fixes for -Werror
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
2014-09-30 02:24:07 -07:00
Alex Klyubin
1f88f8ef32 am 9005ec37: am e3d3016d: Merge "Switch from using base64 BIOs to encoding funcs."
* commit '9005ec378ecd281f52945b5baca87245543bbfbf':
  Switch from using base64 BIOs to encoding funcs.
2014-09-26 21:58:52 +00:00
Alex Klyubin
e3d3016d46 Merge "Switch from using base64 BIOs to encoding funcs." 2014-09-26 21:51:36 +00:00
Vince Harron
af436b1e10 fix for adbd pinning CPU
adbd was spinning between select & read (0 bytes) for an adb_auth
socket.  The read documentation states: "On success, the number of
bytes read is returned (zero indicates end of file)" so the code has
been modified to close the connection (like the read error case).

BUG=17419868

Change-Id: I1d8fb70c8e1876225ba8d47ea0a2b6265a7d182b
2014-09-25 21:51:15 -07:00
Dan Albert
736fd4a870 am 8e1e5415: am 5b4a1767: Merge "Revert "Switch adb to epoll(2).""
* commit '8e1e54154bc7a5e9dee206735474186c2276b111':
  Revert "Switch adb to epoll(2)."
2014-09-25 22:32:18 +00:00
Dan Albert
45741ae2ea Revert "Switch adb to epoll(2)."
This reverts commit 67de1557b0.
2014-09-25 15:10:34 -07:00
Elliott Hughes
0ab784d470 am 790e7c0a: am 3772545c: Merge "Switch adb to epoll(2)."
* commit '790e7c0ac46bca5ad511ba8764bbb0e9646c6f2a':
  Switch adb to epoll(2).
2014-09-23 18:57:33 +00:00
Elliott Hughes
67de1557b0 Switch adb to epoll(2).
Bug: 17588403
Change-Id: I2590f5e7dd4e178ff4f743609c5ef0155b1015a1
2014-09-23 10:40:51 -07:00
Doug Zongker
edda73d0c8 fix windows build
(cherry-picked from commit 4b39c6aca9)

Change-Id: Ia7b236f1a915630fe85d488072efb9784ba10dad
2014-09-16 10:59:49 -07:00
Kenny Root
d372c5c365 Merge changes I11e84a7b,I5adaedd8
* changes:
  adb: fix 64-bit build
  add sideload-host mode to adb
2014-09-16 17:36:13 +00:00
Colin Cross
52e0b61999 adb: fix 64-bit build
strlen returns a size_t, but the * modifier in printf expects an int.
On arm64 size_t != int.

(cherry-picked from commit 6d6a898b0c)

Change-Id: I11e84a7b62c935162abc0aba910d14e63d11efd3
2014-09-16 10:31:30 -07:00
Doug Zongker
8e49ae4bb8 add sideload-host mode to adb
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.

(cherry-picked from commit 71fe584a1a)

Change-Id: I5adaedd8243dc3b76414bba0149879ca2bbf35fa
2014-09-16 10:27:38 -07:00
Esteban de la Canal
a5ab96eb50 74602: Fixes adb not seeing connected devices on Mac.
Every alternate time an adb server was started already connected devices were
not being seen. This was caused by opened usb connections being "stalled".
See this thread for more information: http://lists.apple.com/archives/usb/2011/Jun/msg00050.html

Change-Id: Ic35b7a66c3f14a837b960066557f44e105609dcb
Fixes: https://code.google.com/p/android/issues/detail?id=74602
2014-09-15 15:46:13 -07:00
Esteban de la Canal
da5b2d67fa am 99bb69c1: am f41ee3d5: Merge "74602: Fixes adb not seeing connected devices on Mac."
* commit '99bb69c1cee678382bf5e48962aa444469b3310e':
  74602: Fixes adb not seeing connected devices on Mac.
2014-09-12 21:43:43 +00:00