Commit graph

430 commits

Author SHA1 Message Date
ecsgms
cae8b9df5c Add USB Vendor ID for ECS
Change-Id: Ib2fa70204d37f53dc642091eb927d865ddc585b5
2013-07-24 16:13:49 +08:00
esther
001fe87e02 Add Qisda usb config
add Qisda usb config
Signed-off-by: esther <esther530@gmail.com>

Change-Id: I5b8a0e5bd2218ecdf417de357c9a7d9307c91932

Conflicts:
	adb/usb_vendors.c
2013-06-18 11:28:08 -07:00
Elliott Hughes
865bb05dd0 Merge "adb: fix reported transfer size for transfer over 4 GiB" 2013-06-17 20:49:25 +00:00
Jeff Smith
71150ce4ef adb: add vendor ID's for Nook, Haier, Hisense, and MTK
Change-Id: I156ff750ef9ae66113d1e0e3ceffea047abc03b9
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
2013-06-17 13:21:04 -05:00
Jeff Smith
d9a1430ff2 adb: fix reported transfer size for transfer over 4 GiB
When transferring files over 4 GiB with adb, the size of the transfer
is misreported.

Change-Id: Ia3d4cae1e9f82b4f7432341820b101ea9a44f85b
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
2013-06-15 16:03:54 -05:00
Kenny Root
928116ceef Host builds: add fastboot and adb
Add fastboot and adb host utilities to debug builds for debugging
and development purposes.

Change-Id: If77699a27497b8641998930f14d4ee418b856080
2013-05-02 09:51:53 -07:00
Colin Cross
d7cab8bff1 Merge "adb : add missing connection states" 2013-04-17 21:45:45 +00:00
Al Sutton
21ec0516cf Add OUYA VID to known VID list
Add the OUYA VID to the list of known USB VIDs to allow developers with OUYA
consoles to have their device automatically recognized.

Change-Id: I499114d8071747b972c24681fc0771f000ad9f9d
2013-04-17 09:20:05 -07:00
trevd
a5ad539cff adb : add missing connection states
Both CS_RECOVERY and CS_SIDELOAD where not being checked by
connection_state_name which resulted in adb get-state returning
unknown when a device is in those modes.

Change-Id: I00716024d6a0bdb68d6e2380c8cd7b5d056bd15f
Signed-off-by: trevd <trevd1234@gmail.com>
2013-04-17 14:34:23 +01:00
Benoit Goby
f8cfa8a1e4 adb: Remove execute permission on usb_vendor.c
Change-Id: Ia4f2e0171634764bde3593593b3c99184236528f
2013-03-29 16:33:02 -07:00
sunxiaoqi
92eb583833 Add BYD's USB Vendor ID
Change-Id: I0694ed72d70638f0a4a252b1c802ae8f4e33385e
2013-03-29 14:57:44 -07:00
Gary Hua
d3b69404a1 Add USB Vendor ID for Xiaomi
Change-Id: I9f0622e05334a5074604bd88093172654b4c3e7d
Signed-off-by: Gary Hua <huachengping@xiaomi.com>
2013-03-29 14:56:53 -07:00
Sam Lin
df6d7666fd Add vendor IDs to adb
Adding vendor IDs to adb for device partners:
  AnyDATA, Harris & Oppo

Change-Id: Ib8c5196c53599bd6eb077871cd95ccac935c42e7
2013-03-29 14:51:15 -07:00
Elliott Hughes
fd5c6b9f13 Merge "Close adb_usb.ini after reading it" 2013-03-09 01:20:08 +00:00
Magnus Eriksson
86ae6d587b Fix issues where the filename is referred to as 'sideload'
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>
2013-03-05 07:37:32 +01:00
Nick Kralevich
e2864bf727 adb: use correct header file.
Change-Id: I7a66ced762dc077247fd7c2714ae8850ffdcaeb9
2013-02-28 14:12:58 -08:00
Nick Kralevich
109f4e16cb adb: Use 64 bit capabilities.
Fix the following kernel warning:

$ adb shell dmesg | grep adb
<6>[    7.813003] warning: `adbd' uses 32-bit capabilities (legacy support in use)

Change-Id: I3912302c5c577f1cb03f0c591834ab7b3a72ddf5
2013-02-15 09:33:13 -08:00
Kenny Root
f8afaebec3 Merge "Windows adb: include stdint.h for uint8_t on MinGW-w64" 2013-01-30 05:44:17 +00:00
Kenny Root
d40fd86ec5 Merge "Windows adb: initialize on to 1 in disable_tcp_nagle" 2013-01-30 05:43:33 +00:00
David Turner
98d0789772 Merge "Windows adb: Make client stdout and stderr handles uninheritable" 2013-01-21 10:16:54 +00:00
Ray Donnelly
bbe26c1f79 Windows adb: initialize on to 1 in disable_tcp_nagle 2013-01-11 16:36:00 +00:00
Ray Donnelly
cbb9891049 Windows adb: include stdint.h for uint8_t on MinGW-w64
Change-Id: I84b8284bc034feb0acd313b0aad9e2fa5868854f
2013-01-08 23:11:49 +00:00
Ray Donnelly
267aa8b00e Windows adb: Make client stdout and stderr handles uninheritable
Change-Id: Ib0519a199c9504aad1d0ecc3757f4d162984bf22
2013-01-08 23:02:28 +00:00
Ying Wang
ef2ea99bfe Merge "Correct LOCAL_LDLIBS of adb" 2013-01-08 13:56:07 -08:00
Matt Gumbel
d7b3308511 Support adb client connect to remote server
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>
2013-01-04 11:00:38 -08:00
Chih-Wei Huang
9c60755207 Correct LOCAL_LDLIBS of adb
adb doesn't really use ncurses-libs, remove it.

Add -ldl for the symbols dlclose, dlerror, dlopen...
introduced from dso_dlfcn.c of libcrypto_static.a.

Change-Id: If1cc23987a9b35ec535bbf8f4e7db141b9f10af7
2013-01-01 15:57:40 +08:00
David 'Digit' Turner
0d82fbf04d adb: Improve ADB's forward redirection management.
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
2012-11-26 21:37:08 +01:00
Chris Dearman
60529e39bb Close adb_usb.ini after reading it
Signed-off-by: Chris Dearman <chris@mips.com>
Change-Id: I7d3ee8cbd54af206dac89225c438e6c7322c571f
2012-11-16 14:58:26 -08:00
Xavier Ducrohet
493d04d2fe am f621d62a: am c4244565: am d1e39491: Add usb vendor id for Teleepoch.
* commit 'f621d62adcbcd81d6479223d9afe47c1d966710d':
  Add usb vendor id for Teleepoch.
2012-11-08 06:14:18 -08:00
Xavier Ducrohet
d1e39491f0 Add usb vendor id for Teleepoch.
Change-Id: I82bbfed598fc3a886681c4139600cf487034c59c
2012-11-06 12:56:14 -08:00
Kenny Root
1dcaf9d054 am 51ccef27: Merge "Add TEMP_FAILURE_RETRY macro for darwin"
* commit '51ccef27cab58277775e62518a59666d2a059b62':
  Add TEMP_FAILURE_RETRY macro for darwin
2012-10-13 13:54:34 -07:00
Kenny Root
89c2812bd6 Add TEMP_FAILURE_RETRY macro for darwin
Darwin doesn't define the TEMP_FAILURE_RETRY macro in unistd.h so we
need to add it everywhere. Joy!

(cherry picked from commit ec90f1dc11)

Change-Id: Ida554fc65193672cc4616dec79e6282e06cc1b28
2012-10-13 12:35:03 -07:00
Kenny Root
1dc92bacb8 am 207c17ff: Merge "Make adb robust against EINTR"
* commit '207c17ff1f48d0db3c69628bb036a14db40b5887':
  Make adb robust against EINTR
2012-10-12 23:59:22 -07:00
Kenny Root
73167412bc Make adb robust against EINTR
Change-Id: I39a8d9007ce2d5662a33a50e4d7e2e7f8f9fad63
2012-10-12 15:28:37 -07:00
Jeff Sharkey
d8a8979bd9 Merge "Bring back ADB_EXTERNAL_STORAGE." into jb-mr1-dev 2012-09-06 13:08:37 -07:00
Jeff Sharkey
d6d4286a28 Bring back ADB_EXTERNAL_STORAGE.
Bug: 7119408
Change-Id: Ic9a23fb6adfb1db771e1e278179586bca69a5edd
2012-09-06 13:05:40 -07:00
Ying Wang
96535ba620 Dist fastboot and adb for the sdk build.
So they can be downloaded from the build page.
Bug: 7109694

Change-Id: Ibc60d0acbc5d2445c01010fd0bd4654a240b0a88
2012-09-05 10:26:43 -07:00
Benoit Goby
345ca131bb adb: Link statically with libcrypto
Bug: 7063951
Change-Id: I328b76a751aceaae625d64156f22ce3de65678c8
2012-08-31 18:24:07 -07:00
Benoit Goby
64b3103017 adb: Create private key with 0600 mode
Changed key name to force generating new pairs.

Bug: 7092477
Change-Id: I680cb9dd1896ae52b2b29d63533f966e033d823f
2012-08-31 12:31:36 -07:00
Benoit Goby
d5fcafaf41 adb: Add public key authentification
Secure adb using a public key authentication, to allow USB debugging
only from authorized hosts.

When a device is connected to an unauthorized host, the adb daemon sends
the user public key to the device. A popup is shown to ask the user to
allow debugging once or permanantly from the host. The public key is
installed on the device in the later case. Other keys may be installed
at build time.

On the host, the user public/private key pair is automatically generated,
if it does not exist, when the adb daemon starts and is stored in
$HOME/.android/adb_key(.pub) or in $ANDROID_SDK_HOME on windows. If needed,
the ADB_KEYS_PATH env variable may be set to a :-separated (; under
Windows) list of private keys, e.g. company-wide or vendor keys.

On the device, vendors public keys are installed at build time in
/adb_keys. User-installed keys are stored in /data/misc/adb/adb_keys.

ADB Protocol change:
If the device needs to authenticate the host, it replies to CNXN
packets with an AUTH packet. The AUTH packet payload is a random token.
The host signs the token with one of its private keys and sends an AUTH(0)
packet. If the signature verification succeeds, the device replies with
a CNXN packet. Otherwise, it sends a new AUTH packet with a new token so
that the host can retry with another private key. Once the host has tried
all its keys, it can send an AUTH(1) packet with a public key as
payload. adbd then sends the public key to the framework (if it has been
started) for confirmation.

Change-Id: I4e84d7621da956f66ff657245901bdaefead8395
2012-08-23 00:20:06 -07:00
Jeff Sharkey
bfcd810b79 Iteration on multi-user external storage.
Define /storage as top-level concept, so that we enforce permissions
uniformly.  Moves external storage paths from headers to per-device
environment variables.  Added missing mount flags, and we no longer
have adb-specific external storage.

Bug: 6925012
Change-Id: Ic7ca953be2f552d3f0ec9e69f89fef751daa1b29
2012-08-22 14:28:37 -07:00
Benoit Goby
3fc95a9918 Revert "adb: Add public key authentification"
This reverts commit f4ed516643.
2012-08-20 23:04:11 -07:00
Benoit Goby
300d6d65d0 Merge "adb: Add public key authentification" into jb-mr1-dev 2012-08-20 20:28:51 -07:00
John Grossman
9dd0029a05 Merge "Replace a segfault with a warning." into jb-mr1-dev 2012-08-20 16:48:13 -07:00
John Grossman
9367f4f973 Replace a segfault with a warning.
Just print a warning if ADB_EXTERNAL_STORAGE is not defined when ADB
runs instead of segfaulting.  If we really don't want to continue to
run, we can make this a fatal error instead.

Change-Id: Icfc5fb9e594b0a310029f1dca7e9476f27ceb7bc
2012-08-20 16:38:01 -07:00
Jean-Baptiste Queru
a8b832a897 am 42900c30: am 0874aa0e: Merge "adb: Pick desired product value from command line it follows -p"
* commit '42900c30cf39ea4cdc41cc3671584b7f4f39b8bc':
  adb: Pick desired product value from command line it follows -p
2012-08-20 14:51:53 -07:00
Jean-Baptiste Queru
0874aa0ec4 Merge "adb: Pick desired product value from command line it follows -p" 2012-08-20 14:41:25 -07:00
Jeff Sharkey
5dd0f86fbf Migrate sdcard0 to shell-accessible location.
Also remove mount() from adb, since it can come online long before
data partition is ready.  Set EXTERNAL_STORAGE environment variable
to point to owner for backwards compatibility.

Bug: 7005701
Change-Id: I63444f6636624eb7ad89f053daa289663424639e
2012-08-20 13:11:11 -07:00
Benoit Goby
f4ed516643 adb: Add public key authentification
Secure adb using a public key authentication, to allow USB debugging
only from authorized hosts.

When a device is connected to an unauthorized host, the adb daemon sends
the user public key to the device. A popup is shown to ask the user to
allow debugging once or permanantly from the host. The public key is
installed on the device in the later case. Other keys may be installed
at build time.

On the host, the user public/private key pair is automatically generated,
if it does not exist, when the adb daemon starts and is stored in
$HOME/.android/adb_key(.pub) or in $ANDROID_SDK_HOME on windows. If needed,
the ADB_KEYS_PATH env variable may be set to a ;-separated list of private
keys, e.g. company-wide or vendor keys.

On the device, vendors public keys are installed at build time in
/adb_keys. User-installed keys are stored in /data/misc/adb/adb_keys.

ADB Protocol change:
If the device needs to authenticate the host, it replies to CNXN
packets with an AUTH packet. The AUTH packet payload is a random token.
The host signs the token with one of its private keys and sends an AUTH(0)
packet. If the signature verification succeeds, the device replies with
a CNXN packet. Otherwise, it sends a new AUTH packet with a new token so
that the host can retry with another private key. Once the host has tried
all its keys, it can send an AUTH(1) packet with a public key as
payload. adbd then sends the public key to the framework (if it has been
started) for confirmation.

Change-Id: Idce931a7bfe4ce878428eaa47838e5184ac6073f
2012-08-16 21:36:26 -07:00
Jeff Sharkey
885342a0f2 Multi-user external storage support.
Remount rootfs as recursively shared, so that mount changes are
propagated into child namespaces.  Mount external storage for access
from adb.

Clean multi-user dependencies for use in Dalvik.  Also define
external storage paths.

Bug: 6925012
Change-Id: I375de581a63f4f36667894c56a34a9dd45361e8f
2012-08-15 21:10:07 -07:00