summaryrefslogtreecommitdiffstats
path: root/adb
Commit message (Collapse)AuthorAgeFilesLines
* Allow adb to listen both on usb and tcp.Mike J. Chen2012-08-091-11/+15
| | | | | | | | | | | (cherry picked from commit ae868a40459a6bcb89d8a4426503fea0c8002b25 in master) Change-Id: I980c7c5e8affbc8627d17b1d9303b002adcdb29a Signed-off-by: Mike J. Chen <mjchen@google.com> Conflicts: adb/adb.c
* am 7accfc2f: am f889f0db: Merge "Trivial signed/unsigned warning fix for adbd"Stephen Hines2012-08-081-1/+1
|\ | | | | | | | | * commit '7accfc2ffd3d0fb6e6e8985349e8773f1977df59': Trivial signed/unsigned warning fix for adbd
| * Trivial signed/unsigned warning fix for adbdEdwin Vane2012-08-021-1/+1
| | | | | | | | | | | | Change-Id: Icd674006bb2b526166960b4f90eb274030d80439 Author: Edwin Vane <edwin.vane@intel.com> Reviewed-by: Ariel J Bernal <ariel.j.bernal@intel.com>
| * Fix signed/unsigned comparison warningEdwin Vane2012-08-011-1/+1
| | | | | | | | | | | | | | | | Trivial warning fix. Change-Id: I93b905b34155214fc2d211a0d9319f06b67fa193 Author: Edwin Vane <edwin.vane@intel.com> Reviewed-by: Ariel J Bernal <ariel.j.bernal@intel.com>
* | am d4725517: am ec7d9dc7: Merge "Avoid zombies on androidscreencast"Colin Cross2012-07-231-0/+5
|\ \ | |/ | | | | | | * commit 'd47255175ede1af31aee9132914e5d14549ba577': Avoid zombies on androidscreencast
| * Avoid zombies on androidscreencastYuriy Zabroda2012-07-231-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Add Kobo's USB vendor ID to adbDan Zhang2012-07-091-0/+3
| | | | | | | | Change-Id: I8b86a851e6478d5e8248df4f1e53f3da4dc4b5e0
* | am 504dccec: am aeceb517: adb: Fix adb tcpip commandBenoit Goby2012-06-121-3/+3
|\ \ | |/ | | | | | | * commit '504dccec97c12283f348838ba0bf88536322ee6b': adb: Fix adb tcpip command
| * am aeceb517: adb: Fix adb tcpip commandBenoit Goby2012-06-121-3/+3
| |\ | | | | | | | | | | | | * commit 'aeceb5174502659cb4fff6de924b54ef7e6cdae7': adb: Fix adb tcpip command
| | * adb: Fix adb tcpip commandBenoit Goby2012-06-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge "FunctionFS: initial implementation"Benoit Goby2012-06-063-17/+364
|\ \ \
| * | | FunctionFS: initial implementationAndrzej Pietrasiewicz2012-05-313-17/+364
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | am 1b7a7e81: adb: Use bionic\'s strtok_r() for WindowsScott Anderson2012-06-053-2/+89
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | * commit '1b7a7e81195ff06a7482f81cb92b094bb3481cb1': adb: Use bionic's strtok_r() for Windows
| * | | | adb: Use bionic's strtok_r() for WindowsScott Anderson2012-06-053-2/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | am 2ca3e6b3: adb: Generalizing -s to take qualifiers.Scott Anderson2012-06-055-27/+126
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | * commit '2ca3e6b35f79136418ebc32fef57580698dbd045': adb: Generalizing -s to take qualifiers.
| * | | | adb: Generalizing -s to take qualifiers.Scott Anderson2012-06-055-27/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | am e82c2db0: adb: Transmit key properties in banner of connect messageScott Anderson2012-06-054-22/+89
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | * commit 'e82c2db05cae70a0490a1f84b7211ef42c329671': adb: Transmit key properties in banner of connect message
| * | | | adb: Transmit key properties in banner of connect messageScott Anderson2012-06-054-22/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | am 3608d832: adb: Fix two problems with device path implementation.Scott Anderson2012-06-012-3/+4
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | * commit '3608d832425ca3a6d00c4040f3bb979c5aa49899': adb: Fix two problems with device path implementation.
| * | | | adb: Fix two problems with device path implementation.Scott Anderson2012-05-312-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | am c7993af6: adb: Fix compiler warningScott Anderson2012-06-011-1/+2
|\ \ \ \ \ | |/ / / / | | / / / | |/ / / |/| | | * commit 'c7993af64baec271a238646bc20aaa846866c4a9': adb: Fix compiler warning
| * | | adb: Fix compiler warningScott Anderson2012-05-311-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | am c7a67d0f: resolved conflicts for merge of 246808be to jb-dev-plus-aospXavier Ducrohet2012-05-151-0/+3
|\ \ \ \ | | |/ / | |/| | | | | | | | | | * commit 'c7a67d0fc4121abb0bc5f11aeda4d848ea8e0690': Add USB Vendor ID for Yulong Coolpad.
| * | | resolved conflicts for merge of 246808be to jb-dev-plus-aospXavier Ducrohet2012-05-151-0/+3
| |\ \ \ | | | |/ | | |/| | | | | Change-Id: I3415e2d7b4e8295b7415951c0e8a78c775574089
| | * | Add USB Vendor ID for Yulong Coolpad.Xavier Ducrohet2012-05-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Bug: 6217375 Change-Id: I8931c42e8d3088cc4df8c6e56b323a7392cad5ef
* | | | am 9dbcbe08: am 9bdedb59: am a36e1aa3: Merge "adb: usb_windows: fix adb ↵Jean-Baptiste Queru2012-05-141-3/+3
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | connection lost issue" * commit '9dbcbe08751bacbf1fcbf6037fed1e6c69a27fa3': adb: usb_windows: fix adb connection lost issue
| * | | am 9bdedb59: am a36e1aa3: Merge "adb: usb_windows: fix adb connection lost ↵Jean-Baptiste Queru2012-05-111-3/+3
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | issue" * commit '9bdedb599874278abf206230ed31010eeb9b40dd': adb: usb_windows: fix adb connection lost issue
| | * | | adb: usb_windows: fix adb connection lost issueJack Ren2012-05-091-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | am 007b7002: am 2ae9878c: am c5d5a5e8: Merge "Kindle Fire USB ID"Jean-Baptiste Queru2012-05-021-0/+3
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | * commit '007b70023b179f846c0ad1f0303da4ce03ac065e': Kindle Fire USB ID
| * | | | am 2ae9878c: am c5d5a5e8: Merge "Kindle Fire USB ID"Jean-Baptiste Queru2012-05-021-0/+3
| |\ \ \ \ | | |/ / / | | | / / | | |/ / | |/| | * commit '2ae9878cd5dc517cc7338aaca81f0eb3127b4a53': Kindle Fire USB ID
| | * | Kindle Fire USB IDJon Sawyer2012-04-151-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds Lab126's USB id to the known USB Devices Change-Id: I3cd5d90bba68123d5d3d2d67e1ab7d60137eb388 Signed-off-by: Jon Sawyer <jon@cunninglogic.com>
* | | | am 9526a788: Merge "adb: Add ability to specify device path" into ics-aahScott Anderson2012-05-0110-30/+112
|\ \ \ \ | |/ / / |/| | / | | |/ | |/| * commit '9526a788a6bd528e14622404e8750bdcc147d15a': adb: Add ability to specify device path
| * | adb: Add ability to specify device pathScott Anderson2012-04-2010-30/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | am 746f3243: Add USB vendor IDs for Quanta, INQ and Sony.Xavier Ducrohet2012-01-241-0/+9
| |\ \ | | | | | | | | | | | | | | | | * commit '746f3243f6d30ab51a36dcfea76eac3ba29ac625': Add USB vendor IDs for Quanta, INQ and Sony.
| * \ \ am 4779e934: Add Intel\'s vendor ID to adbAndrew Hsieh2012-01-191-1/+3
| |\ \ \ | | | | | | | | | | | | | | | | | | | | * commit '4779e9344bb62208e4772ff6486b6df564f434b8': Add Intel's vendor ID to adb
| * \ \ \ am 07ad9f2a: Add USB Vendor ID for Fujitsu and Lumigon.Xavier Ducrohet2012-01-111-0/+6
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * commit '07ad9f2a127b2836c7d45a503a5f3ef7517218f3': Add USB Vendor ID for Fujitsu and Lumigon.
| * \ \ \ \ am ae429828: Cherry-picked from c4f37eed7 in master. Do not merge.Vladimir Chtchetkine2012-01-101-0/+7
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'ae4298286896cbef22b2af285a3f651e8f498185': Cherry-picked from c4f37eed7 in master. Do not merge.
| * \ \ \ \ \ am 74159657: Cherry-picked from c13daef7b on master. Do not merge.Vladimir Chtchetkine2012-01-101-1/+119
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '74159657687aadab4c82e4fd7e7a54d16c045d95': Cherry-picked from c13daef7b on master. Do not merge.
| * \ \ \ \ \ \ am b1dfffe6: Fix \'adb backup\' on WindowsChristopher Tate2011-12-091-2/+24
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'b1dfffe6bb506313a3bc9146d2f6f8c533213193': Fix 'adb backup' on Windows
| * | | | | | | | Allow adb to listen both on usb and tcp.Joe Onorato2011-12-071-10/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I98db594241631fa17e39686727392afc8b3124bc
* | | | | | | | | Add encryption parameters to adb installAnonymous Coward2012-04-271-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I92e5f6ace1bc9e711c14cb83533aeb99ab9ab9f7
* | | | | | | | | adb: set umask to 000Nick Kralevich2012-04-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | | | | adb: fix non-linux builds. tcpip:, root:, usb: are not for ADB_HOSTJP Abgrall2012-03-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | | | | adb: fix exit of "adb root" when it is a no-op.JP Abgrall2012-03-301-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "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
* | | | | | | | | Merge "Revert "add IP checking for adb over TCP""Kenny Root2012-03-281-36/+2
|\ \ \ \ \ \ \ \ \
| * | | | | | | | | Revert "add IP checking for adb over TCP"Kenny Root2012-03-281-36/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit dca76e6187c4128a17c8df5bcaca0db6993d91a1
* | | | | | | | | | Merge "add IP checking for adb over TCP"Kenny Root2012-03-281-2/+36
|\ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / /
| * | | | | | | | | add IP checking for adb over TCPWei Zhong2012-03-151-2/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | | | | | Make sure "adb install" work is cleaned after errorKenny Root2012-03-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If an error occurs during the verification of an APK, it could be left in the temporary installation directory. Change-Id: I4afa5535fc0b978532b31d5b8fb63776963c39db
* | | | | | | | | | Merge "adb: Don't synchronize with transport using sleep"Benoit Goby2012-03-263-13/+19
|\ \ \ \ \ \ \ \ \ \