Commit graph

350 commits

Author SHA1 Message Date
Edwin Vane
ae06933cde Trivial signed/unsigned warning fix for adbd
Change-Id: Icd674006bb2b526166960b4f90eb274030d80439
Author: Edwin Vane <edwin.vane@intel.com>
Reviewed-by: Ariel J Bernal <ariel.j.bernal@intel.com>
2012-08-02 09:17:53 -04:00
Edwin Vane
97d2aef6d2 Fix signed/unsigned comparison warning
Trivial warning fix.

Change-Id: I93b905b34155214fc2d211a0d9319f06b67fa193
Author: Edwin Vane <edwin.vane@intel.com>
Reviewed-by: Ariel J Bernal <ariel.j.bernal@intel.com>
2012-08-01 16:36:06 -04: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
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
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
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
007b70023b am 2ae9878c: am c5d5a5e8: Merge "Kindle Fire USB ID"
* commit '2ae9878cd5dc517cc7338aaca81f0eb3127b4a53':
  Kindle Fire USB ID
2012-05-02 15:11:08 -07:00
Anonymous Coward
4474ac4081 Add encryption parameters to adb install
Change-Id: I92e5f6ace1bc9e711c14cb83533aeb99ab9ab9f7
2012-04-27 13:48:54 -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
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
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
07ad9f2a12 Add USB Vendor ID for Fujitsu and Lumigon.
Change-Id: Icd013b362366815527834cbf54aa4ecac2b7750d
2012-01-11 11:55:45 -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
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
Christopher Tate
c6b07d94fa Merge "Tweak logcat parameters" 2011-12-07 16:02:37 -08:00