Commit graph

675 commits

Author SHA1 Message Date
Colin Cross
9630ca7dce am d4725517: am ec7d9dc7: Merge "Avoid zombies on androidscreencast"
* commit 'd47255175ede1af31aee9132914e5d14549ba577':
  Avoid zombies on androidscreencast
2012-07-23 19:52:34 -07:00
Yuriy Zabroda
5a536efa5b Avoid zombies on androidscreencast
When using a third party screen capture program called androidscreencast
(http://code.google.com/p/androidscreencast/) to get the framebuffer of
the device, there are tons of screencap zombie processes got left behind.
The issue is also mentioned here: http://code.google.com/p/android/issues/detail?id=22836.
The cause of the issue is that adbd spawns off screencap processes,
and these child processes were not waited to be finished.
This change fixes the issue.

Change-Id: Ife928d65ecf6a2ff39b8b72ddba930fda6733a00
Signed-off-by: Yuriy Zabroda <yuriy.zabroda@ti.com>
2012-07-23 15:23:20 +03:00
Dan Zhang
f53aff6948 Add Kobo's USB vendor ID to adb
Change-Id: I8b86a851e6478d5e8248df4f1e53f3da4dc4b5e0
2012-07-09 16:29:44 -07:00
Benoit Goby
66086a586f am 504dccec: am aeceb517: adb: Fix adb tcpip command
* commit '504dccec97c12283f348838ba0bf88536322ee6b':
  adb: Fix adb tcpip command
2012-06-12 16:46:48 -07:00
Benoit Goby
504dccec97 am aeceb517: adb: Fix adb tcpip command
* commit 'aeceb5174502659cb4fff6de924b54ef7e6cdae7':
  adb: Fix adb tcpip command
2012-06-12 16:44:11 -07:00
Benoit Goby
aeceb51745 adb: Fix adb tcpip command
When running "adb tcpip 5555", adb create a service socket named
"tcpip:5555". Only compare the 6 first chars "tcpip:" to decide if
we enable exit_on_close.

Bug: 6650130
Change-Id: I0835973de044f1cfde0e859ff0277c0ccc2630a3
2012-06-12 16:14:58 -07:00
Benoit Goby
c29569c5d3 Merge "FunctionFS: initial implementation" 2012-06-06 15:51:07 -07:00
Scott Anderson
845f106a93 am 1b7a7e81: adb: Use bionic\'s strtok_r() for Windows
* commit '1b7a7e81195ff06a7482f81cb92b094bb3481cb1':
  adb: Use bionic's strtok_r() for Windows
2012-06-05 18:17:37 -07:00
Scott Anderson
1b7a7e8119 adb: Use bionic's strtok_r() for Windows
A recent change use strtok_r which broke the Windows build.
Clear this potential landmine by adding adb_strtok_r to sysdeps.h
in the typical fashion.  For Windows, the actual implementation
in sysdeps_win32.c was copied from bionic/libc/string/strtok.c.

Change-Id: Ibb71555bc429f7058c07c3d39e0b62859c79635c
Signed-off-by: Scott Anderson <saa@android.com>
2012-06-05 17:54:27 -07:00
Scott Anderson
0e9e13eb46 am 2ca3e6b3: adb: Generalizing -s to take qualifiers.
* commit '2ca3e6b35f79136418ebc32fef57580698dbd045':
  adb: Generalizing -s to take qualifiers.
2012-06-05 16:21:04 -07:00
Scott Anderson
3fef581bc7 am e82c2db0: adb: Transmit key properties in banner of connect message
* commit 'e82c2db05cae70a0490a1f84b7211ef42c329671':
  adb: Transmit key properties in banner of connect message
2012-06-05 16:21:03 -07:00
Scott Anderson
2ca3e6b35f adb: Generalizing -s to take qualifiers.
Prior to this change, -s could take either a serial number or a
device path (e.g. "-s 01498B1F02015015" or "-s usb:1-4.2").  This
change extends -s to also allow product, model or device names
(e.g. "-s product:mysid").  These new qualifiers will only be
available on devices that are running an adb daemon that provides
properties in the connect message per Change-Id:
    I09200decde4facb8fc9b4056fdae910155f2bcb9

The product, model and device are derived from the
ro.product.name, ro.product.model and ro.product.device
properties respectively.  They are prefixed with "product:",
"model:" or "device:" as appropriate.  In addition, any
non-alphanumerics in the model are changed to underscores.

If the -s parameter matches multiple devices, the result will be
the same as when multiple devices are connected but no -d, -e or
-s option is specified.  In general, this means the user will get
"error: more than one device".  However for get-state,
get-devpath and get-serialno, they will get "unknown".

The format of "devices -l" was changed to list all of the
qualifiers that are available.  The following example output
(with the last digits of the serial numbers replaced with X's) is
with a Galaxy Prime with an older adb daemon and another Galaxy
Prime and Galaxy S both with the enhanced adb daemons:

List of devices attached
016B75D60A0060XX       device usb:2-5 product:mysid model:Galaxy_Nexus device:toro
3731B535FAC200XX       device usb:1-4.2 product:soju model:Nexus_S device:crespo
01498B1F020150XX       device usb:1-4.1

Note that the serial number and state are now column oriented
instead of tab delimited.  After the serial number and state, all
qualifiers are listed with each preceded by a space.  The output
of the original devices command (without -l) is unchanged.

Change-Id: Iceeb2789874effc25a630d514a375d6f1889dc56
Signed-off-by: Scott Anderson <saa@android.com>
2012-06-05 11:13:40 -07:00
Scott Anderson
e82c2db05c adb: Transmit key properties in banner of connect message
protocol.txt says that the connect message should have three
fields:

        <systemtype>:<serialno>:<banner>

In reality, what is transmitted is simply:

        <systemtype>::

The serialno is obtained via other means so doesn't really need
to be a part of the connect message.  This change puts the
ro.product.name, ro.product.model and ro.product.device
properties in the <banner> for devices.  Each property is
terminated by a semicolon (;) with the key and value separated by
an equals sign (=).  Example message:

device::ro.product.name=<prd>;ro.product.model=<mdl>;ro.product.device=<dev>;

Making this change will enable the device list to provide more
information to the user and to give the potential for being able
to select which device to talk to with the -s option.

Change-Id: I09200decde4facb8fc9b4056fdae910155f2bcb9
Signed-off-by: Scott Anderson <saa@android.com>
2012-06-05 11:04:55 -07:00
Scott Anderson
e5867141c9 am 3608d832: adb: Fix two problems with device path implementation.
* commit '3608d832425ca3a6d00c4040f3bb979c5aa49899':
  adb: Fix two problems with device path implementation.
2012-06-01 11:08:08 -07:00
Scott Anderson
a1020825fb am c7993af6: adb: Fix compiler warning
* commit 'c7993af64baec271a238646bc20aaa846866c4a9':
  adb: Fix compiler warning
2012-06-01 11:06:17 -07:00
Andrzej Pietrasiewicz
fd96db17b7 FunctionFS: initial implementation
This is the second version of a patch which demonstrates the possibility
of using adbd (Android Debug Bridge daemon) with a generic FunctionFS gadget
instead of a custom adb usb gadget in the Linux kernel. It contains changes
introduced after Benoit's review - thank you Benoit.

The patch adds a new usb access layer to adbd using FunctionFS. The former
usb access method is still available. The method is chosen at runtime
depending if /dev/usb-ffs/adb/ep0 or /dev/android_adb is accessible.

How to use on the target device:

$ insmod g_ffs.ko idVendor=<vendor ID> iSerialNumber=<some string>
$ mount -t functionfs adb /dev/usb-ffs/adb -o uid=2000,gid=2000
$ ./adbd

This patch requires a patch to bionic which adds <linux/usb_functionfs.h>
which is an exact copy of the relevant file in the linux kernel.

Change-Id: I4b42eb267ffa50fca7a5fba46f388a2f083e8b2d
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
[benoit@android.com: detect at runtime if functionfs is mounted
or fallback using f_adb]
Signed-off-by: Benoit Goby <benoit@android.com>
2012-05-31 15:00:41 -07:00
Scott Anderson
3608d83242 adb: Fix two problems with device path implementation.
The commands that use "host-serial:<serial-number>:<request>"
service did not handle "-s usb:<path>".  The -s parameter is
passed as the serial number in the protocol and then matched
against either the serial number or device path.  However,
skip_host_serial() in sockets.c did not know about the usb:
syntax, the serial number was parsed incorrectly.  Before this
change:
	$ adb -s usb:1-4.1 get-state
	error: unknown host service
After:
	$ adb -s usb:1-4.1 get-state
	device

Code was added in find_transport() in transport.c to match device
paths, but find_transport() is only used for socket connections
so matching device paths is not needed.

Change-Id: I922cec963659dafadd0fbc8fa36dee3b55fe366c
Signed-off-by: Scott Anderson <saa@android.com>
2012-05-31 14:06:07 -07:00
Scott Anderson
c7993af64b adb: Fix compiler warning
system/core/adb/adb.c: In function 'connect_device':
system/core/adb/adb.c:1001: warning: comparison between signed and unsigned integer expressions

Change-Id: I206f85395e1d7ad8d6ef130a26c95dcf0f498696
Signed-off-by: Scott Anderson <saa@android.com>
2012-05-31 11:29:49 -07:00
Xavier Ducrohet
678cc32980 am c7a67d0f: resolved conflicts for merge of 246808be to jb-dev-plus-aosp
* commit 'c7a67d0fc4121abb0bc5f11aeda4d848ea8e0690':
  Add USB Vendor ID for Yulong Coolpad.
2012-05-15 11:29:59 -07:00
Xavier Ducrohet
c7a67d0fc4 resolved conflicts for merge of 246808be to jb-dev-plus-aosp
Change-Id: I3415e2d7b4e8295b7415951c0e8a78c775574089
2012-05-15 10:44:29 -07:00
Xavier Ducrohet
246808bedf Add USB Vendor ID for Yulong Coolpad.
Bug: 6217375

Change-Id: I8931c42e8d3088cc4df8c6e56b323a7392cad5ef
2012-05-14 15:00:25 -07:00
Jean-Baptiste Queru
51a958645c am 9dbcbe08: am 9bdedb59: am a36e1aa3: Merge "adb: usb_windows: fix adb connection lost issue"
* commit '9dbcbe08751bacbf1fcbf6037fed1e6c69a27fa3':
  adb: usb_windows: fix adb connection lost issue
2012-05-14 08:37:37 -07:00
Jean-Baptiste Queru
9dbcbe0875 am 9bdedb59: am a36e1aa3: Merge "adb: usb_windows: fix adb connection lost issue"
* commit '9bdedb599874278abf206230ed31010eeb9b40dd':
  adb: usb_windows: fix adb connection lost issue
2012-05-11 21:58:10 -07:00
Jack Ren
1c4b760a5d adb: usb_windows: fix adb connection lost issue
Windows adb connection could be lost if the target
side kernel enables the kmemleak.

The root cause is that kmemleak downgrades USB
performance, and lead to Windows adb host application
timeout because usb_write()/usb_read()'s timeout time is
very short. That issue is not reproducible in Linux
host because its usb_write() timeout is 5s and usb_read()
is blocked until return:
                usb_write()         usb_read()
Linux           5000ms              blocked until return
Windows         500+len*8 ms        500+len*8 ms

To fix that issue, extend the Windows adb host usb_write
timeout time to 5 seconds and usb_read() as a blocked routine:
                usb_write()         usb_read()
Windows         5000ms              blocked until return

Change-Id: If54e2b4c396a5a06318c0ee0b3326a00e7661fbc
Signed-off-by: Yu Wang <yu.y.wang@intel.com>
Signed-off-by: Jin Can Zhuang <jin.can.zhuang@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2012-05-09 23:08:12 +08:00
Jean-Baptiste Queru
69b2e7dd12 am 007b7002: am 2ae9878c: am c5d5a5e8: Merge "Kindle Fire USB ID"
* commit '007b70023b179f846c0ad1f0303da4ce03ac065e':
  Kindle Fire USB ID
2012-05-02 15:14:04 -07:00
Jean-Baptiste Queru
007b70023b am 2ae9878c: am c5d5a5e8: Merge "Kindle Fire USB ID"
* commit '2ae9878cd5dc517cc7338aaca81f0eb3127b4a53':
  Kindle Fire USB ID
2012-05-02 15:11:08 -07:00
Scott Anderson
76e47e0ec8 am 9526a788: Merge "adb: Add ability to specify device path" into ics-aah
* commit '9526a788a6bd528e14622404e8750bdcc147d15a':
  adb: Add ability to specify device path
2012-05-01 19:33:41 -07:00
Anonymous Coward
4474ac4081 Add encryption parameters to adb install
Change-Id: I92e5f6ace1bc9e711c14cb83533aeb99ab9ab9f7
2012-04-27 13:48:54 -07:00
Scott Anderson
e109d266c1 adb: Add ability to specify device path
For manufacturing and testing, there is a need to talk to
whatever device is connected to a given port on the host.  This
change modifies adb's "-s" option to take either a serial
number or a device path.  The device paths of the connected
devices can be listed using "adb devices -l" whose output
will resemble:

    List of devices attached
    016B75D60A00600D	usb:2-5	device
    3031D0B2E71D00EC	usb:1-4.3	device

The second column lists the device paths.  If the -l option is
not given, the output from "adb devices" will be the same as
it used to be (i.e. the paths will not be printed).

The device path can also be obtained with the get-devpath
command:

    $adb -s 3031D0B2E71D00EC get-devpath
    usb:1-4.3

Note that the format of the device paths are platform dependent.
The example above is from Linux.  On OS-X, the paths will be
"usb:" followed by hex digits.  For other platforms, the device
paths will be printed as "????????????" and the -s option will
not be able to select a device until someone implements the
underlying functionality.

Change-Id: I057d5d9f8c5bb72eddf5b8088aae110763f809d7
Signed-off-by: Scott Anderson <saa@android.com>
2012-04-20 11:21:14 -07:00
Jon Sawyer
775ab9c99e Kindle Fire USB ID
Adds Lab126's USB id to the known USB Devices

Change-Id: I3cd5d90bba68123d5d3d2d67e1ab7d60137eb388
Signed-off-by: Jon Sawyer <jon@cunninglogic.com>
2012-04-15 12:39:59 -07:00
Nick Kralevich
eb68fa8153 adb: set umask to 000
Init is going to be modified to set the umask to 077.
This will impact adb, as "adb install" and "adb sync"
assume that files will be world-readable / writable.

Keep adb's umask at 000 for now.

Bug: 3272072
Change-Id: I75978e8dd7bbdf4dbe7c9a691ef516235f207da2
2012-04-02 14:10:56 -07:00
JP Abgrall
f91259a8f0 adb: fix non-linux builds. tcpip:, root:, usb: are not for ADB_HOST
The handling of adb root:/tpcip:/usb: is normally only for non-ADB_HOST.
This avoids getuid() being invoked on windows builds.

Change-Id: I365b81d9f70de99b9347d3eac82e690a8ac5e747
2012-03-30 13:19:11 -07:00
JP Abgrall
d7f1feb5c8 adb: fix exit of "adb root" when it is a no-op.
"adb root" creates a socket, then starts the service.
Socket creation should not set the exit_on_close when the service will be
a no-op.

Bug: 6259353
Change-Id: Ie526d2fad64f39a48051ed0ff6fb3405c2802ced
2012-03-30 11:19:16 -07:00
Kenny Root
9a7611fefa Merge "Revert "add IP checking for adb over TCP"" 2012-03-28 15:45:16 -07:00
Kenny Root
9a77f55aad Revert "add IP checking for adb over TCP"
This reverts commit dca76e6187
2012-03-28 15:45:08 -07:00
Kenny Root
29dc792bcd Merge "add IP checking for adb over TCP" 2012-03-28 15:15:29 -07:00
Kenny Root
60733e9280 Make sure "adb install" work is cleaned after error
If an error occurs during the verification of an APK, it could be left
in the temporary installation directory.

Change-Id: I4afa5535fc0b978532b31d5b8fb63776963c39db
2012-03-26 16:14:07 -07:00
Benoit Goby
4d668e013b Merge "adb: Don't synchronize with transport using sleep" 2012-03-26 12:56:56 -07:00
Benoit Goby
62e5cbaebc Merge "Revert "Reimplement the "adb root" command to more closely match its previous behavior"" 2012-03-26 12:56:49 -07:00
Andrew Hsieh
8ee361cb01 Remove duplicated VENDOR_ID_INTEL
VENDOR_ID_INTEL defined and appear in builtInVendorIds[] twice.
Remove the 2nd one.

Change-Id: I62f7bba392012aafb8ea9730959362db4bc6c669
2012-03-23 15:28:56 +08:00
Benoit Goby
f366b3698b adb: Don't synchronize with transport using sleep
Services that cause adbd to reboot are currently implemented this way:
    write(fd, response)
    close(fd)
    sleep(1)
    exit(1)
sleep(1) is necessary to leave time for the transport to transmit
the response before the daemon exits. This is slow and unreliable.
Instead, add a flag to the asocket to make it exit the daemon only
after the socket is closed.

Change-Id: I9df45ea6221f0d9b828703b9b2316a5d4fe59352
2012-03-16 15:30:05 -07:00
Benoit Goby
7941cf87f6 Revert "Reimplement the "adb root" command to more closely match its previous behavior"
This reverts commit 535164e9d9.
2012-03-16 15:30:05 -07:00
Benoit Goby
9f1af8cde9 adb: Remove unused flags
BUILD_ADBD is always true

ANDROID_GADGET is not used in the code anymore. adbd now checks at
runtime if /dev/android_adb is present

Change-Id: If6c3278606c79cc74d1ef5978e7b8e3a4513aef8
2012-03-16 15:29:34 -07:00
Wei Zhong
dca76e6187 add IP checking for adb over TCP
whitelist connection for
1) emulator
2) "eng" or "tests" build, or
3) IP matches with "persist.service.adb.client_ip"

Change-Id: I8ac149149873f3bd206bd4d5abc063e5274fb468
Signed-off-by: Wei Zhong <wzhong@google.com>
2012-03-15 14:40:11 -07:00
Dianne Hackborn
50458cf76e Add AID_SDCARD_R.
Change-Id: I47f650e415e06c0b69790ffefea7f208c910ebd7
2012-03-08 14:30:32 -08:00
Vladimir Chtchetkine
28781b0a52 Enables ADBD tracing in the emulator.
When running inside the emulator, guest's adbd can connect to 'adb-debug' qemud
service that can display adb trace messages on condition that emulator has been
started with '-debug adb' option.

This CL enables that functionality in ADB code.

Change-Id: I59b4a76d3c887ad28b8aa8e2a01dfa814e75faa1
2012-02-27 10:41:53 -08:00
Anatol Pomazau
fc656103db Fix 'extra tokens at end of #endif directive' warning
Change-Id: I464ede415e64cf7db845bb441754120974bcf855
2012-02-13 18:12:18 -08:00
Xavier Ducrohet
46f86f11d4 am 0c054095: am 746f3243: Add USB vendor IDs for Quanta, INQ and Sony.
* commit '0c05409510037fd7372c3fe7ab240ebf33b15831':
  Add USB vendor IDs for Quanta, INQ and Sony.
2012-01-24 11:32:19 -08:00
Xavier Ducrohet
05025357e6 am 746f3243: Add USB vendor IDs for Quanta, INQ and Sony.
* commit '746f3243f6d30ab51a36dcfea76eac3ba29ac625':
  Add USB vendor IDs for Quanta, INQ and Sony.
2012-01-24 11:29:52 -08:00
Xavier Ducrohet
0c05409510 am 746f3243: Add USB vendor IDs for Quanta, INQ and Sony.
* commit '746f3243f6d30ab51a36dcfea76eac3ba29ac625':
  Add USB vendor IDs for Quanta, INQ and Sony.
2012-01-24 11:29:50 -08:00
Xavier Ducrohet
746f3243f6 Add USB vendor IDs for Quanta, INQ and Sony.
Change-Id: I224e067d9a64e8e9e7afbad0760a4b07f965bf83
2012-01-24 11:18:50 -08:00
Jean-Baptiste Queru
38412163da am 70580b20: am 149ae11f: Merge "adb,fastboot: add USB support for Intel Vendor ID"
* commit '70580b20bc8485002df0b3e89e42754c8c9796ff':
  adb,fastboot: add USB support for Intel Vendor ID
2012-01-24 08:49:05 -08:00
Jean-Baptiste Queru
70580b20bc am 149ae11f: Merge "adb,fastboot: add USB support for Intel Vendor ID"
* commit '149ae11fb63818b470156e1652abfad0e08d486d':
  adb,fastboot: add USB support for Intel Vendor ID
2012-01-24 08:42:49 -08:00
Andrew Hsieh
a8748d3b2a am daafb531: am 4779e934: Add Intel\'s vendor ID to adb
* commit 'daafb531484a35a63e229e14d8a81b412e506670':
  Add Intel's vendor ID to adb
2012-01-20 15:52:03 -08:00
Nick Kralevich
5890fe3314 Don't allow adb to run as root in user builds.
Change-Id: I4fbd7beb7f76c68fead1a89b745f0dfb931b4597
2012-01-19 15:06:14 -08:00
Nick Kralevich
bd9206bc73 Move permission checking code to it's own function.
Change-Id: Ibe46ca3043791f3b3815080f9e23ac307b1f5900
2012-01-19 15:02:41 -08:00
Andrew Hsieh
80d50a4c99 am 4779e934: Add Intel\'s vendor ID to adb
* commit '4779e9344bb62208e4772ff6486b6df564f434b8':
  Add Intel's vendor ID to adb
2012-01-19 09:55:28 -08:00
Andrew Hsieh
4779e9344b Add Intel's vendor ID to adb
Change-Id: I81da3ea11bfd44395f6895fe51e477ff1e7fa25b
2012-01-18 14:30:11 -08:00
Wu, Hao
f60e863828 adb,fastboot: add USB support for Intel Vendor ID
This patch adds Intel USB Vendor ID into the support
list for adb and fastboot.

Signed-off-by: Wu, Hao <hao.wu@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
2012-01-17 12:08:06 -08:00
Xavier Ducrohet
a33c6ee92b am e0b55791: am 07ad9f2a: Add USB Vendor ID for Fujitsu and Lumigon.
* commit 'e0b557915123b7ad022ff5d0a7a3d4dd2ee7c2fe':
  Add USB Vendor ID for Fujitsu and Lumigon.
2012-01-11 12:05:16 -08:00
Xavier Ducrohet
95ec1ca903 am 07ad9f2a: Add USB Vendor ID for Fujitsu and Lumigon.
* commit '07ad9f2a127b2836c7d45a503a5f3ef7517218f3':
  Add USB Vendor ID for Fujitsu and Lumigon.
2012-01-11 12:03:32 -08:00
Xavier Ducrohet
07ad9f2a12 Add USB Vendor ID for Fujitsu and Lumigon.
Change-Id: Icd013b362366815527834cbf54aa4ecac2b7750d
2012-01-11 11:55:45 -08:00
Vladimir Chtchetkine
b125671921 am ae429828: Cherry-picked from c4f37eed7 in master. Do not merge.
* commit 'ae4298286896cbef22b2af285a3f651e8f498185':
  Cherry-picked from c4f37eed7 in master. Do not merge.
2012-01-10 16:28:43 -08:00
Vladimir Chtchetkine
9f55988343 am 74159657: Cherry-picked from c13daef7b on master. Do not merge.
* commit '74159657687aadab4c82e4fd7e7a54d16c045d95':
  Cherry-picked from c13daef7b on master. Do not merge.
2012-01-10 16:19:42 -08:00
Vladimir Chtchetkine
ae42982868 Cherry-picked from c4f37eed7 in master. Do not merge.
Fix the build.

Conditionally compile code that is intended to run inside the emulator only.

Change-Id: Ie82e415b2ff52395616f85871dddb38e65b0ed55
2012-01-10 16:19:09 -08:00
Vladimir Chtchetkine
7415965768 Cherry-picked from c13daef7b on master. Do not merge.
Use QEMU pipe for ADB communication when running in emulator.

Change-Id: I7934b6272c2a9825d244ce76ff65dbce6e54ebff
2012-01-10 16:03:17 -08:00
Doug Zongker
447f061da1 add "adb sideload" and sideload connection state
Recovery will soon support a minimal implementation of adbd which will
do nothing but accept downloads from the "adb sideload" command and
install them.  This is the client side command (mostly resurrected out
of the old circa-2007 "adb recover" command) and the new connection
state.

Change-Id: I4f67b63f1b3b38d28c285d1278d46782679762a2
2012-01-10 10:09:07 -08:00
Christopher Tate
bffa4ca9ad Tell the user to unlock/confirm backup & restore operations
People are being confused about the silent failure of backup/restore
when they didn't know they had to unlock the device & confirm the
backup/restore operation, so now adb prints a brief reminder.

Change-Id: I1b32913f0ad0cf6e30bf235dc975b9e983b533fd
2012-01-06 15:43:03 -08:00
Vladimir Chtchetkine
c4f37eed73 Fix the build.
Conditionally compile code that is intended to run inside the emulator only.

Change-Id: Ie82e415b2ff52395616f85871dddb38e65b0ed55
2011-12-13 12:19:29 -08:00
Vladimir Chtchetkine
c13daef7bd Use QEMU pipe for ADB communication when running in emulator.
Change-Id: I7934b6272c2a9825d244ce76ff65dbce6e54ebff
2011-12-13 08:19:15 -08:00
Christopher Tate
1f4bada667 am 650307df: am b1dfffe6: Fix \'adb backup\' on Windows
* commit '650307df33fc834c251df71c78b00cc0ae6529b7':
  Fix 'adb backup' on Windows
2011-12-12 15:39:07 -08:00
Christopher Tate
1131c1644f am b1dfffe6: Fix \'adb backup\' on Windows
* commit 'b1dfffe6bb506313a3bc9146d2f6f8c533213193':
  Fix 'adb backup' on Windows
2011-12-09 16:55:38 -08:00
Christopher Tate
b1dfffe6bb Fix 'adb backup' on Windows
Use the same call sequence that 'adb pull' uses for creating the
output file.  adb_open_mode() apparently does not work on Windows
hosts.

Bug 5733007

Change-Id: I48d719c4657c93e19f6790cf1c6da610d49f5806
2011-12-09 15:29:30 -08:00
Joe Onorato
ae868a4045 Allow adb to listen both on usb and tcp.
Change-Id: I98db594241631fa17e39686727392afc8b3124bc
2011-12-07 17:50:28 -08:00
Christopher Tate
c6b07d94fa Merge "Tweak logcat parameters" 2011-12-07 16:02:37 -08:00
Christopher Tate
db0a880c46 Tweak logcat parameters
Change-Id: If97ee1eb682d95fa05b5e2003a204a628bd6ae4d
2011-12-07 16:01:59 -08:00
Vladimir Chtchetkine
ce48083fc9 Fixes ADB crash on Windows due to large number of connections. do not merge.
The reason for the crash is that ADB on Windows uses WaitForMultipleObjects to
wait on connection events. When number of connections exceeds 64, ADB crashes,
because WaitForMultipleObjects API doesn't support more than 64 handles. This
CL contains a fixer routine that allows waiting on an arbitrary number of
handles.

(cherry picked from commit ac52833e48)

Change-Id: I8ad264765e5b38d01a31e42b445f97ea86e49948
2011-12-05 13:14:23 -08:00
Vladimir Chtchetkine
ac52833e48 Fixes ADB crash on Windows due to large number of connections.
The reason for the crash is that ADB on Windows uses WaitForMultipleObjects to
wait on connection events. When number of connections exceeds 64, ADB crashes,
because WaitForMultipleObjects API doesn't support more than 64 handles. This
CL contains a fixer routine that allows waiting on an arbitrary number of
handles.

Change-Id: I83f712e552018df308318154c27df184015a16ee
2011-12-01 08:47:35 -08:00
JP Abgrall
61b90bd211 adb: grant it AID_NET_BW_STATS for full /proc/net/xt_qtaguid/stats
Normally only bandwidth stats for the uid reading .../stats is returned.
With the extra group, adb shell will be able to read stats from
all UIDs.
This is to be used to offer data usage profiling to developers.

Change-Id: If3d2941ce5aa4dbb1a23947b97b893149ba224f7
2011-11-09 10:30:08 -08:00
Christopher Tate
56885094b6 Add command line help for the new 'adb backup -all -nosystem'
Documentation-only change that supports the new framework-side
feature to omit system packages when you're using adb backup -all.
Bug 5361503.

Change-Id: I86bca8883a7fb8c713ca352ad5980e92fd640d18
2011-10-03 18:27:01 -07:00
Kenny Root
a031a91b95 Skip argument when parsing adb install
A command line flag with an argument was checked in the Pm.java code,
but it wasn't being checked by "adb install" so attempts to use it
failed.

Change-Id: I0b84a4203a416f7323fa823c0f1f1750670d0c76
2011-09-23 13:36:00 -07:00
Xavier Ducrohet
dd52e8c57b Add Positivo's vendor ID to adb.
Change-Id: Ida6fc323d766249f4f12708bae1c50ae5d937b2c
2011-09-16 13:48:50 -07:00
Mike Lockwood
aa61854645 adb: Add USB vendor IDs for K-Touch, Pegatron and Archos
Change-Id: Idbc212abfb7d4d0a53e6b8ecd55134b81f4e960d
Bug: 5182028
Bug: 5157478

Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-09-13 13:20:12 -04:00
Christopher Tate
bb86bc5892 Fix 'adb backup' command line validation
The host side wasn't properly checking for argument-list sufficiency
*after* removing any [-f filename] sequence.

Fixes bug 5164135

Change-Id: I7bc49e37ef168182088e0e664b6897dd2a088ebf
2011-08-22 17:12:08 -07:00
Kenny Root
75ae424629 Merge "Add install arg for verification" 2011-08-16 08:36:17 -07:00
Mike Lockwood
22268c720b am 549bfcda: am 003771d1: am 80d508fd: Merge "correct VID of Lenovo(0x2006 is for LenovoMobile,0x17EF is for Lenovo)"
* commit '549bfcda6df30dd00db254b3717fc8df463ce710':
  correct VID of Lenovo(0x2006 is for LenovoMobile,0x17EF is for Lenovo)
2011-08-15 10:29:03 -07:00
Mike Lockwood
549bfcda6d am 003771d1: am 80d508fd: Merge "correct VID of Lenovo(0x2006 is for LenovoMobile,0x17EF is for Lenovo)"
* commit '003771d1c0ad6c3c6cd0c82f787636111c9e193c':
  correct VID of Lenovo(0x2006 is for LenovoMobile,0x17EF is for Lenovo)
2011-08-15 10:25:47 -07:00
zhangclb
c11f99f40a correct VID of Lenovo(0x2006 is for LenovoMobile,0x17EF is for Lenovo)
Change-Id: I3466fdf7b03cf5da189efe4efb563d09f14b467a
2011-08-15 14:18:02 +08:00
Christopher Tate
de034ec83e Change default backup filename and terminology
We now use "backup.ab" as the default backup archive filename, and no longer
refer to "tar" or "tarfiles" in the help text.  The underlying format may
be tar, but we're certainly not interoperable even with ustar/pax thanks
to our compression & encryption layers and our custom header.

Change-Id: I3e74af96cfc102e94848c969eb36af54304bfd9b
2011-08-09 17:05:29 -07:00
Kenny Root
597ea5b63f Add install arg for verification
Allow "adb install" to transfer the file for the verification argument
to the package manager "pm install" command.

Change-Id: I4834f45019eb1387a5d2b205b53a67e91d5fa67e
2011-08-06 13:19:56 -07:00
Kenny Root
9ff99f6536 Merge "Default to secure mode" 2011-08-05 10:16:21 -07:00
Kenny Root
ff9d3484e6 Default to secure mode
If ro.secure is not set for some reason, default to secure mode.

Change-Id: Id0ce3ea5507a3f9690332fb5a2daef7d3303481d
2011-07-31 09:15:46 -07:00
Nick Kralevich
514b40bafa am 189de0c1: am adabe566: am 810cf41b: Merge "Fixed memory leak when using transport:serial."
* commit '189de0c1f4339abd7b938b4905775163d2a94bbe':
  Fixed memory leak when using transport:serial.
2011-07-29 16:51:35 -07:00
Nick Kralevich
189de0c1f4 am adabe566: am 810cf41b: Merge "Fixed memory leak when using transport:serial."
* commit 'adabe566906aa5e8ce791327559aeb10c139b365':
  Fixed memory leak when using transport:serial.
2011-07-29 16:47:31 -07:00
Nick Kralevich
810cf41b6d Merge "Fixed memory leak when using transport:serial." 2011-07-29 16:32:21 -07:00
Tom Marlin
3175c8e9bf Fixed memory leak when using transport:serial.
Fixed memory leak when using transport:serial. Code was previously
using strdup() to make a copy of the serial number which was not
necessary. Instead, just set serial=service.

Change-Id: Ifa8fe7999c6fb88955d2c6bdfcd3cd724ec1f020
Signed-off-by: Tom Marlin <tomm@bsquare.com>
2011-07-29 13:38:56 -05:00
Mike Lockwood
ea839db289 am b1cfa672: am 7d39463e: am d1015de9: Merge "adb: Add USB vendor ID for Vizio"
* commit 'b1cfa672014d197d6d4d12fca0d40cd59de436bc':
  adb: Add USB vendor ID for Vizio
2011-07-29 06:22:44 -07:00
Mike Lockwood
b1cfa67201 am 7d39463e: am d1015de9: Merge "adb: Add USB vendor ID for Vizio"
* commit '7d39463eff2a9002208f34f1d2ce4d62546f6c3a':
  adb: Add USB vendor ID for Vizio
2011-07-29 06:20:10 -07:00
Mike Lockwood
fb34e98bdd adb: Add USB vendor ID for Vizio
Change-Id: I280ff83d7f1fda1ed811bd42cb6fd65036525559
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-07-29 08:59:43 -04:00
Mike Lockwood
b32904a9ea am 01acea11: am 1f72fe99: am 7df080b2: am 3ddaa0ad: Merge "adb: Add USB vendor ID for Lenovo"
* commit '01acea112501f7d140f100591319781e59b90d0e':
  adb: Add USB vendor ID for Lenovo
2011-07-18 09:23:23 -07:00
Mike Lockwood
01acea1125 am 1f72fe99: am 7df080b2: am 3ddaa0ad: Merge "adb: Add USB vendor ID for Lenovo"
* commit '1f72fe991dc2e48c13518015c523f9e3ea048af2':
  adb: Add USB vendor ID for Lenovo
2011-07-18 09:18:58 -07:00
Jean-Baptiste Queru
7076831c7d am f75a2ed2: Merge from gingerbread-plus-aosp
* commit 'f75a2ed2138cd8b74597bd57e13d12e1f0b815c2':
  adb: Add vendor IDs for iRiver, Compal and T & A Mobile Phones
  Add Gigabyte's USB vendor ID to adb.
  Add Funai's USB vendor ID to adb.
2011-07-14 10:49:22 -07:00
Mike Lockwood
7c17d0932c adb: Add USB vendor ID for Lenovo
Change-Id: I1c2423f567272493067fae04e64fdcb651b0af62
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-07-14 09:00:33 -04:00
Jean-Baptiste Queru
f75a2ed213 Merge from gingerbread-plus-aosp
Change-Id: I55b84eda30edf0eade8b43712ab011cd3f65f0d9
2011-07-12 14:41:38 -07:00
Jeff Brown
29e1e7393d Remove the simulator target from all makefiles.
Bug: 5010576

Change-Id: I2fcf31af681d92880e5d31a46d5f6777f7ca1977
2011-07-11 22:12:32 -07:00
Mike Lockwood
292e86230e adb: Add vendor IDs for iRiver, Compal and T & A Mobile Phones
Change-Id: I4dafc43aa76049dd0075e1d70ba05d899e545c8d
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-07-11 09:39:39 -04:00
Joe Bass
7a5c1463ba Add Gigabyte's USB vendor ID to adb.
Bug #4452872

Change-Id: Ib97548d121d40e96ccc519323a335fc90f3b32b9
2011-07-11 09:39:02 -04:00
Xavier Ducrohet
cbe19cec61 Add Funai's USB vendor ID to adb.
Change-Id: Idc2974d4437ab1c79cfea5aade98b599a877aad3
2011-07-11 09:37:43 -04:00
Mike Lockwood
535164e9d9 Reimplement the "adb root" command to more closely match its previous behavior
The adb gadget driver used to reset the USB bus when the adbd daemon exited,
and the host side adb relied on this behavior to force it to reconnect
with the new adbd instance after init relaunches it.  The new gadget
drivers no longer automatically reset the USB bus when adbd is restarted
which caused adb to hang since it was no longer forced to reconnect with the
device.  We attempted to work around this on the host side adb, but that
work around has not been reliable.

This change adds a property trigger on the service.adb.root system property
which will reset the USB bus and restart the adbd daemon when adbd sets
the property to 1.  This should be much closer to the previous behavior
and will hopefully fix some problems with automated testing.

Change-Id: I177c37400009a3d83f21a5f9431f94fd1cc19b9b
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-06-22 08:36:53 -04:00
Mike Lockwood
07edefe4ce Revert "adb: kick the transport after sending the "adb root" command"
This reverts commit d15e6ac95d.

Also increment adb version to 1.0.29

Change-Id: I890643f0c18a2fe90f170134df039c54116cecda
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-06-22 07:15:44 -04:00
Mike Lockwood
693e78b9b6 Merge "Fix hang after end of backup" 2011-06-21 16:44:32 -07:00
Christopher Tate
10f129ca8e Fix hang after end of backup
The buggy behavior was that the 'adb backup ....' host command line
invocation would hang forever, even after the backup finished and
the forked device-side subprocess had been reaped.  The reason for
this is that the device adbd end of the socketpair used to send
the data back from the forked subprocess was still stuck readable
even after the remote end of it had been closed.

With this patch, the thread whose job it is to waitpid() in order
to harvest the forked child process also closes the local (adbd)
end of the socketpair.  This makes the fdevent logic notice that
the socket is dead, at which point it cleans up everything including
the communication back to the host.

Change-Id: I90e7e4e5db36c5a6f7363708b29a6d2c56d1250e
2011-06-21 16:05:17 -07:00
Mike Lockwood
b0bd6024e3 adb: Update version to 1.0.28
Change-Id: Ib8a98d3840abf24cf062112aca7ce462a0f44bc5
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-06-21 17:26:11 -04:00
Christopher Tate
5b811fa5dd Tidy up the end-of-data handling in backup
* Increase transfer buffer size to 32K
* Add logging about error conditions and fd teardown
* Pass the fd number as a command line option to the 'bu' subprocess
* Properly harvest the 'bu' subprocess after it's done

Change-Id: Id44dde25778ecf43c5604fd9d01d726ba58861e5
2011-06-20 16:19:42 -07:00
Kenny Root
b0a8aae3ed Use adb_sleep_ms for Cygwin compat
Change-Id: Iabb2cddfb6740a35e4b6b1563a81b64972c29453
2011-06-15 20:03:49 -07:00
Mike Lockwood
d15e6ac95d adb: kick the transport after sending the "adb root" command
This is needed because the USB driver on the device no longer resets the bus
when exits and restarts.
Since the host side adb no longer detects that adbd has restarted we need
to reset the connection on the host side now.

Change-Id: I1a8eabd292e8b45c34fa07a8a8b8c609cc15648d
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-06-12 16:09:27 -04:00
Nick Kralevich
37b9fc6e7c am 4ba5a8ac: am eafcbe10: am 072a0fac: Merge "Fixed adb crash due to accessing freed memory"
* commit '4ba5a8acba033127befd184f2f78cf0580995b07':
  Fixed adb crash due to accessing freed memory
2011-06-09 11:27:11 -07:00
Nick Kralevich
4ba5a8acba am eafcbe10: am 072a0fac: Merge "Fixed adb crash due to accessing freed memory"
* commit 'eafcbe109f97e5a687cc944e65c383fa45d71c8f':
  Fixed adb crash due to accessing freed memory
2011-06-07 16:28:09 -07:00
Tom Marlin
49f1857dd8 Fixed adb crash due to accessing freed memory
Reset peers to NULL after closing them down. This prevents
other code from attempting to access that freed memory
(which prevents crashes). Previously, it left pointers to
freed memory and the "if (s->peer)" guards could not block
the attempt to access that memory later. Resolves many
crashes seen while taking repeated screenshots on WinXP.

Change-Id: I32553f4d19f6ddc9b05b6ab4dc1e9efe69e5be4f
2011-06-03 11:29:17 -05:00
Christopher Tate
c9cd3b9761 Make 'adb backup' -f handling more bulletproof and more flexible
* "adb backup" as the entire command line no longer crashes

* The "-f filename" option can now appear anywhere in the command line.
  A trailing "-f" at EOL prompts an error message and usage summary.

Change-Id: I040ed73c2ca3687e265e35600eb3ab2b3c879695
2011-06-01 17:56:23 -07:00
Joe Bass
2bc503e6a9 am 0efe2f2f: am b27c682e: am f5144d34: Add Gigabyte\'s USB vendor ID to adb.
* commit '0efe2f2f11d79060962f35a3fb4db525d3f12e9e':
  Add Gigabyte's USB vendor ID to adb.
2011-05-21 21:35:49 -07:00
Joe Bass
0efe2f2f11 am b27c682e: am f5144d34: Add Gigabyte\'s USB vendor ID to adb.
* commit 'b27c682e28a01b18f7506a9b35222453058107ad':
  Add Gigabyte's USB vendor ID to adb.
2011-05-20 16:14:13 -07:00
Christopher Tate
5526ee0831 Merge "Add 'adb restore' to parallel 'adb backup'" 2011-05-20 15:36:55 -07:00
Joe Bass
f5144d34fa Add Gigabyte's USB vendor ID to adb.
Bug #4452872

Change-Id: Ib97548d121d40e96ccc519323a335fc90f3b32b9
2011-05-19 11:40:23 -07:00
Xavier Ducrohet
aff5d7870e am 44c336bf: am 830fc9af: am 30d916c3: Add Funai\'s USB vendor ID to adb.
* commit '44c336bfe9bbd400461b9b28a449a67145eaeeb8':
  Add Funai's USB vendor ID to adb.
2011-05-19 08:57:55 -07:00
Xavier Ducrohet
44c336bfe9 am 830fc9af: am 30d916c3: Add Funai\'s USB vendor ID to adb.
* commit '830fc9afbe3e83b3b39278d67a9680bb2068098a':
  Add Funai's USB vendor ID to adb.
2011-05-18 17:41:21 -07:00
Xavier Ducrohet
30d916c360 Add Funai's USB vendor ID to adb.
Change-Id: Idc2974d4437ab1c79cfea5aade98b599a877aad3
2011-05-18 16:57:26 -07:00
Christopher Tate
702967afb1 Add 'adb restore' to parallel 'adb backup'
It won't actually do anything until the 'bu' tool and framework are
updated to respond properly, but this is the adb side of the
necessary infrastructure: we copy the tarfile into the socket pointed
at the device, using the existing mechanisms.

Change-Id: Ic3b5779ade256bd1ad989a94b0685f7b1a7d59d2
2011-05-17 15:52:54 -07:00
Christopher Tate
024447c3c3 Use the new 'bu' syntax for backup vs restore operation
Change-Id: Ib007705ee562a41869f8add3408101b3a53aa2d7
2011-05-16 16:28:59 -07:00
Omari Stephens
35e6a003ca Merge "Add a 1000msec timeout for adb's USB control packets" 2011-05-16 15:42:26 -07:00
Christopher Tate
574ebc41f8 Merge "Add 'adb backup' for pulling a full backup tarfile to the host" 2011-05-11 12:51:14 -07:00
Omari Stephens
8bbae23915 Add a 1000msec timeout for adb's USB control packets
Includes a version bump to make it possible to determine if a given
binary has this fix or not.

Bug: 4111855
Change-Id: I86d902a7fa0c4b906264141d2467b7bdddb61801
2011-05-09 19:14:24 -07:00
Christopher Tate
d2f5415c60 Add 'adb backup' for pulling a full backup tarfile to the host
The direct command interfaces with the 'bu' binary in /system/bin
on the device.

Change-Id: I4cd69eedfe5144c47277573c5626c6ad8755d70b
2011-04-27 15:27:23 -07:00
Mike Lockwood
224f9485f1 am 81ce51da: am 55537c34: am 2f7995ee: Merge "adb: fix typo in helptext"
* commit '81ce51dae95deb0dc6b07cbd96bd07d08aad5178':
  adb: fix typo in helptext
2011-04-26 16:06:04 -07:00
Mike Lockwood
81ce51dae9 am 55537c34: am 2f7995ee: Merge "adb: fix typo in helptext"
* commit '55537c347bb31d0e2b176ca2550d2054877f9d54':
  adb: fix typo in helptext
2011-04-26 16:00:55 -07:00
Bernhard Reutner-Fischer
6715a4390f adb: fix typo in helptext
s/ocmmand/command

Change-Id: I4ed17e8df9dc71a28e1caef5a21f6351e92628af
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-04-26 12:53:55 +02:00
JP Abgrall
112445b8a7 adb: Don't allow a forced exit if data is still in the socket
Fixes the  http://b/4271011 "adb shell cat /init.rc output gets truncated"


Change-Id: I6df64374b60789595fb18f96d429315dec032443
Signed-off-by: JP Abgrall <jpa@google.com>
2011-04-12 22:01:58 -07:00
Mike Lockwood
0ffe483a6a am e4bcf830: am d37e0840: Merge "In serial, skip over port as well if numbers found after colon."
* commit 'e4bcf8305748e8799df9047fb0f6881553dd43b5':
  In serial, skip over port as well if numbers found after colon.
2011-04-11 14:55:01 -07:00
Terence Haddock
e994f18c53 In serial, skip over port as well if numbers found after colon.
Change-Id: Icd45f570a9527790eb0cd614a3f77da1a72375b1
2011-04-06 16:18:25 +02:00
JP Abgrall
b40367e7bc adb: keep mac build happy
Use FIONREAD instead of TIOCINQ

Change-Id: Ic9db0228a51c546a798c70f08f2e644a1a376120
2011-03-29 12:36:22 -07:00
JP Abgrall
408fa57864 adb: fix subprocess exit handling, oom adjust fixes, extra debugging.
* Add support for correctly handling subprocess termination in shell service  (b/3400254 b/3482112 b/2249397)
 - have a waitpid() track the subprocess, then notify the fdevent via a socket
 - force an eof on the pty master in fdevent's new subproc handler.
 - modify fdevent to force-read the pty after an exit.
* Migrate the "shell:blabla" handling to "#if !ADB_HOST" sections, where it
 belongs.
* Fix the race around OOM adjusting.
  - Do it in the child before exec() instead of the in the parent as the
   child could already have started or not (no /proc/pid/... yet).
* Allow for multi-threaded D() invocations to not clobber each other.
  - Allow locks across object files.
  - Add lock within D()
  - Make sure sysdesp init (mutex init also) is called early.
* Add some missing close(fd) calls
  - Match similar existing practices near dup2()
* Add extra D() invocations related to FD handling.
* Warn about using debugging as stderr/stdout is used for protocol.
* Fix some errno handling and make D() correctly handle it.
* Add new adb trace_mask: services.
* Make fdevent_loop's handle BADFDs more gracefully (could occur some subproc closed its pts explicitely).
* Remove obsolete commandline args reported in help. (b/3509092)


Change-Id: I928287fdf4f1a86777e22ce105f9581685f46e35
2011-03-28 14:12:22 -07:00
Terence Haddock
28e1390e68 In serial, skip over port as well if numbers found after colon.
Change-Id: Icd45f570a9527790eb0cd614a3f77da1a72375b1
2011-03-16 09:43:56 +01:00
Ken Sumrall
e3aeeb4de3 Try to unmount writable filesystems when rebooting
Ext4 filesystems like to be unmounted before rebooting.  The Android system
doesn't have a traditional Linux init setup, and shutting down the system
was not much more than calling sync(2) and reboot(2).  This adds a new
function to libcutils called android_reboot().  By default, it calls sync()
and then remounts all writable filesystems as read-only and marks them clean.
There is a flag parameter in which the caller can ask for sync() not to be
called, or to not remount the filesystems as read-only.  Then it will call
reboot(2) as directed by the other parameters.  This change also updates
adb, init and toolbox to call the new android_reboot() function.
Fixes bugs 3350709 and 3495575.

Change-Id: I16d71ffce3134310d7a260f61ec6f4dd204124a7
2011-03-10 18:11:46 -08:00
JP Abgrall
0e7c4274c6 Revert "Fix adb hang when subprocess dies early."
This is for http://b/3482112 "adb interactions with device causing test harness failures".

This reverts commit 69c5c4c45b.

Change-Id: I630bf2e04d2ecf0223bd2af4e87136754ff880d3
2011-02-23 18:49:00 -08:00
JP Abgrall
69c5c4c45b Fix adb hang when subprocess dies early.
* Handling of the subprocess and its FD.
  This fixes http://b/3400254 "Many bugreports getting hung at the end in monkey"
  -  Start up a service thread that waits on the subprocess to terminate,
then closes the FD associated with it.
  -  Have the event handler select() with a timeout so that it can
  detect the closed FD. Select() with no timeout does not return when an FD is closed.
  - Have the event handler force a read on the closed FD to trigger the close sequence.
  - Migrate the "shell:blabla" handling to "#if !ADB_HOST" sections.
* Fix the race around OOM adjusting.
  - Do it in the child before exec() instead of the in the parent as the
   child could already have started or not (no /proc/pid/... yet).
* Allow for multi-threaded D() invocations to not clobber each other.
  - Allow locks across object files.
  - Add lock within D()
* Add some missing close(fd) calls
  - Match similar existing practices near dup2()
* Add extra D() invocations related to FD handling.
* Warn about using debugging as stderr/stdout is used for protocol.

Change-Id: Ie5c4a5e6bfbe3f22201adf5f9a205d32e069bf9d
Signed-off-by: JP Abgrall <jpa@google.com>
2011-02-18 14:16:59 -08:00
Mathias Agopian
0909af57d5 am c1fbf7c1: fix [3374821] Cannot take screenshot of HC preview
* commit 'c1fbf7c1638cb4f1f139edf74562fcfbaa6f3435':
  fix [3374821] Cannot take screenshot of HC preview
2011-02-09 13:22:39 -08:00
Mathias Agopian
c1fbf7c163 fix [3374821] Cannot take screenshot of HC preview
don't hardcode the pixelformat to RGBA_8888 when taking
screenshots.

Change-Id: I3a76b49275acfce9a2994436f521b76310cd8fb2
2011-02-09 12:56:25 -08:00
Mike Lockwood
67afaad585 am d4894f4b: am 034117e4: Merge changes I8df51128,Ie922b3e7,I31f78419,I7e8df44d,I6067857b,Ifd35587c,Ie8d66740
* commit 'd4894f4be608c28ef0f39c7794ba865ac812dff9':
  Fix adb leaking file descriptors to forked processes
  adb: Fix command-line parser.
  adb: Increase device descriptor buffer size in Linux host USB support
  adb: improve debug traces readability.
  adb: Don't report negative number of bytes after pushing file > 2 gigabytes
  Adding Texas Instruments to the VID list.
  Support an additional alias for 'adb shell.'
2011-02-03 12:59:03 -08:00
Benoit Goby
3b4a0c81c4 Fix adb leaking file descriptors to forked processes
accept() creates a new file descriptor that should be closed on exec so
that forked processes don't keep a fd opened on the socket.

This also fixes b/3297070 where adb hangs after running adb on the
target.

Change-Id: I8df511289e5549ae49b4824c9dfb71a3bf85eae8
2011-02-03 15:26:45 -05:00
David 'Digit' Turner
eb5df470e6 adb: Fix command-line parser.
This fixes the command-line parser to accept both "daemon server"
and "server nodaemon". Before the patch, the second string would
ignore the "nodaemon" flag.

Fixes b/2191598

Change-Id: Ie922b3e7bf57a6e334fc448cec33fb340ca6abc4
2011-02-03 15:26:43 -05:00
Mike Lockwood
a5d4694846 adb: Increase device descriptor buffer size in Linux host USB support
256 bytes wasn't big enough for some complicated USB configurations

Change-Id: I31f7841953d73b06958f44040f58166b159faff4
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-02-03 15:26:41 -05:00
David 'Digit' Turner
3e42db23fb adb: improve debug traces readability.
This patch makes the traces easier to read. For example transports are
displayed by name/serial instead of their hex address.

Change-Id: I7e8df44ddbec19754d63d989bd56485998b4627b
2011-02-03 15:26:37 -05:00
Mike Lockwood
487009ef5e adb: Don't report negative number of bytes after pushing file > 2 gigabytes
BUG: 3198322

Change-Id: I6067857b9490984a21b597f6ee338446a9decaf5
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-02-03 15:26:35 -05:00
Alex Sakhartchouk
1d3fbed348 Adding Texas Instruments to the VID list.
Change-Id: Ifd35587c93ae7d5c8253f477a92cca2345dc8bb5
2011-02-03 15:26:33 -05:00
Daniel Sandler
9c73d17e87 Support an additional alias for 'adb shell.'
Change-Id: Ie8d667407fef8ee5a6c7ab86b30307fb61869170
2011-02-03 15:26:29 -05:00
Mike Lockwood
b596608f09 adb: Increase device descriptor buffer size in Linux host USB support
256 bytes wasn't big enough for some complicated USB configurations

Change-Id: I31f7841953d73b06958f44040f58166b159faff4
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-01-07 23:18:14 -05:00
Mike Lockwood
ee878753f9 adb: Don't report negative number of bytes after pushing file > 2 gigabytes
BUG: 3198322

Change-Id: I6067857b9490984a21b597f6ee338446a9decaf5
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-12-14 23:08:43 -08:00
Alex Sakhartchouk
ffe55f760d Adding Texas Instruments to the VID list.
Change-Id: Ifd35587c93ae7d5c8253f477a92cca2345dc8bb5
2010-12-13 14:26:18 -08:00
Ying Wang
1c061b9ea9 dist for dist_files
Change-Id: I665572a2212f1239b02b7816e37ada210afbdb48
2010-12-09 10:33:27 -08:00
Jean-Baptiste Queru
5fa7fcf89a am 34961b26: am 6713a2e0: Merge "Fix USB endianness bugs on Linux."
Merge commit '34961b266773006ec6643446e7b5a1558d82e4f4'

* commit '34961b266773006ec6643446e7b5a1558d82e4f4':
  Fix USB endianness bugs on Linux.
2010-10-21 13:45:39 -07:00
Jean-Baptiste Queru
5985f6ceee am 89463984: am 81347d27: Merge "adb: Improved detection of big endian architecture"
Merge commit '89463984f5576d7ab61303e08f81eb9175afed59'

* commit '89463984f5576d7ab61303e08f81eb9175afed59':
  adb: Improved detection of big endian architecture
2010-10-21 10:55:02 -07:00
Jean-Baptiste Queru
34961b2667 am 6713a2e0: Merge "Fix USB endianness bugs on Linux."
Merge commit '6713a2e0c659be9d992e75ab420da5680f522658' into gingerbread-plus-aosp

* commit '6713a2e0c659be9d992e75ab420da5680f522658':
  Fix USB endianness bugs on Linux.
2010-10-20 15:33:57 -07:00
Jean-Baptiste Queru
89463984f5 am 81347d27: Merge "adb: Improved detection of big endian architecture"
Merge commit '81347d2764b32ec7224d4e2ab3348103816400b2' into gingerbread-plus-aosp

* commit '81347d2764b32ec7224d4e2ab3348103816400b2':
  adb: Improved detection of big endian architecture
2010-10-20 13:34:01 -07:00
Mike Lockwood
12ddbea0fd am a8b8c0e2: am d02e521d: adb: Add support for Philips\'s USB vendor ID
Merge commit 'a8b8c0e21ac4bdb7838c8c1b8e7d60f632eda79b'

* commit 'a8b8c0e21ac4bdb7838c8c1b8e7d60f632eda79b':
  adb: Add support for Philips's USB vendor ID
2010-10-18 09:32:38 -07:00
Xavier Ducrohet
5ca7509f5b am fa5c690d: am 89aff1d2: Add Asus USB vendor ID to adb.
Merge commit 'fa5c690d93b92ccf57a0522c498ca2076a7ad98d'

* commit 'fa5c690d93b92ccf57a0522c498ca2076a7ad98d':
  Add Asus USB vendor ID to adb.
2010-10-16 09:43:26 -07:00
Marcus Comstedt
6f703a2e85 Fix USB endianness bugs on Linux.
The fields device->idVendor and device->idProduct should not be
converted from little endian to native byteorder, because the
kernel has in fact done so already!

On the other hand, the descriptors read using raw ioctl:s in
register_device() do need to be converted.

Change-Id: I5fe08b626b14ead56a592b68d026690e343c2656
2010-10-16 14:35:34 +02:00
Marcus Comstedt
d340d2f57d adb: Improved detection of big endian architecture
Instead of testing for the (compiler specific) define
__ppc__ explicitly, use the define HAVE_BIG_ENDIAN provided by
AndroidConfig.h.  That way, it should work on all big endian
systems.

Change-Id: Ic4d62afcefce4c8ad5716178ebfcb2b055ac73ce
2010-10-16 14:35:28 +02:00
Mike Lockwood
a8b8c0e21a am d02e521d: adb: Add support for Philips\'s USB vendor ID
Merge commit 'd02e521d79a49471b3f1dc3717e842948df64789' into gingerbread-plus-aosp

* commit 'd02e521d79a49471b3f1dc3717e842948df64789':
  adb: Add support for Philips's USB vendor ID
2010-10-15 18:25:27 -07:00
Mike Lockwood
d02e521d79 adb: Add support for Philips's USB vendor ID
Change-Id: Iaf2e3f6f111198740703b5c3581d95756f797224
Signed-off-by: Mike Lockwood <lockwood@google.com>
2010-10-15 18:14:22 -04:00
Xavier Ducrohet
3b5d79b78c am 1693c32f: am 6c263694: Fix KT Tech\'s usb vendor ID.
Merge commit '1693c32f42e69634b52df1bf827fd81dc3abda46'

* commit '1693c32f42e69634b52df1bf827fd81dc3abda46':
  Fix KT Tech's usb vendor ID.
2010-10-15 14:01:53 -07:00
Xavier Ducrohet
fa5c690d93 am 89aff1d2: Add Asus USB vendor ID to adb.
Merge commit '89aff1d22662c64cc2de384e7e2c699e4d1d5d47' into gingerbread-plus-aosp

* commit '89aff1d22662c64cc2de384e7e2c699e4d1d5d47':
  Add Asus USB vendor ID to adb.
2010-10-15 11:57:14 -07:00
Xavier Ducrohet
89aff1d226 Add Asus USB vendor ID to adb.
Bug: 3099385

Change-Id: Ic068fbf58abd23f4bddfe13ae33854a8b4053cf8
2010-10-15 10:26:50 -07:00
Xavier Ducrohet
1693c32f42 am 6c263694: Fix KT Tech\'s usb vendor ID.
Merge commit '6c2636947c43c2950488d8d82bfc691cb907518d' into gingerbread-plus-aosp

* commit '6c2636947c43c2950488d8d82bfc691cb907518d':
  Fix KT Tech's usb vendor ID.
2010-10-14 11:35:01 -07:00
Xavier Ducrohet
6c2636947c Fix KT Tech's usb vendor ID.
Change-Id: I77a6de8c11d490e2427f704ff64e7c09874a5d14
2010-10-14 10:06:13 -07:00
Benoit Goby
dff0237430 Don't build adb for sdk only builds
Change-Id: I0c56213e81a889fd3a7c5e72c4a6e63544a2a3bd
Signed-off-by: Benoit Goby <benoit@android.com>
2010-10-06 18:30:55 -07:00
Benoit Goby
cb56b712b5 Don't build adb for simulator target
Change-Id: Ibe4ef6bb111dc7123e53262553deb8f5e25e9391
Signed-off-by: Benoit Goby <benoit@android.com>
2010-10-06 17:23:16 -07:00
John Michelau
c318833b35 Build adb for target-as-host
Added a new target for adb, so that the adb
host executable is built for the target as
well. This allows the target to connect to
any Android devices which are attached to it.

Bug: 3022194
Change-Id: Ib01983e70b75cec40a9ee161da7f4cf1343eecf2
2010-10-05 16:08:19 -07:00
Xavier Ducrohet
579ca37361 am 1e3f8f27: am f62b23f2: Add new USB vendor IDs.
Merge commit '1e3f8f2769f9a227fe4d4abfe3d26083e4da91e9'

* commit '1e3f8f2769f9a227fe4d4abfe3d26083e4da91e9':
  Add new USB vendor IDs.
2010-09-28 13:57:56 -07:00
Xavier Ducrohet
1e3f8f2769 am f62b23f2: Add new USB vendor IDs.
Merge commit 'f62b23f2c1540221621024c850fdf615dda0c903' into gingerbread-plus-aosp

* commit 'f62b23f2c1540221621024c850fdf615dda0c903':
  Add new USB vendor IDs.
2010-09-28 10:44:12 -07:00
Xavier Ducrohet
f62b23f2c1 Add new USB vendor IDs.
Change-Id: Ie3b1ee09c67c4c8fdb294cfc99fa28e4ebe8dfae
2010-09-28 09:54:07 -07:00
Mathias Agopian
0715f91223 update adbd to use the new screencap command for taking screenshots.
Change-Id: I02c49240f9db9258824020f3f5f04463e17a537a
2010-09-26 18:44:28 -07:00
Nick Kralevich
9abea13a0a am 4692599c: am 44db990d: Fix bug 2950316. Check return values.
Merge commit '4692599cf73240e34d8e3bf7f54e99ebb9c0aaf3'

* commit '4692599cf73240e34d8e3bf7f54e99ebb9c0aaf3':
  Fix bug 2950316.  Check return values.
2010-08-27 18:10:24 -07:00
Nick Kralevich
4692599cf7 am 44db990d: Fix bug 2950316. Check return values.
Merge commit '44db990d3a4ce0edbdd16fa7ac20693ef601b723' into gingerbread-plus-aosp

* commit '44db990d3a4ce0edbdd16fa7ac20693ef601b723':
  Fix bug 2950316.  Check return values.
2010-08-27 15:28:24 -07:00
Nick Kralevich
44db990d3a Fix bug 2950316. Check return values.
Change-Id: I687bb5fb8195d4c1fc863e32a5e233a8b9e74196
2010-08-27 14:37:11 -07:00
Daniel Sandler
ff91ab855b Support an additional alias for 'adb shell.'
Change-Id: Ie8d667407fef8ee5a6c7ab86b30307fb61869170
2010-08-19 01:10:18 -04:00
Takeshi Kishimoto
91c3853911 Added Toshiba's USB VID (0x0930) upon their request.
Change-Id: I9f7fca6b98b0664ef9af4f7b86f0f5863e91e4c1
2010-07-21 10:21:05 -07:00
Takeshi Kishimoto
81fbbc2d0b Added NEC and PMC's USB VIDs upon their request.
Change-Id: I332ee1e68ff960d41a365aeb96d012253056edd2
2010-07-21 10:20:54 -07:00
Xavier Ducrohet
deafd15f2c am 4309d602: Merge "Added Toshiba\'s USB VID (0x0930) upon their request." into gingerbread
Merge commit '4309d602b562eb9f181b0314837e6096577c6c18' into gingerbread-plus-aosp

* commit '4309d602b562eb9f181b0314837e6096577c6c18':
  Added Toshiba's USB VID (0x0930) upon their request.
2010-07-20 23:55:42 -07:00
The Android Open Source Project
3c5581da1d merge from open-source master
Change-Id: I90bd618ff8c6bcbe1071468e0d75574feee58d27
2010-07-20 10:11:46 -07:00
The Android Open Source Project
02565fec82 merge from open-source master
Change-Id: Ice679e12b8393621b21a8dafe640dd880a09d35e
2010-07-20 10:11:20 -07:00
Takeshi Kishimoto
29837f94b5 Added Toshiba's USB VID (0x0930) upon their request.
Change-Id: I9f7fca6b98b0664ef9af4f7b86f0f5863e91e4c1
2010-07-20 17:08:09 +08:00
Viral Mehta
899913f816 print msg.command in human-readable format
to print msg.command as some odd decimal number is just not helping in debugging;
instead print msg.command as a string

Change-Id: Id1ec770c20c86b8bdae40a0262bf4b63c0213b0a
2010-07-19 15:28:22 -07:00
Jean-Baptiste Queru
fdb13f7937 Merge "Fix ADB daemon file descriptor leak" 2010-07-19 15:23:44 -07:00
The Android Open Source Project
67e6fcd195 merge from froyo-plus-aosp
Change-Id: Ie231effb4d9dfd63aa98ec08b269c31ce32aa1c0
2010-06-21 11:50:42 -07:00
Teddie Stenvi
8f5daadcc1 Fix ADB daemon file descriptor leak
The ADB (Android Debug Bridge) daemon suffers from a file descriptor leak.
When transfering file descriptors, opened by the adbd daemon, to a JDWP
process for debugging through sendmsg, the file descriptor is duplicated
by the kernel and a copy is transfered to the JDWP process.
Adbd neglects to close it's copy of the descriptor after the sendmsg call
which causes a file descriptor leak in the process.
Eventually this causes the daemon to hit its maximum roof of opened file
descriptors thus making it impossible for the process to serve any new
commands from the adb server.
Jdwp_service.c has been modified to close the file descriptor after the
send message call has succeded.
Also, the socket used for transfering the file descriptor is set to blocking
mode before the sendmsg call since the adbd processes needs to know when the
duplication has been completed by the kernel.
The flags are reset to its original state after the sendmsg call.

Change-Id: I76b15460301ac01e432f5ce8678ff58c658c16f2
Signed-off-by: Christian Bejram <christian.bejram@stericsson.com>
2010-06-18 08:11:04 +00:00
Takeshi Kishimoto
2124afeee1 Added NEC and PMC's USB VIDs upon their request.
Change-Id: I332ee1e68ff960d41a365aeb96d012253056edd2
2010-06-18 09:37:35 +08:00
The Android Open Source Project
2ef569417d merge from open-source master
Change-Id: Ia99df155e4abf0585ed46943b75a2a1569d0534f
2010-06-15 11:31:57 -07:00
The Android Open Source Project
ee0306b933 merge from open-source master
Change-Id: I183a933e96222f8c01516210cfa4be5f18e35b70
2010-06-15 11:29:05 -07:00
The Android Open Source Project
d9a1904d3f merge from open-source master
Change-Id: I14853c1f8a1d392d7ee9dfae3914d9ee3107794c
2010-06-15 11:27:36 -07:00
The Android Open Source Project
6f29e5a27b merge from open-source master
Change-Id: I2dacf7f8895debd0452c3601424e32a3b9e19059
2010-06-15 11:26:20 -07:00
The Android Open Source Project
07a804b83a merge from open-source master
Change-Id: Ia8d41f96f3885bd7159571182d09c1da079e5bc9
2010-06-15 11:24:47 -07:00
Michael Richardson
83cb93b401 added vendor ID for http://www.onthegovideo.com/
Change-Id: I38e3a6f252728d93177745778147e6f6ed45d5c5
2010-06-15 09:33:59 -07:00
Jean-Baptiste Queru
feff3a8b8d Merge "eliminate a compiler warning: signed/unsigned length" 2010-06-15 09:31:40 -07:00
Michael Richardson
eb558b9240 eliminate a compiler warning: signed/unsigned length
Change-Id: I6139a1b3f9caa8fe3492e4850dcc58d8d5ff0cfb
2010-06-14 14:49:08 -07:00
André Goddard Rosa
8182829ccb adb: optimize socket-list-walking code
Change-Id: I8bbb8b671c1ce7a2ce736b60b0cdb7b21ccdc372
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
2010-06-14 09:59:34 -07:00
André Goddard Rosa
8e78dc64d2 adb: remove unneeded assignment of id to zero
... as memory was already obtained zero'ed by calloc().

Change-Id: Ic73bad09b54cb778fd40bdf86bb40888ea504c5f
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
2010-06-14 09:56:14 -07:00
André Goddard Rosa
c419e2a210 adb: clean up 0 --> NULL for pointers
Change-Id: I9216fdf534d807a55dfbc6800b5c3ef5f8c83368
2010-06-14 09:55:42 -07:00
The Android Open Source Project
f7e148c1bc merge from open-source master
Change-Id: I9b051ebd6e785e4d68e148a005a0485e79aa55ea
2010-06-03 09:09:17 -07:00
Mike Lockwood
cbbe79add1 adb connect and disconnect improvements:
Port number is now optional.  Will use default port 5555 if not specified.
"adb disconnect" with no additional arguments will disconnect all TCP devices.

Change-Id: I7fc26528ed85e66a73b8f6254cea7bf83d98109f
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-06-02 11:31:26 -04:00
The Android Open Source Project
456688bfb4 merge from open-source master
Change-Id: I99ae03ba51ee185b9cfecf4f26e94a757f3815c2
2010-06-02 08:14:33 -07:00
The Android Open Source Project
5dc0f5db71 merge from open-source master
Change-Id: I9e7ebc99f0de12ed3ae38a3882481485a96f9680
2010-06-02 08:13:29 -07:00
The Android Open Source Project
c57a22c856 merge from open-source master
Change-Id: I44bd527e51d102a56a1efe40cb6e634859b09461
2010-06-02 08:11:52 -07:00
The Android Open Source Project
705b37b84c merge from open-source master
Change-Id: I5f7880bec0c15ae7a42175107d8192ad44b847ca
2010-06-02 08:08:55 -07:00
The Android Open Source Project
c0b3ad1659 merge from open-source master
Change-Id: I71f2e47509695ba9ec626f4a6917a645b00a4e70
2010-06-02 08:07:48 -07:00
Mike Lockwood
67d5358e2a adb: remove obsolete shell history support.
Change-Id: I85a7cda176ca3bb7cb9f96e18556d53daaac3023
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-05-25 13:40:15 -04:00
Jack Palevich
7fe202f160 Use linenoise to add simple editing and history to the Android shell.
The linenoise library is from http://github.com/antirez/linenoise

This patch also disables command-line editing and history from adb. The
adb implementation was shadowing the Android shell's implementation.

The adb implementation was also shadowing the editing and history
implementation in alternative shells such as BusyBox's ash.

Change-Id: I7ebd4cb391d0ce966c0ce0e707d80ecd659f9079
2010-05-25 14:49:57 +08:00
Stefan Hilzinger
d9d1ca4780 Let "adb connect" connect to emulators too
- adb can now connect to an emulator configured with an arbitrary
  pair of <console port, adb port>. These two ports do not have to be
  adjacent.
  This can be done from the commandline at any time using
  adb connect emu:<console_port>,<adb_port>
- Emulators running on ports outside the normal range
  (5554/5555-5584/5585) register themselves on startup if they follow
  the convention "console port+1==abd port".
- Emulators outside the normal port range will not be auto-detected on
  adb startup as these ports are not probed.
- The index into local_transports[] array in transport_local.c does no
  longer indicate the port number of the local transport. Use the altered
  atransport struct to get the port number.
- I have chosen not to document the adb connect emu:console_port,adb_port
  syntax on adb's help screen as this might be confusing to most readers
  and useful to very few.
- I don't expect this to introduce any (backwards) compatibility issues.

Change-Id: Iad3eccb2dcdde174b24ef0644d705ecfbff6e59d
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-05-24 11:27:16 -04:00
Colin Cross
5762ec2905 Fix adb remount on non-MTD devices
Change-Id: If8e07502bcface53aaac81022f6183c6a147edc8
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-05-24 11:27:16 -04:00
Dima Zavin
f1c03de74e adb: Add Qualcomm USB id
Change-Id: I044a77f14d7a90e9dff191919e4aeb39723ea429
Signed-off-by: Dima Zavin <dima@android.com>
2010-05-24 11:02:17 -04:00
The Android Open Source Project
e57d89186d merge from open-source master
Change-Id: Ibc1c58aa757910f2b00acf6883127dd027f01d73
2010-05-03 16:32:46 -07:00
Tim
cd64315f72 Add documentation for some adb environmental variables.
The ADB_TRACE one is particularly important.

Change-Id: I125a5930c43065c8cf505eea40d20e3f209bc858
2010-04-29 07:41:50 -07:00
The Android Open Source Project
9a22c68e86 merge from open-source master
Change-Id: Id824d3427cb4808a8768f14e7b46c0eaf5e02e73
2010-04-28 12:58:12 -07:00
Brian Carlstrom
26bb6e92ba Fixing spelling errors in adb docs
Change-Id: I9376717165a01e207034f84a31f85335d3740f18
2010-04-28 11:38:39 -04:00
Stefan Hilzinger
a84a42eb20 Make adb's daemon-port on the host machine configurable.
This is the first CL of a somewhat larger effort which, among other things,
will involve changing the emulator and ddms to talk to adb running on a
configurable port.

The port can be configured using environment variable ANDROID_ADB_SERVER_PORT.

Further CLs will also address the set of ports used for the local transport.

Change-Id: Ib2f431801f0adcd9f2dd290a28005644a36a780a
2010-04-28 11:38:34 -04:00
Mike Lockwood
23e64161be adb: remove obsolete adb.connected system property.
This was used for adb networking, which no longer exists.
This code also failed when adb was not running as root.

Change-Id: Ied86fb1930094d5ae5009684d25e15385fd31d03
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-04-28 11:35:10 -04:00
Xavier Ducrohet
4f660699bf Add Pantech's USB vendor ID to adb.
Change-Id: I5334f46ee52ca1bd8067860701aef7b93296bedb
2010-04-28 11:34:01 -04:00
Takeshi Kishimoto
c22b9bf1a8 Added Kyocera's VID (0x0482), upon their request.
Change-Id: I8f2f2a02c22d618c0b42d4f287d88a98af3ac4fa
2010-04-28 11:33:49 -04:00
Mike Lockwood
505bd6e5fc adb: Add five second timeout for USB writes on Linux host.
This helps us recover when things go wrong during automated testing.

Change-Id: I006dbfaff7f70d51398ff12fbddcaee751453b78
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-04-28 11:33:13 -04:00
Brian Carlstrom
805c4a7030 Add missing newlines to adb usage message 2010-04-28 11:32:53 -04:00
Mike Lockwood
c519c00c36 adb: do not mix printf() with write() when writing to stdout.
Change-Id: I3598cc951778080bec9a21d646656d5aba57120a
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-04-28 11:32:20 -04:00
Takeshi Kishimoto
16f1550b51 Added ZTE's USB Vendor ID (0x19D2) upon ZTE's request. 2010-04-28 11:31:50 -04:00
Takeshi Kishimoto
17273091e9 Added USB vendor id of Sharp, based on Sharp's request.
Sharp's vendor id: 0x04dd
2010-04-28 11:31:37 -04:00
Raphael
a00a69e07d am b419c35c: Fix adb, fastboot to compile in Windows SDK under Linux.
Merge commit 'b419c35c660d7421e18a9efef38eca11966b44c7' into froyo-plus-aosp

* commit 'b419c35c660d7421e18a9efef38eca11966b44c7':
  Fix adb, fastboot to compile in Windows SDK under Linux.
2010-04-23 17:14:45 -07:00
Raphael
b419c35c66 Fix adb, fastboot to compile in Windows SDK under Linux.
(Merged from master Change I3d0e4cab)

Change-Id: Ib3fd566bdaf09d5893a6b0c66168c76c6b0d92eb
2010-04-23 13:07:17 -07:00
The Android Open Source Project
775a8df614 merge from open-source master
Change-Id: I686f28fcfcff1cca7cf254de9e4334cc4ea2fef7
2010-04-21 09:11:15 -07:00
Mike Lockwood
05f202a94b Merge "adb: Add persistent system property for running adb in TCPIP mode" 2010-04-20 11:09:49 -07:00
Mike Lockwood
8e2ceaeacf adb: Add persistent system property for running adb in TCPIP mode
In addition to service.adb.tcp.port, you can now set persist.adb.tcp.port
to specify the port number for adb to listen to instead of USB.
This allows the adb TCP configuration to persist across reboots.

Change-Id: I897ffcb019e8dd1785996d2f3c571cfc2f8ded38
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-04-20 14:06:40 -04:00
The Android Open Source Project
3523412f43 merge from open-source master
Change-Id: Ib9250bd9d73664b07facaef362beba57a1519411
2010-04-20 07:28:23 -07:00
Anthony Newnam
705c944c0e Add -l option to adb sync
Change-Id: I87c01663dff319dde24b70560e6fe5647ebf9d49
2010-04-19 16:36:57 -07:00
The Android Open Source Project
8ac50107a2 merge from open-source master
Change-Id: I7f30144c12c340501f161fba70a917eb62afc41f
2010-04-16 12:36:35 -07:00
Matt Fischer
457d81cec1 Allow 'adb pull' to pull symlinked files
Change-Id: I02f31334e4ee0c7b0e7b379016629a465e711905
2010-04-15 13:36:16 -05:00
Xavier Ducrohet
7c19bbe086 Add Pantech's USB vendor ID to adb.
Change-Id: I5334f46ee52ca1bd8067860701aef7b93296bedb
2010-03-31 13:06:47 -07:00
Takeshi Kishimoto
8d2f91db21 Added Kyocera's VID (0x0482), upon their request.
Change-Id: I8f2f2a02c22d618c0b42d4f287d88a98af3ac4fa
2010-03-12 21:34:58 +08:00
Mike Lockwood
fe582b5d32 adb: Add five second timeout for USB writes on Linux host.
This helps us recover when things go wrong during automated testing.

Change-Id: I006dbfaff7f70d51398ff12fbddcaee751453b78
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-03-08 22:10:52 -05:00
Brian Carlstrom
6fcc801ead Add missing newlines to adb usage message 2010-03-01 22:54:12 -08:00
Mike Lockwood
bfb0477f1d Merge "adb: do not mix printf() with write() when writing to stdout." 2010-02-27 06:16:41 -08:00
Satoshi Kataoka
1d01c295a9 Merge "Added ZTE's USB Vendor ID (0x19D2) upon ZTE's request." 2010-02-26 01:59:39 -08:00
Mike Lockwood
dd6b36e334 adb: do not mix printf() with write() when writing to stdout.
Change-Id: I3598cc951778080bec9a21d646656d5aba57120a
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-02-25 23:04:43 -05:00
Mike Lockwood
d969faa161 adb: Attempt to unmount the SD card before rebooting.
Change-Id: Idd4d96b4704f4e1bd324e72bca87611a23e30801
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-02-24 16:07:23 -05:00
The Android Open Source Project
d6391c6aaa merge from open-source master 2010-02-23 07:32:01 -08:00
Takeshi Kishimoto
01512aa3b0 Added ZTE's USB Vendor ID (0x19D2) upon ZTE's request. 2010-02-22 19:30:41 +08:00
Mike Lockwood
0ef3fd048a adb: add -s option to adb install for installing apps on SD card.
Change-Id: Ic6b24411e594d160ddcf862cc9f1283e1e17bb4d
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-02-19 17:53:27 -05:00
Raphael
5a912bf03e ADB: Garmin-Asus's USB Vendor ID
Change-Id: I3249d629f59d40f291079fc214b643ac6c927f76
2010-02-15 12:00:48 -05:00
Erik Gilling
2f6c2b04fb adb: add Nvidia's vendor id to adb
Signed-off-by: Erik Gilling <konkers@android.com>
2010-02-15 11:59:54 -05:00
Dan Egnor
7eced2b86a make "adb bugreport" run "bugreport" (which invokes "dumpstate"
indirectly via system service) rather than "dumpstate", that way
even when adb is not running as root, dumpstate does run as root,
and can do things like collect VM traces.
2010-02-15 11:59:47 -05:00
Mike Lockwood
429c5ae461 adb: Fix problems detecting adb in more complicated USB configurations.
Change-Id: Ib5b13960a1c75efc97abeca46204c85bba905c71
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-02-15 11:59:04 -05:00
Joe Onorato
8071a4bdb6 Make adb pull use . as the target file directory if you don't supply one. 2010-02-15 11:58:56 -05:00
Takeshi Kishimoto
123331adea Added USB vendor id of Sharp, based on Sharp's request.
Sharp's vendor id: 0x04dd
2010-02-09 18:10:36 +08:00
Raphael
3332d6e69d resolved conflicts for merge of 190cabb3 to master 2010-02-02 08:35:43 -08:00
Raphael
190cabb376 am 1873adc2: ADB: Garmin-Asus\'s USB Vendor ID
Merge commit '1873adc2b12d5a9045bae90650bb331c7c7aa3c7' into eclair-plus-aosp

* commit '1873adc2b12d5a9045bae90650bb331c7c7aa3c7':
  ADB: Garmin-Asus's USB Vendor ID
2010-02-01 15:34:16 -08:00
Raphael
1873adc2b1 ADB: Garmin-Asus's USB Vendor ID
Change-Id: I3249d629f59d40f291079fc214b643ac6c927f76
2010-02-01 09:56:47 -08:00
Xavier Ducrohet
f71f068fb9 Add DELL's USB Vendor ID to adb - DO NOT MERGE
Change-Id: Ie1a6b6a81f50956362aee2a2d6d1b805f0e85b7a
2010-01-21 17:24:36 -08:00
Dan Egnor
288c7cfe1b Merge "make "adb bugreport" run "bugreport" (which invokes "dumpstate" indirectly via system service) rather than "dumpstate", that way even when adb is not running as root, dumpstate does run as root, and can do things like collect VM traces." 2010-01-21 17:10:50 -08:00
Erik Gilling
6ac5e19299 adb: add Nvidia's vendor id to adb
Signed-off-by: Erik Gilling <konkers@android.com>
2010-01-20 18:19:58 -08:00
Dan Egnor
c130ea7c29 make "adb bugreport" run "bugreport" (which invokes "dumpstate"
indirectly via system service) rather than "dumpstate", that way
even when adb is not running as root, dumpstate does run as root,
and can do things like collect VM traces.
2010-01-20 13:52:59 -08:00
Mike Lockwood
37ddce736c adb: Add Dell's USB vendor ID.
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-01-19 11:58:03 -05:00
Mike Lockwood
cc7a5dc770 adb: Add Dell's USB vendor ID.
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-01-19 11:46:08 -05:00
Mike Lockwood
07e8f7e875 adb: Fix problems detecting adb in more complicated USB configurations.
Change-Id: Ib5b13960a1c75efc97abeca46204c85bba905c71
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-01-17 00:52:27 -05:00
Joe Onorato
00c0eeac6b Make adb pull use . as the target file directory if you don't supply one. 2010-01-05 13:42:25 -08:00
Mike Lockwood
a1871d2a72 adb: Add USB vendor ID for Foxconn
Change-Id: I88e4051b6e5cd820cab7e3ec417a545f50925a33
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-12-23 07:45:07 -05:00
Romain Guy
a48d43a077 Add adb reboot-bootloader to match fastboot reboot-bootloader.
Also fix the formatting of one of the options in the help message.
2009-12-23 07:44:50 -05:00
Mike Lockwood
a59387b508 adb: fix -d and -e options for "adb forward" command.
Change-Id: I9166572a1c398ce5ef1423d19a30895385118ee5
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-12-23 07:44:03 -05:00
Mike Lockwood
6170404867 adb: Add USB vendor ID for Foxconn
Change-Id: I88e4051b6e5cd820cab7e3ec417a545f50925a33
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-12-22 09:02:21 -05:00
Romain Guy
311add489e Add adb reboot-bootloader to match fastboot reboot-bootloader.
Also fix the formatting of one of the options in the help message.
2009-12-14 14:45:17 -08:00
Mike Lockwood
255ed555d6 am 3c0c6dca: am 64e99545: adb: fix -d and -e options for "adb forward" command.
Merge commit '3c0c6dca1abc350035efedafa9ee9d705499c334'

* commit '3c0c6dca1abc350035efedafa9ee9d705499c334':
  adb: fix -d and -e options for "adb forward" command.
2009-11-28 19:34:13 -08:00
Mike Lockwood
3c0c6dca1a am 64e99545: adb: fix -d and -e options for "adb forward" command.
Merge commit '64e99545d4b5600bb5ca044fcad636ae8389b381' into eclair-mr2-plus-aosp

* commit '64e99545d4b5600bb5ca044fcad636ae8389b381':
  adb: fix -d and -e options for "adb forward" command.
2009-11-28 19:32:17 -08:00
Mike Lockwood
64e99545d4 adb: fix -d and -e options for "adb forward" command.
Change-Id: I9166572a1c398ce5ef1423d19a30895385118ee5
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-11-28 12:46:13 -05:00
Jean-Baptiste Queru
333a80cf9f merge from eclair 2009-11-15 12:07:12 -08:00
Jean-Baptiste Queru
4b29fe640a eclair snapshot 2009-11-12 18:46:23 -08:00
Jean-Baptiste Queru
c923980e78 am ef063fe3: merge from open-source master
Merge commit 'ef063fe3066153dab5389b6baba6cb4e36888106'

* commit 'ef063fe3066153dab5389b6baba6cb4e36888106':
  Add support for Acer devices
  FreeBSD support for usb-connected devices in adb
  Make get_my_path() safer
  Fix use of memset function
2009-11-09 12:07:42 -08:00
Jean-Baptiste Queru
ef063fe306 merge from open-source master 2009-11-09 09:40:48 -08:00
Xavier Ducrohet
3b01d54819 am 96f0d140: am df872bec: am 1b9f8c6a: am 23433b93: Add Sony-Ericsson to adb.
Merge commit '96f0d140df11c2efeecd8b0eed9ffad514456034'

* commit '96f0d140df11c2efeecd8b0eed9ffad514456034':
  Add Sony-Ericsson to adb.
2009-11-02 12:04:56 -08:00
Xavier Ducrohet
23433b93d1 Add Sony-Ericsson to adb. 2009-10-30 13:09:39 -07:00
Alexey Tarasov
3b226f9e3b FreeBSD support for usb-connected devices in adb
FreeBSD (and other systems as well) may use libusb to work with USB devices.
libusb is integrated in FreeBSD base system in recent builds (8.0+),
however in other systems it may need include libusb.h like <libusb/libusb.h>
and install library from devel/libusb port or other repository.

Submitted change not supports events (attach/detach) as libusb 1.0 lacks
such functionality and in order to make code more portable I've not used
workarounds as in earlier changeset.

Code was tested on FreeBSD 8.0-RC1, HTC Hero (1.0.0.A6288, Android 1.5)
2009-10-25 01:56:35 +11:00
Alexey Tarasov
3166410a82 Make get_my_path() safer
Adds maxLen parameter to get_my_path().
Some small cosmetic fixes.
2009-10-22 02:55:00 +11:00
Mike Lockwood
a01fdd534d am 96b6bf3e: am 8cf0d59f: adb: Add "adb disconnect" command for disconnecting TCP/IP devices.
Merge commit '96b6bf3e923e23d695c1322fc41a57c9346b3e90'

* commit '96b6bf3e923e23d695c1322fc41a57c9346b3e90':
  adb: Add "adb disconnect" command for disconnecting TCP/IP devices.
2009-10-13 17:01:53 -07:00
Mike Lockwood
74d7ff8cfd adb: Add "adb disconnect" command for disconnecting TCP/IP devices.
Also check that device is not already connected in "adb connect"

Change-Id: I5f84b56b63d8c6932f23791cac319fd6bc39d36c
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-10-13 10:45:39 -04:00
Robert CH Chou
1fbf27bf22 Add support for Acer devices
Change-Id: I7045249f86e2b628c31c888e95eb5ba6f6c47251
2009-10-13 10:45:34 -04:00
Mike Lockwood
89f9a84af0 adb: Add USB Vendor IDs for LG and Huawei
Change-Id: Ib47e3e39609bac9cf34f2b9334aa95184b3db71d
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-10-13 10:45:29 -04:00
Jean-Baptiste Queru
4a0da39db4 Add NOTICE file and license tag for adb
BUG=1716164
2009-10-13 10:45:22 -04:00
Mike Lockwood
d6e3ecb70f adb: Clean up argument passing for create_service_thread()
Change-Id: Id68b312e76215e8e217b42ca0301713dbddfee9e
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-10-13 10:45:14 -04:00
Joe Onorato
e5c8b6dd79 Revert "adb: Another attempted workaround for the adb disconnect problem."
This reverts commit cc1de48dcd.

lockwood says to take this out.
2009-10-13 10:45:04 -04:00
Mike Lockwood
8cf0d59f61 adb: Add "adb disconnect" command for disconnecting TCP/IP devices.
Also check that device is not already connected in "adb connect"

Change-Id: I5f84b56b63d8c6932f23791cac319fd6bc39d36c
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-10-11 23:04:18 -04:00
Elliott Hughes
31dbed7b60 Add adb's ANDROID_SERIAL to fastboot too.
We noticed this when trying to script on-device testing for the dalvik
continuous build.

Also fix a typo in adb's help.
2009-10-07 15:38:53 -07:00
Android (Google) Code Review
ff7d5835d9 Merge change 26093 into eclair
* changes:
  Add NOTICE file and license tag for adb
2009-09-24 12:45:49 -04:00
Robert CH Chou
7953b89e8d Add support for Acer devices
Change-Id: I7045249f86e2b628c31c888e95eb5ba6f6c47251
2009-09-22 13:03:14 -07:00
Mike Lockwood
6ae9256322 adb: Add USB Vendor IDs for LG and Huawei
Change-Id: Ib47e3e39609bac9cf34f2b9334aa95184b3db71d
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-09-21 08:09:59 -04:00
Jean-Baptiste Queru
2fcdaf9907 Add NOTICE file and license tag for adb
BUG=1716164
2009-09-20 19:02:02 -07:00
Mike Lockwood
b6b40079e6 adb: Clean up argument passing for create_service_thread()
Change-Id: Id68b312e76215e8e217b42ca0301713dbddfee9e
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-09-19 17:49:57 -04:00
Rebecca Schultz Zavin
154b7d7de4 Add bitfields to header for screen shots. This will allow ddms to distinguish
between various 32 bit pixel formats.  Also adds new version number for
future expansion.

Change-Id: Ia1d7d7485614e961a47ebb65493b19f4a16ded05
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
2009-09-15 21:06:12 -07:00
Android (Google) Code Review
8880093fe3 Merge change 24493 into eclair
* changes:
  Fix several issues in framebuffer_service
2009-09-10 19:31:27 -04:00
Rebecca Schultz Zavin
04bee29ad9 Fix several issues in framebuffer_service
-supports fb's with x and y offsets
-dumps the front buffer (instead of just the low end of the buffer)
-switch from mmap to read/write, for fb's with very large offsets

Change-Id: Id560790c9661f7cc3b4350a44cc29f0104831e85
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
2009-09-10 15:37:08 -07:00
Joe Onorato
91acb14877 Revert "adb: Another attempted workaround for the adb disconnect problem."
This reverts commit cc1de48dcd.

lockwood says to take this out.
2009-09-03 16:35:42 -07:00
Mike Lockwood
f56d1b5a76 Revert "adb: "adb bugreport" now runs dumpstate via init rather than execing it in the shell."
This reverts commit be0045aafd.
This change broke compatibility with previous versions of adbd, so I will be implementing this
by modifying the bugreport command on the device instead.
2009-09-03 14:54:58 -04:00
Mike Lockwood
be0045aafd adb: "adb bugreport" now runs dumpstate via init rather than execing it in the shell.
This allows dumpstate to run as root even if adbd is not.

Change-Id: I04bda1ee0c8de91677149a2a9eda713c85067aa4
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-09-03 00:36:14 -04:00
Mike Lockwood
cef31a0254 adb: Fix emulator support.
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-08-26 14:46:18 -07:00
Xavier Ducrohet
f71c71148c Fix broken 'adb root' command.
Change-Id: I75bf01863e82967a7214d3e31b8db792690716c1
2009-08-26 14:46:18 -07:00
Mike Lockwood
2f38b69971 adb: Improved support for running adb over TCP/IP
Added new commands:

adb connect <host>:<port> (to connect to a device via TCP/IP)
adb tcpip <port>          (to restart adbd on the device to listen on TCP/IP)
adb usb                   (to restart adbd on the device to listen USB)

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-08-26 14:46:18 -07:00
Raphael
26f3de6738 BUG 2033924: Add AdbWinUsbApi.dll to prebuilt for Windows SDK 2009-08-26 14:46:18 -07:00
Mike Lockwood
ecfb75d9e4 adb: Fix infinite loop in Linux host device discovery.
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-08-26 14:46:18 -07:00
Mike Lockwood
668cc77101 adb: print better error message when there are insufficient permissions for a device.
Now, a command like "adb shell" will print "insufficient permissions for device"
instead of "device not found" if adb does not have permissions to communicate with the device.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-08-26 14:46:18 -07:00
Mike Lockwood
a8be72f653 adb: update call to register_usb_transport in Mac and Windows builds.
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-08-26 14:46:18 -07:00
Mike Lockwood
95b837d38b adb: On Linux, detect USB devices for which adb does not have permissions to communicate with.
adb devices will now list devices without adequate file system permissions in /dev/bus/usb as:

List of devices attached
????????????	no permissions

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-08-26 14:46:18 -07:00
Guang Zhu
e64004d327 adb: Use correct language ID when retrieving USB serial number.
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-08-26 14:46:18 -07:00
Mike Lockwood
63e6152748 adb: Remove adbd from simulator build.
It no longer compiles without recent kernel headers.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-08-26 14:46:18 -07:00
Mike Lockwood
5f4b051235 adb: add "adb reboot" command.
This will allow rebooting the device via adb on any build, including user builds.
An optional argument can be provided
(for example, "adb reboot bootloader" or adb reboot recovery")

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-08-26 14:46:18 -07:00
Mathias Agopian
3969080e23 get rid of utils/executablepath.h, which now lives in the simulator 2009-08-26 14:46:18 -07:00
Nick Pelly
22048ef325 Allow adb to use ANDORID_SERIAL env variable to specify the device to talk to.
Overridden by -s.
2009-08-26 14:46:18 -07:00
Mike Lockwood
a3e8a6ad56 adb: Fix emulator support.
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-08-26 12:50:22 -07:00
Xavier Ducrohet
1bba53f7c8 Fix broken 'adb root' command.
Change-Id: I75bf01863e82967a7214d3e31b8db792690716c1
2009-08-25 20:16:14 -07:00
Mike Lockwood
ff19670d48 adb: Improved support for running adb over TCP/IP
Added new commands:

adb connect <host>:<port> (to connect to a device via TCP/IP)
adb tcpip <port>          (to restart adbd on the device to listen on TCP/IP)
adb usb                   (to restart adbd on the device to listen USB)

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-08-24 16:05:58 -07:00
Raphael
818806ad59 am e3baafd8: BUG 2033924: Add AdbWinUsbApi.dll to prebuilt for Windows SDK
Merge commit 'e3baafd85a5fecd1714441455e3f75f26b5c381e'

* commit 'e3baafd85a5fecd1714441455e3f75f26b5c381e':
  BUG 2033924: Add AdbWinUsbApi.dll to prebuilt for Windows SDK
2009-08-12 12:04:07 -07:00
Raphael
e3baafd85a BUG 2033924: Add AdbWinUsbApi.dll to prebuilt for Windows SDK 2009-08-11 11:08:45 -07:00
Mike Lockwood
d70dc73d8d adb: Fix infinite loop in Linux host device discovery.
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-08-11 11:29:40 -04:00
Mike Lockwood
c52c602171 DO NOT MERGE adb: Remove adbd from simulator build.
It no longer compiles without recent kernel headers.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-08-10 21:48:22 -04:00
Mike Lockwood
704aa83338 DO NOT MERGE cherry-pick "adb reboot" from master:
adb: add "adb reboot" command.

This will allow rebooting the device via adb on any build, including user builds.
An optional argument can be provided
(for example, "adb reboot bootloader" or adb reboot recovery")

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-08-10 20:15:25 -04:00
Mike Lockwood
37d3111b1c adb: print better error message when there are insufficient permissions for a device.
Now, a command like "adb shell" will print "insufficient permissions for device"
instead of "device not found" if adb does not have permissions to communicate with the device.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-08-08 13:53:16 -04:00
Mike Lockwood
5c93dba771 adb: update call to register_usb_transport in Mac and Windows builds.
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-08-08 13:16:54 -04:00
Mike Lockwood
0927bf9690 adb: On Linux, detect USB devices for which adb does not have permissions to communicate with.
adb devices will now list devices without adequate file system permissions in /dev/bus/usb as:

List of devices attached
????????????	no permissions

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-08-08 12:44:35 -04:00
Guang Zhu
1a1f818986 adb: Use correct language ID when retrieving USB serial number.
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-08-07 06:36:42 -04:00
Mike Lockwood
781d041892 adb: Remove adbd from simulator build.
It no longer compiles without recent kernel headers.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-08-06 10:58:00 -04:00
Mike Lockwood
ee15662140 adb: add "adb reboot" command.
This will allow rebooting the device via adb on any build, including user builds.
An optional argument can be provided
(for example, "adb reboot bootloader" or adb reboot recovery")

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-08-05 17:57:20 -04:00
Mike Lockwood
1f4ff53517 am cc1de48d: adb: Another attempted workaround for the adb disconnect problem.
Merge commit 'cc1de48dcdf06c76ee14abbe2a237aa51b5b3bad'

* commit 'cc1de48dcdf06c76ee14abbe2a237aa51b5b3bad':
  adb: Another attempted workaround for the adb disconnect problem.
2009-07-30 16:31:40 -07:00
Mike Lockwood
cc1de48dcd adb: Another attempted workaround for the adb disconnect problem.
For adb shell commands (as well as shell based commands like logcat and bugreport) we now
batch USB writes into 4K chunks instead of sending small packets of data as they come in.
A timeout prevents us from blocking for more than 100ms when our 4K buffer is partially full.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-07-30 16:23:56 -07:00
Xavier Ducrohet
1fde31c8fb am de6f62a6: Add support for Samsung and Motorola devices.
Merge commit 'de6f62a609120c3d9e4e53689c3b309842ec874b'

* commit 'de6f62a609120c3d9e4e53689c3b309842ec874b':
  Add support for Samsung and Motorola devices.
2009-07-24 16:09:22 -07:00
Xavier Ducrohet
de6f62a609 Add support for Samsung and Motorola devices.
Also update the linux code. Some devices have more complex USB descriptors
which can't be parsed with the simple assumption of just skipping the
endpoint descriptors.
2009-07-24 14:42:27 -07:00
Mike Lockwood
dd8a23b774 am 7bf68842: adb: Increment ADB_SERVER_VERSION
Merge commit '7bf68842d765ad7e6a51426b625d0de6d2331740'

* commit '7bf68842d765ad7e6a51426b625d0de6d2331740':
  adb: Increment ADB_SERVER_VERSION
2009-07-09 17:12:06 -07:00
Mike Lockwood
7bf68842d7 adb: Increment ADB_SERVER_VERSION
It was pointed out that we should have done this when we added the "adb root" command.
And doing this will also force people to pick up the recent Linux USB serial number fix.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-07-09 20:09:10 -04:00
Kenny Root
df3fb65e98 am c989199c: Fix typo in adb commandline help
Merge commit 'c989199ccfbe745a7109f57d2aee2577d2f72b8d'

* commit 'c989199ccfbe745a7109f57d2aee2577d2f72b8d':
  Fix typo in adb commandline help
2009-07-08 09:07:49 -07:00
Kenny Root
c989199ccf Fix typo in adb commandline help
Android developers are not expected to have PDP-11s.
2009-07-08 12:05:05 -04:00
Mike Lockwood
5089bd0a6e am 3d9b265b: adb: Use correct language ID when retrieving USB serial number.
Merge commit '3d9b265b7d34d886a2f44e486c25e402d7df791b'

* commit '3d9b265b7d34d886a2f44e486c25e402d7df791b':
  adb: Use correct language ID when retrieving USB serial number.
2009-07-08 07:30:39 -07:00
Mike Lockwood
3d9b265b7d adb: Use correct language ID when retrieving USB serial number.
Fixes http://code.google.com/p/android/issues/detail?id=2609

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-07-08 10:28:38 -04:00
Android (Google) Code Review
7490e4b170 am 34c34267: Merge change 3951 into donut
Merge commit '34c342677e4ffb57584d571d8996822bf4d879ef'

* commit '34c342677e4ffb57584d571d8996822bf4d879ef':
  Revert "adb: Workaround for adb disconnect problem."
2009-06-12 04:59:42 -07:00
Mike Lockwood
02d40b51c6 Revert "adb: Workaround for adb disconnect problem."
This reverts commit e38a31e305.

This change had the unfortunate side effect of breaking ctrl-C
when executing "adb shell <command>"

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-06-11 17:40:48 -04:00
Android (Google) Code Review
f4c94943a9 am 87657782: Merge change 3008 into donut
Merge commit '876577823d7679fa18f175405ce77e5257161e3a'

* commit '876577823d7679fa18f175405ce77e5257161e3a':
  adb: Workaround for adb disconnect problem.
2009-06-02 22:48:18 -07:00
Mike Lockwood
e38a31e305 adb: Workaround for adb disconnect problem.
For non-interactive adb shell commands, batch USB writes into 4K chunks
instead of sending small packets of data as they come in.
Add a timeout so we do not block for more than 200ms when our 4K buffer is partially full.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-06-02 22:09:03 -07:00
Mathias Agopian
89ac364c54 get rid of utils/executablepath.h, which now lives in the simulator 2009-05-31 18:50:09 -07:00
Mike Lockwood
5b043d6182 am 1f546e6d: adb: Allow enabling of device side adbd logging with a persistent system property.
Merge commit '1f546e6d1f6ccd1964336ddf0d8e8b3b11b1e945'

* commit '1f546e6d1f6ccd1964336ddf0d8e8b3b11b1e945':
  adb: Allow enabling of device side adbd logging with a persistent system property.
2009-05-25 15:32:19 -07:00
Mike Lockwood
1f546e6d1f adb: Allow enabling of device side adbd logging with a persistent system property.
To enable logging, set the property persist.adb.trace_mask to a hex value
containing the bitmask for adb_trace_mask (see the TRACE_* enum values in adb.h).
This will result in adb writing log output to a file in /data/adb/
No logging will occur if persist.adb.trace_mask is not set or has a value
that cannot be parsed as a hex integer.
The property is read once only at startup, so you must reboot or restart adbd
for changes in the property to take effect.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-05-25 18:17:55 -04:00
Mike Lockwood
64c6397b56 am 6a3075c7: adb: Add adbd to the AID_SDCARD_RW group to allow writing to the SD card.
Merge commit '6a3075c78287ea5a7ee7a3c85cde58e894350822'

* commit '6a3075c78287ea5a7ee7a3c85cde58e894350822':
  adb: Add adbd to the AID_SDCARD_RW group to allow writing to the SD card.
2009-05-25 11:32:08 -07:00