History log of /system/core/adb/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
df33ffadd29ed02d87e87515626b673eac67f735 09-Jul-2015 Thierry Strudel <tstrudel@google.com> fs_config: replace getenv('OUT') by new fs_config parameter

Using a getenv('OUT') in such a deep down function is a wrong design
choice. Replacing with explicit parameter that may be NULL in case
device specific files can be accessed from /.
Since TARGET_COPY_OUT_SYSTEM may be defined to something different than
system we also ensure that we use a path relative to TARGET_OUT to
compute path to fs_config_* files.

Bug: 21989305
Bug: 22048934
Change-Id: Id91bc183b29beac7379d1117ad83bd3346e6897b
Signed-off-by: Thierry Strudel <tstrudel@google.com>
ile_sync_service.cpp
1cddc2092f544c5eac339e59746436facfdd5dc7 18-Jun-2015 Elliott Hughes <enh@google.com> Ignore ro.adb.secure in user builds.

Require authorization by default, and remove the ability to override
that in user builds. (userdebug and eng are still free to do whatever
they want.)

Bug: http://b/21862859
Change-Id: Ibf8af375be5bf1141c1ad481eee7a59fb10a7adb
(cherry picked from commit 5cba504215ea91187cc36ec7aec5dce1b0f4b0fe)
ndroid.mk
db.cpp
db_auth.cpp
db_auth.h
db_main.cpp
d62bce804005ef55bba90b9513a17db63c186ab3 08-May-2015 Spencer Low <CompareAndSwap@gmail.com> adb: win32: fix key files reading/writing

The issue is that adb uses fopen() with "e" (presumably to open the file
with O_CLOEXEC), but that flag causes MSVCRT.DLL to return an error. So
when adb_auth_host.cpp goes to read or write the adbkey files, it fails.

The quick fix is to not use the "e" option on adb host code since it
isn't necessary there, compared to adbd.

An alternative fix would be to have a fopen() wrapper on Windows that
filters out the "e" option.

Bug: http://b/21806456
Bug: https://code.google.com/p/android/issues/detail?id=175077
Change-Id: I7d8ba2847dab0ed558ffe156e79093251eb253c9
Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
(cherry picked from commit 9b9603148b0a42ee9b4fc2df76bfde31ba29c311)
db_auth_host.cpp
23d84074652b77385431fc0d1505b7d43b7dba9e 02-Jun-2015 Svetoslav <svetoslavganov@google.com> Improve adb install help.

Bug: 21365060
Change-Id: I0a4ea5cf3a2f37a82161b30f7eec5781d175aa8f
ommandline.cpp
0b3baac51217b14be9eacb8865f31be8f6b4bbc3 27-May-2015 Lorenzo Colitti <lorenzo@google.com> Document the -g option to adb install.

Change-Id: I012165df343c24953f1c1cfcdce379bf1b67c624
ommandline.cpp
2181c722ceac50dde3c4a399950b37e7fd6a5893 15-May-2015 Elliott Hughes <enh@google.com> Fix ' escaping in adb.

You can't just use \' inside a single-quoted string.

Bug: http://b/20323053
Bug: http://b/3090932
Change-Id: I73754b097671d02dc11c35052f0534b6dd789e4f
(cherry picked from commit 84b0bf22644b35d6b3d3f7dc96311a484c3519b3)
db_utils.cpp
db_utils_test.cpp
ests/test_adb.py
a51d8b9a1c06a17b8d5d5fd9547a3bf813ea4157 11-May-2015 Elliott Hughes <enh@google.com> Failure to find an oem partition should not be a remount failure.

Many devices don't have an /oem partition, so find_mount should be
expected to fail, but shouldn't cause the overall remount to fail.

Also clean up all the error handling and reporting, and remove the
dead int* globals.

Bug: http://b/21024141
Change-Id: Ie31021b03c9cab8e972269d7d1ffe383cd30ee9e
(cherry picked from commit 9aa4fda4e64c1882faf019cc2a483ee4917e0c85)
emount_service.cpp
emount_service.h
et_verity_enable_state_service.cpp
207ddb20ac2f25de19d74fe88f2a526e0ee5cfa6 08-May-2015 Elliott Hughes <enh@google.com> Fix "adb remount" for devices without an oem partition.

On a device without an oem partition, we now have an /oem directory
anyway. This causes find_mount to fail, and that was returning nullptr
from a std::string-returning function. Boom!

Also clean up the bits of code I had to trace through between "adb remount"
on the host to the crash on the device as I debugged this.

The only other meaningful change is the error checking in
adb_connect_command --- adb_connect can also return -2.

Bug: http://b/20916855
Change-Id: I4c3b7858e13f3a3a8bbc7d30b3c0ee470bead587
(cherry picked from commit 5677c23e8d0c085be8d8429a5d125147d11e9bb2)
ommandline.cpp
emount_service.cpp
c33e62bdc63ddaf7a17c5f317e73349bf3df2b83 08-May-2015 Benson Leung <bleung@google.com> Merge "Be tolerant of devices that don't report serials." into mnc-dev
02418b3e093b025ee9b9ae2e51a37810cc5322d6 08-May-2015 Elliott Hughes <enh@google.com> Try to include the SHA in a ddmslib-compatible way.

Bug: http://b/20918202
Change-Id: I0c1a48459372b0d28aaf9d09d82540e44b438c9c
(cherry picked from commit f3bbfa6a216669c4cd91d5f936662e89e0ae07ca)
ommandline.cpp
6043e15311df5278614157a1ef3000a6b143cb60 07-May-2015 Dan Albert <danalbert@google.com> Be tolerant of devices that don't report serials.

The USB spec explicitly says this is optional, so we shouldn't be
relying on it.

Bug: http://b/20883914
Change-Id: Icf38405b00275199bcf51a70c47d428ae7264f2b
ransport.cpp
sb_linux.cpp
c1cfbd304ad1f4f5f136a175ed687de41701235a 06-May-2015 Dan Albert <danalbert@google.com> Include the git sha in the adb version.

Also add --version to adbd to display the same thing.

Change-Id: I47dfbad16c892c42ea938aedd085ba77492791ba
(cherry picked from commit 1ba1d7c1ee644967ff4743b0d257290cbeca7a83)
ndroid.mk
db_main.cpp
ommandline.cpp
aceb9c08df80da9c929af2998c54870455b79a03 05-May-2015 Elliott Hughes <enh@google.com> Implement the ssh(1) escaping rules.

The first rule of ssh(1) escaping is that there is no escaping.

This doesn't undo any of my recent security fixes because they're all
calling escape_arg themselves.

This fixes "adb shell rm /data/dalvik-cache/arm/*".

Also remove do_cmd which caused concern during code review.

Bug: http://b/20564385
Change-Id: I4588fd949d51e2a50cff47ea171ed2d75f402d0d
(cherry picked from commit 2b10111d25adcfe3627103b73edad22f188c97ba)
ommandline.cpp
ests/test_adb.py
e1a55004e9fa46055c59f86e952e9e457c36c3f2 02-May-2015 Elliott Hughes <enh@google.com> Add WriteFdFmt and clean up more code.

Also say *which* device wasn't found.

Bug: http://b/20666660
Change-Id: I50e234ad89e39ae0a8995083c0b642c61275c5a3
(cherry picked from commit ab52c181fa4c1c9891644635dc5653cda5b90e2b)
db.cpp
db_client.cpp
db_io.cpp
db_io.h
db_io_test.cpp
db_listeners.cpp
db_listeners.h
db_main.cpp
ommandline.cpp
emount_service.cpp
ervices.cpp
et_verity_enable_state_service.cpp
ransport.cpp
ransport_local.cpp
92af733ee202caa3b5475fe27fcc81582f11e7c8 01-May-2015 Elliott Hughes <enh@google.com> More adb buffer fixes.

This patch factors out a lot of the basic protocol code: sending OKAY,
sending FAIL, and sending a length-prefixed string.

ADB_TRACE has been non-optional for a long time, so let's just remove
the #ifs.

Also actually build the device tracker test tool (and remove its duplicate).

Bug: http://b/20666660
Change-Id: I6c7d59f18707bdc62ca69dea45547617f9f31fc6
(cherry picked from commit e67f1f87d9b1188ec8617035db7006c37ee7b21e)
ndroid.mk
db.cpp
db.h
db_client.cpp
db_io.cpp
db_io.h
db_io_test.cpp
db_listeners.cpp
db_listeners.h
db_trace.h
db_utils.cpp
db_utils.h
ommandline.cpp
emount_service.cpp
ervices.cpp
et_verity_enable_state_service.cpp
ockets.cpp
ysdeps_win32.cpp
est_track_devices.cpp
est_track_jdwp.cpp
ransport.cpp
ransport.h
f1a58f8f33509201cabe71c6a9d01aa6b8f99966 29-Apr-2015 Elliott Hughes <enh@google.com> More fixed-length buffer removal.

Bug: http://b/20666660
Change-Id: I0c738e9fed2defed48a9cf2d0a4f7b99c08dcf3d
(cherry picked from commit 6452a89aa8934231e12ab77e0d90f12c3e892ad1)
db.h
db_client.cpp
db_client.h
ommandline.cpp
ransport.cpp
ransport_local.cpp
0156589846117bccb2fbec6b3141cc21bc86c638 30-Apr-2015 Elliott Hughes <enh@google.com> Add missing 'else' to fix all devices showing up as "host".

Bug: http://b/20705355
Change-Id: I4f7830278f0c2bc87d95d148d85455b8da894645
(cherry picked from commit 3ce9575af76fa6dc110506080434303b9459abf4)
db.cpp
2e06d3057e2d4f630b5785008fd586d6256d1827 29-Apr-2015 Elliott Hughes <enh@google.com> Fix Win32 build.

(cherry-pick of 1b600a902cc0b3a6065c962293292a5ac689fafe.)

Change-Id: Icf2c8df99b4b88bbf85a4097731733c5795fba44
db_client.cpp
71aeb798154a515d5f4a91ecb9adb0896ab9a9e6 29-Apr-2015 Elliott Hughes <enh@google.com> Move __adb_error to std::string, and improve various errors.

Also remove an sprintf. Also fix various bits of code that were
reporting stale adb_error values when they meant strerror.

(cherry-pick of 078f0fcf4c63b8d8e8c10a18855eae04ca321e06.)

Bug: http://b/20666660
Change-Id: Ibeb48b7bc21bb0ec30ba47889d1d671ee480e1b7
db_client.cpp
db_client.h
ommandline.cpp
ile_sync_client.cpp
d81f75ae41b2eed4ae7b0911f250778f3e6ec9c2 25-Apr-2015 Elliott Hughes <enh@google.com> Remove strtok from adb.

Also fix android::base::Split to behave like Java, Python, and google3.

(cherry picked from commit 8d5fa6da44d56511b3e173bc463cbc65ff221b4a)

Change-Id: I9388ae37ee8dd4a4a6c2a9a19f068b70d9a78353
db.cpp
db_auth_host.cpp
ysdeps.h
ysdeps_win32.cpp
03a90d663363c904d5b874f2de204a055c763b3c 27-Apr-2015 Elliott Hughes <enh@google.com> Support the full length of USB serial numbers.

Two bugs: we couldn't report the serial number correctly if it was long
enough, and it wasn't possible to connect to a device whose serial number
was long enough to overflow a different fixed-length buffer.

Bug: http://b/20317730

(cherry picked from commit 9309ecbcec428edfcb487ef697862bce59a1aed5)

Change-Id: I04c160a215418a57bd4fb27b7f63060c8be6f12e
ndroid.mk
db_client.cpp
sb_linux.cpp
ce6363bbbcd05ff16111040eecacd174f9327745 25-Apr-2015 Elliott Hughes <enh@google.com> Improve logging of USBDEVFS_CLAIMINTERFACE failures.

Bug: https://code.google.com/p/android/issues/detail?id=170054
Change-Id: I9b11eb019093e3322da0a8e70d6e17de4c25ab75
sb_linux.cpp
876881b22ad5d735cdb3ae2ac1afa6c336378808 22-Apr-2015 Elliott Hughes <enh@google.com> Merge "Add missing null checks after allocations."
dc3b459ff9f0ff71d404ba7198083e532a0dd894 22-Apr-2015 Elliott Hughes <enh@google.com> Add missing null checks after allocations.

Bug: http://b/20317729
Change-Id: I62bb761d48ee59a1f4ddd0cdd0632432305ca2ca
ommandline.cpp
ervices.cpp
ransport.cpp
sb_linux.cpp
sb_linux_client.cpp
sb_osx.cpp
1555147bc47349dd786098e9d660bbed205d25fc 22-Apr-2015 Elliott Hughes <enh@google.com> Plumb more of the error reporting through.

This doesn't fix the bug, but it does flatten the bug to the well-known
and long-standing "adb shell" doesn't return exit statuses, so when we
fix that, this one will fix itself.

Bug: http://b/20423886
Change-Id: I48351e46f05dd3f2f6e57f0df1d851333458d0ef
ommandline.cpp
8e6edc0d89f370fbc1760139849cf36d3ac4d589 22-Apr-2015 Elliott Hughes <enh@google.com> Add a couple more adb shell regression tests.

Bug: http://b/15479704
Change-Id: Id3e7f0df101ad61db509df313c13210a8bd8b124
ests/test_adb.py
82b0f7ba9258c74e4019b2b6478d2e1623a287d9 21-Apr-2015 Badhri Jagan Sridharan <Badhri@google.com> Merge "adb: set sys.usb.ffs.ready to signal usb pullup"
5f97370babbe465e82c2aefe9864848af6796113 21-Apr-2015 Badhri Jagan Sridharan <Badhri@google.com> adb: set sys.usb.ffs.ready to signal usb pullup

This change sets sys.usb.ffs.ready to 1 to
trigger configfs based enumeration.

Change-Id: I222495fc667cce59675579069d164b0b484f3653
sb_linux_client.cpp
0053bb3f1a4647e6b2deea3d7cf0a1965a3d9bad 21-Apr-2015 Elliott Hughes <enh@google.com> Add a test for shell escaping.

Until I fixed this, we would fail this example:

$ adb shell sh -c 'echo hello; echo world'
hello
/system/bin/sh: echo world: not found

Bug: http://b/19734868
Change-Id: I11a437cd0c0362303028f23fbaa103611b75707e
ests/test_adb.py
d236d071b960a387f536712f0314b99696167178 21-Apr-2015 Elliott Hughes <enh@google.com> Fix "adb sync" for devices without vendor and oem.

Bug: http://b/20440110
Change-Id: I2481992198890f5ca50412c2b7ca361101961413
ommandline.cpp
ile_sync_client.cpp
ile_sync_service.h
e434ad1dd799551830019a7bd2871dec226bdcd2 21-Apr-2015 Elliott Hughes <enh@google.com> Merge "Always explain why bind(2) failed."
14b65736c5ed487ebba93d3ccc3e261ece71f833 21-Apr-2015 Elliott Hughes <enh@google.com> Merge "Use ' quoting to escape arguments."
dc1e482b205ac6f04a4c1344bd0038e593a25ce3 20-Apr-2015 Colin Cross <ccross@android.com> Fix windows adb build

libc++ is not available on windows yet, but it already defaults to
static libstdc++.

Change-Id: I85a766ead84f71fe1f2f59be6ac739b0b833b6db
ndroid.mk
b2b06de5fc9605919a06d7757c8ef4a7a48f3e87 20-Apr-2015 Colin Cross <ccross@android.com> Merge "statically link adb and fastboot against libc++"
7b506090e1ac51f4990f17621c6e33847b0632a2 20-Apr-2015 Elliott Hughes <enh@google.com> Always explain why bind(2) failed.

This has confused several people lately.

Bug: http://b/20219978
Change-Id: I2537ceb83bff0b3166c230c728d4389a983db858
ndroid.mk
db.cpp
db_listeners.cpp
db_listeners.h
ransport_local.cpp
53daee6a2b415caa0ff3e425c7fa613c834bca61 19-Apr-2015 Elliott Hughes <enh@google.com> Fix the Windows adb build.

It looks like we can't use clang on Windows yet because libc++ isn't ready.
So move back to GCC for the Windows host clang. Work around the mingw
printf format string problems that made us want to switch to clang in the
first place, and #include "sysdeps.h" in adb_utils.cpp to work around the
absence of lstat(2) on Windows.

Change-Id: Icd0797a8c0c2d1d326bdd704ba6bcafcbaeb742f
ndroid.mk
db_utils.cpp
ommandline.cpp
5498adefb00cd979137361b98fcbf8d51f72ebeb 18-Apr-2015 Elliott Hughes <enh@google.com> Use ' quoting to escape arguments.

The specific motivating case is "text;ls;1.apk", but rather than continue
adding individual characters to the list of characters to be escaped, let's
just switch to quote all arguments with ', which only leaves ' itself to be
escaped.

Bug: 20323053
Bug: 19734868
Change-Id: I8bd71db9373bc2d1169fc11e46c889da6638550a
db_utils.cpp
db_utils_test.cpp
6c34bbaa6845a1c3ccb116d45b1a873ba6256fc8 18-Apr-2015 Elliott Hughes <enh@google.com> Use escape_arg in "adb backup".

This doesn't fix the injection vulnerability, but it makes "adb backup"
no worse than the other commands, and lets me fix them all at once.

Bug: 20323053
Change-Id: I39843c065d9d738b6b7943b2ffd660e4a031cc36
ommandline.cpp
ervices.cpp
a7090b94c181f3efe5b53d2c8367b78d99074dfe 18-Apr-2015 Elliott Hughes <enh@google.com> Remove yet more fixed-length buffers (and their overruns).

Bug: 20317724
Change-Id: If137fc96f5f23576ccecd388ac87afefa47337c6
db_main.cpp
db_utils.cpp
db_utils.h
ommandline.cpp
ervices.cpp
sb_linux_client.cpp
2083fa6b012ee9106a8a72b9ba94da714af846ab 18-Apr-2015 Elliott Hughes <enh@google.com> Switch adb over to clang.

Change-Id: Ib5511dcba56e80ffce6bc293d99251ccfd61c330
ndroid.mk
61a004c05f100741048d284fa527ac28c242d0bc 18-Apr-2015 Elliott Hughes <enh@google.com> Merge "Fix more buffer overruns."
5830577bd82fdb7c39555da20a4cf585b8bb376a 17-Apr-2015 Elliott Hughes <enh@google.com> Fix more buffer overruns.

Also add some tests.

Bug: 20323050
Change-Id: I9eaf3dc04efd85206663c4cca4f8c1208620a89a
ndroid.mk
db_utils.cpp
db_utils.h
db_utils_test.cpp
ommandline.cpp
emount_service.cpp
2940ccff8605e929cc56353254f29f37823fdda7 17-Apr-2015 Elliott Hughes <enh@google.com> Use PRI* macros to fix the Windows build.

Change-Id: Icd400be05c2bc726265832875b5a05dba7966847
ommandline.cpp
2baae3a876ada7e22986e92188f7933cae34ce3b 17-Apr-2015 Elliott Hughes <enh@google.com> Remove various fixed-length buffers (and their overflows).

Bug: 20323052
Bug: 20323051
Bug: 20317728
Bug: 20317727
Bug: 20317726
Bug: 20317725
Change-Id: I57a5e30a5b7867715f55cee7429aa36d7ce21484
ndroid.mk
ommandline.cpp
0b8ecb32908f0ccde550dd510f4a562239085806 17-Apr-2015 Elliott Hughes <enh@google.com> Merge "Remove extern "C" barriers to using C++."
2d4121c0dcc93382bcd7ea6476f433d8254919dd 17-Apr-2015 Elliott Hughes <enh@google.com> Remove extern "C" barriers to using C++.

Change-Id: Ic046d6aa540738cb46b54531bc59ba3b47b0136d
db.h
db_auth.h
db_client.h
db_io.h
db_listeners.h
db_trace.h
devent.h
ile_sync_client.cpp
ile_sync_service.h
dwp_service.cpp
emu_tracing.h
ervices.cpp
ockets.cpp
ysdeps.h
ransport.cpp
7be29c819b4fb8bf9b1d4b69a4333f8765de0281 17-Apr-2015 Elliott Hughes <enh@google.com> Show $ADB_VENDOR_KEYS if authentication fails.

Incorrectly set $ADB_VENDOR_KEYS is the most likely cause of failed
adb connections. Make it easier to debug such problems by including
the value in use in the error message.

Bug: 20165551
Change-Id: I64c1d98ae6d3fb40eea9e1f0ddcfcf4f2d9d7318
db.cpp
ervices.cpp
ockets.cpp
ransport.cpp
ransport.h
a4802ca08bfcbf0124f5e9b959ed4e3a198d5f46 17-Apr-2015 Dan Albert <danalbert@google.com> Merge "Move usb_osx to C++."
c4f8fa7b36a8ba397f1c0ad3c7fb5a5c09520272 17-Apr-2015 Dan Albert <danalbert@google.com> Merge "Link libraries needed for Darwin adb tests."
7447dd05bdc12b87687c49ee7ecf0fe50d8ab17a 17-Apr-2015 Dan Albert <danalbert@google.com> Move usb_osx to C++.

Change-Id: I21673211a702cc4f31d4311c36e2a4b22e55fac8
ndroid.mk
sb_osx.c
sb_osx.cpp
f8d6b9b1ef9c19769dd4a450390f9bdec17f11b3 17-Apr-2015 Dan Albert <danalbert@google.com> Link libraries needed for Darwin adb tests.

Change-Id: I1c3c3a7bbd3824f5f3a37ee80c24d1c2a9b98748
ndroid.mk
55bf5f0017a76df0a97ec35f092054ef6f33c713 17-Apr-2015 Colin Cross <ccross@android.com> statically link adb and fastboot against libc++

libc++.so is not widely available on the host, so we compile against
one built as part of the platform. This causes problems for adb and
fastboot, which are distributed through a number of channels - the
sdk, distro packages, downloaded from the build server, or manually
copied. Instead of forcing all users to handle libc++.so too,
statically link against libc++.

Change-Id: I51b75258653a23558c8b598802005f6c1166a439
ndroid.mk
a2f2e56796fef024c7374d033bd7d34af71fdf5a 17-Apr-2015 Elliott Hughes <enh@google.com> Move sysdeps_win32 to C++.

Change-Id: I27ca41b64d62bb3611b3a39a5c3bb4377d0773bc
ndroid.mk
ommandline.cpp
ysdeps_win32.c
ysdeps_win32.cpp
2acec9153e40a558671ec0544bdd89d5a7fabf08 16-Apr-2015 Elliott Hughes <enh@google.com> Switch usb_linux_client to C++.

Change-Id: I8172e81e6c4665aa16e9e8e0c33b048dbb9ad848
ndroid.mk
sb_linux_client.c
sb_linux_client.cpp
1a4d85a5e81bb98503966312a509c5a1e23f14d4 16-Apr-2015 Elliott Hughes <enh@google.com> Move get_my_path_darwin to C++.

As long as we have C in here, we can't use C++ in our headers.

Change-Id: Ibccaa77a5af506dc504aa9c39c8dca5dcdbeccab
ndroid.mk
et_my_path_darwin.c
et_my_path_darwin.cpp
284c5cb2a16d21e5d5123ae6a0d731dcc6beadca 07-Apr-2015 Sami Tolvanen <samitolvanen@google.com> Merge "Set verity mode as the verified property value"
dfa09fd635e341d5e47d67123a0e938710be5949 01-Mar-2013 Alistair Buxton <a.j.buxton@gmail.com> Disable CR/LF translation for adb interactive shell.

adb shell uses termios to disable canonical input processing in order to
get raw control codes but it does not disable CR/LF translation. The default
for Linux terminals is to convert CR to LF unless the running program
specifically asks for this to be disabled. Since adb does not, there is no
way to send a CR to any program run on adb shell. Many programs do in fact
differentiate and so are broken by this behaviour, notably nano. This patch
sets the termios flags to disable all line ending translation.

Change-Id: I8b950220f7cc52fefaed2ee37d97e0789b40a078
Signed-off-by: Alistair Buxton <a.j.buxton@gmail.com>
ommandline.cpp
09a45a1927415de1540ad9c94ed0052ef2eb2184 04-Apr-2015 Elliott Hughes <enh@google.com> Fix "adb devices -l".

Change 055f1aa4ff58ba71133d506b202ad46612758ded switched to using isalnum(3)
but didn't take into account that isalnum has the opposite sense to the
function it replaced, so the tests should have been inverted.

Bug: http://b/20056546
Change-Id: I90630c0bea69ddbb4a95dc09f79f49d23fd497de
ransport.cpp
bcc2b5f44a39c5843eea2449cad66b8dce8721ee 02-Apr-2015 Elliott Hughes <enh@google.com> Remove LOCAL_ADDITIONAL_DEPENDENCIES in cases where it's not needed.

Change-Id: I720b8ef1050da45a7833adef8219b6acb2cf3a38
ndroid.mk
454742392f72079dbdb0d23ea24e01b5703c1aa5 30-Mar-2015 Sami Tolvanen <samitolvanen@google.com> Set verity mode as the verified property value

Set the verity mode as the value for partition.%s.verified to make it
easier for userspace to determine in which mode dm-verity was started.

Change-Id: Icc635515f8a8ede941277aed196867351d8387cb
emount_service.cpp
175b7bbfb4d935e1867a1d6df14e6ef94f2db2f4 29-Mar-2015 Tao Bao <tbao@google.com> adb: Add option to reboot into sideload mode in recovery

Currently it requires manual key press to enter the sideload mode. This
CL adds 'adb reboot sideload' to reboot the device into sideload mode
directly with text display on. With 'adb reboot sideload-auto-reboot',
it will reboot after the sideload regardless of the installation result,
unless interrupted by user.

Since it needs to write to /cache/recovery/command file, 'adb root' is
required before calling 'adb reboot sideload' and the one with
'-auto-reboot'.

Also it requires the matching CL in bootable/recovery.

Change-Id: Ib7bd4e216a1efc01e64460659c97c6005bbaec1b
ndroid.mk
ommandline.cpp
ervices.cpp
868402e5bfcc14305f216f34751d6c2e150aa849 28-Mar-2015 Dan Albert <danalbert@google.com> Revert "Remove the emulator special case from the "adb root" code."

adb root doesn't work on the emulator, so this prevents root access
to a userdebug emulator.

Since the emulator has always been root even on userdebug builds, it
may be that adb root has never worked on the emulator.

Bug: 19974213

This reverts commit abd6773b41effd1e1005ad7ce8cb5e370a367302.
db_main.cpp
50184062b87a121458fff7d8bda6656c59c71c77 02-Mar-2015 Spencer Low <CompareAndSwap@gmail.com> adb shell: Win32: fix Ctrl-C, tab completion, line editing, server echo

The 'adb shell' command on Windows has had problems:

* Ctrl-C killed the local Windows adb.exe process instead of sending the
Ctrl-C to the Android device.

* Local echo was enabled, causing everything typed to be displayed twice.

* Line input was enabled, so the Android device only received input
after hitting enter. This meant that tab completion did not work because
the tab wasn't seen by the shell until pressing enter.

* The usual input line editing keys did not work (Ctrl-A to go to the
beginning of the line, etc.).

This commit fixes these issues by reconfiguring the Win32 console and
then translating input into what Gnome Terminal would send, in effect
somewhat emulating a Unix terminal.

This does not fix all Win32 console issues, but is designed to be better
than what we had before, and to make the common day-to-day usage much
more comfortable and usable.

Change-Id: Idb10e0b634e27002804fa99c09a64e7176cf7c09
Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
ommandline.cpp
ysdeps.h
ysdeps_win32.c
8743ef98414b336f222327253f2cde6bf6aee386 20-Mar-2015 Dan Albert <danalbert@google.com> Additional cleanup of start_device_log.

Addresses nnk's post commit review comments on
https://android-review.googlesource.com/#/c/139381/

Remove unneeded code for creating /data/adb.

Add an O_CLOEXEC.

Move the closing of stdin out to main().

Append the pid of the current process to the log file to avoid
clobbering the log if the process crashes and restarts within the same
second.

Change-Id: Ide0be86b4b33256486634c29ba02efaf10cf913d
db.cpp
db_main.cpp
ea2175ab6bae74409620374a96fc9a0097a1845c 09-Mar-2015 Dan Albert <danalbert@google.com> Use text based trace masks for adbd.

Previously the adbd trace mask had to be set as raw hex rather than
with the colon separated list. We all have better things to do than
memorize bitmasks, so make adbd use the same trace mask setting code
as adb.

Change-Id: I0bf0ab61c070d06d1cc2acf1ed90b2b77ccd261b
db.cpp
db_main.cpp
a16b0f4c3a7b6546690cbdbd3d63b5cdd2da4149 20-Mar-2015 Dan Albert <danalbert@google.com> Merge "The generic failure case disappeared..."
28f07697eb6f4039daae6c9c5efee67a4d85cc92 20-Mar-2015 Dan Albert <danalbert@google.com> Merge "File header cleanup."
08f66bc771ac798d89451a9b68a1c6722352d683 20-Mar-2015 Dan Albert <danalbert@google.com> The generic failure case disappeared...

Was manifesting as a write to a full disk hanging indefinitely.

Bug: 19846181
Change-Id: Ia581e0bbbb331c221bdb68882c238d0cb9f8a0b3
db_io.cpp
db_io_test.cpp
3313426fad9eaaf53017cdbde889ebcec91358ec 19-Mar-2015 Dan Albert <danalbert@google.com> File header cleanup.

* sysdeps.h should always be included first.
* TRACE_TAG needs to be defined before anything is included.
* Some files were missing copyright headers.
* Save precious bytes on my SSD by removing useless whitespace.

Change-Id: I88980e6e00b5be1093806cf286740d9e4a033b94
db.cpp
db_auth.cpp
db_auth.h
db_auth_client.cpp
db_auth_host.cpp
db_client.cpp
db_io.cpp
db_main.cpp
ommandline.cpp
devent.cpp
ile_sync_service.cpp
dwp_service.cpp
emount_service.cpp
ervices.cpp
et_verity_enable_state_service.cpp
ockets.cpp
ysdeps_win32.c
ransport.cpp
ransport_local.cpp
ransport_usb.cpp
sb_linux.cpp
sb_linux_client.c
sb_osx.c
sb_windows.cpp
683238c3c45628666a9eb0880a067a61358a4dfe 19-Mar-2015 Dan Albert <danalbert@google.com> Fix clang-format file for correct indent settings.

Change-Id: I8786baf33c0b84e3614e9d40c404eeef94b91236
clang-format
b4ebc475e678e1dce5e4c78436a0b2fc4813159d 19-Mar-2015 Dan Albert <danalbert@google.com> Merge "Fix memory leak on jdwp_process_free()"
64d9adcea807aa1d31574b5b3bb5aad4b9025134 17-Mar-2015 Pavel Labath <labath@google.com> Fix file descriptor leakage in adbd

adb_auth_init in adb_auth_client.cpp sets FD_CLOEXEC on the control
socket, which prevents the leakage. However if ro.adb.secure
property is unset (as it is on the emulator), adb_auth_init is not
invoked, which results in the control socket fd leaking into any
process started by the deamon (specifically, any command executed
through adb shell).

Split the fd cleanup into a separate function that is called
unconditionally.

Change-Id: I73ea84977542ddfc4ac20599593ecf3745ae9108
db_auth.h
db_auth_client.cpp
db_main.cpp
ec7a66713144a16361724fe88332b28bbf3f4b3c 16-Mar-2015 Elliott Hughes <enh@google.com> Revert "Revert "adb: support /oem partition""

This reverts commit 6084a0124f868c7ec43f6c415a27a168f27ff694.

The original build breakage is fixed by (a) building the verity
code for eng builds as well as userdebug builds and (b) moving
the exported remount service functions into a new header file.

Change-Id: Ice0c4f97d4db38ab7eb333c7a6e56bbd11123f5b
ndroid.mk
db.h
ommandline.cpp
ile_sync_service.cpp
emount_service.cpp
emount_service.h
ervices.cpp
et_verity_enable_state_service.cpp
6084a0124f868c7ec43f6c415a27a168f27ff694 16-Mar-2015 Dan Albert <danalbert@google.com> Revert "adb: support /oem partition"

This is broken on userdebug builds, and it isn't completely clear why. The declaration for make_block-device_writable in adb.h wasn't updated to match the definition (which uses a std::string instead of a char*). adb.h is currently extern "C", and it isn't clear why this is only broken for userdebug, so I'd like to revert while we investigate.

This reverts commit 81416fdb186070fe4db3ca5fed2e713a4eecaac1.

Change-Id: I47f321574f9f21052e2c7332e8b0f6ef9ab98277
ommandline.cpp
ile_sync_service.cpp
emount_service.cpp
81416fdb186070fe4db3ca5fed2e713a4eecaac1 03-Nov-2014 MÃ¥rten Kongstad <marten.kongstad@sonymobile.com> adb: support /oem partition

Add support for /oem partition in commands 'adb remount' and 'adb sync'.

Change-Id: I5defc74ccaa37feaef74b9268e22b4075f98a59f
ommandline.cpp
ile_sync_service.cpp
emount_service.cpp
98ff77204cef9bb8f0f27420833233622060a09e 14-Mar-2015 Dan Albert <danalbert@google.com> Create libbase.

Move StringPrintf and the string based file I/O from libutils to
libbase.

Change-Id: I0297a6063874b9d92100e0dd5123fddfbda932fe
ndroid.mk
db_io_test.cpp
46270d233a76b63497b5bcf456e00f6defd429bd 13-Mar-2015 Elliott Hughes <enh@google.com> adb doesn't actually use libzipfile.

Change-Id: Ia7d22214bc8422c88edaaf9bb716d7e12e0bb381
ndroid.mk
db_client.cpp
ile_sync_client.cpp
83ca56ac98c089dfa5d61f282353e9ae2024797e 10-Mar-2015 Dan Albert <danalbert@google.com> Fix build from -Werror=maybe-uninitialized.

This won't actually ever be uninitialized because the code will take a
failure path if the code that initializes it fails. The goto seems to
thwart this check though.

Not sure why this is only firing on userdebug builds yet. I'll look in
to it tomorrow.

Change-Id: Ie9d837d6baea255d2a4d169355b53dfd775eacce
et_verity_enable_state_service.cpp
bac3474a8256cb32a29e8d46f78cad95a5502692 26-Feb-2015 Dan Albert <danalbert@google.com> Move adb to C++.

I keep trying to clean things up and needing std::strings. Might as
well just do this now.

usb_linux_client.c is going to stay as C because GCC isn't smart
enough to deal with the designated initializers it uses (though for
some reason it is in C mode).

The Darwin files are staying as C because I don't have a way to test
that they build.

The Windows files are staying as C because while I can actually build
for them, it's slow and painful.

Change-Id: I75367d29205a9049d34460032b3bb36384f43941
ndroid.mk
db.c
db.cpp
db.h
db_auth.c
db_auth.cpp
db_auth.h
db_auth_client.c
db_auth_client.cpp
db_auth_host.c
db_auth_host.cpp
db_client.c
db_client.cpp
db_client.h
db_io.cpp
db_listeners.c
db_listeners.cpp
db_main.c
db_main.cpp
ommandline.c
ommandline.cpp
onsole.c
onsole.cpp
ile_sync_client.c
ile_sync_client.cpp
ile_sync_service.c
ile_sync_service.cpp
ramebuffer_service.c
ramebuffer_service.cpp
et_my_path_darwin.c
et_my_path_linux.c
et_my_path_linux.cpp
et_my_path_windows.c
et_my_path_windows.cpp
dwp_service.c
dwp_service.cpp
emu_tracing.c
emu_tracing.cpp
emount_service.c
emount_service.cpp
ervices.c
ervices.cpp
et_verity_enable_state_service.c
et_verity_enable_state_service.cpp
ockets.c
ockets.cpp
est_track_devices.c
est_track_devices.cpp
est_track_jdwp.c
est_track_jdwp.cpp
ransport.c
ransport.cpp
ransport.h
ransport_local.c
ransport_local.cpp
ransport_usb.c
ransport_usb.cpp
sb_linux.c
sb_linux.cpp
sb_windows.c
sb_windows.cpp
9b1fd969a7b7f1c6f1ed19719f21d57001d3c461 09-Mar-2015 Dan Albert <danalbert@google.com> Merge "Fix a writex transcription error."
f3519a8747c8ea4dd56c7df51c67a714e89fa32c 09-Mar-2015 Dan Albert <danalbert@google.com> Fix a writex transcription error.

Change-Id: I71b11127d41ebac6caf68926089c5a3b99d8c21e
ile_sync_service.c
857d7db69d2aac03ea624a0401e7231a3cef4597 03-Mar-2015 Dan Albert <danalbert@google.com> Make the root/unroot test more robust.

* Check the current adb user to choose the order of root/unroot.
* Re-root the device when finished.

Change-Id: I47a14b89e2c405bd63722e4d2043fcc629fb5e58
ests/test_adb.py
abb80e0f95f43b3ca066d9f80f4fe060a87e3f80 03-Mar-2015 SungHyun Kwon <sh.kwon@lge.com> Fix memory leak on jdwp_process_free()

if many jdwp connection are created(), the memory will be leaked.

When it deletes heap memory on jdwp_process_free(),
the proc->fde just set to null.

so it need to free() in fdevent_destory().
devent.cpp
268eb4f3846d551c73eb4fc5a505f9a70d47b638 26-Feb-2015 Nick Kralevich <nnk@google.com> check if uid=0 before attempting remount

If "adb remount" is done without having done "adb root" first,
scary looking SELinux denials are emitted before the operation
eventually fails. Avoid the scary looking messages by refusing
remount attempts if we're not running with privileges.

Change-Id: I298621251a10e38345ef77875003a97c8b5a0270
emount_service.c
cc731cc76786b6bdc58764aad9924c0d0c8d645f 25-Feb-2015 Dan Albert <danalbert@google.com> Test readx/writex (now renamed).

Renamed readx/writex to ReadFdExactly/WriteFdExactly respectively.
These read/write a full fixed-size buffer. If the whole buffer cannot
be read/written, these functions return an error.

Rename write_string to WriteStringFully.

Move the TEMP_FAILURE_RETRY definition in sysdeps.h out of the
!Windows section. It seems Windows won't actually interrupt a call,
but it's easier to just define it than to #ifdef each call.

Change-Id: Ia8ddffa2a52764a2f9a281c96c937660e002b9b9
ndroid.mk
db.c
db_client.c
db_io.cpp
db_io.h
db_io_test.cpp
db_trace.h
ommandline.c
devent.cpp
ile_sync_client.c
ile_sync_service.c
ramebuffer_service.c
emount_service.c
ervices.c
ockets.c
ysdeps.h
ransport.c
ransport.h
ransport_local.c
7fd821e907c4ee25ea4bdf7643c38bd679efdaca 25-Feb-2015 Dan Albert <danalbert@google.com> Remove _(GNU|XOPEN)_SOURCE makefile cruft.

None of the functions that require these are used.

Change-Id: I10cffab127795b94340131f8737f7924b9138f9e
ndroid.mk
055f1aa4ff58ba71133d506b202ad46612758ded 21-Feb-2015 Dan Albert <danalbert@google.com> Add some basic tests to adb.

Change-Id: I946b5b1e5650540db3b4f75892214c4218b3baf3
ndroid.mk
ransport.c
ransport_test.cpp
dc0f8ecb24f3a392fa51c85eee5f7fbe14da3a1e 25-Feb-2015 Dan Albert <danalbert@google.com> Fix the mac build.

Change-Id: Ieb6f2650ce5f39f1d8c938d0ca8cbec459d8e2fd
sb_osx.c
72bf2a710089b5fff42059d5946fe7bdd6b12480 25-Feb-2015 Dan Albert <danalbert@google.com> Merge "Move transport declarations into transport.h."
7664901a355b959f312e9acff5a0fd31b7139623 25-Feb-2015 Dan Albert <danalbert@google.com> Move transport declarations into transport.h.

There are a few cloexec issues in here as an added bonus.

Change-Id: I1699d719d733f47878bdba0454230cf5ab6a60b6
db.c
db.h
db_auth.c
db_auth_client.c
db_client.c
db_listeners.c
db_main.c
ommandline.c
ile_sync_client.c
ile_sync_service.c
ramebuffer_service.c
emount_service.c
ervices.c
ockets.c
ransport.c
ransport.h
ransport_local.c
ransport_usb.c
sb_linux.c
sb_linux_client.c
sb_windows.c
103c1be03f8ce8e4b12c1f194a7881d3381ea897 25-Feb-2015 Dan Albert <danalbert@google.com> Add .clang-format file.

Not going to format the whole world just yet, but this helps for `git
clang-format`.

Change-Id: I482819419647e4c752d3b044bde8d637e1fae1e5
clang-format
5329d3fd54fa875bb7de78a8c40134cc63921c64 25-Feb-2015 Dan Albert <danalbert@google.com> Merge "Add a project wide clang switch."
9697ce520d47500a72c95bb7f688ff2f273c9070 21-Feb-2015 Dan Albert <danalbert@google.com> Add a project wide clang switch.

I'll probably make this the default soon, but I'm not brave enough to
do that without checking the recovery image first.

Change-Id: I9cde687b08a588e3797645a308f381e4ec553447
ndroid.mk
70385f3017366ecf06af7a073a2fb955e93d01ba 25-Feb-2015 Elliott Hughes <enh@google.com> Merge "Remove the emulator special case from the "adb root" code."
b2e57b738f4d24e59235738e74dc2f9a8f53f64e 21-Feb-2015 Dan Albert <danalbert@google.com> Make Python tests only check the current device.

In practice testing all connected devices is a pain, since it's
probably each device is running a different build. It would probably
make sense to just move this functionality up into a higher level test
runner (which could just live in main).

Also rename test_devices to test_shell, since it doesn't really test
`adb devices`.

Change-Id: Ie96d3e83b30acfac4e3bcbd9821690c0ad4d2f7e
ests/test_adb.py
fdf8722491cf5fd21b5d897578c24fec4bb62682 24-Feb-2015 Dan Albert <danalbert@google.com> Fix Mac build.

Prior to https://android-review.googlesource.com/#/c/134253/ the
makefile had assumed !Windows was the same as Linux, so the Mac was
actually getting all the Linux sources as well. I mistakenly didn't
add fdevent.cpp to the Darwin sources in that change.

Change-Id: I4e12a394e9a2baf7c1e3c711a01a6b5fccbf79d9
ndroid.mk
abd6773b41effd1e1005ad7ce8cb5e370a367302 24-Feb-2015 Elliott Hughes <enh@google.com> Remove the emulator special case from the "adb root" code.

The emulator is essential an "eng" build, so the regular properties
should suffice.

Change-Id: Id63b3918f9b0b04b0d887ed886535b9976a9cc85
db_main.c
88cf1c8c4ac986b89d90eed798f51fa007787db0 24-Feb-2015 Dan Albert <danalbert@google.com> Fix Windows SDK build.

Change-Id: I9c0f9c92c28867ff17f1ec83aac935d18348c335
ndroid.mk
3b967f52f2d859c736028b8c5983fd759c5e62b6 24-Feb-2015 Elliott Hughes <enh@google.com> Add missing <stdlib.h> to adb_listeners.c.

Change-Id: If9505880a33131b27bfaa19f3efd45c83a6810ed
db_listeners.c
a75b4935a4b667f0d37372db7559ecc6f8ee0b0d 24-Feb-2015 Dan Albert <danalbert@google.com> Merge "Move more into libadb and libadbd."
9f3540d017f881768ec3a317d3149edd6a50fab9 24-Feb-2015 Dan Albert <danalbert@google.com> Merge "Oops. Fix make variable name. Thanks again, make."
8ef39424e8ef58ea09addb4a1f3e7d1c45b30cb3 24-Feb-2015 Dan Albert <danalbert@google.com> Merge "Ignore another stupid lint warning."
b627a0e2ed63377c828b1f324dd0120fee4e4cd3 18-Feb-2015 Nanik Tolaram <nanikjava@gmail.com> Add more logging message and dead code

* Add more logging message to aid in easier debugging

* Remove unnecessary dead/commented code

Change-Id: I9c7fe8f6b674cab41601001458010ab176b89776
Signed-off-by: Nanik Tolaram <nanikjava@gmail.com>
ile_sync_client.c
ockets.c
sb_linux.c
3c43858986ff9b6804fb52029b9d12461f49fcae 21-Feb-2015 Dan Albert <danalbert@google.com> Move more into libadb and libadbd.

None of this needs to be shared with minadbd, but these sources are
still needed for anything linking libadb (such as tests).

Change-Id: I3024f714da42364bf27a991986f00676e2bbbf2c
ndroid.mk
bf10647b61704a8dbe01b7381ebed5aefaa074e0 21-Feb-2015 Dan Albert <danalbert@google.com> Oops. Fix make variable name. Thanks again, make.

Change-Id: Iecbb41acc835bb8eb20b668c89a3ff065470fcb7
ndroid.mk
db_listeners.c
f1591691ee12c9156f2ec9397cc6818542e39263 21-Feb-2015 Dan Albert <danalbert@google.com> Ignore another stupid lint warning.

Change-Id: I8e586e472a139cc3039f1371f8a99935d20aa0f0
PPLINT.cfg
7e84308b74e2757d19610aaf8653aa1e244b8149 20-Feb-2015 Dan Albert <danalbert@google.com> Merge "Lose adb.c and sockets.c to libadb."
e1ca623faa278a264981b088fb608b2a62727ab1 19-Feb-2015 Dan Albert <danalbert@google.com> Lose adb.c and sockets.c to libadb.

Also kill the device side libadb. This was added for the now dead
device side adb, and is no longer used.

Bug: 17626262
Change-Id: I3b28915641fd5b4f16fc86cf1f4f4e9711093001
ndroid.mk
18daa159ec5f8455f83dd87dad1a1ed1d2501b3e 19-Feb-2015 Dan Albert <danalbert@google.com> Merge "Document the behavior of props affecting adb root."
13f9c406d7ae58bb3f5c3ac0b0e50f8760c5cf46 19-Feb-2015 Dan Albert <danalbert@google.com> Document the behavior of props affecting adb root.

Change-Id: Icfdc3ba696556d6db64835e61dde6f40b491d1a7
db_main.c
6795cd8db5ffab674f2a477d8b7b8cc0e3ab406e 19-Feb-2015 Dan Albert <danalbert@google.com> Fix Windows adb build.

Change-Id: I560bedfcf77556b36acadc19f5dac71b3628ea2b
db.c
db_listeners.c
db_main.c
bd0b750897bebaa10e16507fdd08dbc746cd228d 19-Feb-2015 Dan Albert <danalbert@google.com> Move adb_main to its own file.

Change-Id: If6e98c089b39f73bd8f4a878a82669bfeee367f3
ndroid.mk
db.c
db.h
db_auth.c
db_auth.h
db_main.c
e9fca14c9e555a9d02e1d94ba6d3b290673ea26b 19-Feb-2015 Dan Albert <danalbert@google.com> Move the listener code into its own file.

Change-Id: I7332455ed1a213daedeaa4a81260edf08b2fd131
ndroid.mk
db.c
db_listeners.c
db_listeners.h
ransport.h
ba3a251749c88210949008ae26f8bc04812084c1 19-Feb-2015 Dan Albert <danalbert@google.com> Move the adb auth code into its own file.

Change-Id: I84cf0bd7777f0147119e7c6afc4096c2e93156a2
ndroid.mk
db.c
db.h
db_auth.c
db_auth.h
1403aa36b2d9d0c295402a935bb07ea661536fcb 19-Feb-2015 Dan Albert <danalbert@google.com> Merge "Move emulator tracing into its own file."
21c3eaf4cc46aa835531b0cf1e0ca177046a14ed 19-Feb-2015 Dan Albert <danalbert@google.com> Move emulator tracing into its own file.

adb.c is far too monolithic.

Change-Id: I4a9ee97927e4a96a38ea5859d84efac86bfdfc35
ndroid.mk
db.c
emu_tracing.c
emu_tracing.h
4c9d24a3edaa86df458b3c5937e77d07cd51e3a7 19-Feb-2015 Elliott Hughes <enh@google.com> Fix build.

Change-Id: I31fc562068ebbba5e9872ee91694feb611fc957f
db.c
8e16a7e2a3506b6f526a503bd03e3919235dde71 19-Feb-2015 Elliott Hughes <enh@google.com> Merge "adb: add "adb unroot" to restart adb in non-root mode"
9885881d0689e7999f2d7e7558e894dc73a0a0b0 06-Oct-2014 Dan Pasanen <dan.pasanen@gmail.com> adb: add "adb unroot" to restart adb in non-root mode

Change-Id: Ice6b94a71a62648ac073d129914a07372411fb25
db.c
ommandline.c
ervices.c
ockets.c
ests/test_adb.py
9449376328daa7c726ec693637fcdf1d3985640a 25-Nov-2014 Dan Albert <danalbert@google.com> Move USB transport code to libadb.

Also note that we need both a libadb and a libadbd (for now) to
differentiate between code using ADB_HOST=1 and ADB_HOST=0.

Bug: 17626262
Change-Id: I873a8fb442a8a69258fe39af17781714a8fae4f6
ndroid.mk
1ac334ec660292298917668a40fc5239b1fdaa56 18-Feb-2015 Dan Albert <danalbert@google.com> Merge "Add extern "C" to all the adb headers."
818fb4b448a44ef9f1db85f66415fde4b7a96aa6 18-Feb-2015 Dan Albert <danalbert@google.com> Add extern "C" to all the adb headers.

Change-Id: Iaefa3e18d6ee2e065eb97271a796613b2a8e7d6e
db.h
db_auth.h
db_client.h
db_trace.h
ile_sync_service.h
ysdeps.h
54ac73aa343f25391e7b3c2e56eacacfa868a8ea 18-Feb-2015 Dan Albert <danalbert@google.com> Ignore useless cpplint messages in adb.

Change-Id: I6411eb3963d215b228e50cd967a2174e5036ed73
PPLINT.cfg
a859219fec34ea0207c97a225c9f3fe451fc1209 03-Feb-2015 eric.yan <severecold@gmail.com> fix bug that passing invalid fd to fstats on win32 builds

lfd returned by adb_open is not the actual file desc.
on win32 builds. calling through fstat with invalid fd
will lead to crash, using stat instead.

Change-Id: I7fdc8b825162eaa42efe8755265842c300b00e39
Signed-off-by: eric.yan <eric.yan@yulong.com>
Signed-off-by: severecold <severecold@gmail.com>
ile_sync_client.c
187eade1279e592de7d3ac87f4924593f02c7ef6 03-Feb-2015 Elliott Hughes <enh@google.com> Remove netcfg's unused options.

Only "netcfg" for a list of interfaces and "netcfg <interface> dhcp" still
seem to be used.

Change-Id: I9f0b580474258fa648deb5287f98d8ec5533ca6f
db.c
c463025a19aff3f9f92cffa3de6462316e8407a7 03-Feb-2015 Elliott Hughes <enh@google.com> Revert "Remove netcfg's unused options."

This reverts commit f8e83054cb8a8b13ee84a4aeeaa0a2fd8debca81.

Change-Id: Iede772f96ff9008277df433dcbb5f6603de65283
db.c
f8e83054cb8a8b13ee84a4aeeaa0a2fd8debca81 02-Feb-2015 Elliott Hughes <enh@google.com> Remove netcfg's unused options.

Only "netcfg" for a list of interfaces and "netcfg <interface> dhcp" still
seem to be used.

Change-Id: Iaf499c06b09ffe5e0925339b9cd6e502f3234a86
db.c
506aea43618ec101917bb670b7487fa226e88233 31-Jan-2015 Elliott Hughes <enh@google.com> The bsddroid project has been dead since 2010.

And even if it wasn't, they should probably keep this stuff in their own
repository.

Change-Id: If9fa2e47ee2700098d8a99f6986f7e89fc6dfdf3
ndroid.mk
et_my_path_freebsd.c
sb_libusb.c
9c4c5a6ed934490ba0fcce661594975a6f4c2c89 28-Jan-2015 Sami Tolvanen <samitolvanen@google.com> Merge "Verify token length before adb signs it"
a034362be4dc69d3432d7587089d371dc871e811 28-Jan-2015 Elliott Hughes <enh@google.com> Merge "Make server port option work on windows"
0de77ffec6b4096f334bd45f48a6210915c6d1af 26-Jan-2015 Spencer Low <CompareAndSwap@gmail.com> adb: tracing: don't make strings if runtime tracing is disabled

If tracing was not enabled (the ADB_TRACE environment variable was not
set specially), writex() and readx() would still call dump_hex() which
would construct hex tracing strings, which would be immediately
discarded and not printed (because tracing is not enabled).

The fix is to only call dump_hex() if ADB_TRACING evalutes to true, the
same way that dump_packet() is only called if ADB_TRACING evaluates to
true.

Change-Id: I1651680da344389475ebdeea77ba1982960d5764
Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
ransport.c
7b9c20d3b2aad8b2f67de9478d3d44cc6deff52c 27-Jan-2015 Sami Tolvanen <samitolvanen@google.com> Verify token length before adb signs it

Currently, a host running adb will sign a token of any length passed
to it by a device, effectively acting as a signing oracle. If the
ADB_VENDOR_KEYS environment variable is used to specify an additional
key to use, this behavior is not only unexpected, but probably also
unwanted. Further discussion can be found from this thread:

http://www.metzdowd.com/pipermail/cryptography/2015-January/024423.html

This change adds a check to ensure token length matches TOKEN_SIZE
before it's signed, which prevents an attacker from signing longer
messages.

Change-Id: I7b2cc1f051941bf9b66e1c02980850bede501793
db_auth_host.c
f055c193b85b5bc077a4e278f84f33a266edccf7 25-Jan-2015 Spencer Low <CompareAndSwap@gmail.com> adb: Win32: set socket buffer sizes properly

On Windows, adb_socket_setbufsize() was taking a file descriptor value
from the compatibility layer in sysdeps_win32.c (namely, an index into
the _win32_fhs array) and passing it to the Winsock setsockopt() call,
which wants a Winsock SOCKET handle. Basically, adb_socket_setbufsize()
was passing `fd` instead of `_fh_from_int(fd)->fh_socket`, resulting in
adb effectively setting a socket buffer size on a random socket in the
process.

The fix is to introduce adb_setsockopt() which just calls setsockopt()
on non-Win32, and which uses the Winsock SOCKET handle on Win32. The
change also moves Win32 disable_tcp_nagle() to a header and adds an
extra sanity check to adb_shutdown().

Change-Id: I4354e818d27538f7ff5b0e70b28bdb6300e1b98b
Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
ommandline.c
ysdeps.h
ysdeps_win32.c
1f09bdaf598636095da97e4e0eb3df7b1630e16f 27-Jan-2015 Dan Albert <danalbert@google.com> Protect from eng vs userdebug build breaks.

Using a const bool rather than an ifdef means the compiler can still
protect us from breaking code paths that aren't included in every
build variant.

Change-Id: Ic45c8fb52cd66c3ce090d760cdb92104e31265f5
et_verity_enable_state_service.c
fe68578716290d93fd42005622adade8d345de3c 27-Jan-2015 Dan Albert <danalbert@google.com> Merge "Fix userdebug build."
030b76fc1d2884b8bafb2bdcd4d9947b351d627d 27-Jan-2015 Dan Albert <danalbert@google.com> Fix userdebug build.

Apparently this code I thought was unused is just unused for eng
builds...

Bug: 17626262
Change-Id: I2e5f411a2ead7f23d9f5822935de66c992750a03
ndroid.mk
et_verity_enable_state_service.c
4626b7105763f0f5d25343dc81523ff2e9bda180 27-Jan-2015 Dan Albert <danalbert@google.com> Fix win_sdk build.

Hadn't caught this in the previous submission because I tested the
build with another change on top of it that also fixes this.

Bug: 17626262
Change-Id: Ia40127618a5466e382081760d614ff7fc09d50a3
ndroid.mk
630b9afeb0d7f0e5e053db0f900cfb65d914cb1a 25-Nov-2014 Dan Albert <danalbert@google.com> Begin moving code from adb to libadb.

Much of adb is duplicated in bootable/recovery/minadb and fastboot.
Changes made to adb rarely get ported to the other two, so the trees
have diverged a bit. We'd like to stop this because it is a
maintenance nightmare, but the divergence makes this difficult to do
all at once. For now, we will start small by moving common files into
a static library. Hopefully some day we can get enough of adb in here
that we no longer need minadb.

Bug: 17626262
Change-Id: Ic8d5653bfcc0fec4e1acbece124402355084b864
ndroid.mk
db.h
devent.c
devent.cpp
devent.h
et_verity_enable_state_service.c
ysdeps.h
ransport.h
fb538fb13d930a7398695d1044ceaaf854949018 26-Jan-2015 Christopher Ferris <cferris@google.com> Merge "Fix the v2 descriptor handling."
c49f51c451516bf06afc6d71947eb11cc4627273 24-Jan-2015 Christopher Ferris <cferris@google.com> Fix the v2 descriptor handling.

There was a misinterpretation of how the v2 header works. The flags
in the header indicate what is in the rest of the structure.

Bug: 19127803

Change-Id: I5fa0dae6da51522c9afc4c94838eb6f462208683
sb_linux_client.c
943ef23b3de60c92a219e65aee35ae6242a461dc 26-Jan-2015 Spencer Low <CompareAndSwap@gmail.com> adbd: tcpip command uses port number from uninitialized memory

If you run `adb tcpip`, adbd tries to process a string of 'tcpip:' using
this code:

} else if(!strncmp(name, "tcpip:", 6)) {
int port;
if (sscanf(name + 6, "%d", &port) == 0) {
port = 0;
}
ret = create_service_thread(restart_tcp_service, (void *) (uintptr_t) port);

If a zero-length string is passed to sscanf(), it returns EOF (-1) which
causes the if statement to skip the block, leaving the port variable
uninitialized.

I found this by running `adb tcpip` and sometimes getting 'invalid port'
and sometimes a device would start listening on a random port number.

The fix is to check the sscanf() return value for the success case (the
number of items successfully parsed), as is already done in other parts
of the adb code. I also fixed-up another instance of the same
code-pattern in services.c.

Change-Id: I8c9c33485ad076828da0ac74f048fdad561669d3
Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
ervices.c
1bc38a4cdc74f477b99185125089f20411baf431 23-Jan-2015 David 'Digit' Turner <digit@google.com> Merge "adb: Fix 'adb forward --no-rebind'."
f0e0c2e458580129a02b383f1eccc0984fcc0966 22-Jan-2015 David 'Digit' Turner <digit@google.com> adb: Fix 'adb forward --no-rebind'.

Due to a typo, the --no-rebind option never worked (it always failed).
The root of the problem was that the client was sending on the wire
a command like:

host:forward:norebind::tcp:<port>;tcp:<port>
^^
Instead of:

host:forward:norebind:tcp:<port>;tcp:<port>
^

Note the erroneous double-column.

The fix is local to the adb client and thus doesn't require a new
version of the server or guest adbd on the device-side.

This also fixes 'adb reverse --no-rebind'.

See https://code.google.com/p/chromium/issues/detail?id=451109

Change-Id: I680fd432b5470072f6a9968ca32a7f90c600ac68
ommandline.c
d83a9c55f46017627821787b6405b75682f1d391 09-Dec-2014 Riley Andrews <riandrews@google.com> Python unit test for adb.

Change-Id: I1b2b8004f47b708e6a1d6a4ad20816e7beb21a0f
ests/test_adb.py
0a049b1d8dbb1877fd9cd3ca7c3f39e72b3b6c04 12-Jan-2015 Elliott Hughes <enh@google.com> Clean up adb Win32 symlink #ifdefs.

Change-Id: I83ef30e82d820f91960c29f6b737e6e900caaca6
ile_sync_client.c
ile_sync_service.c
fdb3da5953b70dc87a05d28c31cb0dc06b8181aa 06-Jan-2015 Yabin Cui <yabinc@google.com> Merge "Use getmntent when accessing /proc/mounts."
d6bd9bf45968cb97ed88a4e06c40a127625897b1 02-Jan-2015 Yabin Cui <yabinc@google.com> Use getmntent when accessing /proc/mounts.

Bug: 18887435
Change-Id: I6d7f95bbdb976428d4722bd640745e73c9839160
emount_service.c
13449cd71464c3a644109c469a77bd7fd56c8af8 02-Jan-2015 Sami Tolvanen <samitolvanen@google.com> Fix disable-verity when the underlying block device is RO

If verity is enabled and the underlying block device is marked
read-only, disable-verity fails. We cannot use the existing code
for enable-verity to make the device writable as the device in
/proc/mounts will be the verity device instead of the underlying
device we want to change. This change makes the correct device
writable when altering verity state.

Change-Id: I423ee50fb34d78cff2fe843318b9081c03c5142d
db.h
emount_service.c
et_verity_enable_state_service.c
2bd412425981c590f6de6e16848b7c59c173c18d 12-Dec-2014 Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org> Fix build with clang

Remove 2 unused functions and 1 unused label in the
!ALLOW_ADBD_DISABLE_VERITY case

Change-Id: Id6b29f57bcb95e54f5a4014021d47d8ca6e4556e
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
et_verity_enable_state_service.c
4d04d24b9e668fa532782e7c9e53bb9f66ecd1ab 12-Dec-2014 Riley Andrews <riandrews@google.com> fix memory leak in copy_remote_dir_local

Bug https://code.google.com/p/android/issues/detail?id=82436


Change-Id: I4bfa865638742e1b7cedd17f5b33dcc10c7f711c
ile_sync_client.c
058932c4ff89b7d42734cba0a7aa7805c2859a11 10-Dec-2014 Chih-Hung Hsieh <chh@google.com> Remove unused local variable.

Clang compiler gives it a warning and error.

Change-Id: Id35b740e265b393b5e31e05bd83544f391d8ff08
emount_service.c
98f58e83c0f2a282c70706f9cc3c25edc7a2e756 06-Dec-2014 Riley Andrews <riandrews@google.com> Fix some style issues in adb_commandline().

Change-Id: I8ed7899e7e137405594b3f3cbb0a87eae411dfc9
ommandline.c
c8514c886e2103d1c4f3f74d5a94472396615b3b 06-Dec-2014 Riley Andrews <riandrews@google.com> Refactor the host adb argument parsing loop to remove a goto

Change-Id: I3412ac473abc4efa51a6275658e65f7191b5439d
ommandline.c
1d931bca26331c82777a1a75579a2d7405d5c49b 04-Dec-2014 Paul Lawrence <paullawrence@google.com> Fix build

(cherry-pick of 731136ca36bb7af1490856373d463e3a6c4df1c8.)

Change-Id: I9b493fd5fc5c5f62f02bc5234ccca2a5118380b4
et_verity_enable_state_service.c
982089d83879c768eac3fd36f19665463a550b53 04-Dec-2014 Paul Lawrence <paullawrence@google.com> Add adb enable-verity

Note that it is *easy* to break your phone with this feature. It is
not a bug that reenabling verity after changing one byte of the system
partition stops the device booting.

(cherry-pick of 7c442e1700e6312727283db402dec6f666f1b55a.)

Bug: 18529433
Change-Id: I632e91281884471a362960f1ba30312d2669b8ff
ndroid.mk
db.h
ommandline.c
isable_verity_service.c
emount_service.c
ervices.c
et_verity_enable_state_service.c
ec900bba20630934dc51a1b3a57d6d7a30fed325 09-Oct-2014 Paul Lawrence <paullawrence@google.com> Revert "Revert "Enable verity on userdebug, and add disable-verity to adb""

This reverts commit 152d2d4234ba89e0c20c4af13e291b6049a7bc33.

Fixed build error, and also fixed memory leak spotted from warning.

(cherry-pick of bbb36319119edde9377fb80015235893c30d2bc9.)

Bug: 17691572
Change-Id: I23b5ba537f7b557432041d4338b38b9be434e981
ndroid.mk
db.h
ommandline.c
isable_verity_service.c
ervices.c
34637555c25a6663658b1ff45e98272b10b449f4 27-Oct-2014 Paul Lawrence <paullawrence@google.com> adb warns on remount when verity is enabled

(cherry-pick of f643beced1d154726dca7115014d2d1fdfcca993.)

Bug: 18119147
Change-Id: I75e5edf83fa01dbf2495e24df4597dce41f13654
emount_service.c
ab3446dd3400652ecf50682d0e5c4184628e9930 28-Oct-2014 Badhri Jagan Sridharan <badhri@google.com> adbd & fastbootd: Support for new f_fs descriptor format

The patch "[RFC] usb: gadget: f_fs: Add flags
to descriptors block" marks the current
usb_functionfs_descs_head format deprecated
and introduces support for sending SuperSpeed
descriptors.

This CL makes adbd to send Descriptors in the
new format. Adbd would fall back to the old
format, if kernel is not able to recognize
the new format. This is done to prevent
adbd from breaking in the older versions
of the kernel.

(cherry-pick of fad60336daa5a7adf82d8140cbddd1c735770e71.)

Bug: 17394972
Change-Id: I05095ccdcc74bf6953cbef847d7583eab137e12e
Signed-off-by: Badhri Jagan Sridharan <Badhri@google.com>
sb_linux_client.c
298b6c70a084e87e688d19d1b3d609410121cf1d 23-Aug-2014 leozwang <leozwang@google.com> Fix build on mac.

On mac require a case.
Also, this code is not portable, will fix it in long run.

(cherry-pick of 0f1fda9ee80ba086e4c8960a7d153798e3cf3285.)

Change-Id: I76194b62cea29bd3d21c7ba6c3da4d549bea4738
ysdeps.h
cbf0267f5b508f6933631e661a5be86f0bd89ed1 15-Aug-2014 leozwang <leozwang@google.com> Add more debug information.

Re-commit https://googleplex-android-review.googlesource.com/#/c/519430/
Add fix for win_sdk build.

Add socketpair debug log.
Also output thread information in log on host side.

(cherry-pick of adb09fa01a16d8c5c92c2f8d325e1678c531223f.)

Change-Id: I21021bc111a3f7362a91b70593e3738125878118
db.h
db_client.c
db_trace.h
devent.c
dwp_service.c
ervices.c
ysdeps.h
ransport.c
67a7a4ae274ebd873a78e791b96da35a210db0cc 06-Nov-2014 Christopher Ferris <cferris@google.com> Fix adb/fastboot windows compilations.

Many of the windows files where not including stdlib.h even though they
are using malloc/free calls.

(cherry-pick of ae7bf0959bd3f79afbf365e41f015ed1c304afdc.)

Change-Id: If6959df9909d9d9928e9f4a2a96018166361cf3c
db_auth_host.c
ysdeps_win32.c
sb_windows.c
02ef15f1d7cc6f47b041eb34e7d9d2ef37ff866d 10-Dec-2014 Elliott Hughes <enh@google.com> Merge "Introduce "adb keygen""
dbb7c46d686e55aabd52a8e4c5494768c8955a2f 08-Dec-2014 Elliott Hughes <enh@google.com> Merge "ADB on linux: Handle USB SuperSpeed extra Descriptors"
bea3f9c345073069151c9000cd506b9e46b26250 14-Nov-2014 Nick Kralevich <nnk@google.com> Introduce "adb keygen"

Introduce the "adb keygen" command.

Usage: adb keygen <filename>

This command creates an adb public/private key pair in a user
specified file. This can be used to create new adb keys, or rotate
existing keys.

Modify adb's key generation routines to use the HOSTNAME/LOGNAME
environment variables if available. This allows someone to override
the username/hostname embedded within the adb public key file if
desired. Fallback to the old mechanisms if those environment
variables aren't available.

Bug: 18342715
Change-Id: Ibccee6088d4609aa05ad6687d3a1d8a8689d3e8a

(cherry picked from commit af782b9f2ac4fb817ded80d4317a45345bb3f992)

Change-Id: Ic76ffc9412171dddc879af0bbf6e20fbe1a8f057
db_auth.h
db_auth_host.c
ommandline.c
a5e9b065efcd2ee91a7a9bee4a44d85c5d30cf13 08-Dec-2014 Elliott Hughes <enh@google.com> Merge "adb: enable superspeed support"
d6ee9f26a5163af4121f4380264fcbd4e6851a17 02-Sep-2014 Zhuang Jin Can <jin.can.zhuang@intel.com> adb: enable superspeed support

Change-Id: I5a350bfa5641365d7a0939d89c6f477c335e948a
Signed-off-by: Zhuang Jin Can <jin.can.zhuang@intel.com>
Signed-off-by: Robert Chiras <robert.chiras@intel.com>
sb_linux_client.c
b79a2d55f7c514357da3486a1d72b3fe31661207 07-Dec-2014 Trevor Drake <trevordrake.gerrit@gmail.com> Clean up adb/Android.mk

Removed redundant LOCAL_C_INCLUDES.
Switch from using libunz to libz

Change-Id: Ic90c582fa56453bbac09561158e73f240dd47503
ndroid.mk
023bc0a426d0500904d5a9d2ddf4b7dfecf9ce6a 03-Dec-2014 Elliott Hughes <enh@google.com> Merge "Fix deadlocks."
97ac0e1bb42ddd17c75691ecbe1df8a6520d4c81 22-Nov-2014 Elliott Hughes <enh@google.com> Kill HAVE_BIG_ENDIAN, HAVE_ENDIAN_H, and HAVE_LITTLE_ENDIAN.

Change-Id: I9e25ac9d27e95b04fb8bf7a66c619af0139d8b8f
db.h
ile_sync_service.h
ransport_local.c
ransport_usb.c
8432ddc822ac98f64ae87a2b1352bf76ffc6c90e 21-Nov-2014 Ajay Dudani <adudani@codeaurora.org> system/core: Remove AID_GRAPHICS from adb groups

Remove AID_GRAPHICS from adb access groups to limit framebuffer
access.

Change-Id: I7fc6dca8b02a45d67d1ecc4a4daf6c38741ffb94
db.c
c66aed8a14ac6227378c90085d8e42625ceabf9e 21-Nov-2014 Elliott Hughes <enh@google.com> Remove the adb usb vendor id whitelist.

If there are bad vendors, we should blacklist them. Whitelisting the entire
world is crazy.

Change-Id: I1f4c27fd34fc420e2a3b4b2c8749198030db69f1
ndroid.mk
db.c
sb_vendors.c
sb_vendors.h
97e1e1704245d4c2edd8a9e155669aaae7341b7d 21-Nov-2014 Elliott Hughes <enh@google.com> Merge "Disable vendor id filtering for OS X."
0750f78659758352490e599d057a39dc44e93340 21-Nov-2014 Elliott Hughes <enh@google.com> Merge "Remove explict use of ASCII encoding"
01d49e854fa09a776c9673b229efcfa2d53adfea 21-Nov-2014 Elliott Hughes <enh@google.com> Merge "adb: Add USB vendor ID for Ubiquiti Networks, Inc."
2a4b5f9e804f019c0d565c86579f07963989ed1b 21-Nov-2014 Al Sutton <al@funkyandroid.com> Remove explict use of ASCII encoding

Replace the use of CFStringGetCString with kCFStringEncodingASCII specified
with CFStringGetFileSystemRepresentation which will ensure the correct
character encoding is used to conver the CFString into a NULL terminated
char array suitable for use with POSIX APIs.

Change-Id: Ibab1dc05c4f4db8604d329a493b4241992b8e69d
et_my_path_darwin.c
8e01cc6e0be65b395e226301f2f45a9cc6f10cf9 21-Nov-2014 Al Sutton <al@funkyandroid.com> Disable vendor id filtering for OS X.

Companion patch for change I2bf583a27f9a3f98ef006ea62b906a4f89960507.

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

Change-Id: I380cc80f96addc5057660efb2179b35f9378886a
sb_osx.c
aa3e17e1b685218cddeb7a05e68ff1721a322147 20-Nov-2014 Elliott Hughes <enh@google.com> Merge "Return path including executable instead of without"
26b53bb75e6bdf9aa7820a3343845dae145625cc 20-Nov-2014 Al Sutton <al@funkyandroid.com> Return path including executable instead of without

The previous implementation returned the path the executable was in instead
of returning the path including the executable (i.e. it returned ...bin
instead of ...bin/executable). This is not what the original methods did
and caused the process forking of adb to fail.

This patch corrects the implementation.

Change-Id: Ib58497cab35706041f170c1bc97c31fd5d965f90
et_my_path_darwin.c
55664906a89058ae8d7521e20b24273508f6bf9b 20-Nov-2014 Elliott Hughes <enh@google.com> Disable vendor id filtering for Linux.

It's time we switched to blacklisting any problematic devices rather than
slowly whitelisting the entire world. This seems to work for me, but let's
see how other people get on before coming back to actually remove the list.

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

Change-Id: I2bf583a27f9a3f98ef006ea62b906a4f89960507
ransport_usb.c
sb_vendors.c
f456d47c506d87265ce0ff6080cba5374dced011 19-Nov-2014 Al Sutton <al@funkyandroid.com> Fix building on modern versions of Xcode and OS X.

Recent versions of XCode fail to compile the adb and fastboot binaries due to
two functions being deprecated in 10.9 (GetCurrentProcess and
ProcessInformationCopyDictionary), and the use of -Werrror.

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

Change-Id: I855bf26aff45093ca9022924f3ecd1b80f2305a8
et_my_path_darwin.c
868cf42557fc9ce96ffa90886f014a8f2e60e1ff 03-Oct-2014 Jeremy Chang <jeremy@ubnt.com> adb: Add USB vendor ID for Ubiquiti Networks, Inc.

Change-Id: Iedb86b9ff8dc55aea5d0df201a98c96418002207
Signed-off-by: Jeremy Chang <jeremy@ubnt.com>
sb_vendors.c
0655d38b0c998f294ad52f1f8e84233a48046e97 18-Nov-2014 Elliott Hughes <enh@google.com> Merge "Revert "adb: Add USB vendor ID for Honeywell""
3e01bb85d622ae87956c8be78e8ccb82f20b5fd8 18-Nov-2014 Elliott Hughes <enh@google.com> Revert "adb: Add USB vendor ID for Honeywell"

This reverts commit 8c4c8e8988411449ecb2f50c25d3e4188e81e7c0.

Change-Id: Ia1cad862f42e5bea3174ed2cc0eea5232fc0a858
sb_vendors.c
d325e866c438ac63305bf0f48bbaa95d1b6bd8ec 17-Nov-2014 Yabin Cui <yabinc@google.com> kill HAVE_TERMIO_H

Bug: 18398307
Change-Id: Idbb89a074cdf16869cae3f667e89472781f37a5f
ommandline.c
e77b6a08623bba383ce55cd6653bec76cdf57792 11-Nov-2014 Yabin Cui <yabinc@google.com> kill HAVE_FORKEXEC

Bug: 18317407
Change-Id: I4eecb3c9d745e3dabfc46fa595aac7f94f6d93e3
db.c
ommandline.c
ervices.c
2655256570b7c1c5af6d886735835eecb99f45f2 05-Nov-2014 Elliott Hughes <enh@google.com> am 452f08a0: Merge "Add razer usb vid for future use with adb"

* commit '452f08a0b78e65cbd7e4cddac133e59f94d5db4c':
Add razer usb vid for future use with adb
3410d33dc497ec61c2a106d4e5802671ed6ecb06 03-Nov-2014 Stuart Wells <stuart.wells@razerzone.com> Add razer usb vid for future use with adb

Change-Id: I6b76c297de900da050473b764517cfd15c64b838
Signed-off-by: Stuart Wells <stuart.wells@razerzone.com>
sb_vendors.c
cb3739b5453ffaa64daa47bd7db824f58481f9d5 20-Oct-2014 JP Abgrall <jpa@google.com> am 7e38ab47: am 951c48c5: Merge "adb: Add USB vendor ID for TrekStor GmbH"

* commit '7e38ab476f808f84f0755ccbceb4cd7d8a1982a3':
adb: Add USB vendor ID for TrekStor GmbH
4fa99e542f00be3e1dab52e803facd840486c074 20-Oct-2014 Thorsten Koroscha <t.koroscha@trekstor.de> adb: Add USB vendor ID for TrekStor GmbH

Change-Id: I1d7fc14e691b4ab504c5205b21c93939499cdff9
Signed-off-by: Thorsten Koroscha <t.koroscha@trekstor.de>
sb_vendors.c
f17c42f68a3b176aef40f0977f5212fed80577f4 02-Oct-2014 Stephen Hines <srhines@google.com> am 2f431a8d: Fix windows-specific error without messing up Makefile flags.

* commit '2f431a8d5a1c2029af470a7336751a555131ee51':
Fix windows-specific error without messing up Makefile flags.
2f431a8d5a1c2029af470a7336751a555131ee51 02-Oct-2014 Stephen Hines <srhines@google.com> Fix windows-specific error without messing up Makefile flags.

Bug: 14416410

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

Change-Id: I29504ba3a184a85c6636d06c2ad900828fdb5436
ndroid.mk
ysdeps.h
ysdeps_win32.c
sb_windows.c
d2ee70758627cd67c9e393f6ae7f453093a1c957 02-Oct-2014 Stephen Hines <srhines@google.com> am 3ea87c33: Fix build breakage for missing -Wcpp option on old GCC versions.

* commit '3ea87c33a1c6e940322f5436cf0dd70a0bdadd75':
Fix build breakage for missing -Wcpp option on old GCC versions.
3ea87c33a1c6e940322f5436cf0dd70a0bdadd75 02-Oct-2014 Stephen Hines <srhines@google.com> Fix build breakage for missing -Wcpp option on old GCC versions.

Bug: 14416410
Change-Id: Ib30c3739d50d6122b3b4643051c72f2fa4985686
ndroid.mk
1e95e0b19cd265088286940def38d27305f847af 02-Oct-2014 Stephen Hines <srhines@google.com> am 64f44b84: Merge "Remove obsolete reference to ddk; Fixes for -Werror" into lmp-dev

* commit '64f44b8444dabd69cf391d42e10d44e8e926a79d':
Remove obsolete reference to ddk; Fixes for -Werror
64f44b8444dabd69cf391d42e10d44e8e926a79d 02-Oct-2014 Stephen Hines <srhines@google.com> Merge "Remove obsolete reference to ddk; Fixes for -Werror" into lmp-dev
43aecc543619de2d72529ab75fd5fb645cfd55fa 30-Sep-2014 Vince Harron <vharron@google.com> am c75dac39: Merge "fix for adbd pinning CPU" into lmp-dev

* commit 'c75dac394e3fcd9760841a820d8a0c93dd0c276e':
fix for adbd pinning CPU
b75d6f1429edf41cd15772a8d9d3a96f84a21862 07-May-2014 Andrew Hsieh <andrewhsieh@google.com> Remove obsolete reference to ddk; Fixes for -Werror

Bug: 14416410

1. The new mingw-w64 toolchain x86_64-w64-mingw32-4.8 has ddk
in x86_64-w64-mingw32/include/ddk
2. Add -Wno-error=cpp to suppress a warning that turns into error
thanks to -Werror:

Please include winsock2.h before windows.h
3. Cast GetLastError() return type DWORD to "int"
4. Include direct.h for _mkdir
5. Include stdint.h for uint8_t on Windows

Change-Id: I4bec0587f6573692f08c760da6c98ae551b8b5eb
ndroid.mk
ommandline.c
ysdeps.h
ysdeps_win32.c
1f88f8ef32d6468cf8096a41a36420117f56cc36 26-Sep-2014 Alex Klyubin <klyubin@google.com> am 9005ec37: am e3d3016d: Merge "Switch from using base64 BIOs to encoding funcs."

* commit '9005ec378ecd281f52945b5baca87245543bbfbf':
Switch from using base64 BIOs to encoding funcs.
e3d3016d46f53a75d4ae94fcbcb95a5593eb00a0 26-Sep-2014 Alex Klyubin <klyubin@google.com> Merge "Switch from using base64 BIOs to encoding funcs."
af436b1e10bed3b89880b3bd4f3031ea14057def 26-Sep-2014 Vince Harron <vharron@google.com> fix for adbd pinning CPU

adbd was spinning between select & read (0 bytes) for an adb_auth
socket. The read documentation states: "On success, the number of
bytes read is returned (zero indicates end of file)" so the code has
been modified to close the connection (like the read error case).

BUG=17419868

Change-Id: I1d8fb70c8e1876225ba8d47ea0a2b6265a7d182b
db_auth_client.c
736fd4a870781b9cf8a59c95fac8a518a462c49a 26-Sep-2014 Dan Albert <danalbert@google.com> am 8e1e5415: am 5b4a1767: Merge "Revert "Switch adb to epoll(2).""

* commit '8e1e54154bc7a5e9dee206735474186c2276b111':
Revert "Switch adb to epoll(2)."
45741ae2ea7883dcfb5062d34707f4699e0716ca 26-Sep-2014 Dan Albert <danalbert@google.com> Revert "Switch adb to epoll(2)."

This reverts commit 67de1557b0aa53b07a96d24734f165238f7415b3.
devent.c
0ab784d4707e88405fd85d6467487bf2ee9d84a0 23-Sep-2014 Elliott Hughes <enh@google.com> am 790e7c0a: am 3772545c: Merge "Switch adb to epoll(2)."

* commit '790e7c0ac46bca5ad511ba8764bbb0e9646c6f2a':
Switch adb to epoll(2).
67de1557b0aa53b07a96d24734f165238f7415b3 22-Sep-2014 Elliott Hughes <enh@google.com> Switch adb to epoll(2).

Bug: 17588403
Change-Id: I2590f5e7dd4e178ff4f743609c5ef0155b1015a1
devent.c
edda73d0c8aa52500199ed17781b9a9e83b1dfa7 08-Jul-2014 Doug Zongker <dougz@google.com> fix windows build

(cherry-picked from commit 4b39c6aca973470812caf4f7911b494c891e0c3a)

Change-Id: Ia7b236f1a915630fe85d488072efb9784ba10dad
ommandline.c
d372c5c36510b99254b031d3fd5958e246a85544 16-Sep-2014 Kenny Root <kroot@android.com> Merge changes I11e84a7b,I5adaedd8

* changes:
adb: fix 64-bit build
add sideload-host mode to adb
52e0b619990cce8becc20d16530ddd91334eff84 07-Jul-2014 Colin Cross <ccross@android.com> adb: fix 64-bit build

strlen returns a size_t, but the * modifier in printf expects an int.
On arm64 size_t != int.

(cherry-picked from commit 6d6a898b0c4e0283569209ba74bd7dbf49da73a2)

Change-Id: I11e84a7b62c935162abc0aba910d14e63d11efd3
ommandline.c
8e49ae4bb8c7a58d03b9907e0b14a7305a4af526 27-Jun-2014 Doug Zongker <dougz@google.com> add sideload-host mode to adb

The sideload-host mode turns the host into a server capable of sending
the device various pieces of the file on request, rather than
downloading it all in one transfer. It's used to support sideloading
OTA packages to devices without the need for them to hold the whole
package in RAM.

If the connected device doesn't support sideload-host mode, we fall
back to the older sideload connection.

(cherry-picked from commit 71fe584a1a7256c057267ae46a35f7c74d1d549e)

Change-Id: I5adaedd8243dc3b76414bba0149879ca2bbf35fa
db.h
db_client.c
ommandline.c
a5ab96eb50f27989240ab8917e8ebf3a028bcdfb 11-Sep-2014 Esteban de la Canal <estebandlc@google.com> 74602: Fixes adb not seeing connected devices on Mac.

Every alternate time an adb server was started already connected devices were
not being seen. This was caused by opened usb connections being "stalled".
See this thread for more information: http://lists.apple.com/archives/usb/2011/Jun/msg00050.html

Change-Id: Ic35b7a66c3f14a837b960066557f44e105609dcb
Fixes: https://code.google.com/p/android/issues/detail?id=74602
sb_osx.c
da5b2d67faeb2a85f042cf5b23d9875ad3413183 12-Sep-2014 Esteban de la Canal <estebandlc@google.com> am 99bb69c1: am f41ee3d5: Merge "74602: Fixes adb not seeing connected devices on Mac."

* commit '99bb69c1cee678382bf5e48962aa444469b3310e':
74602: Fixes adb not seeing connected devices on Mac.
f41ee3d5a1f236b0770d1ebd7068606aea7288bd 12-Sep-2014 Esteban de la Canal <estebandlc@google.com> Merge "74602: Fixes adb not seeing connected devices on Mac."
9dd83dc96e2f4d86093bc64d934d6c60c18d1edb 11-Sep-2014 Esteban de la Canal <estebandlc@google.com> 74602: Fixes adb not seeing connected devices on Mac.

Every alternate time an adb server was started already connected devices were
not being seen. This was caused by opened usb connections being "stalled".
See this thread for more information: http://lists.apple.com/archives/usb/2011/Jun/msg00050.html

Change-Id: Ic35b7a66c3f14a837b960066557f44e105609dcb
Fixes: https://code.google.com/p/android/issues/detail?id=74602
sb_osx.c
8fa75e44f182afb9eddeb11dbb67e78397165bab 10-Sep-2014 Elliott Hughes <enh@google.com> am 6608a46c: am c4ff0389: Merge "adb: Add USB vendor ID for Alco Digital Devices Limited"

* commit '6608a46c59abd72bd42a5104937fb276b6b0ccbd':
adb: Add USB vendor ID for Alco Digital Devices Limited
553630e4233251f905ffc90e44cdc6f4f16f39e7 10-Sep-2014 DanielMo <DanielMo@fih-foxconn.com> adb: Add USB vendor ID for Alco Digital Devices Limited

Change-Id: I50d343d583e688e9f8a72d1c61618b384e310fe1
Signed-off-by: DanielMo <DanielMo@fih-foxconn.com>
sb_vendors.c
84e533d7b06de2dfd2a40b577ef22877e0e499af 09-Sep-2014 Jeff Sharkey <jsharkey@android.com> am 228f8261: Merge "delete_file() should force removal." into lmp-dev

* commit '228f8261fd778e1c03184b5f79f979d1a25abf50':
delete_file() should force removal.
41b3cfa29602d5f5065e7eafc25692cd75dc1871 09-Sep-2014 Jeff Sharkey <jsharkey@android.com> delete_file() should force removal.

It's a shell command with a pty, but it's not really interactive,
so force the removal to avoid giving users dead-end prompts.

Bug: 17339227
Change-Id: Iaf5d95c49f032066aa741a711a2c45557d93c598
ommandline.c
fb849bd46e28bd47a0545cf56d6683d138f5f09d 06-Sep-2014 Christopher Ferris <cferris@google.com> am fc8e16bf: am 2c805883: Merge "Add -Wno-deprecated-declarations to makefiles."

* commit 'fc8e16bfc59fcebaf554e266aae808eed5f2d078':
Add -Wno-deprecated-declarations to makefiles.
2c805883408339823d3f3ca23aceb08a1783ebbd 06-Sep-2014 Christopher Ferris <cferris@google.com> Merge "Add -Wno-deprecated-declarations to makefiles."
6d94763b2fd88a66197927d3233eff91e2b8044a 06-Sep-2014 Chih-Hung Hsieh <chh@google.com> am 379ca94d: am 299a32c8: Merge "Include ADB_HOST only code in #if ADB_HOST."

* commit '379ca94d00cab91a77ad8991cc92e2b4d4236d56':
Include ADB_HOST only code in #if ADB_HOST.
299a32c8038d4152b302948e5b961f2fcc04f6b2 06-Sep-2014 Chih-Hung Hsieh <chh@google.com> Merge "Include ADB_HOST only code in #if ADB_HOST."
f787b381b6a304415030ed54bdba6ca482763e4c 06-Sep-2014 Chih-Hung Hsieh <chh@google.com> Include ADB_HOST only code in #if ADB_HOST.

BUG: 17409892
Change-Id: Ic1199dd745191aba718fdb18343e87c0ccbe530b
db.c
709569febf97ab2f3c94a28c42cce06ebf56114c 06-Sep-2014 Elliott Hughes <enh@google.com> am 0dcc3f65: am 9c814648: Merge "Add USB Vendor ID for Micromax Informatics Ltd."

* commit '0dcc3f65b1ff5fa771618436ee4bfdd44cd2f672':
Add USB Vendor ID for Micromax Informatics Ltd.
4d10523be8a6a1aec8228c82ca57477d575f964d 28-Aug-2014 Abhishek Karmakar <abhishek.karmakar@micromaxinfo.com> Add USB Vendor ID for Micromax Informatics Ltd.

Signed-off-by: Abhishek Karmakar <abhishek.karmakar@micromaxinfo.com>
Change-Id: I63462eb15575cc953ac0246ee5d4c883d3678c08
sb_vendors.c
179d9d6587ff4c46746ea8df5c8a6ffe3f1cda3f 03-Sep-2014 Adam Langley <agl@google.com> Switch from using base64 BIOs to encoding funcs.

The OpenSSL base64 BIO is going away in BoringSSL. This change switches
to using the explicit base64 functions which are availible in both
OpenSSL and BoringSSL. The BoringSSL helper functions (i.e. for
calculating the size of the base64 encoding) are wrapped in #ifdefs so
that this change isn't coupled with the switch to BoringSSL. Once that
switch is complete, the #ifdefs can be removed.

Bug: 17409664
Change-Id: I42bac3bc93a1fb39feed39a8917d8e38d97629d3
Signed-off-by: Adam Langley <agl@google.com>
db_auth_host.c
51448eb39ef28b6c0314668ce22aa1f4aa116e8d 04-Sep-2014 Christopher Ferris <cferris@google.com> Add -Wno-deprecated-declarations to makefiles.

This is in preparation for an update to the uapi v3.16.1
kernel headers that marks the structure usb_functionfs_descs_head
as deprecated.

Change-Id: I25d2f32ce8e95e038e6df201ce2f8126f5a8b6fa
ndroid.mk
0c3d98b02b74fc64c78e57c07ae6b81eff3a8888 15-Aug-2014 Ying Wang <wangying@google.com> am 87ad7cdc: am e1ba39aa: Merge "Fix 64-bit host build."

* commit '87ad7cdc590aa4033f0b7ae23d83e2fbc119d07a':
Fix 64-bit host build.
42a809ba0626d089441fcef398297aa44013d53c 15-Aug-2014 Ying Wang <wangying@google.com> Fix 64-bit host build.

Bug: 13751317
Change-Id: Ibf62935b7d12a55ffc57242a26a2581b52796847
sb_osx.c
e772705a598a8d2a13fb9d8386d06441b67f804f 06-Aug-2014 Elliott Hughes <enh@google.com> am 771f6f29: am 29c5a78f: Merge "Fix build of adb with gcc-4.9."

* commit '771f6f299f16704b251d6adb8fb185c8fb517d07':
Fix build of adb with gcc-4.9.
678bd2e8225ccebe678430d4095b7fc78253bcf8 06-Aug-2014 Alexander Ivchenko <alexander.ivchenko@intel.com> Fix build of adb with gcc-4.9.

Without this patch we get:

system/core/adb/commandline.c:1629:16: error: array subscript is above
array bounds [-Werror=array-bounds]

Signed-off-by: Alexander Ivchenko <alexander.ivchenko@intel.com>

(cherry picked from commit 53723338858772a0189aa3f92f4d4bbdaa9b6772)

Change-Id: I920c1de933ce5ba0a0d57eb8a9b557325a767a2a
ommandline.c
8a01917da13ba9ed66a8dd2adec33aaf38845c00 06-Aug-2014 Brian Carlstrom <bdc@google.com> am 46a8ffe8: Fix Windows adb build by avoiding "bool"

* commit '46a8ffe87f3cba070fb18a90e3c5c1f73468f99c':
Fix Windows adb build by avoiding "bool"
46a8ffe87f3cba070fb18a90e3c5c1f73468f99c 06-Aug-2014 Brian Carlstrom <bdc@google.com> Fix Windows adb build by avoiding "bool"

Change-Id: I9ca59e400c199d497a1a18d5e64c2cafe628097b
ommandline.c
8c9b155ea17c8281021d835fc1f5fedc49199c4b 06-Aug-2014 Jeff Sharkey <jsharkey@android.com> am 43d65b69: Merge "Escape single quotes in arguments." into lmp-dev

* commit '43d65b6903249a409031b081bb6175b9ad3e5c2a':
Escape single quotes in arguments.
440df7b61f81ee616405579fdeb19f66a011f4fc 06-Aug-2014 Elliott Hughes <enh@google.com> am 830a8641: am a8d0c4a2: Merge "Move host \'get-state\' service up so that it works."

* commit '830a8641bb960d208ad2a5b3bc3d9fb91bc31c2b':
Move host 'get-state' service up so that it works.
29c5a78fdc163f7d5e5e3a00729b8c37a89562f6 06-Aug-2014 Elliott Hughes <enh@google.com> Merge "Fix build of adb with gcc-4.9."
53723338858772a0189aa3f92f4d4bbdaa9b6772 06-Aug-2014 Alexander Ivchenko <alexander.ivchenko@intel.com> Fix build of adb with gcc-4.9.

Without this patch we get:

system/core/adb/commandline.c:1629:16: error: array subscript is above
array bounds [-Werror=array-bounds]

Change-Id: I494eb8b4d0e8082f8ff57bdd33d8d46c8c481c6f
Signed-off-by: Alexander Ivchenko <alexander.ivchenko@intel.com>
ommandline.c
a8d0c4a2b8f99dd3dba9d726bdecde98d350da50 06-Aug-2014 Elliott Hughes <enh@google.com> Merge "Move host 'get-state' service up so that it works."
0cc642c82d94affd5804b7c28c2f2578b8fadafb 11-Jun-2014 Jeff Sharkey <jsharkey@android.com> Partially revert argument escaping.

Commands chained with && need to be passed through literally instead
of always being quoted.

(cherry-pick of 7c460351f53cb683097fe4071b9ec1e4cd7cdf82.)

Bug: 15479704
Change-Id: I2998e40a92a3bfd092098cd526403b469c86c9a6
ommandline.c
dcd2f0ef2f87a3fcade74aec7e178be14d0ea335 10-Jun-2014 Jeff Sharkey <jsharkey@android.com> Uniformly escape shell arguments.

Arguments with embedded spaces need to be wrapped in quotes, which
changes the overall escaping strategy. Instead of mixing the two
strategies, just always wrap arguments in quotes.

(cherry-pick of fd546e8c35341b518873eb4f883afbed92e947af.)

Bug: 15479704
Change-Id: I03eacfa1bd6c220d4ec6617b825ebb0c43c7221e
ommandline.c
43d65b6903249a409031b081bb6175b9ad3e5c2a 06-Aug-2014 Jeff Sharkey <jsharkey@android.com> Merge "Escape single quotes in arguments." into lmp-dev
d9c4b14b44e93006efdffb059b769d46af509e2d 15-Jul-2014 Simon Ye <sye@google.com> Move host 'get-state' service up so that it works.

Due to previous bad merge, the get-state service was moved out of the
ADB_HOST #ifdef block.

(cherry picked from commit dc22c3c7a82ad1919c52dc4d00c601ad7210c61b)

Change-Id: I08465e7c666104a4c2d15eadef8a4d4be7f91456
db.c
d0eee747f6389a5800b485f36b265b3f5521852f 06-Aug-2014 Jeff Sharkey <jsharkey@android.com> Escape single quotes in arguments.

Verified that these use-cases continue working:

$ adb shell arg a a 'b b'
$ adb shell arg a a "b b"
|arg|a|a|b b|

$ adb shell arg "a a 'b b'"
|arg|a a 'b b'|

$ adb shell arg 'a a "b b"'
|arg|a a "b b"|

$ adb shell arg a\"b\'c
|arg|a"b'c|

$ adb shell "arg a && arg b"
|arg|a|
|arg|b|

$ adb shell "arg 'a' \"b\" c"
|arg|a|b|c|

Bug: 16139781
Change-Id: I3b010b6cdf57281695c11fda318c9bea0a7221cc
ommandline.c
05004026d9ee89d7fc7873aba0d53e71395ccf34 30-Jul-2014 leozwang <leozwang@google.com> am a361503e: Merge "Consolidate adb trace macro defines into its own header file." into lmp-dev

* commit 'a361503e3e68d1b26ce737547c4e1d53a03ec2d9':
Consolidate adb trace macro defines into its own header file.
43eb2ea5f83c79032e6b9b566d0f4e3626683631 29-Jul-2014 Elliott Hughes <enh@google.com> am ec531e5c: am 47a12389: Merge "Fix adb "ptsname is not thread-safe; use ptsname_r instead" build break."

* commit 'ec531e5cdde5e0b120bd88aeb2c3d36d18cedfb4':
Fix adb "ptsname is not thread-safe; use ptsname_r instead" build break.
dc22c3c7a82ad1919c52dc4d00c601ad7210c61b 15-Jul-2014 Simon Ye <sye@google.com> Move host 'get-state' service up so that it works.

Due to previous bad merge, the get-state service was moved out of the
ADB_HOST #ifdef block.

Change-Id: Id4b72a051ff04104659925e63a02eb340db2f807
db.c
d235288553f8c0535f51dfb8f05f81e1bc01e4ed 29-Jul-2014 Elliott Hughes <enh@google.com> Fix adb "ptsname is not thread-safe; use ptsname_r instead" build break.

Change-Id: I633dc4d6d421862473e7267cc0d2c1b0933392e0
ervices.c
a361503e3e68d1b26ce737547c4e1d53a03ec2d9 30-Jul-2014 leozwang <leozwang@google.com> Merge "Consolidate adb trace macro defines into its own header file." into lmp-dev
d3fc15f4841a8cbfd15fa9f051f2712266b5cd78 29-Jul-2014 leozwang <leozwang@google.com> Consolidate adb trace macro defines into its own header file.

Most code is copied and pasted from adb.h.
Any file can just include it to enable tracing.
Removed some duplications.

Change-Id: Ie1ed9e9edbf92158aac84669fbcbf7dc85fe2cf0
db.h
db_trace.h
devent.c
a6ff5c95a3fa798d661e09aa628cd0c5e5c8608f 29-Jul-2014 Elliott Hughes <enh@google.com> Fix adb "ptsname is not thread-safe; use ptsname_r instead" build break.

(cherry picked from commit d235288553f8c0535f51dfb8f05f81e1bc01e4ed)

Change-Id: I05f8160bc8c356cb8a57e2bc5677517750700456
ervices.c
555a904f7c304ee2ad1a7a5cffa80e6f1a121a5a 25-Jul-2014 Jeff Sharkey <jsharkey@android.com> am 74ff4fcf: Merge "Follow refactoring of install-abandon command." into lmp-dev

* commit '74ff4fcfc46e853ecd9fe34b5cedb47fc379f1af':
Follow refactoring of install-abandon command.
75619aabb3ae9ec4d1fd43d5fe1e9ad9cbce917d 25-Jul-2014 leozwang <leozwang@google.com> am 5a255238: Merge "Redirect debug output to logcat." into lmp-dev

* commit '5a2552388e698fec4efda270d2d88bb18ed3f299':
Redirect debug output to logcat.
6cc961c7cb1c45a73dffd0e14683bda1a176263d 25-Jul-2014 Colin Cross <ccross@android.com> am edf41f98: am 8d9d362b: Merge "adb: Add USB vendor ID for SONIM TECHNOLOGIES, INC."

* commit 'edf41f981c47d857bd130e8ecc95cd7cf0a0fe0a':
adb: Add USB vendor ID for SONIM TECHNOLOGIES, INC.
2cc4fd73d100749f4154065e4884fc912db584a9 25-Jul-2014 Tim Murray <timmurray@google.com> am 6ebaf311: am 721f189a: Merge "fix adb build on Darwin"

* commit '6ebaf311a7af8d20979deba279f9d5096ed8f193':
fix adb build on Darwin
43222b3f0ac661a3c8d4dfeff6e1c2f71731aadf 25-Jul-2014 DanielMo <DanielMo@fih-foxconn.com> adb: Add USB vendor ID for SONIM TECHNOLOGIES, INC.

Change-Id: Id66997709fec55b1efd389abf2efa644b9a8ccf4
Signed-off-by: DanielMo <DanielMo@fih-foxconn.com>
sb_vendors.c
5a2552388e698fec4efda270d2d88bb18ed3f299 25-Jul-2014 leozwang <leozwang@google.com> Merge "Redirect debug output to logcat." into lmp-dev
1efcdeffe5ca9981112be5c7ec7c56e7ac0d6e49 25-Jul-2014 Tim Murray <timmurray@google.com> fix adb build on Darwin

bug 16172793

Change-Id: Ia34b7148afc4c909f29037df91c04d6fd29a731e
ndroid.mk
ac77e1f4e40479ee7018f10dd070d5a6d5f4cfec 25-Jul-2014 Jeff Sharkey <jsharkey@android.com> Follow refactoring of install-abandon command.

Bug: 16543552
Change-Id: I1f54254813fd7d7f4341b8815f816535a39de079
ommandline.c
48a904240bf32fcba701ad8634651569a586d0aa 24-Jul-2014 leozwang <leozwang@google.com> Redirect debug output to logcat.

If ADB_TRACE is enabled, debug output will be redirected to logcat.

Change-Id: I9c36ada7690a2b946ecd6a926d04e36a8313c36a
ndroid.mk
db.h
9866a66d6d1b9898c6c29ff390358fe8dc2c7d77 19-Jul-2014 Nick Kralevich <nnk@google.com> adb: set O_CLOEXEC on lots of file descriptors

Too many leaking FDs.

Fixes bug: https://code.google.com/p/android/issues/detail?id=65857
(and more)

(cherrypicked from commit fe8d7f4f2e775d46d61f7c2d29a4e852434984da)

Change-Id: I67d8683244e54288a8105f6f65ee40abe2378d7e
db_auth_client.c
ile_sync_service.c
emount_service.c
ervices.c
sb_linux.c
70467735953ea9cceae9870ee0c426a0d21912ee 06-May-2014 Greg Hackmann <ghackmann@google.com> adb: replace utimes() with utime()

Fix the win_sdk host build by replacing utimes() with utime(). utime()
is functionally equivalent to utimes() when dealing with non-fractional
second timestamps, and is supported by the Windows CRT.

(The Windows CRT uses the nonstandard name _utime(), but mingw creates
aliases to the POSIX names.)

Change-Id: I513c6c5de05376c34cbb0894a94259acba8ae6f1
ile_sync_client.c
ef16a17afb8894776ce0be88b8a9ea705f9d64e5 22-Jul-2014 Nick Kralevich <nnk@google.com> Merge "adb: set O_CLOEXEC on lots of file descriptors" into lmp-dev
1b3f2ff0286da1f06e095e8d96ce8aefe874b6aa 21-Jun-2014 Rom Lemarchand <romlem@google.com> adb: use oom_score_adj instead of oom_adj

(cherry picked from commit 07ce7cab72d9b3e5c701491daf8fd457d035eec8)

Change-Id: I1730d1df34039a5502200002ac813ce96a3eaa1a
ervices.c
eb97987332e2e5f7c5eb90d82d853f698a040b14 27-May-2014 Jeff Sharkey <jsharkey@android.com> Add "exec" service: shell commands with no pty.

To facilitate device scripts that want to read/write binary data from
the host side, this change introduces a new "exec" service that
behaves like "shell" but without creating a pty, which would otherwise
mangle binary data.

After forking, it hooks up stdin/stdout of the child process to
the socket connected through to the host. The adb transport doesn't
support shutdown(), so the host can't half-close the socket and wait
for device termination. Instead, the host side now has two explicit
commands "exec-in" and "exec-out" for either sending or receiving
data.

Teach host side copy_to_file() to deal with stdin/stdout special
cases. Switch device side backup/restore services to use the new
create_subproc_raw under the hood.

(cherry picked from commit 5d9d434efadf1c535c7fea634d5306e18c68ef1f)

Change-Id: I42c18cb5bb907449b458c94450ef6c584d84ecdb
ndroid.mk
db.h
ackup_service.c
ommandline.c
ervices.c
4b35c01e3e1fdf80b85ef417f3c3bcedeccbe442 19-Apr-2013 Lajos Molnar <lajos@google.com> adb: added support for adb pull -a to preserve time stamps and mode

Added -a flag to adb pull that preserves time and mode. Mode is
subjected to umask for security. We only receive modification
time from adb server, so creation time will be set to the modification
time as well.

Signed-off-by: Lajos Molnar <lajos@google.com>

(cherry picked from commit de8ff4adcaa487259f9ddcd0eab4d1117d1cca71)

Change-Id: I03bb5cc14ce542299cf3b221a8be318a28ee8a8d
ommandline.c
ile_sync_client.c
ile_sync_service.h
fe8d7f4f2e775d46d61f7c2d29a4e852434984da 19-Jul-2014 Nick Kralevich <nnk@google.com> adb: set O_CLOEXEC on lots of file descriptors

Too many leaking FDs.

Fixes bug: https://code.google.com/p/android/issues/detail?id=65857
(and more)

Change-Id: I67d8683244e54288a8105f6f65ee40abe2378d7e
db_auth_client.c
ile_sync_service.c
emount_service.c
ervices.c
sb_linux.c
cbbb83b0eb8b09b729c9287238d709bec7b833b5 19-Jul-2014 Elliott Hughes <enh@google.com> Fix implicit declaration of function 'prctl' in adb.

(cherry picked from commit b4dd6ef223c4744f8583add1b4999c9ce0b5a0fe)

Change-Id: Ia64bec746ae8d2c45663f61afb46702838b1e5bf
db.c
b4dd6ef223c4744f8583add1b4999c9ce0b5a0fe 19-Jul-2014 Elliott Hughes <enh@google.com> Fix implicit declaration of function 'prctl' in adb.

Change-Id: I9f14cabbb36d658510c11833b3314565a2445e10
db.c
71bbc6789fb6750d8fddda0a3ff9a87f09a32c74 15-Jul-2014 Christopher Tate <ctate@google.com> Fix the build in clang

"fprintf(stderr, buf)" is a warning in some compilers, and we're
building with all warnings promoted to error.

Change-Id: Ie3c6ddcd74cf4dda40cf7b742df955dde1d1a5ff
ommandline.c
c03064ea71dba91a8fd94e37fabd401a66b8cc7f 14-Jul-2014 Jeff Sharkey <jsharkey@android.com> Fix 64-bit builds.

Change-Id: I1ff5c9c3dc8d870aef2885f8a1989c6c913ccb3d
ommandline.c
960df97c2356f5a804d3ef87fe49f788d7ecdfaf 10-Jun-2014 Jeff Sharkey <jsharkey@android.com> Add install-multiple to adb.

The new install-multiple command automates creating an install
session, streaming multiple files into place, and then committing
or destroying the session. This uses the recent "exec" feature to
stream APK contents over stdin directly into their final resting
place, requiring no extra copies.

Blindly pass through command line arguments to "pm" to make adding
new flags easier in future.

Remove support for verifying APK before sending across wire, since it
was reading the entire APK into memory (!) before sending. Also
remove encrypted APKs, since they are no longer supported. Drop
support for undocumented verification files.

Bug: 14975160
Change-Id: I0c538471873061798160e2e47cec4c0424c27361
ommandline.c
ile_sync_client.c
ile_sync_service.h
ervices.c
77a2c22dcbab56b260eb9d39c84fe8f98258cebb 10-Jul-2014 Badhri Jagan Sridharan <badhri@google.com> Merge "adbd: adb root should terminate adbd only if it's debuggable"
bf9ef5196995119a9801b55d2df2e683eeba2168 10-Jul-2014 Badhri Jagan Sridharan <badhri@google.com> am cb7be1e8: am 87c7a0d7: am 77a2c22d: Merge "adbd: adb root should terminate adbd only if it\'s debuggable"

* commit 'cb7be1e8cd4e4388d014a5c48df455a5715f2180':
adbd: adb root should terminate adbd only if it's debuggable
cb7be1e8cd4e4388d014a5c48df455a5715f2180 10-Jul-2014 Badhri Jagan Sridharan <badhri@google.com> am 87c7a0d7: am 77a2c22d: Merge "adbd: adb root should terminate adbd only if it\'s debuggable"

* commit '87c7a0d74b9dadaedfe6805c57d221d9c445aaf6':
adbd: adb root should terminate adbd only if it's debuggable
4b39c6aca973470812caf4f7911b494c891e0c3a 08-Jul-2014 Doug Zongker <dougz@google.com> fix windows build

Change-Id: Ia7b236f1a915630fe85d488072efb9784ba10dad
ommandline.c
6d6a898b0c4e0283569209ba74bd7dbf49da73a2 07-Jul-2014 Colin Cross <ccross@android.com> adb: fix 64-bit build

strlen returns a size_t, but the * modifier in printf expects an int.
On arm64 size_t != int.

Change-Id: I11e84a7b62c935162abc0aba910d14e63d11efd3
ommandline.c
7df14ef339fcdd9103f2ef4e0eb66bf9c4ad3f5b 07-Jul-2014 Doug Zongker <dougz@google.com> Merge "add sideload-host mode to adb"
71fe584a1a7256c057267ae46a35f7c74d1d549e 27-Jun-2014 Doug Zongker <dougz@google.com> add sideload-host mode to adb

The sideload-host mode turns the host into a server capable of sending
the device various pieces of the file on request, rather than
downloading it all in one transfer. It's used to support sideloading
OTA packages to devices without the need for them to hold the whole
package in RAM.

If the connected device doesn't support sideload-host mode, we fall
back to the older sideload connection.

Change-Id: I5adaedd8243dc3b76414bba0149879ca2bbf35fa
db.h
db_client.c
ommandline.c
686bce6390db802bfd2cb4e78f9270596b6decb2 01-Jul-2014 Daniel Rosenberg <drosen@google.com> Added support for vendor partition to adb

Remount will now remount the vendor partition as well, if it exists.
Sync will also allow you to sync vendor, and will include it by
default if it exists.

Change-Id: Iea1e8212f445e96233438a8d8a9d3266bf3d6557
Signed-off-by: Daniel Rosenberg <drosen@google.com>
ommandline.c
ile_sync_client.c
ile_sync_service.c
emount_service.c
ce10b191c56057e494f6b46de06b0054d77b4726 24-Jun-2014 Elliott Hughes <enh@google.com> am f6d86d75: am d08b80cc: am 20bda70f: Merge "Add Smartisan usb config"

* commit 'f6d86d75461ae3a246522932759e045dcc7a4952':
Add Smartisan usb config
f6d86d75461ae3a246522932759e045dcc7a4952 24-Jun-2014 Elliott Hughes <enh@google.com> am d08b80cc: am 20bda70f: Merge "Add Smartisan usb config"

* commit 'd08b80ccc6f7d106a8bfc410f89e466b798e2ebe':
Add Smartisan usb config
20bda70f9a8dff764bcbad3e711a91700fc6346b 24-Jun-2014 Elliott Hughes <enh@google.com> Merge "Add Smartisan usb config"
07ce7cab72d9b3e5c701491daf8fd457d035eec8 21-Jun-2014 Rom Lemarchand <romlem@google.com> adb: use oom_score_adj instead of oom_adj

Change-Id: I76c6ce83d7d400c8b84bfece5d30189640cb2505
ervices.c
b10fb88e1ea02bce8c052d51662fe2c6fd00f275 19-Jun-2014 Colin Cross <ccross@android.com> am d7d9b6fc: am f02fd9f0: am 5e504a4e: Merge "adb: Add USB vendor ID for Honeywell"

* commit 'd7d9b6fcaa415ea6251e45d84b95a95740ea807e':
adb: Add USB vendor ID for Honeywell
d7d9b6fcaa415ea6251e45d84b95a95740ea807e 19-Jun-2014 Colin Cross <ccross@android.com> am f02fd9f0: am 5e504a4e: Merge "adb: Add USB vendor ID for Honeywell"

* commit 'f02fd9f0b061d29bb872664479ed4a5949d23ac9':
adb: Add USB vendor ID for Honeywell
8c4c8e8988411449ecb2f50c25d3e4188e81e7c0 19-Jun-2014 DanielMo <DanielMo@fih-foxconn.com> adb: Add USB vendor ID for Honeywell

Change-Id: Ib92eca23a6c75ec9323bb1b0e7d7f8cd5f9ca207
Signed-off-by: DanielMo <DanielMo@fih-foxconn.com>
sb_vendors.c
4224edf51dcddf9e014b198bb23fc40ef61a5834 18-Jun-2014 Nick Kralevich <nnk@google.com> am 89e4fad0: am 4e6aa6a2: Merge "adbd: unconditionally call setgroups"

* commit '89e4fad09e1ae765ab0be1580a468bc0837ef7e4':
adbd: unconditionally call setgroups
000a62f64424f0dafa83c9f0fffb07e8ab49f540 18-Jun-2014 Nick Kralevich <nnk@google.com> am 4224edf5: am 89e4fad0: am 4e6aa6a2: Merge "adbd: unconditionally call setgroups"

* commit '4224edf51dcddf9e014b198bb23fc40ef61a5834':
adbd: unconditionally call setgroups
e5cbf4e0441a280985cb4768d5ce65d70fc9c725 18-Jun-2014 Nick Kralevich <nnk@google.com> adbd: unconditionally call setgroups

We should ensure that the appropriate supplementary groups are
set, regardless of whether we're running UID=0 or UID=shell.

Change-Id: I3a1624a574102be08176a41f9c7eb5f82af2b3e5
db.c
def14fc4ed5e38ea942cc6cb8d7d8a68568cf729 16-Jun-2014 Elliott Hughes <enh@google.com> am cd0d5935: am 6c65cd5d: am 60218f19: Merge "Add gionee USB vendor id."

* commit 'cd0d593569d7f2b8f8ec81ab3ef6dd942230e973':
Add gionee USB vendor id.
cd0d593569d7f2b8f8ec81ab3ef6dd942230e973 16-Jun-2014 Elliott Hughes <enh@google.com> am 6c65cd5d: am 60218f19: Merge "Add gionee USB vendor id."

* commit '6c65cd5db84361c66983903638ddb251762f9151':
Add gionee USB vendor id.
4f8d3be3b2a78813a0769ec787a29789c27cf21e 16-Jun-2014 xuefeng cai <caixuefeng130@gmail.com> Add gionee USB vendor id.

Change-Id: I3745f0e8462d0bffcd2eb4d926a9d2f9af8578f9
sb_vendors.c
7c460351f53cb683097fe4071b9ec1e4cd7cdf82 11-Jun-2014 Jeff Sharkey <jsharkey@android.com> Partially revert argument escaping.

Commands chained with && need to be passed through literally instead
of always being quoted.

Bug: 15479704
Change-Id: I2998e40a92a3bfd092098cd526403b469c86c9a6
ommandline.c
fd546e8c35341b518873eb4f883afbed92e947af 10-Jun-2014 Jeff Sharkey <jsharkey@android.com> Uniformly escape shell arguments.

Arguments with embedded spaces need to be wrapped in quotes, which
changes the overall escaping strategy. Instead of mixing the two
strategies, just always wrap arguments in quotes.

Bug: 15479704
Change-Id: I03eacfa1bd6c220d4ec6617b825ebb0c43c7221e
ommandline.c
5c70f7e3106bb9457cd5ea2f638cd430ba67eb9c 07-Jun-2014 Nick Kralevich <nnk@google.com> am f3af14e6: am ef47eb19: am 30136150: Merge "adb: avoid leaking file descriptors"

* commit 'f3af14e6df266f466e0bf7868d002cfe8104c128':
adb: avoid leaking file descriptors
f3af14e6df266f466e0bf7868d002cfe8104c128 07-Jun-2014 Nick Kralevich <nnk@google.com> am ef47eb19: am 30136150: Merge "adb: avoid leaking file descriptors"

* commit 'ef47eb1948ba394866f53c41c459561fc372a3b5':
adb: avoid leaking file descriptors
8fcb631389123ab7f5d795ae3a36a67842b3028c 06-Jun-2014 Nick Kralevich <nnk@google.com> adb: avoid leaking file descriptors

If an adb shell connection comes in while taking a screenshot,
an open pipe file descriptor will be leaked to the shell process.
This causes SELinux denials of the form:

avc: denied { read } for path="pipe:[21838]" dev="pipefs" ino=21838 scontext=u:r:shell:s0 tcontext=u:r:adbd:s0 tclass=fifo_file permissive=0
avc: denied { write } for path="pipe:[21838]" dev="pipefs" ino=21838 scontext=u:r:shell:s0 tcontext=u:r:adbd:s0 tclass=fifo_file permissive=0

Set O_CLOEXEC on the pipe connections, to avoid leaking them
across an exec boundary.

Bug: 15437785
Change-Id: Id2304b316bd7082d8baac246dce1f0e0e26e9197
ramebuffer_service.c
8f4ac8e1d3349170f319526e8cfcb036db954ee4 03-Jun-2014 Narayan Kamath <narayan@google.com> am 7cf8e1cb: am 4e26c95a: Merge "Skip the "--abi" flag on "adb install" if present."

* commit '7cf8e1cb88c44963ccb2128113d8a804d85645b9':
Skip the "--abi" flag on "adb install" if present.
7cf8e1cb88c44963ccb2128113d8a804d85645b9 03-Jun-2014 Narayan Kamath <narayan@google.com> am 4e26c95a: Merge "Skip the "--abi" flag on "adb install" if present."

* commit '4e26c95a6363da4885bb9178c9d42c273b357043':
Skip the "--abi" flag on "adb install" if present.
4e26c95a6363da4885bb9178c9d42c273b357043 03-Jun-2014 Narayan Kamath <narayan@google.com> Merge "Skip the "--abi" flag on "adb install" if present."
b81708146f51afb434739374095161ab7ff32787 02-Jun-2014 Jeff Sharkey <jsharkey@android.com> Merge "Add "exec" service: shell commands with no pty."
5d9d434efadf1c535c7fea634d5306e18c68ef1f 27-May-2014 Jeff Sharkey <jsharkey@android.com> Add "exec" service: shell commands with no pty.

To facilitate device scripts that want to read/write binary data from
the host side, this change introduces a new "exec" service that
behaves like "shell" but without creating a pty, which would otherwise
mangle binary data.

After forking, it hooks up stdin/stdout of the child process to
the socket connected through to the host. The adb transport doesn't
support shutdown(), so the host can't half-close the socket and wait
for device termination. Instead, the host side now has two explicit
commands "exec-in" and "exec-out" for either sending or receiving
data.

Teach host side copy_to_file() to deal with stdin/stdout special
cases. Switch device side backup/restore services to use the new
create_subproc_raw under the hood.

Change-Id: I5993049803519d3959761f2363037b02c50920ee
ndroid.mk
db.h
ackup_service.c
ommandline.c
ervices.c
a284f8b214a8b92775534922ac24f13498d3af0a 29-May-2014 Narayan Kamath <narayan@google.com> Skip the "--abi" flag on "adb install" if present.

This flag needs to be passed through to the package manager.
Without this change, the argument to this flag is interpreted
as a filename.

NOTE: If we don't want to add special treatment for this flag,
we'll have to assume that all flags with a -- prefix have an
argument, and that isn't necessarily true.

Change-Id: I78c3fa842bc24148d83d7278e6dee395686240a0
ommandline.c
bccac026e9198e283fd2e276bfe5a7020db1bf88 27-May-2014 Elliott Hughes <enh@google.com> am 8ed26bd6: am 769db021: am b24085d5: Merge "adb: Add USB vendor ID for Unowhy"

* commit '8ed26bd6531a8d52dcaff6c14b6fc59749791679':
adb: Add USB vendor ID for Unowhy
8ed26bd6531a8d52dcaff6c14b6fc59749791679 27-May-2014 Elliott Hughes <enh@google.com> am 769db021: am b24085d5: Merge "adb: Add USB vendor ID for Unowhy"

* commit '769db021e6b61d10c13a7b17a72750f18ebdee16':
adb: Add USB vendor ID for Unowhy
769db021e6b61d10c13a7b17a72750f18ebdee16 27-May-2014 Elliott Hughes <enh@google.com> am b24085d5: Merge "adb: Add USB vendor ID for Unowhy"

* commit 'b24085d55b082d802eba699243dba26fbc6ac712':
adb: Add USB vendor ID for Unowhy
56266c75e2089500c30fcbc97f0d46df47f87f00 26-May-2014 Wing Tseng <Wing_Tseng@pegatroncorp.com> adb: Add USB vendor ID for Unowhy

Change-Id: I8bab07734d5b6acb4d8ceaf45b0bab0723f5fe03
Signed-off-by: Wing Tseng <Wing_Tseng@pegatroncorp.com>
sb_vendors.c
7291ac60822c8b84e423de4f4abec6663d0e8f50 27-May-2014 David 'Digit' Turner <digit@android.com> am 97267755: am c3358875: am 6e7343b8: Merge "adb: implement "adb reverse <local> <remote>""

* commit '972677557bd2c3a0678a945765783e85c7ec7b9c':
adb: implement "adb reverse <local> <remote>"
972677557bd2c3a0678a945765783e85c7ec7b9c 27-May-2014 David 'Digit' Turner <digit@android.com> am c3358875: am 6e7343b8: Merge "adb: implement "adb reverse <local> <remote>""

* commit 'c3358875169b920847a72428f4e8b8f09f7bdf05':
adb: implement "adb reverse <local> <remote>"
c3358875169b920847a72428f4e8b8f09f7bdf05 27-May-2014 David 'Digit' Turner <digit@android.com> am 6e7343b8: Merge "adb: implement "adb reverse <local> <remote>""

* commit '6e7343b8993fecb2f0600a9e5cff91dd4480a877':
adb: implement "adb reverse <local> <remote>"
252586941934d23073a8d167ec240b221062505f 21-Mar-2013 David 'Digit' Turner <digit@android.com> adb: implement "adb reverse <local> <remote>"

This implements the logical opposite of 'adb forward', i.e.
the ability to reverse network connections from the device
to the host.

This feature is very useful for testing various programs
running on an Android device without root or poking at the
host's routing table.

Options and parameters are exactly the same as those for
'adb forward', except that the direction is reversed.

Examples:

adb reverse tcp:5000 tcp:6000
connections to localhost:5000 on the device will be
forwarded to localhost:6000 on the host.

adb reverse --no-rebind tcp:5000 tcp:6000
same as above, but fails if the socket is already
bound through a previous 'adb reverse tcp:5000 ...'
command.

adb reverse --list
list all active reversed connections for the target
device. Note: there is no command to list all
reversed connections for all devices at once.

adb reverse --remove tcp:5000
remove any reversed connection on the device from
localhost:5000

adb reverse --remove-all
remove all reversed connections form the current
device.

Reversed connections are tied to a transport, in other
words, they disappear as soon as a device is disconnected.

Simple testing protocol:

adb forward tcp:5000 tcp:6000
adb reverse tcp:6000 tcp:7000
nc -l localhost 7000

in another terminal:
echo "Hello" | nc localhost 5000

Will print "Hello" on the first terminal.

Change-Id: I761af790cdb06829b68430afa4145a919fa0e6d5
ERVICES.TXT
db.c
db.h
ommandline.c
ervices.c
6fb1557fda1b18b4696c9213df7b4f542cd30d3f 21-May-2014 Colin Cross <ccross@android.com> am b696bec3: am 28c30518: am 1742b7d2: Merge "Modify VID for Compal"

* commit 'b696bec3541dc3091fb7c8764750f8ba21f64636':
Modify VID for Compal
b696bec3541dc3091fb7c8764750f8ba21f64636 21-May-2014 Colin Cross <ccross@android.com> am 28c30518: am 1742b7d2: Merge "Modify VID for Compal"

* commit '28c305183a6596eb3241771422d22351fbeaa9fb':
Modify VID for Compal
28c305183a6596eb3241771422d22351fbeaa9fb 21-May-2014 Colin Cross <ccross@android.com> am 1742b7d2: Merge "Modify VID for Compal"

* commit '1742b7d218706c596e6b40c89a6660f30bdba022':
Modify VID for Compal
1742b7d218706c596e6b40c89a6660f30bdba022 21-May-2014 Colin Cross <ccross@android.com> Merge "Modify VID for Compal"
b65208d1a98c4cc6b4fbae302f7718f056e2fadd 20-May-2014 Elliott Hughes <enh@google.com> am f7a7e3c3: am 6dfb039b: am 4a343436: Merge "Fix win32 undefined reference to `_socket_network_client_timeout\'."

* commit 'f7a7e3c301fdf7d98d8bcabf6fefb0fcf5bbf90d':
Fix win32 undefined reference to `_socket_network_client_timeout'.
f7a7e3c301fdf7d98d8bcabf6fefb0fcf5bbf90d 20-May-2014 Elliott Hughes <enh@google.com> am 6dfb039b: am 4a343436: Merge "Fix win32 undefined reference to `_socket_network_client_timeout\'."

* commit '6dfb039b0ba56576b4ed043e02ae43fb6afd42aa':
Fix win32 undefined reference to `_socket_network_client_timeout'.
6dfb039b0ba56576b4ed043e02ae43fb6afd42aa 20-May-2014 Elliott Hughes <enh@google.com> am 4a343436: Merge "Fix win32 undefined reference to `_socket_network_client_timeout\'."

* commit '4a343436e01b07c21c043f8a903689f70000ca73':
Fix win32 undefined reference to `_socket_network_client_timeout'.
0bff5bd95268184a34ae69c062584a8d1f4d87fb 20-May-2014 Elliott Hughes <enh@google.com> Fix win32 undefined reference to `_socket_network_client_timeout'.

Change-Id: I063213957b8452f4690da0f64872075f7c27b4cd
ysdeps_win32.c
fa59e0a48786505d5d8e65e0714f65b85d260dfc 20-May-2014 Elliott Hughes <enh@google.com> am 9bcc5512: am 796b2015: am 51e27f95: Merge "Fix win32 implicit declaration of function socket_network_client_timeout."

* commit '9bcc55123ec814074417994db99730929a31fec8':
Fix win32 implicit declaration of function socket_network_client_timeout.
9bcc55123ec814074417994db99730929a31fec8 20-May-2014 Elliott Hughes <enh@google.com> am 796b2015: am 51e27f95: Merge "Fix win32 implicit declaration of function socket_network_client_timeout."

* commit '796b20157f75e46ad91b7d894796e0ba55a7766e':
Fix win32 implicit declaration of function socket_network_client_timeout.
796b20157f75e46ad91b7d894796e0ba55a7766e 20-May-2014 Elliott Hughes <enh@google.com> am 51e27f95: Merge "Fix win32 implicit declaration of function socket_network_client_timeout."

* commit '51e27f955b79846e36097532a725f4b7a3eefef8':
Fix win32 implicit declaration of function socket_network_client_timeout.
b911cf0af43718a6dedb06561e787ba3bdbdfe8b 20-May-2014 Elliott Hughes <enh@google.com> Fix win32 implicit declaration of function socket_network_client_timeout.

Change-Id: Ic6070855a21920384c555c9c82b9a2e4a776cbae
ysdeps.h
3edc25271fd6696cede2d0e6ecdcaf3d6cc273a5 20-May-2014 Elliott Hughes <enh@google.com> am b42f1413: am 0e71e3ab: am 9cae50b3: Merge "Bound the ADB connect time with a non-blocking connect"

* commit 'b42f141315ae0929325335645d397db04a500c88':
Bound the ADB connect time with a non-blocking connect
b42f141315ae0929325335645d397db04a500c88 20-May-2014 Elliott Hughes <enh@google.com> am 0e71e3ab: am 9cae50b3: Merge "Bound the ADB connect time with a non-blocking connect"

* commit '0e71e3ab9cf66f41645ea286c7e62ed2b657ca38':
Bound the ADB connect time with a non-blocking connect
0e71e3ab9cf66f41645ea286c7e62ed2b657ca38 20-May-2014 Elliott Hughes <enh@google.com> am 9cae50b3: Merge "Bound the ADB connect time with a non-blocking connect"

* commit '9cae50b38d6a58efe0799ef3697f594cb4b100f9':
Bound the ADB connect time with a non-blocking connect
aecc6a6657746afc9b95a960eedad10484bf14ac 20-Jun-2013 Ken Lierman <ken.lierman@windriver.com> Bound the ADB connect time with a non-blocking connect

After a disconnect, the initial blocking connect takes
a long time to return, while subsequent calls return
quicks. Switch to a non-blocking connect to make the
re-connect time more consistent and faster overall.

Change-Id: I21d02b22a8eb9a457c2f1fa95eb17894d5612ccd
Signed-off-by: Ken Lierman <ken.lierman@windriver.com>
Reviewed-by: Gumbel, Matthew K <matthew.k.gumbel@intel.com>
Reviewed-by: Jovanovic, Radivoje <radivoje.jovanovic@intel.com>
Reviewed-by: Boie, Andrew P <andrew.p.boie@intel.com>
ervices.c
58b01e01875e2f6ae593ded197430bc23713dd0a 16-May-2014 Ingo Rohloff <lundril@gmx.de> ADB on linux: Handle USB SuperSpeed extra Descriptors

Under Linux, ADB manually parses USB Descriptors to check for
possible ADB USB Interfaces. USB Devices connected with SuperSpeed
will exhibit extra USB SuperSpeed Endpoint Companion Descriptors.
This patch handles these USB SuperSpeed specific USB Descriptors.

Change-Id: Icd1e5fdde0b324c7df4f933583499f2c52a922f3
Signed-off-by: Ingo Rohloff <lundril@gmx.de>
sb_linux.c
cdb1b1b84daa528d078379a7f343177b94e5976e 14-May-2014 Bao Haojun <baohaojun@gmail.com> Fix deadlocks.

1. Close pipe fds[1] as soon as possible. Otherwise it may block when
reading from fds[0] even though the child process has exited early
and closed its copy of fds[1].

2. Waitpid after pipe is closed. Otherwise the screencap child process
may block while writing fds[1], because the fds[0] is not closed
yet. If we close fds[0] first, then the screencap child process will
die because of SIGPIPE, and waitpid will return correctly.

Change-Id: I433c95a5ba2eb3045727fc39a49fd9557fb1a1d1
Signed-off-by: Bao Haojun <baohaojun@gmail.com>
ramebuffer_service.c
910bca6850aea80bb4431aaccb2561730fe9741d 13-May-2014 Kenny Root <kroot@google.com> am 57e53ed4: am c563c38d: am 905874ab: Merge "adb: avoid compilation errors for unused results"

* commit '57e53ed4189cc49844e6afcea2a5861fd8ca93f1':
adb: avoid compilation errors for unused results
57e53ed4189cc49844e6afcea2a5861fd8ca93f1 13-May-2014 Kenny Root <kroot@google.com> am c563c38d: am 905874ab: Merge "adb: avoid compilation errors for unused results"

* commit 'c563c38d06e3af61ab8cf1c26536106985fec073':
adb: avoid compilation errors for unused results
c563c38d06e3af61ab8cf1c26536106985fec073 13-May-2014 Kenny Root <kroot@google.com> am 905874ab: Merge "adb: avoid compilation errors for unused results"

* commit '905874abe45279d7c668e590d404880dd91b1869':
adb: avoid compilation errors for unused results
1bd41b13998b2d56359f64247695db355c48f4c6 13-May-2014 Kenny Root <kroot@google.com> adb: avoid compilation errors for unused results

The BIO_CTRL_FLUSH function for files doesn't return anything useful
from the underlying fflush call, so it is safe to ignore this.

Change-Id: If33a7efbbaaf158e3da1cd72d0a56da1d3b82fd9
db_auth_host.c
d2baee2f47dc5d96c913ac0d6550134bdcab9753 08-May-2014 Mark Salyzyn <salyzyn@google.com> am e7597115: am 328746da: am 129e9dad: Merge changes Idfd1a114,If725a1cb,I61211165,If9a05ccb

* commit 'e75971157c46a0fc57194a75d4dde0920f60f427':
adb: turn on -Werror
netcfg: turn on -Werror
mkbootimg: turn on -Werror
gpttool: turn on -Werror
da6a0aa0df91d7e9429c522e403a129077502df9 08-May-2014 Ying Wang <wangying@google.com> am b18da571: am 1e6cd741: am 803fb62b: Merge "Remove unused LOCAL_LDLIBS."

* commit 'b18da571f90eebedd99fe5607a6b0d7ae4e91893':
Remove unused LOCAL_LDLIBS.
e75971157c46a0fc57194a75d4dde0920f60f427 08-May-2014 Mark Salyzyn <salyzyn@google.com> am 328746da: am 129e9dad: Merge changes Idfd1a114,If725a1cb,I61211165,If9a05ccb

* commit '328746da8090a549e432da2358585b101e30d753':
adb: turn on -Werror
netcfg: turn on -Werror
mkbootimg: turn on -Werror
gpttool: turn on -Werror
328746da8090a549e432da2358585b101e30d753 08-May-2014 Mark Salyzyn <salyzyn@google.com> am 129e9dad: Merge changes Idfd1a114,If725a1cb,I61211165,If9a05ccb

* commit '129e9dada707d66eb3242b666b6187a031dc410a':
adb: turn on -Werror
netcfg: turn on -Werror
mkbootimg: turn on -Werror
gpttool: turn on -Werror
129e9dada707d66eb3242b666b6187a031dc410a 08-May-2014 Mark Salyzyn <salyzyn@google.com> Merge changes Idfd1a114,If725a1cb,I61211165,If9a05ccb

* changes:
adb: turn on -Werror
netcfg: turn on -Werror
mkbootimg: turn on -Werror
gpttool: turn on -Werror
b18da571f90eebedd99fe5607a6b0d7ae4e91893 08-May-2014 Ying Wang <wangying@google.com> am 1e6cd741: am 803fb62b: Merge "Remove unused LOCAL_LDLIBS."

* commit '1e6cd741fd130e5916337eb75c9ceef2152035d2':
Remove unused LOCAL_LDLIBS.
1e6cd741fd130e5916337eb75c9ceef2152035d2 08-May-2014 Ying Wang <wangying@google.com> am 803fb62b: Merge "Remove unused LOCAL_LDLIBS."

* commit '803fb62bb49b551afff546b4748d2d3e9ec54af1':
Remove unused LOCAL_LDLIBS.
9f437d71812dd9907571d0cabd061153190ebbb9 08-May-2014 Ying Wang <wangying@google.com> Remove unused LOCAL_LDLIBS.

Change-Id: I42aeb7668183e7a06207ee063f6eee4d37d66c6e
ndroid.mk
7a5e2bd0621ee0b1c66d8f4c21497ffb62feff42 06-May-2014 Greg Hackmann <ghackmann@google.com> adb: replace utimes() with utime()

Fix the win_sdk host build by replacing utimes() with utime(). utime()
is functionally equivalent to utimes() when dealing with non-fractional
second timestamps, and is supported by the Windows CRT.

(The Windows CRT uses the nonstandard name _utime(), but mingw creates
aliases to the POSIX names.)

Change-Id: I513c6c5de05376c34cbb0894a94259acba8ae6f1
ile_sync_client.c
60299dfd6a5dca059a079bc8e11d45a1fecf02d0 30-Apr-2014 Mark Salyzyn <salyzyn@google.com> adb: turn on -Werror

- Deal with some -Wunused issues

Change-Id: Idfd1a114e68ae637978b52fde5144d0dca0ec79f
ndroid.mk
ackup_service.c
ommandline.c
ile_sync_client.c
emount_service.c
ysdeps_win32.c
sb_windows.c
1297d22bc99c26b2ad414faedd5bea73a16ecb90 24-May-2013 jzhuan5 <jin.can.zhuang@intel.com> adbd: adb root should terminate adbd only if it's debuggable

adb root command will terminate adbd when closing the socket if current
user id is not root. This works for userdebug build, as adb root causes
re-enumeration.

But for user build, adb root command won't cause re-enumeration, and if
adbd is terminated and restarted, it will be in offline state, thus it
won't send any thing to host.

Change-Id: I81216a3b3da888cd9b236060cf745175f6d93c60
Author: jzhuan5 <jin.can.zhuang@intel.com>
Signed-off-by: Bo Huang <bo.b.huang@intel.com>
ockets.c
fd18127eb7f1b900beb72be35bbe9163bf95995a 04-May-2014 herman_lin <herman_lin@compal.com> Modify VID for Compal

The original definition of VENDOR_ID_COMPAL is for Compal Communications, Inc.
But Compal Communications, Inc(CCI) had been merged into Compal Electronics, Inc(CEI) at April of 2014
So VENDOR_ID_COMPAL should be changed from 0x1219(CCI's VID) to 0x04B7(CEI's VID).
And add one new definition(VENDOR_ID_COMPALCOMM) for CCI to maintain old devices that use CCI's VID.
modified: adb/usb_vendors.c

Change-Id: I9e9a96f6cc81273ff2c9353a13e7ce3b0583396b
sb_vendors.c
de8ff4adcaa487259f9ddcd0eab4d1117d1cca71 19-Apr-2013 Lajos Molnar <lajos@google.com> adb: added support for adb pull -a to preserve time stamps and mode

Added -a flag to adb pull that preserves time and mode. Mode is
subjected to umask for security. We only receive modification
time from adb server, so creation time will be set to the modification
time as well.

Change-Id: I37c0b94741ed464f19025d25dea3ff2f6ac43e7f
Signed-off-by: Lajos Molnar <lajos@google.com>
ommandline.c
ile_sync_client.c
ile_sync_service.h
1333e012ee65fef59f5f43f33744230574dfc2a2 30-Apr-2014 Bill Yi <byi@google.com> Merge commit '4102af05a86aae36d2560fd8b3f740a52399342c' into HEAD
48858b21b2609831bfc105fb937ea322daedb9e9 18-Apr-2014 Colin Cross <ccross@android.com> am c33702dd: am 4785ea60: Merge "adb: Add USB vendor ID for Prestigio"

* commit 'c33702dd92da5f41d17ee9a64a8a0ff67f6e9d1b':
adb: Add USB vendor ID for Prestigio
76b526a2cad8f42717c48ad5d451dfc09d5a6d6f 15-Apr-2014 DanielMo <DanielMo@fih-foxconn.com> adb: Add USB vendor ID for Prestigio

Change-Id: Ib9e79043961b9b1fa27d87f5bc815000e7965706
Signed-off-by: DanielMo <DanielMo@fih-foxconn.com>
sb_vendors.c
83ec00108676fa66cec470e886b87384bdf1e6a2 15-Apr-2014 Jeff Brown <jeffbrown@google.com> am a77bef47: Document the adb install -d option.

* commit 'a77bef47decf2c0818397aced983999e235aa82f':
Document the adb install -d option.
a77bef47decf2c0818397aced983999e235aa82f 15-Apr-2014 Jeff Brown <jeffbrown@google.com> Document the adb install -d option.

Change-Id: Ife0da42c22e4408dc5c07ac0f20e0ecbbde20832
ommandline.c
ae1f0094309b9bad62ff7de32820c78f66f2c07a 31-Mar-2014 Bao Haojun <baohaojun@gmail.com> Add Smartisan usb config

Change-Id: Ifd921f1dc0d2163230337805c3cf726f371300b0
Signed-off-by: Bao Haojun <baohaojun@gmail.com>
sb_vendors.c
d3113afc4775495ce1b89b031f0b26ac7d0e7cbc 26-Mar-2014 Colin Cross <ccross@android.com> am 707f5b40: am 6940bc08: Merge "adb: Add USB vendor ID for Intermec Technologies Corp."

* commit '707f5b401ec354851c0e1b22c8ddb6aba45fba66':
adb: Add USB vendor ID for Intermec Technologies Corp.
2b6612ff96eaf4ad5debda7af5d2a9bdb04c417d 26-Mar-2014 DanielMo <DanielMo@fih-foxconn.com> adb: Add USB vendor ID for Intermec Technologies Corp.

Change-Id: I6429bca087523829a13f905ae9dfa5f43b7abf8b
Signed-off-by: DanielMo <DanielMo@fih-foxconn.com>
sb_vendors.c
5a5ab405cd796eeb08ae94b201eb297d68f09bd8 20-Mar-2014 JP Abgrall <jpa@google.com> am 4db6ce8e: Merge "Adding documentation on the sync part of the adb protocol previously missing."

* commit '4db6ce8e353458de751394102084bb3a304a7ff6':
Adding documentation on the sync part of the adb protocol previously missing.
ff66a06851828e3e5afaf14dc29526e09ca534e4 20-Mar-2014 JP Abgrall <jpa@google.com> am 4db6ce8e: Merge "Adding documentation on the sync part of the adb protocol previously missing."

* commit '4db6ce8e353458de751394102084bb3a304a7ff6':
Adding documentation on the sync part of the adb protocol previously missing.
4db6ce8e353458de751394102084bb3a304a7ff6 20-Mar-2014 JP Abgrall <jpa@google.com> Merge "Adding documentation on the sync part of the adb protocol previously missing."
912d5dddf81da3c5485d17480fb6b773334bf7eb 20-Mar-2014 Samuel Carlsson <samuel.carlsson@gmail.com> Adding documentation on the sync part of the adb protocol previously missing.

In the SERVICES.TXT a missing documentation file is mentioned - SYNC.TXT. This file is supposed to contain all the godie bits of the adb protocol for pushing and pulling files. I've read the source code and documented this in the file SYNC.TXT. I've used my own documentation to create a java implementation to verify the documentation here: https://github.com/vidstige/jadb

Added line breaks at 78 characters. Added comments about remote files might be deleted.

Change-Id: I48c87c2a9fb5b59b85c72679124dfbbfa9a701bc
Signed-off-by: Samuel Carlsson <samuel.carlsson@gmail.com>
YNC.TXT
111c882b3ca61a3a3c069d0ad69b64053f991e15 14-Mar-2014 David 'Digit' Turner <digit@google.com> am ee223d50: Merge "adb: Increase the max number of emulator instances to 64"

* commit 'ee223d50a009af39be577c30cc35257c751f05a1':
adb: Increase the max number of emulator instances to 64
7cb1504e8a234fa8aaa110912c75fb221307ad17 14-Mar-2014 David 'Digit' Turner <digit@google.com> am ee223d50: Merge "adb: Increase the max number of emulator instances to 64"

* commit 'ee223d50a009af39be577c30cc35257c751f05a1':
adb: Increase the max number of emulator instances to 64
648f4113bcd82e00f4ef1ba80d1928ee0d8d7685 13-Mar-2014 JP Abgrall <jpa@google.com> am 5fb1a34a: Merge "Added transfer progress reporting for push and pull commands."

* commit '5fb1a34af4128bfe7332b02e31b146a82bc2872d':
Added transfer progress reporting for push and pull commands.
094fd86b1423fbb4f4c421447ddf6d10a5027c7b 13-Mar-2014 David 'Digit' Turner <digit@google.com> adb: Increase the max number of emulator instances to 64

When the ADB server starts, it probes the localhost ports to find
existing emulator instances, starting from 5555 with increments of
2, and stopping after ADB_LOCAL_TRANSPORT_MAX tries, which was
set to 16.

This means that the ADB server could not detect on startup more
than 16 existing emulator instances.

This increases the limit to 64, to match a corresponding change
on the emulator side.

See https://android-review.googlesource.com/#/c/83553/

Change-Id: I35c69f8017298c3e5797bd396b8d788d44eaa00f
ransport_local.c
73690b24c64bdd96db5316eead079d03b7dcd8ea 12-Mar-2014 JP Abgrall <jpa@google.com> am 5fb1a34a: Merge "Added transfer progress reporting for push and pull commands."

* commit '5fb1a34af4128bfe7332b02e31b146a82bc2872d':
Added transfer progress reporting for push and pull commands.
76f2a93b18e0d321d527cb64c2b2c4281e1cf70f 12-Mar-2014 Mark Lindner <mlindner@google.com> Added transfer progress reporting for push and pull commands.

Added a new '-p' switch to the 'push' and 'pull' commands that outputs
the file transfer progress (bytes transmitted, total bytes, and % done).
This provides useful feedback when transferring large files, and also
makes it possible for other tools to easily monitor the progress of a
forked push/pull command.

Change-Id: Iee6f42f5bd41292e5bc80fba779f526f0072e356
ommandline.c
ile_sync_client.c
ile_sync_service.h
66146c40f7bb9ae3fba4db905634d41684b81279 11-Mar-2014 JP Abgrall <jpa@google.com> am 44390474: Merge "adb: Don\'t unlink special files on sync failure."

* commit '443904746301e4d519e51075487ea4c8b9a860e3':
adb: Don't unlink special files on sync failure.
8a00ce939aca70aaba4138391441e6b4047ff12d 11-Mar-2014 JP Abgrall <jpa@google.com> am b2c34ece: Merge "adb: Don\'t clobber block devices during push"

* commit 'b2c34ece647c212baa30c474394c498a2d6dd61f':
adb: Don't clobber block devices during push
40b735f9b952fd00d890a3c0689b0f694fc9211b 11-Mar-2014 JP Abgrall <jpa@google.com> am 1367854a: Merge "adb: fix windows build after "forward --list" fix."

* commit '1367854a891090d1be1edfb12515691b20b350cf':
adb: fix windows build after "forward --list" fix.
a4a9e64668ce1980e7c39e476aee89b106f6517a 11-Mar-2014 JP Abgrall <jpa@google.com> am 66e95d76: Merge "Fix adb forward --list when forwarding a lot"

* commit '66e95d76c47a3a099931bbebe7f4a0af4d3f7fbb':
Fix adb forward --list when forwarding a lot
b4f1b3ca6502041bd5350b211f894928790d214d 08-Mar-2014 JP Abgrall <jpa@google.com> am 44390474: Merge "adb: Don\'t unlink special files on sync failure."

* commit '443904746301e4d519e51075487ea4c8b9a860e3':
adb: Don't unlink special files on sync failure.
270ebefc6c0c7937e8bef112a257b25509a1c2b7 08-Mar-2014 JP Abgrall <jpa@google.com> am b2c34ece: Merge "adb: Don\'t clobber block devices during push"

* commit 'b2c34ece647c212baa30c474394c498a2d6dd61f':
adb: Don't clobber block devices during push
55b6c843a6166fbbf57aa4afba8b2c2b3e87cfea 08-Mar-2014 JP Abgrall <jpa@google.com> adb: Don't unlink special files on sync failure.

adb push some_disk_image /dev/block/mmcblk0p9
should not unlink the dev just because adb was ctrl-c'd.

Change-Id: I1b6669e8dba1f80fc1438b8deb618180b7e9a1b2
Signed-off-by: JP Abgrall <jpa@google.com>
ile_sync_service.c
4ce2f838e78592d0b93776b73ca4de855a423dde 03-Dec-2013 JP Abgrall <jpa@google.com> adb: Don't clobber block devices during push

In the past, an adb push would ALWAYS unlink the target path.
Now, we only links and regular files (and links).
This allows the following to work:

adb shell ls -l /dev/block/mmcblk0p8
# brw------- root root 179, 8 2013-11-28 07:43 mmcblk0p8
adb push n7.jpa.mda.post_jb_encryption.raw /dev/block/mmcblk0p8

Bug: 11984121
Change-Id: I982c7a1cd87986621f2bebdcb41c4e281f67f772
ile_sync_service.c
ecac99b54ce704f282ff6706f8cfada48f41b35c 07-Mar-2014 JP Abgrall <jpa@google.com> am 1367854a: Merge "adb: fix windows build after "forward --list" fix."

* commit '1367854a891090d1be1edfb12515691b20b350cf':
adb: fix windows build after "forward --list" fix.
5b0bb4898c61e5b5b7dc95c185b2e46b65f60d00 07-Mar-2014 JP Abgrall <jpa@google.com> adb: fix windows build after "forward --list" fix.

EWOULDBLOCK is not there on windows.
It gets translated by the adb_write() wrapper into EGAIN.
But the Linux one does not translate EWOULDBLOCK into EGAIN.
Without EWOULDBLOCK, it works just fine.

Change-Id: Ic293be392aa4364637428ea94ef87890ffa09b9b
Signed-off-by: JP Abgrall <jpa@google.com>
ransport.c
9f573bb362c3716c54df77d85a0285897daa242a 07-Mar-2014 JP Abgrall <jpa@google.com> am 66e95d76: Merge "Fix adb forward --list when forwarding a lot"

* commit '66e95d76c47a3a099931bbebe7f4a0af4d3f7fbb':
Fix adb forward --list when forwarding a lot
6e94c5764b1775a0e4f122cf3925c46815029ccb 07-Mar-2014 Nick Kralevich <nnk@google.com> am 2e7347d6: Merge "Convert all selinux_android_restorecon and _setfilecon calls to new API."

* commit '2e7347d617b02b13d227bb4cecf6bd69b7b20fa9':
Convert all selinux_android_restorecon and _setfilecon calls to new API.
3530b9cd4675a5e0c5c02dd765450b84ace67401 04-Mar-2014 Nick Kralevich <nnk@google.com> am 02916aa2: Remove obsolete vdc call.

* commit '02916aa20e3ffbe4b738bb12dc1607a7ec6a8c37':
Remove obsolete vdc call.
02916aa20e3ffbe4b738bb12dc1607a7ec6a8c37 15-Jan-2014 Nick Kralevich <nnk@google.com> Remove obsolete vdc call.

Since ca8e66a8b0f843812014a28d49208f9f6f64ecbc, init has
been handling reboots and filesystem unmounts. Remove obsolete
call to vdc.

Bug: 12504045
Change-Id: If8704ca042cb3a68857743b9973e48c52e7eb881
(cherry picked from commit 225459a5da21e9397ca49b0d9af7d5fe3462706b)
db.c
ervices.c
2264e7cfef6b1236a90a13b1d99abb4aadcb0b93 30-Jan-2014 Snild Dolkow <snild.dolkow@sonymobile.com> Fix adb forward --list when forwarding a lot

The list action had some problems with large numbers of forwards:
* adb_query() limited replies to 1024 B (and the print was useless)
* the reply header's length could overflow (also in other commands)
* ...and the client had no way of detecting it
* writex() didn't retry on EAGAIN ("Resource temporarily unavailable")

This patch makes all "OKAY%04x" replies use a common function which
checks the length and limits it to 0xffff. This means that the client
can easily check for truncated replies.

Before: forward --list starts failing at 15-30 forwards (depending on
device serial and forward spec lengths).

After: no problems with forward --list.

Change-Id: Ie1e82c4d622f5c56e51abb26533ba17d40459914
db.c
db_client.c
ransport.c
488b5eafe368781077b367a9afd68db303bc8891 13-Feb-2014 Nick Kralevich <nnk@google.com> am 2e7347d6: Merge "Convert all selinux_android_restorecon and _setfilecon calls to new API."

* commit '2e7347d617b02b13d227bb4cecf6bd69b7b20fa9':
Convert all selinux_android_restorecon and _setfilecon calls to new API.
27a93650c0df02e4cd3c48bbec8acee8b817a012 07-Feb-2014 Stephen Smalley <sds@tycho.nsa.gov> Convert all selinux_android_restorecon and _setfilecon calls to new API.

libselinux selinux_android_restorecon API is changing to the more
general interface with flags and dropping the older variants.

Also get rid of the old, no longer used selinux_android_setfilecon API
and rename selinux_android_setfilecon2 to it as it is the only API in use.

Change-Id: I1e71ec398ccdc24cac4ec76f1b858d0f680f4925
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
ile_sync_service.c
3a5f3050626c01c45ff487274a2399876d63a4eb 28-Jan-2014 Mark Salyzyn <salyzyn@google.com> am 7b9bb36a: am 0256e1f6: am d2acdd82: Merge changes I70ab37d5,I716f89c0,I34c96adf,I77650923,I35b0d1ee, ...

* commit '7b9bb36ade6c8fa2e77416143847b019ddda9e95': (29 commits)
libsysutils: SocketListener export release
libsysutils: Add iovec/runOnEachSocket
liblog: support struct logger_event_v2 format
liblog: update timestamp on NOTICE file
libcutils: resolve warning in iosched_policy.c
liblog: Add const pedantics
logcat: Add -T flag (-t w/o assumption of -d)
logcat: Add logcat test suite
liblog: Add cpu utilization test
liblog: Add liblog test suite
debuggerd: Support newline split in log messages
liblog: deprecate export LOGGER ioctl definitions
liblog: deprecate export of LOGGER_LOG_* defines
liblog: Add README
liblog: resolve build warning messages
liblog: high CPU usage from logcat
liblog: fix build again
liblog: drop use of sys/cdefs.h
liblog: git_master@964770 build problem
logcat: Incorporate liblog reading API
...
d2acdd82e613b3e1d79a00943ac3bf5fbc14a766 28-Jan-2014 Mark Salyzyn <salyzyn@google.com> Merge changes I70ab37d5,I716f89c0,I34c96adf,I77650923,I35b0d1ee, ...

* changes:
libsysutils: SocketListener export release
libsysutils: Add iovec/runOnEachSocket
liblog: support struct logger_event_v2 format
liblog: update timestamp on NOTICE file
libcutils: resolve warning in iosched_policy.c
liblog: Add const pedantics
logcat: Add -T flag (-t w/o assumption of -d)
logcat: Add logcat test suite
liblog: Add cpu utilization test
liblog: Add liblog test suite
debuggerd: Support newline split in log messages
liblog: deprecate export LOGGER ioctl definitions
liblog: deprecate export of LOGGER_LOG_* defines
liblog: Add README
liblog: resolve build warning messages
liblog: high CPU usage from logcat
liblog: fix build again
liblog: drop use of sys/cdefs.h
liblog: git_master@964770 build problem
logcat: Incorporate liblog reading API
debuggerd: Incorporate liblog reading API
liblog: Interface to support abstracting log read
adb: deprecate legacy log service interface
adb: regression from Move list.c to inlines
liblog: whitespace cleanup
libcutils: bug str_parms.c:str_parms_get_float().
libcutils: UNUSED argument warnings
libsysutils: Get rid of warnings
libcutils: Move list.c to inlines on list.h
119dbff9c18453c9d91189424e44b3dcdf9bb82b 28-Jan-2014 Benoit Goby <benoitgoby@google.com> am bbc92ee7: am 68a74ec4: am 6ddabb7a: Merge "adbd: Don\'t close/reopen FFS ep0 on disconnect"

* commit 'bbc92ee7e4d05571e734022894afa2236ccbf9a4':
adbd: Don't close/reopen FFS ep0 on disconnect
6ddabb7a1cc3080ae773acb045f69b5e6afee87a 28-Jan-2014 Benoit Goby <benoitgoby@google.com> Merge "adbd: Don't close/reopen FFS ep0 on disconnect"
7aa39a7b199bb9803d3fd47246ee9530b4a96177 10-Dec-2013 Mark Salyzyn <salyzyn@google.com> adb: deprecate legacy log service interface

(cherry picked form commit c66a7537df987715acc77eed952111cc56b7e72b)

Change-Id: If96019cc13b3d7a4dcd7785c7137e0cbcc622981
ndroid.mk
ERVICES.TXT
db.h
og_service.c
ervices.c
c788278abce1830d4b5e9e78aaefd86d0eecafde 07-Dec-2013 Mark Salyzyn <salyzyn@google.com> adb: regression from Move list.c to inlines

(cherry picked from commit 5f64d528be2ca7229c0e9ce00837ac0fa4da2e54)

Change-Id: I057dbe3db80b1460f774e9f9ade11e0929529ec6
ndroid.mk
75e0645921cb6c3e9d33672733372f519bf57f38 10-Dec-2013 Nick Kralevich <nnk@google.com> Fix overflow in adb_client

Credit: Joshua Drake
Bug: 12060953

(cherry picked from commit e89e09dd2b9b42184973e3ade291186a2737bced)

Change-Id: I8a9b2592a5e4f7527c607abfe4ea6df6eb550aa8
db_client.c
c3af60aff5d097c717b19721f143499891d5ca3d 24-Jan-2014 Nick Kralevich <nnk@google.com> am c7e28899: am 16384312: am 0620e3dd: Merge "adbd: switch to su domain when running as root"

* commit 'c7e28899c3917ad6e72d5dc99401bcd133cbd475':
adbd: switch to su domain when running as root
16384312244b8dccd53478a7bdeeb9a492821807 24-Jan-2014 Nick Kralevich <nnk@google.com> am 0620e3dd: Merge "adbd: switch to su domain when running as root"

* commit '0620e3ddb85582f66612d046d1295dc20bf1a4f5':
adbd: switch to su domain when running as root
d49aa2537cf0b454dfaa4b0312a403ebff202d70 18-Jan-2014 Nick Kralevich <nnk@google.com> adbd: switch to su domain when running as root

When adbd runs as root, it should transition into the
su domain. This is needed to run the adbd and shell
domains in enforcing on userdebug / eng devices without
breaking developer workflows.

Introduce a new device_banner command line option.

Change-Id: Ib33c0dd2dd6172035230514ac84fcaed2ecf44d6
db.c
eb665350d13d36f8974da332674adf5df58859f3 18-Jan-2014 Nick Kralevich <nnk@google.com> am 55537633: am 78af6c4c: am 0a72d293: Merge "Fix "adb push /sdcard/filename""

* commit '555376331f436fb519c182677c22d8299ead5523':
Fix "adb push /sdcard/filename"
78af6c4c946fec01b232c92d40eb6fd202490e3e 18-Jan-2014 Nick Kralevich <nnk@google.com> am 0a72d293: Merge "Fix "adb push /sdcard/filename""

* commit '0a72d2930adcd3b3504448f71b25ebb88c2cc3cf':
Fix "adb push /sdcard/filename"
72917837e6a1163bd389cf535eb404501a118cf2 18-Jan-2014 Nick Kralevich <nnk@google.com> Fix "adb push /sdcard/filename"

Don't assume that calling chown(filename, getuid(), getgid())
will always succeed. In the case of /sdcard, a file you create
will be owned by root, so the chown call will fail.

Instead, use uid=gid=-1 so that the chown call is truly a no-op.

Ignore the results of calling chmod. Again, for /sdcard, the
chmod call will never succeed, because the file isn't owned by
the shell user.

Bug: 12441485
Change-Id: I11eaf1d6f6049c1158afc29754fbb7af2baf2c78
ile_sync_service.c
ec9e5891ac97c50cfb8d3d1c9c2d478637eff62b 16-Jan-2014 Elliott Hughes <enh@google.com> am 8940c0a0: am 97373bbc: am 7cd15614: Merge "system/core 64-bit cleanup."

* commit '8940c0a07f8d6682712e2d2ee387e78096602f99':
system/core 64-bit cleanup.
97373bbc713c52c43e0fa48d0f16466e0a450178 16-Jan-2014 Elliott Hughes <enh@google.com> am 7cd15614: Merge "system/core 64-bit cleanup."

* commit '7cd1561410473c71d40cec822fb53a282b5b3279':
system/core 64-bit cleanup.
ccecf1425412beb2bc3bb38d470293fdc244d6f1 16-Jan-2014 Elliott Hughes <enh@google.com> system/core 64-bit cleanup.

This cleans up most of the size-related problems in system/core.
There are still a few changes needed for a clean 64-bit build,
but they look like they might require changes to things like the
fastboot protocol.

Change-Id: I1560425a289fa158e13e2e3173cc3e71976f92c0
ervices.c
ockets.c
ransport.c
ransport_local.c
sb_linux.c
sb_linux_client.c
225459a5da21e9397ca49b0d9af7d5fe3462706b 15-Jan-2014 Nick Kralevich <nnk@google.com> Remove obsolete vdc call.

Since ca8e66a8b0f843812014a28d49208f9f6f64ecbc, init has
been handling reboots and filesystem unmounts. Remove obsolete
call to vdc.

Bug: 12504045
Change-Id: If8704ca042cb3a68857743b9973e48c52e7eb881
db.c
ervices.c
e0e7595f3c5e069e6b85973df6dbba39dcec0984 12-Jan-2014 Colin Cross <ccross@android.com> am e76343ef: Merge "Emerson USB ID"

* commit 'e76343ef72458aff8fdc25c57f4e84407c05a2f2':
Emerson USB ID
e76343ef72458aff8fdc25c57f4e84407c05a2f2 12-Jan-2014 Colin Cross <ccross@android.com> Merge "Emerson USB ID"
6e39bace17ef089beb143f6324807b9d33df366c 12-Jan-2014 Jon Sawyer <jon@cunninglogic.com> Emerson USB ID

Adds Emerson's USB id to the known USB Devices.

Change-Id: If6115c2551c1f30a5c190690f2aeaaf2adff7ee1
Signed-off-by: Jon Sawyer <jon@cunninglogic.com>
sb_vendors.c
c121c69b856bfa9baea105439fbdac648d154097 09-Jan-2014 Colin Cross <ccross@android.com> am b0751101: Merge "HP USB ID"

* commit 'b0751101b090a8732c62ad261fa44e5d6a69a2cc':
HP USB ID
5ff167ca1121a2d598aa7564449950076f42a5ca 08-Jan-2014 Jon Sawyer <jon@cunninglogic.com> HP USB ID

Adds HP's USB id to the know USB Devices

Change-Id: I975126f3ae5e53f25e18dea7cc43c29076bfc965
Signed-off-by: Jon Sawyer <jon@cunninglogic.com>
sb_vendors.c
4cbf1d882236462482b8e22893061604b224e308 24-Dec-2013 Jack Pham <jackp@codeaurora.org> adbd: Don't close/reopen FFS ep0 on disconnect

In case of bulk read/write failure or disconnect, transport_usb
calls usb_ffs_kick in order to force the daemon to re-open the
FunctionFS ep files as a way to soft restart the kernel driver.

However, there's no reason to always close the ep0 file, as it
would need to be reopened and the descriptors rewritten--this
is unnecessary, especially in the simple/frequent case of cable
disconnect, and causes the kernel driver to unbind and bind *all*
of the function drivers. This is causing USB Chapter 9 tests to fail.

Thus, try to reuse the same ep0 file handle across reconnects. In
case there is a failure, the ep1/ep2 opens would fail and all the
file handles get dropped. For the adb root case, the entire daemon
gets restarted anyway.

Change-Id: I0840085c52a0795dcb2d751c39aa4a436c039ee2
sb_linux_client.c
d8f74f1b3e40d64fafcd327066428235f0312c47 06-Jan-2014 Colin Cross <ccross@android.com> am 491ecd0b: Merge changes Id8bec8a3,Ied42e4d0,Iea3f7cc6,Ic7f7c984,Ic77d5f71, ...

* commit '491ecd0b7275a98b7fda9b1e807724f7f06b1469':
adb: Add USB vendor ID for YotaDevices
adb: Add USB vendor ID for TechFaith
adb: Add USB vendor ID for Rockchip
adb: Add USB vendor ID for EMERGING Technology (Holdings) Ltd.
adb: Add USB vendor ID for Allwinner
adb: Add USB vendor ID for Amlogic
added Gigaset's USB vendor ID
adb: alphabetically sort usb vendors lists
c1b6b153dc7c535294a63a215a018d0824813757 04-Sep-2013 DanielMo <DanielMo@fih-foxconn.com> adb: Add USB vendor ID for YotaDevices

Change-Id: Id8bec8a35edd0d21ae52e8469f7a65b5f4433bc2
Signed-off-by: DanielMo <DanielMo@fih-foxconn.com>
sb_vendors.c
402c2b98889e02a9b558b02a0bc28bd85fb36b31 17-Dec-2013 DanielMo <DanielMo@fih-foxconn.com> adb: Add USB vendor ID for TechFaith

Change-Id: Ied42e4d011b736ee990ed75e7d81bc6a16db47f9
sb_vendors.c
d0057c006b5bdfec6e6322d2b80a985a6359d8f3 27-Aug-2013 DanielMo <DanielMo@fih-foxconn.com> adb: Add USB vendor ID for Rockchip

Change-Id: Iea3f7cc6ed463684fe30a73c39445b3ca36854d9
Signed-off-by: DanielMo <DanielMo@fih-foxconn.com>
sb_vendors.c
fdd189c64ee5afe01f11072255a44fe57b965f57 08-Oct-2013 DanielMo <DanielMo@fih-foxconn.com> adb: Add USB vendor ID for EMERGING Technology (Holdings) Ltd.

Change-Id: Ic7f7c984db19050d2ce4da8ae87683ce42dc9094
Signed-off-by: DanielMo <DanielMo@fih-foxconn.com>
sb_vendors.c
63f0f5117bb8ca781a8d9c9a66f5cba755e6005e 28-Aug-2013 DanielMo <DanielMo@fih-foxconn.com> adb: Add USB vendor ID for Allwinner

Change-Id: Ic77d5f71c9e329e33cd31fa0854e692ad794a609
Signed-off-by: DanielMo <DanielMo@fih-foxconn.com>
sb_vendors.c
d5dab6d5f85e7c03f08614918088a33ce73abcf5 26-Aug-2013 DanielMo <DanielMo@fih-foxconn.com> adb: Add USB vendor ID for Amlogic

Change-Id: I35fad82214f2b5a82b0150821326aaea15784de1
Signed-off-by: DanielMo <DanielMo@fih-foxconn.com>
sb_vendors.c
319d8c1d1f5e11e971125bb244e9afca25bce592 07-Oct-2013 Volker Moesker <volker.moesker@gigaset.com> added Gigaset's USB vendor ID

Change-Id: Iebb0f352eec4530ee1e972527fc76bbb9dad5cc3
Signed-off-by: Volker Moesker <volker.moesker@gigaset.com>
sb_vendors.c
293717c364f325c1b60a28fa5913cec0a99ba03d 06-Jan-2014 Colin Cross <ccross@android.com> adb: alphabetically sort usb vendors lists

Sort the lists of usb vendor ids alphabetically to reduce future
conflicts.

Change-Id: I682c18a1d97adf3a4aa9c00de9fed932c83e4646
sb_vendors.c
4600d80cef73af052cbba25c7af0d7abfda6e08b 03-Jan-2014 Colin Cross <ccross@android.com> am e1095e1d: Merge "Modify BYD\'s USB Vendor ID"

* commit 'e1095e1da12de9d6dc219f497f7c19d1c1f7a41b':
Modify BYD's USB Vendor ID
e1095e1da12de9d6dc219f497f7c19d1c1f7a41b 03-Jan-2014 Colin Cross <ccross@android.com> Merge "Modify BYD's USB Vendor ID"
8be1ccff87cad2a71a4db2f3f827b428e0d26d81 03-Jan-2014 Nick Kralevich <nnk@google.com> am fcf3d207: Merge "adb: configure /system file permission with fs_config"

* commit 'fcf3d207c51f1e734137a08ae2fdb1bb37a50b87':
adb: configure /system file permission with fs_config
20d33f4d99c26afdd0aebf23786958ef34e261e3 03-Jan-2014 Liang Cheng <licheng@nvidia.com> adb: configure /system file permission with fs_config

adbd changes the permissions of files uploaded by copying
owner's permission to group and other. This causes kernel
load failure if any changes are made to kernel modules
followed by ``adb push'' or ``adb sync'' because file mode
644 would become 666.

The change uses fs_config to get the target mode of files.

In addition, the SELinux file label is set incorrectly
on synced files. Set the label properly.

Change-Id: I354db848f39adfbf189d7e8d3b028e8d763c772f
Signed-off-by: Liang Cheng <licheng@nvidia.com>
Bug: 12264775
ndroid.mk
ile_sync_service.c
98fdcfa9817bf54a8695c57366f4ff047ceddb85 19-Dec-2013 Nick Kralevich <nnk@google.com> am 67cb61ee: Merge "adb: Check sender\'s socket id when receiving packets."

* commit '67cb61ee5a8b8f5c967361430fff250e76c3a1dc':
adb: Check sender's socket id when receiving packets.
818d641c420f5d4f35f4e8706937c17b974146d1 13-Dec-2013 David 'Digit' Turner <digit@android.com> adb: Check sender's socket id when receiving packets.

handle_packet() in adb.c didn't check that when an A_WRTE packet is
received, the sender's local-id matches the socket's peer id.

This meant that a compromised adbd server could sent packets to
the host adb server, spoofing the identity of another connected
device if it could "guess" the right host socket id.

This patch gets rid of the issue by enforcing even more checks
to ensure that all packets comply with the description in
protocol.txt.

+ Fix a bug where closing a local socket associated with a
remote one would always send an A_CLSE(0, remote-id, "")
message, though protocol.txt says that should only happen
for failed opens.

The issue was that local_socket_close() called
remote_socket_close() after clearing the remote socket's
'peer' field.

The fix introduces a new asocket optional callback,
named 'shutdown' that is called before that, and is
used to send the A_CLSE() message with the right ID
in remote_socket_shutdown().

Also add some code in handle_packet() to detect
invalid close commands.

Change-Id: I9098bc8c6e81f8809334b060e5dca4fc92e6fbc9
db.c
db.h
ockets.c
a91a47c30c7c6672137d5f43cffe87ed34dae04a 10-Dec-2013 Nick Kralevich <nnk@google.com> am b2dfa7ec: am 02d90b92: am 33e7f915: am 54a80bcf: am cd072e94: am ba104fb7: am e975716e: am 03d4eb29: am d63fb078: am e89e09dd: Fix overflow in adb_client

* commit 'b2dfa7ece7fb69d2ce5ae517eb35492beb646385':
Fix overflow in adb_client
b2dfa7ece7fb69d2ce5ae517eb35492beb646385 10-Dec-2013 Nick Kralevich <nnk@google.com> am 02d90b92: am 33e7f915: am 54a80bcf: am cd072e94: am ba104fb7: am e975716e: am 03d4eb29: am d63fb078: am e89e09dd: Fix overflow in adb_client

* commit '02d90b92ce65ad4e7f49565f0e97373e1d8b0fbf':
Fix overflow in adb_client
02d90b92ce65ad4e7f49565f0e97373e1d8b0fbf 10-Dec-2013 Nick Kralevich <nnk@google.com> am 33e7f915: am 54a80bcf: am cd072e94: am ba104fb7: am e975716e: am 03d4eb29: am d63fb078: am e89e09dd: Fix overflow in adb_client

* commit '33e7f915d6a27880dd4c4c0709dcc921f549eea2':
Fix overflow in adb_client
33e7f915d6a27880dd4c4c0709dcc921f549eea2 10-Dec-2013 Nick Kralevich <nnk@google.com> am 54a80bcf: am cd072e94: am ba104fb7: am e975716e: am 03d4eb29: am d63fb078: am e89e09dd: Fix overflow in adb_client

* commit '54a80bcf88060b21f527c631c7ec911171bdb13f':
Fix overflow in adb_client
54a80bcf88060b21f527c631c7ec911171bdb13f 10-Dec-2013 Nick Kralevich <nnk@google.com> am cd072e94: am ba104fb7: am e975716e: am 03d4eb29: am d63fb078: am e89e09dd: Fix overflow in adb_client

* commit 'cd072e94cf7e546cd6d333cd65641edcd69402b7':
Fix overflow in adb_client
03d4eb29003a712c28733646588fafc8939fc1fe 10-Dec-2013 Nick Kralevich <nnk@google.com> am d63fb078: am e89e09dd: Fix overflow in adb_client

* commit 'd63fb078aea697c536b19c03d29d4dde4ac087fc':
Fix overflow in adb_client
d63fb078aea697c536b19c03d29d4dde4ac087fc 10-Dec-2013 Nick Kralevich <nnk@google.com> am e89e09dd: Fix overflow in adb_client

* commit 'e89e09dd2b9b42184973e3ade291186a2737bced':
Fix overflow in adb_client
e89e09dd2b9b42184973e3ade291186a2737bced 10-Dec-2013 Nick Kralevich <nnk@google.com> Fix overflow in adb_client

Change-Id: I7f8582bd8a69d61ce47d11a9ffd0e901fc371037
Credit: Joshua Drake
Bug: 12060953
db_client.c
a09558c2e205771e6830eeb6241c5c0e3b1cf4ce 13-Nov-2013 Wenhao Li <liwenhao.g@gmail.com> Make server port option work on windows

The server port command line option do not work
on windows, need pass -P option to child process.

Change-Id: Ibb3f0a926fae8e17c75fccbd4bb3a33318fffe9e
db.c
9259663cdb8f15226844e3ecfc6e3aa53614ad03 30-Oct-2013 Elliott Hughes <enh@google.com> am f17f5591: am 36d44740: Merge "Fix a bunch of small system/core bugs."

* commit 'f17f55914e18eb176ccc5bb8266b248ece8cb56b':
Fix a bunch of small system/core bugs.
14e28d39f7f094225c1ddae8fa43bd792c621a8f 29-Oct-2013 Elliott Hughes <enh@google.com> Fix a bunch of small system/core bugs.

Missing frees in:
adb/file_sync_client.c
fastboot/fastboot.c
libsparse/output_file.c

Missing closedirs in:
adb/file_sync_service.c
cpio/mkbootfs.c
libcutils/dir_hash.c

Potential buffer overrun in:
gpttool/gpttool.c

Incorrect NULL check in:
libsparse/backed_block.c

Bug: https://code.google.com/p/android/issues/detail?id=61564
Change-Id: If97838a9e73a77aef7f416c31c237ce1fca4ce21
ile_sync_client.c
ile_sync_service.c
406abdc8a2b68df77ab30836826f642c2ef37bda 28-Oct-2013 Brian Carlstrom <bdc@google.com> am 5dadac50: am 87af04a4: Merge "Improve some adb error logging"

* commit '5dadac50c4bbeaf8baf4d5e04c2d2706d9e74fc7':
Improve some adb error logging
93c91fad77dc9516954a606e6199e8a940d99388 18-Oct-2013 Brian Carlstrom <bdc@google.com> Improve some adb error logging

Bug: 11290643
Change-Id: Ibad4e9f0b69421cd6017b70a52237e7f27aab848
db_client.c
ommandline.c
0bf7924df19f72258df7b553515bfbc9574d0114 24-Oct-2013 Nick Kralevich <nnk@google.com> am 91704522: Don\'t return immediately from reboot commands.

* commit '917045222a69021eb36aea96708649c709685509':
Don't return immediately from reboot commands.
917045222a69021eb36aea96708649c709685509 24-Oct-2013 Nick Kralevich <nnk@google.com> Don't return immediately from reboot commands.

The reboot commands return too fast, interfering with testing.
Add a pause(), which will allow the device time to complete the
reboot.

Change-Id: Ie9cc6eea67b7ff662ec71ea2329cbb94f8d55404
Bug: 11369303
ervices.c
903e6865cae15d5967c4c810ece17c021945c2e4 02-Oct-2013 Colin Cross <ccross@android.com> am b024bbf6: am 6da66ef4: Merge "Handle screendumps for all framebuffer sizes"

* commit 'b024bbf6a1daf752a8d756bfda472fe6fb48dd9e':
Handle screendumps for all framebuffer sizes
6da66ef49b7c35cc5050a4a6b9771801640fb99b 02-Oct-2013 Colin Cross <ccross@android.com> Merge "Handle screendumps for all framebuffer sizes"
8e5b63d045e988f13d1ee9b7797db28fde15bbfc 10-Apr-2013 Doug Zongker <dougz@android.com> mincrypt: support SHA-256 hash algorithm

- adds a library to compute the SHA-256 hash

- updates the RSA verifier to take an argument specifying either SHA-1
or SHA-256

- updates DumpPublicKey to with new "key" version numbers for
specifying SHA-256

- adds new argument to adb auth code to maintain existing behavior

(cherry picked from commit 515e1639ef0ab5e3149fafeffce826cf654d616f)

Change-Id: Ib35643b3d864742e817ac6e725499b451e45afcf
db_auth_client.c
85373f42803f86e3295afd5031a0e42e0b3bef33 25-Sep-2013 Chris Dearman <chris.dearman@imgtec.com> Handle screendumps for all framebuffer sizes

readx() treats a partial read as an error but also consumes the data,
Now exactly the amount of data needed for the screendump is requested.

This bug showed up for framebuffers that were not a multiple of 640
bytes.

Also fix a compiler warning related to handing pipe() failure.

Change-Id: I8b1713923e156d4e3424784152e5dc5cbc7d478d
ramebuffer_service.c
b92649341718984bf91a09a3e9dddf04b844c567 28-Aug-2013 Elliott Hughes <enh@google.com> am 876f4366: am a7f6e015: Merge "correct msi usb vendor id."

* commit '876f436668036e8e9d3f86434eee1a44ff5364b8':
correct msi usb vendor id.
48c5d7b6cd805ea859960f9859b424b5a9a52666 28-Aug-2013 astonehuang <astonehuang@msi.com> correct msi usb vendor id.

Change-Id: I13128531b8dd7758abddce47ce1c119381773c26
sb_vendors.c
88ea2f669f914596f934ed50f67f7360aae71b68 17-Aug-2013 Elliott Hughes <enh@google.com> am 3042c265: am b3644d8f: Merge "Add USB Vendor ID for WACOM"

* commit '3042c265bf3123426e99fed856c9d3b7fa3b3ad6':
Add USB Vendor ID for WACOM
64a602942e159c73ceee5c584064f364137d1f47 13-Aug-2013 Wing Tseng <Wing_Tseng@pegatroncorp.com> Add USB Vendor ID for WACOM

Change-Id: I3deee6d5bdfb9c5bbc0fddcfa39814d27ee281c2
Signed-off-by: Wing Tseng <Wing_Tseng@pegatroncorp.com>
sb_vendors.c
49f2e1cedfcf1dac72efe6e3634a3cd2db299e30 12-Aug-2013 Elliott Hughes <enh@google.com> am cc39d421: am 936032b4: Merge "Add USB Vendor ID for MSI"

* commit 'cc39d421ea5f449d5e201dd1ada7b2a12acf5ad9':
Add USB Vendor ID for MSI
307d96a6e6377e4c250999305db540fdf4926516 01-Aug-2013 astonehuang <astonehuang@msi.com> Add USB Vendor ID for MSI

Change-Id: I4f4bfb6ef08058bf749917119a2b08952e7bc337
sb_vendors.c
44f5c157240bd9ba3077ca7f444fee4ea56ce5cf 25-Jul-2013 Colin Cross <ccross@android.com> Merge "Move liblog headers to system/core/include/log"
b815810f477aa39e28705dda1713152927e5adc6 25-Jul-2013 Elliott Hughes <enh@google.com> am 09f240e0: am 5d855432: Merge "Add USB Vendor ID for ECS"

* commit '09f240e0b06326531e64e9826859a774cd456ad7':
Add USB Vendor ID for ECS
5d8554323caddfa3ca02f31625ea72634312521f 25-Jul-2013 Elliott Hughes <enh@google.com> Merge "Add USB Vendor ID for ECS"
9227bd385504ace739d4451a6c5dc3d777b5bf21 24-Jul-2013 Colin Cross <ccross@android.com> Move liblog headers to system/core/include/log

Move the liblog headers to log/ instead of cutils/ to complete
the separation of libcutils and liblog. cutils/log.h still
exists and includes log/log.h in order to support the many existing
modules that use cutils/log.h.

Change-Id: I2758c9f4aedcb809ca7ba8383d0f55041dd44345
ndroid.mk
og_service.c
cae8b9df5c9368cabda380d82f9b6c4903e1e2e5 24-Jul-2013 ecsgms <ecs.gms@ecs.com.tw> Add USB Vendor ID for ECS

Change-Id: Ib2fa70204d37f53dc642091eb927d865ddc585b5
sb_vendors.c
228ee639be8b75ad13b945950b62529aa6615abd 18-Jun-2013 Elliott Hughes <enh@google.com> am 98c02528: am 19188955: am d92e35eb: Merge "Add Qisda usb config"

* commit '98c02528a2f8bdc0f31a78a8b0b086f4ae823310':
Add Qisda usb config
19188955b50ef6cb133780f66384e9fa055acfac 18-Jun-2013 Elliott Hughes <enh@google.com> am d92e35eb: Merge "Add Qisda usb config"

* commit 'd92e35eb7b97f349054390cfee1d40154dba6d66':
Add Qisda usb config
001fe87e0228b72bc0c048ecd92f31be023b72e5 13-Jun-2013 esther <esther530@gmail.com> Add Qisda usb config

add Qisda usb config
Signed-off-by: esther <esther530@gmail.com>

Change-Id: I5b8a0e5bd2218ecdf417de357c9a7d9307c91932

Conflicts:
adb/usb_vendors.c
sb_vendors.c
e39057b68798807f67179baac8bc61860fa1ab7a 17-Jun-2013 Elliott Hughes <enh@google.com> am 88411498: am 520f4f06: am 865bb05d: Merge "adb: fix reported transfer size for transfer over 4 GiB"

* commit '88411498b3341dbf8f2976991524b1e21dedc6f6':
adb: fix reported transfer size for transfer over 4 GiB
8df29c9b61be76c786100d36194b54a871d604f0 17-Jun-2013 Elliott Hughes <enh@google.com> am 1aeefcd6: am 0173ebd5: am 5f8d9c01: Merge "adb: add vendor ID\'s for Nook, Haier, Hisense, and MTK"

* commit '1aeefcd6900d85911028e6d3e344e338e0a05158':
adb: add vendor ID's for Nook, Haier, Hisense, and MTK
520f4f060325496741f600692f3582536fa43a8f 17-Jun-2013 Elliott Hughes <enh@google.com> am 865bb05d: Merge "adb: fix reported transfer size for transfer over 4 GiB"

* commit '865bb05dd0db1531f252de5e137605beec171ca2':
adb: fix reported transfer size for transfer over 4 GiB
0173ebd531b2b443b56d1c12d598f2f89c95fb0a 17-Jun-2013 Elliott Hughes <enh@google.com> am 5f8d9c01: Merge "adb: add vendor ID\'s for Nook, Haier, Hisense, and MTK"

* commit '5f8d9c012cf28fad57d0896b938b05e2c976073f':
adb: add vendor ID's for Nook, Haier, Hisense, and MTK
865bb05dd0db1531f252de5e137605beec171ca2 17-Jun-2013 Elliott Hughes <enh@google.com> Merge "adb: fix reported transfer size for transfer over 4 GiB"
71150ce4efdaba3d60cb39ed085b3476969ab95e 17-Jun-2013 Jeff Smith <whydoubt@gmail.com> adb: add vendor ID's for Nook, Haier, Hisense, and MTK

Change-Id: I156ff750ef9ae66113d1e0e3ceffea047abc03b9
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
sb_vendors.c
d9a1430ff2b2d2a52b586dfba1db5ac0128dd85b 15-Jun-2013 Jeff Smith <whydoubt@gmail.com> adb: fix reported transfer size for transfer over 4 GiB

When transferring files over 4 GiB with adb, the size of the transfer
is misreported.

Change-Id: Ia3d4cae1e9f82b4f7432341820b101ea9a44f85b
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
ile_sync_client.c
893a4a47e8c9290128b9254af0246e36f821c260 23-May-2013 Nick Kralevich <nnk@google.com> adb: Only use properties on device builds

When building for the host, don't make reference to
property_get / property_set. I'm in the process of removing
host side support for properties.

Change-Id: I691c5872b5fd538e78bc38a3fe72574cdc7f43c3
db.c
ervices.c
ysdeps.h
ransport_local.c
cabb75e42743e22975e8dda1035fc0aa51d8e92a 15-May-2013 kongfanqing <kong.fanqing@byd.com> Modify BYD's USB Vendor ID

Change-Id: I391487a12ba7ed86aac81457f8026acd3fd7576c
sb_vendors.c
928116ceef8dbd5ef38dfe0fd587b5d62c2c0c96 26-Sep-2012 Kenny Root <kroot@google.com> Host builds: add fastboot and adb

Add fastboot and adb host utilities to debug builds for debugging
and development purposes.

Change-Id: If77699a27497b8641998930f14d4ee418b856080
ndroid.mk
15e84ad0425a2a98c0f7db0f0b723fbbd6082cf4 26-Apr-2013 Benoit Goby <benoit@android.com> Merge "adb: Handle adb connect in a thread"
44a5fb57045709f7f3feead4c8444baa2bdfc658 25-Apr-2013 Nick Kralevich <nnk@google.com> Merge "fs_mgr: make block devices read-only"
1c45ee92e2372f3c552744823143fb093fdbda9d 30-Mar-2013 Benoit Goby <benoit@android.com> adb: Handle adb connect in a thread

adb connect calls connect() in the event loop. If you pass a wrong ip
address or the server is slow to respond, this will block the event loop
and you can't even kill the adb server with adb kill-server. Handle connect
requests in a service thread instead.

Change-Id: I2ee732869a3dc22a6d3b87cf8ac80acaa7790037
db.c
db.h
ervices.c
ransport.c
9470c2f1ab555311633d52e5ed8303a813061cdf 21-Feb-2013 Benoit Goby <benoit@android.com> adb: Cleanup dead code

dns_service is unused and recover_service has been replaced by adb
sideload

Change-Id: Ie90000d7f672e8299ee1622a9690c7371b214dc1
ndroid.mk
ERVICES.TXT
db.h
utex_list.h
ervices.c
ockets.c
tils.c
tils.h
e18c0d508a6d8b4376c6f0b8c22600e5aca37f69 17-Apr-2013 Nick Kralevich <nnk@google.com> fs_mgr: make block devices read-only

When a filesystem is mounted read-only, make the underlying
block device read-only too. This helps prevent an attacker
who is able to change permissions on the files in /dev
(for example, symlink attack) from modifying the block device.

In particular, this change would have stopped the LG Thrill / Optimus
3D rooting exploit
(http://vulnfactory.org/blog/2012/02/26/rooting-the-lg-thrill-optimus-3d/)
as that exploit modified the raw block device corresponding to /system.

This change also makes UID=0 less powerful. Block devices cannot
be made writable again without CAP_SYS_ADMIN, so an escalation
to UID=0 by itself doesn't give full root access.

adb/mount: Prior to mounting something read-write, remove the
read-only restrictions on the underlying block device. This avoids
messing up developer workflows.

Change-Id: I135098a8fe06f327336f045aab0d48ed9de33807
emount_service.c
ca8e66a8b0f843812014a28d49208f9f6f64ecbc 18-Apr-2013 Nick Kralevich <nnk@google.com> Make init handle reboots

Move the responsibility for rebooting the system from the
reboot command to init. Init is in a better position to take
actions to bring the system down cleanly, including making sure
filesystems are mounted read-only.

The only UIDs which can perform an init triggered reboot are
root, system, and shell.

Modify the reboot command so that it calls into init to perform
the reboot. The reboot command no longer requires CAP_SYS_BOOT.

Remove the -n reboot option and code which supports it. Anyone needing
to do an unclean shutdown can just do a 'echo c > /proc/sysrq-trigger'.

Modify adb so that it calls into init to perform a shutdown.

Bug: 8646621
Change-Id: I84c0513acb549720cb0e8c9fcbda0050f5c396f5
db.c
ervices.c
519236322615102b27c0d759ca75c349f6c5da6c 18-Apr-2013 Colin Cross <ccross@android.com> am b544da0b: am d7cab8bf: Merge "adb : add missing connection states"

* commit 'b544da0be42cdd1e28d6562a26215d57c51b2f2b':
adb : add missing connection states
b544da0be42cdd1e28d6562a26215d57c51b2f2b 18-Apr-2013 Colin Cross <ccross@android.com> am d7cab8bf: Merge "adb : add missing connection states"

* commit 'd7cab8bff1334ba48620a16d1b98f2ae623fee7d':
adb : add missing connection states
d7cab8bff1334ba48620a16d1b98f2ae623fee7d 17-Apr-2013 Colin Cross <ccross@android.com> Merge "adb : add missing connection states"
50970341bfaf0c218e7fff29e0b2fb652387e274 17-Apr-2013 Elliott Hughes <enh@google.com> am ac76c1f1: am ffc5a4a5: Merge "Add OUYA VID to known VID list"

* commit 'ac76c1f16f889140ec5c56faccd676c2ff15d7bc':
Add OUYA VID to known VID list
ac76c1f16f889140ec5c56faccd676c2ff15d7bc 17-Apr-2013 Elliott Hughes <enh@google.com> am ffc5a4a5: Merge "Add OUYA VID to known VID list"

* commit 'ffc5a4a529338c834954e58de2701572eb0752f0':
Add OUYA VID to known VID list
21ec0516cf0fb6b5a849ca8f47258554a99e386c 16-Apr-2013 Al Sutton <al@funkyandroid.com> Add OUYA VID to known VID list

Add the OUYA VID to the list of known USB VIDs to allow developers with OUYA
consoles to have their device automatically recognized.

Change-Id: I499114d8071747b972c24681fc0771f000ad9f9d
sb_vendors.c
a5ad539cff9dba92650425b8bec79c071ef5993b 17-Apr-2013 trevd <trevd1234@gmail.com> adb : add missing connection states

Both CS_RECOVERY and CS_SIDELOAD where not being checked by
connection_state_name which resulted in adb get-state returning
unknown when a device is in those modes.

Change-Id: I00716024d6a0bdb68d6e2380c8cd7b5d056bd15f
Signed-off-by: trevd <trevd1234@gmail.com>
db.c
515e1639ef0ab5e3149fafeffce826cf654d616f 10-Apr-2013 Doug Zongker <dougz@android.com> mincrypt: support SHA-256 hash algorithm

- adds a library to compute the SHA-256 hash

- updates the RSA verifier to take an argument specifying either SHA-1
or SHA-256

- updates DumpPublicKey to with new "key" version numbers for
specifying SHA-256

- adds new argument to adb auth code to maintain existing behavior

Change-Id: I5b1406cf57c2b8993f6032eda3e29139f7740839
db_auth_client.c
05d6a649a3e3106c762c4da8df1fb5ef0e3f9435 02-Apr-2013 Benoit Goby <benoit@android.com> am 9f25178a: am 7f8fb3ff: Merge "adb: Prevent registering usb_disconnect twice" into jb-mr2-dev

* commit '9f25178a9dd0aa8fab5e74f785c9997ae230a325':
adb: Prevent registering usb_disconnect twice
9f25178a9dd0aa8fab5e74f785c9997ae230a325 02-Apr-2013 Benoit Goby <benoit@android.com> am 7f8fb3ff: Merge "adb: Prevent registering usb_disconnect twice" into jb-mr2-dev

* commit '7f8fb3ffa2a234b704fc975fc9b1001f17df9cac':
adb: Prevent registering usb_disconnect twice
b66356cab6cd47ecbe26513f36614dda1052eb11 02-Apr-2013 Benoit Goby <benoit@android.com> adb: Prevent registering usb_disconnect twice

adbd can receive multiple AUTH_RSAPUBLICKEY packets. This happens for
example when booting with usb attached when we retry authenticating
after the framework is done booting. Make sure usb_disconnect is only
registered once, otherwise this creates a loop in the disconnects list.

Bug: 8504991
Change-Id: Ia1f9a37005dd17b7eefee1493d622e1679263eea
db_auth_client.c
b2ba42a5d3fc6d9d3d249fa1efb22a315b5a972e 30-Mar-2013 Colin Cross <ccross@android.com> am b1d20464: am f5562cb6: Merge "adb: Remove execute permission on usb_vendor.c"

* commit 'b1d204648eb8061aa59bed189ce41938fa40197a':
adb: Remove execute permission on usb_vendor.c
b1d204648eb8061aa59bed189ce41938fa40197a 30-Mar-2013 Colin Cross <ccross@android.com> am f5562cb6: Merge "adb: Remove execute permission on usb_vendor.c"

* commit 'f5562cb66c1c15d65bc372ede4c180430e1ce9d7':
adb: Remove execute permission on usb_vendor.c
243667a98ec8b1114ca0dcfe400aaab089623d78 30-Mar-2013 Benoit Goby <benoit@android.com> am 78420edc: resolved conflicts for merge of 35200422 to jb-mr2-dev-plus-aosp

* commit '78420edc0f3e99684c36f0d516744b4d9312a1c1':
Add BYD's USB Vendor ID
Add USB Vendor ID for Xiaomi
Add vendor IDs to adb
f8cfa8a1e46a8927065df0ce4ded78ced5bea46a 30-Mar-2013 Benoit Goby <benoit@android.com> adb: Remove execute permission on usb_vendor.c

Change-Id: Ia4f2e0171634764bde3593593b3c99184236528f
sb_vendors.c
78420edc0f3e99684c36f0d516744b4d9312a1c1 30-Mar-2013 Benoit Goby <benoit@android.com> resolved conflicts for merge of 35200422 to jb-mr2-dev-plus-aosp

Change-Id: I754b8b17a7e3a6e4ef3ccf0a02beca0fc72ba749
92eb5838336d52b415472a9a9df703a99328b194 15-Mar-2013 sunxiaoqi <sun.xiaoqi@byd.com> Add BYD's USB Vendor ID

Change-Id: I0694ed72d70638f0a4a252b1c802ae8f4e33385e
sb_vendors.c
d3b69404a1497cef235574a97e45867686f4c155 19-Mar-2013 Gary Hua <huachengping@xiaomi.com> Add USB Vendor ID for Xiaomi

Change-Id: I9f0622e05334a5074604bd88093172654b4c3e7d
Signed-off-by: Gary Hua <huachengping@xiaomi.com>
sb_vendors.c
df6d7666fd44e9903944202bcb4a8da6e8064a1d 12-Mar-2013 Sam Lin <samlin@google.com> Add vendor IDs to adb

Adding vendor IDs to adb for device partners:
AnyDATA, Harris & Oppo

Change-Id: Ib8c5196c53599bd6eb077871cd95ccac935c42e7
sb_vendors.c
c6d7e200eddd620d8ac55259ab3aa5f8bfa2aadb 23-Mar-2013 Benoit Goby <benoit@android.com> toolbox: Make reboot a separate command from toolbox

Set the CAP_SYS_BOOT filesystem capability on the new reboot
command and keep CAP_SYS_BOOT in adb bounding set so that the
shell user can run it.

Change-Id: I1dd6143445ee2a952254f0452ab6e544318431dd
db.c
644b6afdacec5ae0724ca799b643a808b6d290c7 12-Mar-2013 Sam Lin <samlin@google.com> Add vendor IDs to adb

Adding vendor IDs to adb for device partners:
AnyDATA, Harris & Oppo

Change-Id: Ib8c5196c53599bd6eb077871cd95ccac935c42e7
sb_vendors.c
dd0d0e78afb5b809983fe9cebac8cc5d54a284b6 09-Mar-2013 Elliott Hughes <enh@google.com> am 822ea9b3: am fd5c6b9f: Merge "Close adb_usb.ini after reading it"

* commit '822ea9b3d1cf240b16135e1b5c3bd926c02d17d6':
Close adb_usb.ini after reading it
fd5c6b9f137940ce2d762c85dfdb4d2f1104f2bd 09-Mar-2013 Elliott Hughes <enh@google.com> Merge "Close adb_usb.ini after reading it"
0c06eb5017e5888f0452da348d12fc92a767e45d 07-Mar-2013 Christopher Tate <ctate@google.com> DO NOT MERGE - Document new -obb flag for adb backup

Now that adb backup handles OBB file backup/restore.

(Cherrypicked)

Change-Id: Ie92b546e3898b62d74f552ab577b7756ad176ee6
ommandline.c
95b087fa90c89b21d18268c84167d1407f9e7905 05-Mar-2013 Colin Cross <ccross@android.com> am 79d4381a: am 69f3ec84: Merge "Fix issues where the filename is referred to as \'sideload\'"

* commit '79d4381a8e838d7ddbeda5b7dc90e0c5bca5a8c6':
Fix issues where the filename is referred to as 'sideload'
86ae6d587b740c70d46e0633a92457454dee79fb 05-Mar-2013 Magnus Eriksson <eriksson.mag@gmail.com> Fix issues where the filename is referred to as 'sideload'

The adb sideload utility referes to the filename as 'sideload' in some
places. This patch changes the printouts to display the filename instead.

Change-Id: I38ada01a08bed53a8d9697c03f55ce8cee2abe12
Signed-off-by: Magnus Eriksson <eriksson.mag@gmail.com>
ommandline.c
277626e59dc0ccbf0337ec6615622f46e6f958fd 01-Mar-2013 Nick Kralevich <nnk@google.com> am 844306bd: am cc4499b6: Merge "adb: use correct header file."

* commit '844306bd9cb3c8b3e514e5d91e9514556e8f95f4':
adb: use correct header file.
e2864bf727d6a404bd871f063c03e36cc8eedeec 28-Feb-2013 Nick Kralevich <nnk@google.com> adb: use correct header file.

Change-Id: I7a66ced762dc077247fd7c2714ae8850ffdcaeb9
db.c
4c609e9683959193dafd7a32bb8393410cbddc74 27-Feb-2013 Nick Kralevich <nnk@google.com> Remove CAP_NET_RAW from adb

ping no longer needs CAP_NET_RAW. See:

* http://lwn.net/Articles/443051/
* https://android-review.googlesource.com/52090
* https://android-review.googlesource.com/52072

Eliminate the CAP_NET_RAW special case in adb

Change-Id: If9d32c5254291b123b06bededc94b64113f6b8f2
db.c
1531c966c11a8e3fe5099d8018715560923ffc9f 22-Feb-2013 Benoit Goby <benoit@android.com> Merge "adb: Fix secure adb when booting with usb attached"
080427e4e2b1b72718b660e16b6cf38b3a3c4e3f 15-Feb-2013 Nick Kralevich <nnk@google.com> adb: drop capability bounding set on user builds

run-as: don't require CAP_DAC_OVERRIDE.

Prevent an adb spawned application from acquiring capabilities
other than

* CAP_NET_RAW
* CAP_SETUID
* CAP_SETGID

The only privileged programs accessible on user builds are
* /system/bin/ping
* /system/bin/run-as

and the capabilities above are sufficient to cover those
two programs.

If the kernel doesn't support file capabilities, we ignore
a prctl(PR_CAPBSET_DROP) failure. In a future CL, this could
become a fatal error.

Change-Id: I45a56712bfda35b5ad9378dde9e04ab062fe691a
db.c
b9c087031b4f387fd2d1c6cb9f3ca1d43435c8d4 15-Feb-2013 Nick Kralevich <nnk@google.com> am e149855a: am 523a2090: Merge "adb: Use 64 bit capabilities."

* commit 'e149855a816c98149a95725139ae66f193049ddd':
adb: Use 64 bit capabilities.
109f4e16cb22e2ae915a4c16d8c8a5e46a749d27 15-Feb-2013 Nick Kralevich <nnk@google.com> adb: Use 64 bit capabilities.

Fix the following kernel warning:

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

Change-Id: I3912302c5c577f1cb03f0c591834ab7b3a72ddf5
db.c
045a4a9c3a317e60ab1078f5a689bf302ee2ab19 16-Jan-2013 Benoit Goby <benoit@android.com> adb: Fix secure adb when booting with usb attached

When booting with usb attached, the secure adb authentication happens
long before the framework is done booting, so adb can't notify the
framework to install the public key.

Change-Id: Id2af6cebece345022f56cb0c4b5af24e1d7a425c
db.c
db_auth.h
db_auth_client.c
49f0f776932ec6120d41d8e144247f9d36a01fb5 30-Jan-2013 Kenny Root <kroot@android.com> am 282caf3b: am 260f3471: am f8afaebe: Merge "Windows adb: include stdint.h for uint8_t on MinGW-w64"

# By Ray Donnelly
# Via Android Git Automerger (2) and others
* commit '282caf3bd0dfd81b92ac74e0b3ea970d195fee7b':
Windows adb: include stdint.h for uint8_t on MinGW-w64
53e5b242317a079a6a194e21e5e06a91ab6a23d8 30-Jan-2013 Kenny Root <kroot@android.com> am 6c3d3ccf: am d033739d: am d40fd86e: Merge "Windows adb: initialize on to 1 in disable_tcp_nagle"

# By Ray Donnelly
# Via Android Git Automerger (2) and others
* commit '6c3d3ccfa5d1d77b80e5c7619909a48b976c69ec':
Windows adb: initialize on to 1 in disable_tcp_nagle
f8afaebec3d10879f22406ac1bf06a246d448f93 30-Jan-2013 Kenny Root <kroot@android.com> Merge "Windows adb: include stdint.h for uint8_t on MinGW-w64"
d40fd86ec5bdf56e8cd5a702ffc5332b6de931e4 30-Jan-2013 Kenny Root <kroot@android.com> Merge "Windows adb: initialize on to 1 in disable_tcp_nagle"
8e85644aa139252acd5a13c99a1f6f7de22b23e7 29-Jan-2013 Benoit Goby <benoit@android.com> Merge "adb: Add "unauthorized" connection state"
83dee8e4e5346553f435626b46487d51b1e0ff2d 29-Jan-2013 Benoit Goby <benoit@android.com> Merge "adb: Read secure adb keys on every auth request"
5bf8a4200c5f1695b0210e59b6b6ef421cedee8f 21-Jan-2013 David Turner <digit@android.com> am 3dbcb6d6: am 98d07897: Merge "Windows adb: Make client stdout and stderr handles uninheritable"

* commit '3dbcb6d6c6befc406e4ce4e2b7aa9ad2635dfbb8':
Windows adb: Make client stdout and stderr handles uninheritable
98d0789772b94b9b0c2aecfab74dc1a9283a91b1 21-Jan-2013 David Turner <digit@android.com> Merge "Windows adb: Make client stdout and stderr handles uninheritable"
77e8e5851d3b951b5382663bd50f1f83cb531eb2 15-Jan-2013 Benoit Goby <benoit@android.com> adb: Add "unauthorized" connection state

Add a new connection state, so that devices, that require confirmation
to allow adb, appear as "unauthorized" in the adb devices lists.

Change-Id: Ib4264bc5736dedecf05bcf8e31896f4d7a91fad8
db.c
db.h
ransport.c
345cb066d2e0c774c877a85d3035f298df1daf16 15-Jan-2013 Benoit Goby <benoit@android.com> adb: Read secure adb keys on every auth request

The framework can now clear the user key list, so we need to reload the
key list on every auth request instead of loading it once when adbd
starts.
This also fixes issues with encrypted devices, where the user key file
is only readable after the user has unlocked the device.

Change-Id: I350c5aab986f8ca86b95f316398d03012553e581
db_auth.h
db_auth_client.c
bbe26c1f79bf860dde9cfbe8cd4ad826cd1a8a53 11-Jan-2013 Ray Donnelly <mingw.android@gmail.com> Windows adb: initialize on to 1 in disable_tcp_nagle
ysdeps_win32.c
2c43b55814c9038f25425dd0a9b202e4fb9b5229 11-Jan-2013 Ying Wang <wangying@google.com> resolved conflicts for merge of f62f1e3a to master

Change-Id: I35c66859e2c454c20c8acc6b2b1f0833032205bb
571c1367682c83cb23481cc9c1028c8588a1fed0 07-Dec-2012 JP Abgrall <jpa@google.com> adb: HACK: (linux only) allow temp mitigation for multithreaded issues

There are serious multithreading issues between the fdevent and transport
subsystems which both manipulate struct asocket and struct fde concurrently.
The prevalent symptom being around multiple socket closures which stomp
on each other, typically causing:
"glibc detected *** adb: double free or corruption ..."

This HACK allows forcing CPU affinity via an env var. E.g.:
export ADB_CPU_AFFINITY_BUG6558362=0
which will cause ONLY the adb server and all its threads to be pegged
to CPU 0.

The result is visible in valgrind's helgrind: no *socket_close() related
data races. But tons of other races are still there.

Bug: 6558362
Change-Id: I0f112390a6a921c64b2a783297be9e99ce27fd56
ndroid.mk
db.c
cbb9891049628a2a89d566cade88c80ba1ba4a7b 29-Nov-2012 Ray Donnelly <mingw.android@gmail.com> Windows adb: include stdint.h for uint8_t on MinGW-w64

Change-Id: I84b8284bc034feb0acd313b0aad9e2fa5868854f
db.c
267aa8b00eadf273321e492026af74b7baad890e 29-Nov-2012 Ray Donnelly <mingw.android@gmail.com> Windows adb: Make client stdout and stderr handles uninheritable

Change-Id: Ib0519a199c9504aad1d0ecc3757f4d162984bf22
db.c
ef2ea99bfe1e19c451882c3c8eb19368d0087ff6 08-Jan-2013 Ying Wang <wangying@android.com> Merge "Correct LOCAL_LDLIBS of adb"
d7c52a458e1c93b539ebd94f341f842d32d36937 04-Jan-2013 jp abgrall <jpa@google.com> am 03873ce4: am 77eccafe: Merge "Support adb client connect to remote server"

* commit '03873ce495e8c4bdb1289cdfa2b97cb47bb15108':
Support adb client connect to remote server
d7b33085117ccbb908a883f624cb1fe5495ee92a 14-Nov-2012 Matt Gumbel <matthew.k.gumbel@intel.com> Support adb client connect to remote server

ADB client: allow user to specify hostname and port number of remote
adb server.
ADB server: bind server to all network interfaces instead of just
localhost when user gives -a flag.

Primary use-case for this change is to support remote testing of USB
devices. HostA is running some test automation software which invokes adb
client. HostB has USB-only device attached and is running adb server. adb
client on HostA makes connection to adb server on HostB to talk to the
USB device.

Change-Id: I845cc8c00350b400317f8c18f813e6fd79bd5470
Signed-off-by: Dean Kwon <daex.i.kwon@intel.com>
Signed-off-by: Jim Bride <jim.bride@intel.com>
Signed-off-by: Matt Gumbel <matthew.k.gumbel@intel.com>
db.c
db_client.c
db_client.h
ommandline.c
9c607552077321d9b6b2e29dab8a6e276bffb457 01-Jan-2013 Chih-Wei Huang <cwhuang@linux.org.tw> Correct LOCAL_LDLIBS of adb

adb doesn't really use ncurses-libs, remove it.

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

Change-Id: If1cc23987a9b35ec535bbf8f4e7db141b9f10af7
ndroid.mk
9bc6f20c618c45183af579e118dcf27b145b4e8c 14-Dec-2012 David 'Digit' Turner <digit@android.com> am abf7cc97: am 13306d95: Merge "adb: Improve ADB\'s forward redirection management."

* commit 'abf7cc977e41540c45836d2fafd81606117f0399':
adb: Improve ADB's forward redirection management.
0d82fbf04d6db847cf598f370aa6986af794bd72 14-Nov-2012 David 'Digit' Turner <digit@android.com> adb: Improve ADB's forward redirection management.

This adds a few new options/modes to 'adb forward':

adb forward --list
adb forward --remove <local>
adb forward --remove-all
adb forward --no-rebind <local> <remote>

For more context, see http://code.google.com/p/android/issues/detail?id=39631

Note that this only affects the host adb client and server programs,
i.e. it's compatible with devices running older adbd versions.

Change-Id: I9cda3ba12b5a8560a2061620bc7f948e5c1e70f7
ERVICES.TXT
db.c
ommandline.c
60529e39bb5d5c1a797394fe78201c0454080ee4 15-Nov-2012 Chris Dearman <chris@mips.com> Close adb_usb.ini after reading it

Signed-off-by: Chris Dearman <chris@mips.com>
Change-Id: I7d3ee8cbd54af206dac89225c438e6c7322c571f
sb_vendors.c
846c686b6663b15833e1827ff8f0232f9a959576 08-Nov-2012 Xavier Ducrohet <xav@android.com> am 493d04d2: am f621d62a: am c4244565: am d1e39491: Add usb vendor id for Teleepoch.

* commit '493d04d2fec59b273a067f5ef9d908dd0b441a08':
Add usb vendor id for Teleepoch.
493d04d2fec59b273a067f5ef9d908dd0b441a08 08-Nov-2012 Xavier Ducrohet <xav@android.com> am f621d62a: am c4244565: am d1e39491: Add usb vendor id for Teleepoch.

* commit 'f621d62adcbcd81d6479223d9afe47c1d966710d':
Add usb vendor id for Teleepoch.
d1e39491f063626e026304ba8abe084cc43c94da 06-Nov-2012 Xavier Ducrohet <xav@android.com> Add usb vendor id for Teleepoch.

Change-Id: I82bbfed598fc3a886681c4139600cf487034c59c
sb_vendors.c
1dcaf9d054bf92a17d82160865bba5c6f7d15adb 13-Oct-2012 Kenny Root <kroot@google.com> am 51ccef27: Merge "Add TEMP_FAILURE_RETRY macro for darwin"

* commit '51ccef27cab58277775e62518a59666d2a059b62':
Add TEMP_FAILURE_RETRY macro for darwin
89c2812bd68ce81fb7a85bb1b946cc2f79f5dbfd 13-Oct-2012 Kenny Root <kroot@google.com> Add TEMP_FAILURE_RETRY macro for darwin

Darwin doesn't define the TEMP_FAILURE_RETRY macro in unistd.h so we
need to add it everywhere. Joy!

(cherry picked from commit ec90f1dc11488f0ab8a25a9159965b4ae3c4ca88)

Change-Id: Ida554fc65193672cc4616dec79e6282e06cc1b28
ysdeps.h
ec90f1dc11488f0ab8a25a9159965b4ae3c4ca88 13-Oct-2012 Kenny Root <kroot@google.com> Add TEMP_FAILURE_RETRY macro for darwin

Darwin doesn't define the TEMP_FAILURE_RETRY macro in unistd.h so we
need to add it everywhere. Joy!

Change-Id: Ida554fc65193672cc4616dec79e6282e06cc1b28
ysdeps.h
c5333e494d5a52261a9e0d595dc66e55e5dc6957 13-Oct-2012 Kenny Root <kroot@google.com> am 1dc92bac: am 207c17ff: Merge "Make adb robust against EINTR"

* commit '1dc92bacb8cbf052438e0b1af4030a57901d6e94':
Make adb robust against EINTR
1dc92bacb8cbf052438e0b1af4030a57901d6e94 13-Oct-2012 Kenny Root <kroot@google.com> am 207c17ff: Merge "Make adb robust against EINTR"

* commit '207c17ff1f48d0db3c69628bb036a14db40b5887':
Make adb robust against EINTR
73167412bc52ee370761e418366ddac504666567 13-Oct-2012 Kenny Root <kroot@google.com> Make adb robust against EINTR

Change-Id: I39a8d9007ce2d5662a33a50e4d7e2e7f8f9fad63
ervices.c
ysdeps.h
d5d6d97defa8999784a15003ed41449954bc7178 26-Sep-2012 Kenny Root <kroot@google.com> Host builds: add fastboot and adb

Add fastboot and adb host utilities to debug builds for debugging
and development purposes.

Change-Id: If77699a27497b8641998930f14d4ee418b856080
ndroid.mk
d8a8979bd932a73378286ecea6a03c7fa8e1b2a6 06-Sep-2012 Jeff Sharkey <jsharkey@android.com> Merge "Bring back ADB_EXTERNAL_STORAGE." into jb-mr1-dev
d6d4286a28b4a9aef902585625ea6656ab06cf52 06-Sep-2012 Jeff Sharkey <jsharkey@android.com> Bring back ADB_EXTERNAL_STORAGE.

Bug: 7119408
Change-Id: Ic9a23fb6adfb1db771e1e278179586bca69a5edd
db.c
96535ba62044c712f8b017fe569f598a7a2934c2 05-Sep-2012 Ying Wang <wangying@google.com> Dist fastboot and adb for the sdk build.

So they can be downloaded from the build page.
Bug: 7109694

Change-Id: Ibc60d0acbc5d2445c01010fd0bd4654a240b0a88
ndroid.mk
345ca131bbc17b1ae1073db04f37f6610ccb4c71 01-Sep-2012 Benoit Goby <benoit@android.com> adb: Link statically with libcrypto

Bug: 7063951
Change-Id: I328b76a751aceaae625d64156f22ce3de65678c8
ndroid.mk
64b3103017cb9038c5fb7e3601f51c6a458bed06 31-Aug-2012 Benoit Goby <benoit@android.com> adb: Create private key with 0600 mode

Changed key name to force generating new pairs.

Bug: 7092477
Change-Id: I680cb9dd1896ae52b2b29d63533f966e033d823f
db.h
db_auth_host.c
d5fcafaf41f8ec90986c813f75ec78402096af2d 12-Apr-2012 Benoit Goby <benoit@android.com> adb: Add public key authentification

Secure adb using a public key authentication, to allow USB debugging
only from authorized hosts.

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

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

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

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

Change-Id: I4e84d7621da956f66ff657245901bdaefead8395
ndroid.mk
db.c
db.h
db_auth.h
db_auth_client.c
db_auth_host.c
rotocol.txt
ysdeps.h
bfcd810b792f7ffbb2ec1360c0c2662725fd0362 22-Aug-2012 Jeff Sharkey <jsharkey@android.com> Iteration on multi-user external storage.

Define /storage as top-level concept, so that we enforce permissions
uniformly. Moves external storage paths from headers to per-device
environment variables. Added missing mount flags, and we no longer
have adb-specific external storage.

Bug: 6925012
Change-Id: Ic7ca953be2f552d3f0ec9e69f89fef751daa1b29
db.c
3fc95a991805feba257a396c13548776fd36f34f 21-Aug-2012 Benoit Goby <benoit@android.com> Revert "adb: Add public key authentification"

This reverts commit f4ed516643ee8ed3a59ad1a8048f7ce5f47f93fb.
ndroid.mk
db.c
db.h
db_auth.h
db_auth_client.c
db_auth_host.c
rotocol.txt
300d6d65d022c4a4663d097e5271eac745be6278 21-Aug-2012 Benoit Goby <benoit@android.com> Merge "adb: Add public key authentification" into jb-mr1-dev
9dd0029a05511d5e15c7fdb453b93f50d5b37d04 21-Aug-2012 John Grossman <johngro@google.com> Merge "Replace a segfault with a warning." into jb-mr1-dev
9367f4f973e0d4dfb1fe898709f0246dce6f81aa 21-Aug-2012 John Grossman <johngro@google.com> Replace a segfault with a warning.

Just print a warning if ADB_EXTERNAL_STORAGE is not defined when ADB
runs instead of segfaulting. If we really don't want to continue to
run, we can make this a fatal error instead.

Change-Id: Icfc5fb9e594b0a310029f1dca7e9476f27ceb7bc
db.c
a8b832a89713dea6d1a82cfc8ecfa624c4fc5783 20-Aug-2012 Jean-Baptiste Queru <jbq@google.com> am 42900c30: am 0874aa0e: Merge "adb: Pick desired product value from command line it follows -p"

* commit '42900c30cf39ea4cdc41cc3671584b7f4f39b8bc':
adb: Pick desired product value from command line it follows -p
0874aa0ec4f413a77a610133c904c2590a2e3ccd 20-Aug-2012 Jean-Baptiste Queru <jbq@google.com> Merge "adb: Pick desired product value from command line it follows -p"
5dd0f86fbfed631b31c9055109889f1d9559a3ea 18-Aug-2012 Jeff Sharkey <jsharkey@android.com> Migrate sdcard0 to shell-accessible location.

Also remove mount() from adb, since it can come online long before
data partition is ready. Set EXTERNAL_STORAGE environment variable
to point to owner for backwards compatibility.

Bug: 7005701
Change-Id: I63444f6636624eb7ad89f053daa289663424639e
db.c
f4ed516643ee8ed3a59ad1a8048f7ce5f47f93fb 12-Apr-2012 Benoit Goby <benoit@android.com> adb: Add public key authentification

Secure adb using a public key authentication, to allow USB debugging
only from authorized hosts.

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

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

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

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

Change-Id: Idce931a7bfe4ce878428eaa47838e5184ac6073f
ndroid.mk
db.c
db.h
db_auth.h
db_auth_client.c
db_auth_host.c
rotocol.txt
885342a0f2c834a6b680284047c47c9d04b32565 15-Aug-2012 Jeff Sharkey <jsharkey@android.com> Multi-user external storage support.

Remount rootfs as recursively shared, so that mount changes are
propagated into child namespaces. Mount external storage for access
from adb.

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

Bug: 6925012
Change-Id: I375de581a63f4f36667894c56a34a9dd45361e8f
db.c
1dd55c53af264b24319d721281fe32c67c053120 21-Jul-2012 Mike J. Chen <mjchen@google.com> Allow adb to listen both on usb and tcp.

(cherry picked from commit ae868a40459a6bcb89d8a4426503fea0c8002b25 in master)

Change-Id: I980c7c5e8affbc8627d17b1d9303b002adcdb29a
Signed-off-by: Mike J. Chen <mjchen@google.com>

Conflicts:

adb/adb.c
db.c
5f73a6863f75c54feec73e0f8dad7160e219197e 09-Aug-2012 Stephen Hines <srhines@google.com> am 7accfc2f: am f889f0db: Merge "Trivial signed/unsigned warning fix for adbd"

* commit '7accfc2ffd3d0fb6e6e8985349e8773f1977df59':
Trivial signed/unsigned warning fix for adbd
8127323f145b2de7e1c30bbb7af0d20d783ac76b 05-Aug-2012 Vairavan Srinivasan <vairav@codeaurora.org> adb: Pick desired product value from command line it follows -p

Change-Id: Ic9fb74c99c88479addf3a2cc599b8492ced759d8
ommandline.c
ae06933cdeb61b1145a1245ea3f40a3d159d215b 26-Jul-2012 Edwin Vane <edwin.vane@intel.com> 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>
ransport_local.c
97d2aef6d231b57afb7e08ef871506e98cf1f171 26-Jul-2012 Edwin Vane <edwin.vane@intel.com> 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>
db.c
9630ca7dcefc9abfe456186758c1b91c43b1a3ff 24-Jul-2012 Colin Cross <ccross@android.com> am d4725517: am ec7d9dc7: Merge "Avoid zombies on androidscreencast"

* commit 'd47255175ede1af31aee9132914e5d14549ba577':
Avoid zombies on androidscreencast
5a536efa5b5f5d973232846d5fe6818df84ab5dc 17-Jul-2012 Yuriy Zabroda <yuriy.zabroda@ti.com> 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>
ramebuffer_service.c
f53aff69487f2c36f0fa28ed8ce46ee53db662a5 10-Jul-2012 Dan Zhang <danielzhang@google.com> Add Kobo's USB vendor ID to adb

Change-Id: I8b86a851e6478d5e8248df4f1e53f3da4dc4b5e0
sb_vendors.c
66086a586f80e394674eb171d683d0d9677e3abf 13-Jun-2012 Benoit Goby <benoit@android.com> am 504dccec: am aeceb517: adb: Fix adb tcpip command

* commit '504dccec97c12283f348838ba0bf88536322ee6b':
adb: Fix adb tcpip command
504dccec97c12283f348838ba0bf88536322ee6b 13-Jun-2012 Benoit Goby <benoit@android.com> am aeceb517: adb: Fix adb tcpip command

* commit 'aeceb5174502659cb4fff6de924b54ef7e6cdae7':
adb: Fix adb tcpip command
aeceb5174502659cb4fff6de924b54ef7e6cdae7 12-Jun-2012 Benoit Goby <benoit@android.com> 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
ockets.c
c29569c5d3c1358983915596267e85e85c7f82e2 07-Jun-2012 Benoit Goby <benoitgoby@google.com> Merge "FunctionFS: initial implementation"
845f106a93d5f8ed710c80293d22d23e1b17ed3c 06-Jun-2012 Scott Anderson <saa@android.com> am 1b7a7e81: adb: Use bionic\'s strtok_r() for Windows

* commit '1b7a7e81195ff06a7482f81cb92b094bb3481cb1':
adb: Use bionic's strtok_r() for Windows
1b7a7e81195ff06a7482f81cb92b094bb3481cb1 06-Jun-2012 Scott Anderson <saa@android.com> 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>
db.c
ysdeps.h
ysdeps_win32.c
0e9e13eb46d8ffbb456f937db4a8fb0da02dd5d2 06-Jun-2012 Scott Anderson <saa@android.com> am 2ca3e6b3: adb: Generalizing -s to take qualifiers.

* commit '2ca3e6b35f79136418ebc32fef57580698dbd045':
adb: Generalizing -s to take qualifiers.
3fef581bc7a513defe48329973d14bec722f1293 06-Jun-2012 Scott Anderson <saa@android.com> am e82c2db0: adb: Transmit key properties in banner of connect message

* commit 'e82c2db05cae70a0490a1f84b7211ef42c329671':
adb: Transmit key properties in banner of connect message
2ca3e6b35f79136418ebc32fef57580698dbd045 31-May-2012 Scott Anderson <saa@android.com> 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>
db.c
db.h
ommandline.c
ockets.c
ransport.c
e82c2db05cae70a0490a1f84b7211ef42c329671 25-May-2012 Scott Anderson <saa@android.com> 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>
db.c
db.h
rotocol.txt
ransport.c
e5867141c9364596fbcd47195aeff5b0f9844435 01-Jun-2012 Scott Anderson <saa@android.com> am 3608d832: adb: Fix two problems with device path implementation.

* commit '3608d832425ca3a6d00c4040f3bb979c5aa49899':
adb: Fix two problems with device path implementation.
a1020825fb8abdff9289a7473260e5312131e7c8 01-Jun-2012 Scott Anderson <saa@android.com> am c7993af6: adb: Fix compiler warning

* commit 'c7993af64baec271a238646bc20aaa846866c4a9':
adb: Fix compiler warning
fd96db17b7f07eb6615af01fd1908b74383bf04b 13-Jan-2012 Andrzej Pietrasiewicz <andrzej.p@samsung.com> 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>
db.c
db.h
sb_linux_client.c
3608d832425ca3a6d00c4040f3bb979c5aa49899 31-May-2012 Scott Anderson <saa@android.com> 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>
ockets.c
ransport.c
c7993af64baec271a238646bc20aaa846866c4a9 25-May-2012 Scott Anderson <saa@android.com> 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>
db.c
678cc32980b092ec90e98f6d62bbeeafb3dd19cb 15-May-2012 Xavier Ducrohet <xav@android.com> am c7a67d0f: resolved conflicts for merge of 246808be to jb-dev-plus-aosp

* commit 'c7a67d0fc4121abb0bc5f11aeda4d848ea8e0690':
Add USB Vendor ID for Yulong Coolpad.
c7a67d0fc4121abb0bc5f11aeda4d848ea8e0690 15-May-2012 Xavier Ducrohet <xav@android.com> resolved conflicts for merge of 246808be to jb-dev-plus-aosp

Change-Id: I3415e2d7b4e8295b7415951c0e8a78c775574089
246808bedfb35ce8abd6cee434ff5b07a6618e8a 15-May-2012 Xavier Ducrohet <xav@android.com> Add USB Vendor ID for Yulong Coolpad.

Bug: 6217375

Change-Id: I8931c42e8d3088cc4df8c6e56b323a7392cad5ef
sb_vendors.c
51a958645ce9aeb4f8dc56d66a85d0005273a6ca 14-May-2012 Jean-Baptiste Queru <jbq@google.com> 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
9dbcbe08751bacbf1fcbf6037fed1e6c69a27fa3 12-May-2012 Jean-Baptiste Queru <jbq@google.com> am 9bdedb59: am a36e1aa3: Merge "adb: usb_windows: fix adb connection lost issue"

* commit '9bdedb599874278abf206230ed31010eeb9b40dd':
adb: usb_windows: fix adb connection lost issue
1c4b760a5d41de3196572d50d1404e453174cf9a 12-Aug-2011 Jack Ren <jack.ren@intel.com> 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>
sb_windows.c
69b2e7dd127d0fdc8dac6794c323856142792ab3 03-May-2012 Jean-Baptiste Queru <jbq@google.com> am 007b7002: am 2ae9878c: am c5d5a5e8: Merge "Kindle Fire USB ID"

* commit '007b70023b179f846c0ad1f0303da4ce03ac065e':
Kindle Fire USB ID
007b70023b179f846c0ad1f0303da4ce03ac065e 03-May-2012 Jean-Baptiste Queru <jbq@google.com> am 2ae9878c: am c5d5a5e8: Merge "Kindle Fire USB ID"

* commit '2ae9878cd5dc517cc7338aaca81f0eb3127b4a53':
Kindle Fire USB ID
76e47e0ec84eaf7faf6f77b853ba74345875a8e3 02-May-2012 Scott Anderson <saa@android.com> am 9526a788: Merge "adb: Add ability to specify device path" into ics-aah

* commit '9526a788a6bd528e14622404e8750bdcc147d15a':
adb: Add ability to specify device path
4474ac408105bb31f945ddab53a24ed148e34227 24-Apr-2012 Anonymous Coward <nobody@android.com> Add encryption parameters to adb install

Change-Id: I92e5f6ace1bc9e711c14cb83533aeb99ab9ab9f7
ommandline.c
e109d266c12c5f537d429ca4b892f2719e02c2da 20-Apr-2012 Scott Anderson <saa@android.com> 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>
ERVICES.TXT
db.c
db.h
ommandline.c
ransport.c
sb_libusb.c
sb_linux.c
sb_linux_client.c
sb_osx.c
sb_windows.c
775ab9c99eb513efecb6390b58bbcec80555eef8 15-Apr-2012 Jon Sawyer <jon@cunninglogic.com> 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>
sb_vendors.c
eb68fa8153d97f5f8b6d9062fcf91fe393e3bff3 02-Apr-2012 Nick Kralevich <nnk@google.com> 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
db.c
f91259a8f0d75d721761d588a4b811427565c984 30-Mar-2012 JP Abgrall <jpa@google.com> 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
ockets.c
d7f1feb5c8c76838b822d093983cc8a3f57a9b2d 30-Mar-2012 JP Abgrall <jpa@google.com> 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
ockets.c
9a7611fefae6710ad9903ee61965434d6fb754cc 29-Mar-2012 Kenny Root <kroot@google.com> Merge "Revert "add IP checking for adb over TCP""
9a77f55aada6c5a8da3d330d858bd04c1c0b6c51 29-Mar-2012 Kenny Root <kroot@google.com> Revert "add IP checking for adb over TCP"

This reverts commit dca76e6187c4128a17c8df5bcaca0db6993d91a1
ransport_local.c
29dc792bcdd466efcdf068404760bcbbbd01017b 29-Mar-2012 Kenny Root <kroot@google.com> Merge "add IP checking for adb over TCP"
60733e9280ebd693293d6e7683af0bd94f8909aa 27-Mar-2012 Kenny Root <kroot@google.com> 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
ommandline.c
4d668e013b232e080498868b190f2078b244e892 26-Mar-2012 Benoit Goby <benoit@android.com> Merge "adb: Don't synchronize with transport using sleep"
62e5cbaebc29d83148dd1ce30a620a37dcdbe7ed 26-Mar-2012 Benoit Goby <benoit@android.com> Merge "Revert "Reimplement the "adb root" command to more closely match its previous behavior""
8ee361cb01e20b3fb0980f428cf83d0e1181a4bd 23-Mar-2012 Andrew Hsieh <andrewhsieh@google.com> Remove duplicated VENDOR_ID_INTEL

VENDOR_ID_INTEL defined and appear in builtInVendorIds[] twice.
Remove the 2nd one.

Change-Id: I62f7bba392012aafb8ea9730959362db4bc6c669
sb_vendors.c
f366b3698b409405e1ee88476d1186f29fe14b06 16-Mar-2012 Benoit Goby <benoit@android.com> 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
db.h
ervices.c
ockets.c
7941cf87f624e7747b5bb868a27904c7a3be0ca4 16-Mar-2012 Benoit Goby <benoit@android.com> Revert "Reimplement the "adb root" command to more closely match its previous behavior"

This reverts commit 535164e9d9649a83d4d63829f3389f2bea339fe1.
ervices.c
9f1af8cde988e8a276753db6019e8c7d94f0e2b4 14-Mar-2012 Benoit Goby <benoit@android.com> 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
ndroid.mk
dca76e6187c4128a17c8df5bcaca0db6993d91a1 13-Mar-2012 Wei Zhong <wzhong@google.com> 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>
ransport_local.c
50458cf76ea7b0b03598c785acb1481ed0ae5b1d 07-Mar-2012 Dianne Hackborn <hackbod@google.com> Add AID_SDCARD_R.

Change-Id: I47f650e415e06c0b69790ffefea7f208c910ebd7
db.c
28781b0a52dfb5ad19121afcc6aef56918992b30 27-Feb-2012 Vladimir Chtchetkine <vchtchetkine@google.com> 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
db.c
db.h
fc656103dba298dbab1377ab07060068f50a5f83 14-Feb-2012 Anatol Pomazau <anatol@google.com> Fix 'extra tokens at end of #endif directive' warning

Change-Id: I464ede415e64cf7db845bb441754120974bcf855
ransport_local.c
46f86f11d446a650602057f8a07eba1f609d7fe9 24-Jan-2012 Xavier Ducrohet <xav@android.com> am 0c054095: am 746f3243: Add USB vendor IDs for Quanta, INQ and Sony.

* commit '0c05409510037fd7372c3fe7ab240ebf33b15831':
Add USB vendor IDs for Quanta, INQ and Sony.
05025357e6aef0d4cf036d350c96ac529f6306c2 24-Jan-2012 Xavier Ducrohet <xav@android.com> am 746f3243: Add USB vendor IDs for Quanta, INQ and Sony.

* commit '746f3243f6d30ab51a36dcfea76eac3ba29ac625':
Add USB vendor IDs for Quanta, INQ and Sony.
0c05409510037fd7372c3fe7ab240ebf33b15831 24-Jan-2012 Xavier Ducrohet <xav@android.com> am 746f3243: Add USB vendor IDs for Quanta, INQ and Sony.

* commit '746f3243f6d30ab51a36dcfea76eac3ba29ac625':
Add USB vendor IDs for Quanta, INQ and Sony.
746f3243f6d30ab51a36dcfea76eac3ba29ac625 14-Jan-2012 Xavier Ducrohet <xav@android.com> Add USB vendor IDs for Quanta, INQ and Sony.

Change-Id: I224e067d9a64e8e9e7afbad0760a4b07f965bf83
sb_vendors.c
38412163da933664791cf511056953b9e3bd1454 24-Jan-2012 Jean-Baptiste Queru <jbq@google.com> 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
70580b20bc8485002df0b3e89e42754c8c9796ff 24-Jan-2012 Jean-Baptiste Queru <jbq@google.com> am 149ae11f: Merge "adb,fastboot: add USB support for Intel Vendor ID"

* commit '149ae11fb63818b470156e1652abfad0e08d486d':
adb,fastboot: add USB support for Intel Vendor ID
a8748d3b2afcbe23eb428f7915a45884ad638438 21-Jan-2012 Andrew Hsieh <andrewhsieh@google.com> am daafb531: am 4779e934: Add Intel\'s vendor ID to adb

* commit 'daafb531484a35a63e229e14d8a81b412e506670':
Add Intel's vendor ID to adb
5890fe33141a9efd124c86c40a8c1ff6170ecf20 19-Jan-2012 Nick Kralevich <nnk@google.com> Don't allow adb to run as root in user builds.

Change-Id: I4fbd7beb7f76c68fead1a89b745f0dfb931b4597
ndroid.mk
db.c
bd9206bc7399b22d3917c737bb75f8534fa77e35 19-Jan-2012 Nick Kralevich <nnk@google.com> Move permission checking code to it's own function.

Change-Id: Ibe46ca3043791f3b3815080f9e23ac307b1f5900
db.c
80d50a4c99610334498d23f19932ee782756f4e7 19-Jan-2012 Andrew Hsieh <andrewhsieh@google.com> am 4779e934: Add Intel\'s vendor ID to adb

* commit '4779e9344bb62208e4772ff6486b6df564f434b8':
Add Intel's vendor ID to adb
4779e9344bb62208e4772ff6486b6df564f434b8 13-Jan-2012 Andrew Hsieh <andrewhsieh@google.com> Add Intel's vendor ID to adb

Change-Id: I81da3ea11bfd44395f6895fe51e477ff1e7fa25b
sb_vendors.c
f60e8638282d66c108f1e1dea030856312f65892 17-Jan-2012 Wu, Hao <hao.wu@intel.com> 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>
sb_vendors.c
a33c6ee92b25f6f89ca2044832344d0a6b2ccd11 11-Jan-2012 Xavier Ducrohet <xav@android.com> am e0b55791: am 07ad9f2a: Add USB Vendor ID for Fujitsu and Lumigon.

* commit 'e0b557915123b7ad022ff5d0a7a3d4dd2ee7c2fe':
Add USB Vendor ID for Fujitsu and Lumigon.
95ec1ca90361c6e3509637565b98ea8c8dca14de 11-Jan-2012 Xavier Ducrohet <xav@android.com> am 07ad9f2a: Add USB Vendor ID for Fujitsu and Lumigon.

* commit '07ad9f2a127b2836c7d45a503a5f3ef7517218f3':
Add USB Vendor ID for Fujitsu and Lumigon.
07ad9f2a127b2836c7d45a503a5f3ef7517218f3 11-Jan-2012 Xavier Ducrohet <xav@android.com> Add USB Vendor ID for Fujitsu and Lumigon.

Change-Id: Icd013b362366815527834cbf54aa4ecac2b7750d
sb_vendors.c
b125671921df885515c87de18aa9fe022bc7d094 11-Jan-2012 Vladimir Chtchetkine <vchtchetkine@google.com> am ae429828: Cherry-picked from c4f37eed7 in master. Do not merge.

* commit 'ae4298286896cbef22b2af285a3f651e8f498185':
Cherry-picked from c4f37eed7 in master. Do not merge.
9f5598834309c61dc7cc8fa964c7e1cc33049929 11-Jan-2012 Vladimir Chtchetkine <vchtchetkine@google.com> am 74159657: Cherry-picked from c13daef7b on master. Do not merge.

* commit '74159657687aadab4c82e4fd7e7a54d16c045d95':
Cherry-picked from c13daef7b on master. Do not merge.
ae4298286896cbef22b2af285a3f651e8f498185 13-Dec-2011 Vladimir Chtchetkine <vchtchetkine@google.com> 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
ransport_local.c
74159657687aadab4c82e4fd7e7a54d16c045d95 10-Dec-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Cherry-picked from c13daef7b on master. Do not merge.

Use QEMU pipe for ADB communication when running in emulator.

Change-Id: I7934b6272c2a9825d244ce76ff65dbce6e54ebff
ransport_local.c
447f061da19fe46bae35f1cdd93eeb16bc225463 09-Jan-2012 Doug Zongker <dougz@android.com> 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
db.c
db.h
ommandline.c
ransport.c
bffa4ca9ad2702d51f5b391b7a05be0c7c691e4e 07-Jan-2012 Christopher Tate <ctate@google.com> 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
ommandline.c
c4f37eed734ecd3310bbe241df1b940329e91d74 13-Dec-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Fix the build.

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

Change-Id: Ie82e415b2ff52395616f85871dddb38e65b0ed55
ransport_local.c
c13daef7bdc09886ffbd573d7836a66b01c02084 10-Dec-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Use QEMU pipe for ADB communication when running in emulator.

Change-Id: I7934b6272c2a9825d244ce76ff65dbce6e54ebff
ransport_local.c
1f4bada6674e052eb44e174c6abbb0a9948f498a 13-Dec-2011 Christopher Tate <ctate@google.com> am 650307df: am b1dfffe6: Fix \'adb backup\' on Windows

* commit '650307df33fc834c251df71c78b00cc0ae6529b7':
Fix 'adb backup' on Windows
1131c1644fe170bc1e1c614ed7cc19c10974b4d2 10-Dec-2011 Christopher Tate <ctate@google.com> am b1dfffe6: Fix \'adb backup\' on Windows

* commit 'b1dfffe6bb506313a3bc9146d2f6f8c533213193':
Fix 'adb backup' on Windows
b1dfffe6bb506313a3bc9146d2f6f8c533213193 09-Dec-2011 Christopher Tate <ctate@google.com> 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
ommandline.c
ae868a40459a6bcb89d8a4426503fea0c8002b25 08-Dec-2011 Joe Onorato <joeo@google.com> Allow adb to listen both on usb and tcp.

Change-Id: I98db594241631fa17e39686727392afc8b3124bc
db.c
c6b07d94fa062886e0908540f3ce760256b37065 08-Dec-2011 Christopher Tate <ctate@google.com> Merge "Tweak logcat parameters"
db0a880c4682a90ddf078f03a0e709ddda07a2fd 30-Nov-2011 Christopher Tate <ctate@google.com> Tweak logcat parameters

Change-Id: If97ee1eb682d95fa05b5e2003a204a628bd6ae4d
ommandline.c
ce48083fc90cee807dd66608e2c3e496145af9ff 30-Nov-2011 Vladimir Chtchetkine <vchtchetkine@google.com> 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 ac52833e48f46dfd9f7c8f86236ee8b437850c0a)

Change-Id: I8ad264765e5b38d01a31e42b445f97ea86e49948
ysdeps_win32.c
ac52833e48f46dfd9f7c8f86236ee8b437850c0a 30-Nov-2011 Vladimir Chtchetkine <vchtchetkine@google.com> 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
ysdeps_win32.c
61b90bd211021886049f72cb666a5b49b83b3c64 09-Nov-2011 JP Abgrall <jpa@google.com> 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
db.c
56885094b63af1b0077dec16bc695aa09d8043fc 04-Oct-2011 Christopher Tate <ctate@google.com> 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
ommandline.c
a031a91b9518af9a38290713b0c2126d9b8f6cde 23-Sep-2011 Kenny Root <kroot@google.com> 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
ommandline.c
dd52e8c57b5026f70a3ec390d2f9a7809ebd2d85 16-Sep-2011 Xavier Ducrohet <xav@android.com> Add Positivo's vendor ID to adb.

Change-Id: Ida6fc323d766249f4f12708bae1c50ae5d937b2c
sb_vendors.c
aa61854645ffed8595507463820e81aa0aa8f2fd 13-Sep-2011 Mike Lockwood <lockwood@android.com> 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>
sb_vendors.c
bb86bc5892374f3a41784135bebc7ada3270c8c1 23-Aug-2011 Christopher Tate <ctate@google.com> 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
ommandline.c
75ae4246295db86089a0d672873bb5121b051b79 16-Aug-2011 Kenny Root <kroot@google.com> Merge "Add install arg for verification"
22268c720b53224ed10fa209266418eec964ea7c 15-Aug-2011 Mike Lockwood <lockwood%android.com@gtempaccount.com> 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)
549bfcda6df30dd00db254b3717fc8df463ce710 15-Aug-2011 Mike Lockwood <lockwood%android.com@gtempaccount.com> 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)
c11f99f40a200f5cdb4bdaedc18fddbc4324189c 15-Aug-2011 zhangclb <zhangclb@lenovo.com> correct VID of Lenovo(0x2006 is for LenovoMobile,0x17EF is for Lenovo)

Change-Id: I3466fdf7b03cf5da189efe4efb563d09f14b467a
sb_vendors.c
de034ec83e2d76db54d1936e706e80853146dcc7 10-Aug-2011 Christopher Tate <ctate@google.com> 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
ommandline.c
597ea5b63f764b4403fd0d34400ab37cf944b479 05-Aug-2011 Kenny Root <kroot@google.com> 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
ommandline.c
9ff99f653632504b98c17fc76eac3383df5b5d1e 05-Aug-2011 Kenny Root <kroot@google.com> Merge "Default to secure mode"
ff9d3484e6c8f2f7e7e25581cb4dc86e0884d8a7 31-Jul-2011 Kenny Root <kroot@google.com> Default to secure mode

If ro.secure is not set for some reason, default to secure mode.

Change-Id: Id0ce3ea5507a3f9690332fb5a2daef7d3303481d
db.c
514b40bafada989c63f8a3d42a517c6c53e04b02 30-Jul-2011 Nick Kralevich <nnk@google.com> am 189de0c1: am adabe566: am 810cf41b: Merge "Fixed memory leak when using transport:serial."

* commit '189de0c1f4339abd7b938b4905775163d2a94bbe':
Fixed memory leak when using transport:serial.
189de0c1f4339abd7b938b4905775163d2a94bbe 30-Jul-2011 Nick Kralevich <nnk@google.com> am adabe566: am 810cf41b: Merge "Fixed memory leak when using transport:serial."

* commit 'adabe566906aa5e8ce791327559aeb10c139b365':
Fixed memory leak when using transport:serial.
810cf41b6d5b772846bbb16700f8c69f03710e60 30-Jul-2011 Nick Kralevich <nnk@google.com> Merge "Fixed memory leak when using transport:serial."
3175c8e9bfcb01f181d7300755da15a999e5461c 27-Jul-2011 Tom Marlin <tomm@bsquare.com> 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>
db.c
ea839db2894b88ff8e039e589ad251579fd14610 29-Jul-2011 Mike Lockwood <lockwood@android.com> am b1cfa672: am 7d39463e: am d1015de9: Merge "adb: Add USB vendor ID for Vizio"

* commit 'b1cfa672014d197d6d4d12fca0d40cd59de436bc':
adb: Add USB vendor ID for Vizio
b1cfa672014d197d6d4d12fca0d40cd59de436bc 29-Jul-2011 Mike Lockwood <lockwood@android.com> am 7d39463e: am d1015de9: Merge "adb: Add USB vendor ID for Vizio"

* commit '7d39463eff2a9002208f34f1d2ce4d62546f6c3a':
adb: Add USB vendor ID for Vizio
fb34e98bdd36717a1df5a2be4de288c5e08c9b78 29-Jul-2011 Mike Lockwood <lockwood@android.com> adb: Add USB vendor ID for Vizio

Change-Id: I280ff83d7f1fda1ed811bd42cb6fd65036525559
Signed-off-by: Mike Lockwood <lockwood@android.com>
sb_vendors.c
b32904a9eaff02799713363d5f6817ce86eaca54 18-Jul-2011 Mike Lockwood <lockwood@android.com> 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
01acea112501f7d140f100591319781e59b90d0e 18-Jul-2011 Mike Lockwood <lockwood@android.com> am 1f72fe99: am 7df080b2: am 3ddaa0ad: Merge "adb: Add USB vendor ID for Lenovo"

* commit '1f72fe991dc2e48c13518015c523f9e3ea048af2':
adb: Add USB vendor ID for Lenovo
7076831c7d59d96e9b75bf9aa5664d1d1b312f32 14-Jul-2011 Jean-Baptiste Queru <jbq@google.com> 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.
7c17d0932c676d75ac0ff42b1917a02127ee554e 14-Jul-2011 Mike Lockwood <lockwood@android.com> adb: Add USB vendor ID for Lenovo

Change-Id: I1c2423f567272493067fae04e64fdcb651b0af62
Signed-off-by: Mike Lockwood <lockwood@android.com>
sb_vendors.c
f75a2ed2138cd8b74597bd57e13d12e1f0b815c2 12-Jul-2011 Jean-Baptiste Queru <jbq@google.com> Merge from gingerbread-plus-aosp

Change-Id: I55b84eda30edf0eade8b43712ab011cd3f65f0d9
29e1e7393d1742f9dd5663c63026f50981e5bd89 12-Jul-2011 Jeff Brown <jeffbrown@google.com> Remove the simulator target from all makefiles.
Bug: 5010576

Change-Id: I2fcf31af681d92880e5d31a46d5f6777f7ca1977
ndroid.mk
292e86230ee0eabb9c9bed902bc3b3941437341d 11-Jul-2011 Mike Lockwood <lockwood@android.com> adb: Add vendor IDs for iRiver, Compal and T & A Mobile Phones

Change-Id: I4dafc43aa76049dd0075e1d70ba05d899e545c8d
Signed-off-by: Mike Lockwood <lockwood@android.com>
sb_vendors.c
sb_vendors.h
7a5c1463ba386fd14e97c9fb4e058129763b60c1 19-May-2011 Joe Bass <jbass@google.com> Add Gigabyte's USB vendor ID to adb.

Bug #4452872

Change-Id: Ib97548d121d40e96ccc519323a335fc90f3b32b9
sb_vendors.c
cbe19cec6192837582906d885dafe1945d6a7f4c 19-May-2011 Xavier Ducrohet <xav@android.com> Add Funai's USB vendor ID to adb.

Change-Id: Idc2974d4437ab1c79cfea5aade98b599a877aad3
sb_vendors.c
535164e9d9649a83d4d63829f3389f2bea339fe1 22-Jun-2011 Mike Lockwood <lockwood@android.com> 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>
ervices.c
07edefe4cecbddaf6282e556e04a1e1ef21c404a 22-Jun-2011 Mike Lockwood <lockwood@android.com> Revert "adb: kick the transport after sending the "adb root" command"

This reverts commit d15e6ac95dc898fb78fb5917bb2e4498b40b716f.

Also increment adb version to 1.0.29

Change-Id: I890643f0c18a2fe90f170134df039c54116cecda
Signed-off-by: Mike Lockwood <lockwood@android.com>
db.h
ockets.c
693e78b9b61da835b6d2f88348bb99ab0840b37e 22-Jun-2011 Mike Lockwood <lockwood@google.com> Merge "Fix hang after end of backup"
10f129ca8eb266f46393e981484e60521f9011df 22-Jun-2011 Christopher Tate <ctate@google.com> 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
ackup_service.c
b0bd6024e344eb49702e24e78654f55254f42e8f 21-Jun-2011 Mike Lockwood <lockwood@android.com> adb: Update version to 1.0.28

Change-Id: Ib8a98d3840abf24cf062112aca7ce462a0f44bc5
Signed-off-by: Mike Lockwood <lockwood@android.com>
db.h
5b811fa5dd00288954f15209a56aea03d5e4a004 10-Jun-2011 Christopher Tate <ctate@google.com> 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
ackup_service.c
ommandline.c
ockets.c
b0a8aae3eda5e245b93cb6d3af286202dc8c011c 16-Jun-2011 Kenny Root <kroot@google.com> Use adb_sleep_ms for Cygwin compat

Change-Id: Iabb2cddfb6740a35e4b6b1563a81b64972c29453
ockets.c
d15e6ac95dc898fb78fb5917bb2e4498b40b716f 12-Jun-2011 Mike Lockwood <lockwood@android.com> 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>
db.h
ockets.c
37b9fc6e7c25e4d7f57e1df6954498c8bc3c5a1b 09-Jun-2011 Nick Kralevich <nnk@google.com> 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
4ba5a8acba033127befd184f2f78cf0580995b07 08-Jun-2011 Nick Kralevich <nnk@google.com> am eafcbe10: am 072a0fac: Merge "Fixed adb crash due to accessing freed memory"

* commit 'eafcbe109f97e5a687cc944e65c383fa45d71c8f':
Fixed adb crash due to accessing freed memory
49f1857dd8b64cdd57f28e965a1ff5fa0c2b0547 13-May-2011 Tom Marlin <tomm@bsquare.com> 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
ockets.c
c9cd3b976111d91ede6cd88bd06eb57b10b2f0e7 02-Jun-2011 Christopher Tate <ctate@google.com> 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
ommandline.c
2bc503e6a9000c1b218f5f059629990341d74c33 22-May-2011 Joe Bass <jbass@google.com> am 0efe2f2f: am b27c682e: am f5144d34: Add Gigabyte\'s USB vendor ID to adb.

* commit '0efe2f2f11d79060962f35a3fb4db525d3f12e9e':
Add Gigabyte's USB vendor ID to adb.
0efe2f2f11d79060962f35a3fb4db525d3f12e9e 21-May-2011 Joe Bass <jbass@google.com> am b27c682e: am f5144d34: Add Gigabyte\'s USB vendor ID to adb.

* commit 'b27c682e28a01b18f7506a9b35222453058107ad':
Add Gigabyte's USB vendor ID to adb.
5526ee0831358d0a79670806e6a7df8b0380e61e 21-May-2011 Christopher Tate <ctate@google.com> Merge "Add 'adb restore' to parallel 'adb backup'"
f5144d34fac074b134722b1fdb6149eb11eff420 19-May-2011 Joe Bass <jbass@google.com> Add Gigabyte's USB vendor ID to adb.

Bug #4452872

Change-Id: Ib97548d121d40e96ccc519323a335fc90f3b32b9
sb_vendors.c
aff5d7870e2f7db808b47d8ca2fd4a567433dba5 19-May-2011 Xavier Ducrohet <xav@android.com> am 44c336bf: am 830fc9af: am 30d916c3: Add Funai\'s USB vendor ID to adb.

* commit '44c336bfe9bbd400461b9b28a449a67145eaeeb8':
Add Funai's USB vendor ID to adb.
44c336bfe9bbd400461b9b28a449a67145eaeeb8 19-May-2011 Xavier Ducrohet <xav@android.com> am 830fc9af: am 30d916c3: Add Funai\'s USB vendor ID to adb.

* commit '830fc9afbe3e83b3b39278d67a9680bb2068098a':
Add Funai's USB vendor ID to adb.
30d916c360d4d49658b9b305b17568b37fcb1029 19-May-2011 Xavier Ducrohet <xav@android.com> Add Funai's USB vendor ID to adb.

Change-Id: Idc2974d4437ab1c79cfea5aade98b599a877aad3
sb_vendors.c
702967afb1bebc97c0b8a23c075d4932820ef7a3 18-May-2011 Christopher Tate <ctate@google.com> 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
ndroid.mk
db.h
ackup_service.c
ommandline.c
ervices.c
024447c3c3dcf63b54cc481f2c6ecbda10823269 17-May-2011 Christopher Tate <ctate@google.com> Use the new 'bu' syntax for backup vs restore operation

Change-Id: Ib007705ee562a41869f8add3408101b3a53aa2d7
ackup_service.c
35e6a003ca5d59cbaa504d8bb8458e8bdd995906 17-May-2011 Omari Stephens <xsdg@android.com> Merge "Add a 1000msec timeout for adb's USB control packets"
574ebc41f8aaaec25039b91b118d2dd98678c7d6 11-May-2011 Christopher Tate <ctate@google.com> Merge "Add 'adb backup' for pulling a full backup tarfile to the host"
8bbae239156cb51fd36300368588e9bf8d42613d 10-May-2011 Omari Stephens <xsdg@android.com> 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
db.h
sb_linux.c
d2f5415c603f7d9961f7a0b05579a0768e071410 21-Apr-2011 Christopher Tate <ctate@google.com> 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
ndroid.mk
db.h
ackup_service.c
ommandline.c
ervices.c
224f9485f15b0319440153e42532f71e0906abf4 27-Apr-2011 Mike Lockwood <lockwood%android.com@gtempaccount.com> am 81ce51da: am 55537c34: am 2f7995ee: Merge "adb: fix typo in helptext"

* commit '81ce51dae95deb0dc6b07cbd96bd07d08aad5178':
adb: fix typo in helptext
81ce51dae95deb0dc6b07cbd96bd07d08aad5178 27-Apr-2011 Mike Lockwood <lockwood%android.com@gtempaccount.com> am 55537c34: am 2f7995ee: Merge "adb: fix typo in helptext"

* commit '55537c347bb31d0e2b176ca2550d2054877f9d54':
adb: fix typo in helptext
6715a4390f482815f51577d25d464537f7e7b823 26-Apr-2011 Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> adb: fix typo in helptext

s/ocmmand/command

Change-Id: I4ed17e8df9dc71a28e1caef5a21f6351e92628af
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
ommandline.c
112445b8a752ce174f36cf853d5f1c356c3f5286 13-Apr-2011 JP Abgrall <jpa@google.com> 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>
ockets.c
0ffe483a6a9191fc6da031bbcdbdc50f6f64bdf0 11-Apr-2011 Mike Lockwood <lockwood%android.com@gtempaccount.com> 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.
e994f18c53673cac42ed45ccb3d427bd40000948 16-Mar-2011 Terence Haddock <thaddock@google.com> In serial, skip over port as well if numbers found after colon.

Change-Id: Icd45f570a9527790eb0cd614a3f77da1a72375b1
ockets.c
b40367e7bc3f89c3875d50b29fa98c3a541e33a3 29-Mar-2011 JP Abgrall <jpa@google.com> adb: keep mac build happy

Use FIONREAD instead of TIOCINQ

Change-Id: Ic9db0228a51c546a798c70f08f2e644a1a376120
devent.c
408fa57864c01113deaa213e5c1848a9c594ae92 16-Mar-2011 JP Abgrall <jpa@google.com> 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
db.c
db.h
db_client.c
ommandline.c
devent.c
devent.h
ile_sync_client.c
ile_sync_service.c
utex_list.h
ervices.c
ockets.c
ysdeps.h
ransport.c
ransport.h
sb_linux.c
sb_linux_client.c
sb_vendors.h
sb_windows.c
28e1390e688f721e13a9877d3c41884bf151db60 16-Mar-2011 Terence Haddock <thaddock@google.com> In serial, skip over port as well if numbers found after colon.

Change-Id: Icd45f570a9527790eb0cd614a3f77da1a72375b1
ockets.c
e3aeeb4de34dbb93e832e6554f494122ba633f3b 08-Mar-2011 Ken Sumrall <ksumrall@android.com> 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
ervices.c
0e7c4274c687446dbe30a814278d7a6b99da8c4e 24-Feb-2011 JP Abgrall <jpa@google.com> 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 69c5c4c45bd4f1575ae8bdba13795297be7deb8c.

Change-Id: I630bf2e04d2ecf0223bd2af4e87136754ff880d3
db.c
db.h
db_client.c
ommandline.c
devent.c
utex_list.h
ervices.c
ockets.c
ysdeps.h
ransport.c
sb_linux.c
sb_linux_client.c
69c5c4c45bd4f1575ae8bdba13795297be7deb8c 18-Feb-2011 JP Abgrall <jpa@google.com> 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>
db.c
db.h
db_client.c
ommandline.c
devent.c
utex_list.h
ervices.c
ockets.c
ysdeps.h
ransport.c
sb_linux.c
sb_linux_client.c
0909af57d59422be672ad02e72837e773e1ddd4b 09-Feb-2011 Mathias Agopian <mathias@google.com> am c1fbf7c1: fix [3374821] Cannot take screenshot of HC preview

* commit 'c1fbf7c1638cb4f1f139edf74562fcfbaa6f3435':
fix [3374821] Cannot take screenshot of HC preview
c1fbf7c1638cb4f1f139edf74562fcfbaa6f3435 09-Feb-2011 Mathias Agopian <mathias@google.com> fix [3374821] Cannot take screenshot of HC preview

don't hardcode the pixelformat to RGBA_8888 when taking
screenshots.

Change-Id: I3a76b49275acfce9a2994436f521b76310cd8fb2
ramebuffer_service.c
67afaad585f327b1306ea840aacd19f16f19d7da 03-Feb-2011 Mike Lockwood <lockwood%android.com@gtempaccount.com> 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.'
3b4a0c81c4f2af46e6075f1150dcde55d436c7a6 02-Feb-2011 Benoit Goby <benoit@android.com> 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
db.c
dwp_service.c
ervices.c
ysdeps.h
eb5df470e6e0402006030b76315f06bcb4f17882 31-Jan-2011 David 'Digit' Turner <digit@google.com> 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
ommandline.c
a5d469484660513e47b074b9d7fff17475a68efc 08-Jan-2011 Mike Lockwood <lockwood@android.com> 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>
sb_linux.c
3e42db23fbbfdc2866f5ca035641444c5ab2ff78 06-Jan-2011 David 'Digit' Turner <digit@google.com> 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
db.c
ransport.c
487009ef5e723729d51b937d6844b8d12fb974a3 15-Dec-2010 Mike Lockwood <lockwood@android.com> 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>
ile_sync_client.c
1d3fbed34897e36ed0b55c68fe6b0a7f2dd2ec8e 13-Dec-2010 Alex Sakhartchouk <alexst@google.com> Adding Texas Instruments to the VID list.

Change-Id: Ifd35587c93ae7d5c8253f477a92cca2345dc8bb5
sb_vendors.c
9c73d17e870e448ea1f036bda70736ae0ae6bf2e 19-Aug-2010 Daniel Sandler <dsandler@google.com> Support an additional alias for 'adb shell.'

Change-Id: Ie8d667407fef8ee5a6c7ab86b30307fb61869170
ommandline.c
b596608f098937049fd98c5896cf72ebbf3584ae 08-Jan-2011 Mike Lockwood <lockwood@android.com> 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>
sb_linux.c
ee878753f915a0176ea411b71bdffde064e24ae0 15-Dec-2010 Mike Lockwood <lockwood@android.com> 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>
ile_sync_client.c
ffe55f760d269d19bd06dd39f60e1a042881082f 13-Dec-2010 Alex Sakhartchouk <alexst@google.com> Adding Texas Instruments to the VID list.

Change-Id: Ifd35587c93ae7d5c8253f477a92cca2345dc8bb5
sb_vendors.c
1c061b9ea952ebdf6093ca1e7c29bfff6332857e 09-Dec-2010 Ying Wang <wangying@google.com> dist for dist_files

Change-Id: I665572a2212f1239b02b7816e37ada210afbdb48
ndroid.mk
5fa7fcf89a978678bcf96730b89f9aad7b6ec97c 21-Oct-2010 Jean-Baptiste Queru <jbq@google.com> am 34961b26: am 6713a2e0: Merge "Fix USB endianness bugs on Linux."

Merge commit '34961b266773006ec6643446e7b5a1558d82e4f4'

* commit '34961b266773006ec6643446e7b5a1558d82e4f4':
Fix USB endianness bugs on Linux.
5985f6ceee15979beee6baa608098f80fc388ccd 21-Oct-2010 Jean-Baptiste Queru <jbq@google.com> am 89463984: am 81347d27: Merge "adb: Improved detection of big endian architecture"

Merge commit '89463984f5576d7ab61303e08f81eb9175afed59'

* commit '89463984f5576d7ab61303e08f81eb9175afed59':
adb: Improved detection of big endian architecture
34961b266773006ec6643446e7b5a1558d82e4f4 21-Oct-2010 Jean-Baptiste Queru <jbq@google.com> am 6713a2e0: Merge "Fix USB endianness bugs on Linux."

Merge commit '6713a2e0c659be9d992e75ab420da5680f522658' into gingerbread-plus-aosp

* commit '6713a2e0c659be9d992e75ab420da5680f522658':
Fix USB endianness bugs on Linux.
89463984f5576d7ab61303e08f81eb9175afed59 20-Oct-2010 Jean-Baptiste Queru <jbq@google.com> 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
12ddbea0fd87ff21da94d25f0ebe89cbfd004a3b 18-Oct-2010 Mike Lockwood <lockwood@google.com> 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
5ca7509f5b188231666973a66566e6de2e3d48db 16-Oct-2010 Xavier Ducrohet <xav@android.com> am fa5c690d: am 89aff1d2: Add Asus USB vendor ID to adb.

Merge commit 'fa5c690d93b92ccf57a0522c498ca2076a7ad98d'

* commit 'fa5c690d93b92ccf57a0522c498ca2076a7ad98d':
Add Asus USB vendor ID to adb.
6f703a2e85a3098b3546a0ce254349b72b440628 22-Sep-2010 Marcus Comstedt <marcus@mc.pp.se> 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
sb_linux.c
d340d2f57dc0d414ea66b1b556caaf8c98b1e967 22-Sep-2010 Marcus Comstedt <marcus@mc.pp.se> 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
ile_sync_service.h
ransport_local.c
ransport_usb.c
a8b8c0e21ac4bdb7838c8c1b8e7d60f632eda79b 16-Oct-2010 Mike Lockwood <lockwood@google.com> 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
d02e521d79a49471b3f1dc3717e842948df64789 16-Oct-2010 Mike Lockwood <lockwood@google.com> adb: Add support for Philips's USB vendor ID

Change-Id: Iaf2e3f6f111198740703b5c3581d95756f797224
Signed-off-by: Mike Lockwood <lockwood@google.com>
sb_vendors.c
3b5d79b78cfdeefccaa5b50c72fe2e5d0636178d 15-Oct-2010 Xavier Ducrohet <xav@android.com> am 1693c32f: am 6c263694: Fix KT Tech\'s usb vendor ID.

Merge commit '1693c32f42e69634b52df1bf827fd81dc3abda46'

* commit '1693c32f42e69634b52df1bf827fd81dc3abda46':
Fix KT Tech's usb vendor ID.
fa5c690d93b92ccf57a0522c498ca2076a7ad98d 15-Oct-2010 Xavier Ducrohet <xav@android.com> 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.
89aff1d22662c64cc2de384e7e2c699e4d1d5d47 15-Oct-2010 Xavier Ducrohet <xav@android.com> Add Asus USB vendor ID to adb.

Bug: 3099385

Change-Id: Ic068fbf58abd23f4bddfe13ae33854a8b4053cf8
sb_vendors.c
1693c32f42e69634b52df1bf827fd81dc3abda46 14-Oct-2010 Xavier Ducrohet <xav@android.com> 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.
6c2636947c43c2950488d8d82bfc691cb907518d 14-Oct-2010 Xavier Ducrohet <xav@android.com> Fix KT Tech's usb vendor ID.

Change-Id: I77a6de8c11d490e2427f704ff64e7c09874a5d14
sb_vendors.c
dff02374301f93860568c7805e20b55e2e04a179 07-Oct-2010 Benoit Goby <benoit@android.com> Don't build adb for sdk only builds

Change-Id: I0c56213e81a889fd3a7c5e72c4a6e63544a2a3bd
Signed-off-by: Benoit Goby <benoit@android.com>
ndroid.mk
cb56b712b559dc66d10a3993b60ee4886cebac73 07-Oct-2010 Benoit Goby <benoit@android.com> Don't build adb for simulator target

Change-Id: Ibe4ef6bb111dc7123e53262553deb8f5e25e9391
Signed-off-by: Benoit Goby <benoit@android.com>
ndroid.mk
c318833b359164f25d7a93f6395c0cad787bacd7 24-Sep-2010 John Michelau <john.michelau@motorola.com> 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
ndroid.mk
db.h
579ca37361b2b1ea9aa62d6b450866e1f48db064 28-Sep-2010 Xavier Ducrohet <xav@android.com> am 1e3f8f27: am f62b23f2: Add new USB vendor IDs.

Merge commit '1e3f8f2769f9a227fe4d4abfe3d26083e4da91e9'

* commit '1e3f8f2769f9a227fe4d4abfe3d26083e4da91e9':
Add new USB vendor IDs.
1e3f8f2769f9a227fe4d4abfe3d26083e4da91e9 28-Sep-2010 Xavier Ducrohet <xav@android.com> am f62b23f2: Add new USB vendor IDs.

Merge commit 'f62b23f2c1540221621024c850fdf615dda0c903' into gingerbread-plus-aosp

* commit 'f62b23f2c1540221621024c850fdf615dda0c903':
Add new USB vendor IDs.
f62b23f2c1540221621024c850fdf615dda0c903 28-Sep-2010 Xavier Ducrohet <xav@android.com> Add new USB vendor IDs.

Change-Id: Ie3b1ee09c67c4c8fdb294cfc99fa28e4ebe8dfae
sb_vendors.c
0715f91223b2f7a91ea08bfa95998d846e7977cf 27-Sep-2010 Mathias Agopian <mathias@google.com> update adbd to use the new screencap command for taking screenshots.

Change-Id: I02c49240f9db9258824020f3f5f04463e17a537a
ramebuffer_service.c
9abea13a0a5015a401c15ad6a2a1db1b337d9cdf 28-Aug-2010 Nick Kralevich <nnk@google.com> am 4692599c: am 44db990d: Fix bug 2950316. Check return values.

Merge commit '4692599cf73240e34d8e3bf7f54e99ebb9c0aaf3'

* commit '4692599cf73240e34d8e3bf7f54e99ebb9c0aaf3':
Fix bug 2950316. Check return values.
4692599cf73240e34d8e3bf7f54e99ebb9c0aaf3 28-Aug-2010 Nick Kralevich <nnk@google.com> am 44db990d: Fix bug 2950316. Check return values.

Merge commit '44db990d3a4ce0edbdd16fa7ac20693ef601b723' into gingerbread-plus-aosp

* commit '44db990d3a4ce0edbdd16fa7ac20693ef601b723':
Fix bug 2950316. Check return values.
44db990d3a4ce0edbdd16fa7ac20693ef601b723 27-Aug-2010 Nick Kralevich <nnk@google.com> Fix bug 2950316. Check return values.

Change-Id: I687bb5fb8195d4c1fc863e32a5e233a8b9e74196
db.c
ff91ab855b84cdcf110f1a899320d3920e7c55a5 19-Aug-2010 Daniel Sandler <dsandler@google.com> Support an additional alias for 'adb shell.'

Change-Id: Ie8d667407fef8ee5a6c7ab86b30307fb61869170
ommandline.c
91c3853911ab23728728728276a21dc6fe5fd622 20-Jul-2010 Takeshi Kishimoto <kishimoto@google.com> Added Toshiba's USB VID (0x0930) upon their request.

Change-Id: I9f7fca6b98b0664ef9af4f7b86f0f5863e91e4c1
sb_vendors.c
81fbbc2d0b3db4eb9565fd8367db00a6dc1c9c66 18-Jun-2010 Takeshi Kishimoto <kishimoto@google.com> Added NEC and PMC's USB VIDs upon their request.

Change-Id: I332ee1e68ff960d41a365aeb96d012253056edd2
sb_vendors.c
deafd15f2c3ee7c7356634787c8463e1f5f937d3 21-Jul-2010 Xavier Ducrohet <xav@google.com> 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.
3c5581da1d58d0b7e3bac0f03d7ec1e63d71b86d 20-Jul-2010 The Android Open Source Project <initial-contribution@android.com> merge from open-source master

Change-Id: I90bd618ff8c6bcbe1071468e0d75574feee58d27
02565fec8240bbff105f285e9e25aade52c15450 20-Jul-2010 The Android Open Source Project <initial-contribution@android.com> merge from open-source master

Change-Id: Ice679e12b8393621b21a8dafe640dd880a09d35e
29837f94b56c3eeaf39f447507324ecdb207ba96 20-Jul-2010 Takeshi Kishimoto <kishimoto@google.com> Added Toshiba's USB VID (0x0930) upon their request.

Change-Id: I9f7fca6b98b0664ef9af4f7b86f0f5863e91e4c1
sb_vendors.c
899913f8168b54e00971c0e8d4ae16d06a4651fe 16-Jun-2010 Viral Mehta <viral.vkm@gmail.com> 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
db.c
fdb13f793742bd981f45333f056e4baa5281e4b5 20-Jul-2010 Jean-Baptiste Queru <jbq@google.com> Merge "Fix ADB daemon file descriptor leak"
67e6fcd19533f54ca37cbe72425f55a40a7f0333 21-Jun-2010 The Android Open Source Project <initial-contribution@android.com> merge from froyo-plus-aosp

Change-Id: Ie231effb4d9dfd63aa98ec08b269c31ce32aa1c0
8f5daadcc13a238344f5121a38345a18abc5aa9a 15-Feb-2010 Teddie Stenvi <teddie.xx.stenvi@stericsson.com> 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>
dwp_service.c
2124afeee1f19423e71c52ede6f4926f5389e917 18-Jun-2010 Takeshi Kishimoto <kishimoto@google.com> Added NEC and PMC's USB VIDs upon their request.

Change-Id: I332ee1e68ff960d41a365aeb96d012253056edd2
sb_vendors.c
2ef569417d1136f9dcb8c2bbc6e3c3c59c4ea28d 15-Jun-2010 The Android Open Source Project <initial-contribution@android.com> merge from open-source master

Change-Id: Ia99df155e4abf0585ed46943b75a2a1569d0534f
ee0306b93386340c86d6ca9f70bd147fba16d901 15-Jun-2010 The Android Open Source Project <initial-contribution@android.com> merge from open-source master

Change-Id: I183a933e96222f8c01516210cfa4be5f18e35b70
d9a1904d3f873f7733e3b7b91c70027781b463c5 15-Jun-2010 The Android Open Source Project <initial-contribution@android.com> merge from open-source master

Change-Id: I14853c1f8a1d392d7ee9dfae3914d9ee3107794c
6f29e5a27b552297295f5570d2de6a8bc9e76738 15-Jun-2010 The Android Open Source Project <initial-contribution@android.com> merge from open-source master

Change-Id: I2dacf7f8895debd0452c3601424e32a3b9e19059
07a804b83ae9aff836bf6e66eb4f2bbe8f88cc90 15-Jun-2010 The Android Open Source Project <initial-contribution@android.com> merge from open-source master

Change-Id: Ia8d41f96f3885bd7159571182d09c1da079e5bc9
83cb93b4016cbd6029a2d215a7b63fa716b103e4 03-Jun-2010 Michael Richardson <mcr@credil.org> added vendor ID for http://www.onthegovideo.com/

Change-Id: I38e3a6f252728d93177745778147e6f6ed45d5c5
sb_vendors.c
feff3a8b8d1da8aaeaf36a09adc44e0fb3789737 15-Jun-2010 Jean-Baptiste Queru <jbq@google.com> Merge "eliminate a compiler warning: signed/unsigned length"
eb558b9240743e24c87796191f54c99890641b14 03-Jun-2010 Michael Richardson <mcr@credil.org> eliminate a compiler warning: signed/unsigned length

Change-Id: I6139a1b3f9caa8fe3492e4850dcc58d8d5ff0cfb
sb_vendors.c
8182829ccb46fc5b043ea258672602dc2928dee2 12-Jun-2010 André Goddard Rosa <andre.goddard@gmail.com> adb: optimize socket-list-walking code

Change-Id: I8bbb8b671c1ce7a2ce736b60b0cdb7b21ccdc372
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
ockets.c
8e78dc64d2fedccc77966b0636f7530f452dc7d5 11-Jun-2010 André Goddard Rosa <andre.goddard@gmail.com> 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>
ockets.c
c419e2a210ad7e37a1f749f2ab4de7c7f95b90d7 11-Jun-2010 André Goddard Rosa <andre.goddard@gmail.com> adb: clean up 0 --> NULL for pointers

Change-Id: I9216fdf534d807a55dfbc6800b5c3ef5f8c83368
ockets.c
f7e148c1bc482fe7f8df49d216b1f9390f0638b9 03-Jun-2010 The Android Open Source Project <initial-contribution@android.com> merge from open-source master

Change-Id: I9b051ebd6e785e4d68e148a005a0485e79aa55ea
cbbe79add1410b53ec65936cfb1b74cac68467f0 24-May-2010 Mike Lockwood <lockwood@android.com> 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>
db.c
db.h
ommandline.c
ransport.c
456688bfb4fa7817031a1d704e8353e1dd5efb3c 02-Jun-2010 The Android Open Source Project <initial-contribution@android.com> merge from open-source master

Change-Id: I99ae03ba51ee185b9cfecf4f26e94a757f3815c2
5dc0f5db7152a604377af30f7d2139a84fd7b30c 02-Jun-2010 The Android Open Source Project <initial-contribution@android.com> merge from open-source master

Change-Id: I9e7ebc99f0de12ed3ae38a3882481485a96f9680
c57a22c8561cc571d23cd7f321103b2b4d2c7cde 02-Jun-2010 The Android Open Source Project <initial-contribution@android.com> merge from open-source master

Change-Id: I44bd527e51d102a56a1efe40cb6e634859b09461
705b37b84c0c13407963fb1cea0309b9c3081368 02-Jun-2010 The Android Open Source Project <initial-contribution@android.com> merge from open-source master

Change-Id: I5f7880bec0c15ae7a42175107d8192ad44b847ca
c0b3ad16598a0cc30cfc2fcd3fc21ce1fd2b978f 02-Jun-2010 The Android Open Source Project <initial-contribution@android.com> merge from open-source master

Change-Id: I71f2e47509695ba9ec626f4a6917a645b00a4e70
67d5358e2a870f9e9447517bfa49bf5c6b410a50 25-May-2010 Mike Lockwood <lockwood@android.com> adb: remove obsolete shell history support.

Change-Id: I85a7cda176ca3bb7cb9f96e18556d53daaac3023
Signed-off-by: Mike Lockwood <lockwood@android.com>
ndroid.mk
ommandline.c
istory.h
hlist.c
hlist.h
7fe202f160ca1926bc0277e3c276ad7b3f9b9aeb 25-May-2010 Jack Palevich <jackpal@google.com> 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
ndroid.mk
d9d1ca47802395e9e42e7deb05b2683d9d306598 26-Apr-2010 Stefan Hilzinger <hilzinger@google.com> 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>
db.c
db.h
ransport_local.c
5762ec29056936decf23b498724cd38d4a702edc 07-May-2010 Colin Cross <ccross@android.com> Fix adb remount on non-MTD devices

Change-Id: If8e07502bcface53aaac81022f6183c6a147edc8
Signed-off-by: Mike Lockwood <lockwood@android.com>
emount_service.c
f1c03de74e56a82551c8d8165021bc23c6ac11a5 07-May-2010 Dima Zavin <dima@android.com> adb: Add Qualcomm USB id

Change-Id: I044a77f14d7a90e9dff191919e4aeb39723ea429
Signed-off-by: Dima Zavin <dima@android.com>
sb_vendors.c
e57d89186def9dfabe39cec7a91397079514dc2a 04-May-2010 The Android Open Source Project <initial-contribution@android.com> merge from open-source master

Change-Id: Ibc1c58aa757910f2b00acf6883127dd027f01d73
cd64315f72537359537c66eebe482495ffefba57 16-Feb-2010 Tim <tdhutt@gmail.com> Add documentation for some adb environmental variables.

The ADB_TRACE one is particularly important.

Change-Id: I125a5930c43065c8cf505eea40d20e3f209bc858
ommandline.c
9a22c68e8697a2ec86cd238a87a32ea42d7f8d39 28-Apr-2010 The Android Open Source Project <initial-contribution@android.com> merge from open-source master

Change-Id: Id824d3427cb4808a8768f14e7b46c0eaf5e02e73
26bb6e92ba392b28eb2edabb639f8750f859ce20 26-Apr-2010 Brian Carlstrom <bdc@google.com> Fixing spelling errors in adb docs

Change-Id: I9376717165a01e207034f84a31f85335d3740f18
VERVIEW.TXT
ERVICES.TXT
a84a42eb20d43ffa2695a69d583a6e09532b49d9 19-Apr-2010 Stefan Hilzinger <hilzinger@google.com> 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
db.c
db.h
db_client.c
db_client.h
ommandline.c
ransport_local.c
23e64161be09ce26cb4d213a860f61e1fe77d975 15-Apr-2010 Mike Lockwood <lockwood@android.com> 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>
db.c
4f660699bf3317e299f9fda780c711178f6ea932 31-Mar-2010 Xavier Ducrohet <xav@android.com> Add Pantech's USB vendor ID to adb.

Change-Id: I5334f46ee52ca1bd8067860701aef7b93296bedb
sb_vendors.c
c22b9bf1a8e9f1cc73a1407ccf12183f07736a04 12-Mar-2010 Takeshi Kishimoto <kishimoto@google.com> Added Kyocera's VID (0x0482), upon their request.

Change-Id: I8f2f2a02c22d618c0b42d4f287d88a98af3ac4fa
sb_vendors.c
505bd6e5fcc576eb3bea87ac86db8aeed86d9a0d 19-Feb-2010 Mike Lockwood <lockwood@android.com> 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>
db.h
sb_linux.c
805c4a70300ed918853eec2f67e7b45919e48e10 02-Mar-2010 Brian Carlstrom <bdc@google.com> Add missing newlines to adb usage message
ommandline.c
c519c00c367c9017eed70973022813e828448818 22-Sep-2009 Mike Lockwood <lockwood@android.com> adb: do not mix printf() with write() when writing to stdout.

Change-Id: I3598cc951778080bec9a21d646656d5aba57120a
Signed-off-by: Mike Lockwood <lockwood@android.com>
ommandline.c
16f1550b51a12187799bb9d577839f2812c949d6 22-Feb-2010 Takeshi Kishimoto <kishimoto@google.com> Added ZTE's USB Vendor ID (0x19D2) upon ZTE's request.
sb_vendors.c
17273091e960ba683a90974aa6f0629e1575350d 09-Feb-2010 Takeshi Kishimoto <kishimoto@google.com> Added USB vendor id of Sharp, based on Sharp's request.
Sharp's vendor id: 0x04dd
sb_vendors.c
a00a69e07d959f73495e42637fe1f493eb01193d 24-Apr-2010 Raphael <raphael@google.com> 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.
b419c35c660d7421e18a9efef38eca11966b44c7 14-Apr-2010 Raphael <raphael@google.com> Fix adb, fastboot to compile in Windows SDK under Linux.

(Merged from master Change I3d0e4cab)

Change-Id: Ib3fd566bdaf09d5893a6b0c66168c76c6b0d92eb
ndroid.mk
775a8df614d364fcb82e280069a3f533381240b4 21-Apr-2010 The Android Open Source Project <initial-contribution@android.com> merge from open-source master

Change-Id: I686f28fcfcff1cca7cf254de9e4334cc4ea2fef7
05f202a94bd7c51db10f041bde6006b4e719929e 20-Apr-2010 Mike Lockwood <lockwood@android.com> Merge "adb: Add persistent system property for running adb in TCPIP mode"
8e2ceaeacf9fa1eb5ac41e4d3498836a6e2c7c97 20-Apr-2010 Mike Lockwood <lockwood@android.com> 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>
db.c
3523412f43ec616775a73f5fb8a2615370a1ee3a 20-Apr-2010 The Android Open Source Project <initial-contribution@android.com> merge from open-source master

Change-Id: Ib9250bd9d73664b07facaef362beba57a1519411
705c944c0e2a50150ffb41707b6b3daebb45cf79 22-Feb-2010 Anthony Newnam <anthony.newnam@garmin.com> Add -l option to `adb sync`

Change-Id: I87c01663dff319dde24b70560e6fe5647ebf9d49
ommandline.c
ile_sync_client.c
ile_sync_service.h
8ac50107a21b96f6e9c77ab23820d164543c5bbe 16-Apr-2010 The Android Open Source Project <initial-contribution@android.com> merge from open-source master

Change-Id: I7f30144c12c340501f161fba70a917eb62afc41f
457d81cec12fce6e38c0dcd94d33d06036c2618a 04-Jan-2010 Matt Fischer <matt.fischer@garmin.com> Allow 'adb pull' to pull symlinked files

Change-Id: I02f31334e4ee0c7b0e7b379016629a465e711905
ile_sync_client.c
7c19bbe086b3cd81499829c0a79ed0ed0ae4fb16 31-Mar-2010 Xavier Ducrohet <xav@android.com> Add Pantech's USB vendor ID to adb.

Change-Id: I5334f46ee52ca1bd8067860701aef7b93296bedb
sb_vendors.c
8d2f91db21271a253bfe1bbe7716ff59e88572bd 12-Mar-2010 Takeshi Kishimoto <kishimoto@google.com> Added Kyocera's VID (0x0482), upon their request.

Change-Id: I8f2f2a02c22d618c0b42d4f287d88a98af3ac4fa
sb_vendors.c
fe582b5d32d08d075be87f4c9193e24029963361 19-Feb-2010 Mike Lockwood <lockwood@android.com> 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>
db.h
sb_linux.c
6fcc801eadcccd09d92045f851f9fbf1ed0f25ea 02-Mar-2010 Brian Carlstrom <bdc@google.com> Add missing newlines to adb usage message
ommandline.c
bfb0477f1d0210e117f66f36128f9cc0ca962b6e 27-Feb-2010 Mike Lockwood <lockwood@android.com> Merge "adb: do not mix printf() with write() when writing to stdout."
1d01c295a9fa8cd543af046c4232d3430b73ac13 26-Feb-2010 Satoshi Kataoka <satok@google.com> Merge "Added ZTE's USB Vendor ID (0x19D2) upon ZTE's request."
dd6b36e334809e7a99f0bce45353cdd7e4dac4e1 22-Sep-2009 Mike Lockwood <lockwood@android.com> adb: do not mix printf() with write() when writing to stdout.

Change-Id: I3598cc951778080bec9a21d646656d5aba57120a
Signed-off-by: Mike Lockwood <lockwood@android.com>
ommandline.c
d969faa161310d0a3792766320daa3200b84bd74 24-Feb-2010 Mike Lockwood <lockwood@android.com> adb: Attempt to unmount the SD card before rebooting.

Change-Id: Idd4d96b4704f4e1bd324e72bca87611a23e30801
Signed-off-by: Mike Lockwood <lockwood@android.com>
db.c
ervices.c
d6391c6aaaa40c20761b7a2a8d4be115163e4194 23-Feb-2010 The Android Open Source Project <initial-contribution@android.com> merge from open-source master
01512aa3b0e3709e97054ffd1ff265a2d4193646 22-Feb-2010 Takeshi Kishimoto <kishimoto@google.com> Added ZTE's USB Vendor ID (0x19D2) upon ZTE's request.
sb_vendors.c
0ef3fd048aeaeb59467e43e543f66b96e4e6c7f5 19-Feb-2010 Mike Lockwood <lockwood@android.com> adb: add -s option to adb install for installing apps on SD card.

Change-Id: Ic6b24411e594d160ddcf862cc9f1283e1e17bb4d
Signed-off-by: Mike Lockwood <lockwood@android.com>
ommandline.c
5a912bf03e62a8d37624d6323d43253c76022130 01-Feb-2010 Raphael <raphael@google.com> ADB: Garmin-Asus's USB Vendor ID

Change-Id: I3249d629f59d40f291079fc214b643ac6c927f76
sb_vendors.c
2f6c2b04fbc0a3b1103b2c42ccdd2e4917fef455 21-Jan-2010 Erik Gilling <konkers@android.com> adb: add Nvidia's vendor id to adb

Signed-off-by: Erik Gilling <konkers@android.com>
sb_vendors.c
7eced2b86aa4ad91307b6531cae73ce1a4064b18 20-Jan-2010 Dan Egnor <egnor@google.com> 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.
ommandline.c
429c5ae4618a454120a0fa353a378916f38d2fd7 17-Jan-2010 Mike Lockwood <lockwood@android.com> adb: Fix problems detecting adb in more complicated USB configurations.

Change-Id: Ib5b13960a1c75efc97abeca46204c85bba905c71
Signed-off-by: Mike Lockwood <lockwood@android.com>
sb_linux.c
8071a4bdb6e437baa4efcb8cf777d4caeaf069e4 05-Jan-2010 Joe Onorato <joeo@android.com> Make adb pull use . as the target file directory if you don't supply one.
ommandline.c
123331adeaed6c54e4869b0fd7001c5f1b19bdc4 09-Feb-2010 Takeshi Kishimoto <kishimoto@google.com> Added USB vendor id of Sharp, based on Sharp's request.
Sharp's vendor id: 0x04dd
sb_vendors.c
3332d6e69d3182a756c029e9d499a78f17c4b17a 02-Feb-2010 Raphael <raphael@google.com> resolved conflicts for merge of 190cabb3 to master
190cabb376d9a393b65a0d8c123196bf58ef7ab4 02-Feb-2010 Raphael <raphael@google.com> 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
1873adc2b12d5a9045bae90650bb331c7c7aa3c7 01-Feb-2010 Raphael <raphael@google.com> ADB: Garmin-Asus's USB Vendor ID

Change-Id: I3249d629f59d40f291079fc214b643ac6c927f76
sb_vendors.c
f71f068fb9082ad78c78493c1295074e88a5526c 22-Jan-2010 Xavier Ducrohet <xav@android.com> Add DELL's USB Vendor ID to adb - DO NOT MERGE

Change-Id: Ie1a6b6a81f50956362aee2a2d6d1b805f0e85b7a
sb_vendors.c
288c7cfe1b702dc669a8c4b7094035efc1cf7e30 22-Jan-2010 Dan Egnor <egnor@google.com> 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."
6ac5e192997478ae166981ddf66136c865d21a40 21-Jan-2010 Erik Gilling <konkers@android.com> adb: add Nvidia's vendor id to adb

Signed-off-by: Erik Gilling <konkers@android.com>
sb_vendors.c
c130ea7c29b0149939c8fd6b8da2c981944636f9 20-Jan-2010 Dan Egnor <egnor@google.com> 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.
ommandline.c
37ddce736ce7700ee1e120f7371e6ee6a526f3ca 19-Jan-2010 Mike Lockwood <lockwood@android.com> adb: Add Dell's USB vendor ID.

Signed-off-by: Mike Lockwood <lockwood@android.com>
sb_vendors.c
cc7a5dc770e50272f3c14dacf8b0d7ad5f68032d 19-Jan-2010 Mike Lockwood <lockwood@android.com> adb: Add Dell's USB vendor ID.

Signed-off-by: Mike Lockwood <lockwood@android.com>
sb_vendors.c
07e8f7e8758d5ce44fe6cf3bacb670962750a92e 17-Jan-2010 Mike Lockwood <lockwood@android.com> adb: Fix problems detecting adb in more complicated USB configurations.

Change-Id: Ib5b13960a1c75efc97abeca46204c85bba905c71
Signed-off-by: Mike Lockwood <lockwood@android.com>
sb_linux.c
00c0eeac6be1597ce24fccf8e2afaaffab223cb3 05-Jan-2010 Joe Onorato <joeo@android.com> Make adb pull use . as the target file directory if you don't supply one.
ommandline.c
a1871d2a72e0cdd8fefc658dec389f2945b4cf2f 22-Dec-2009 Mike Lockwood <lockwood@android.com> adb: Add USB vendor ID for Foxconn

Change-Id: I88e4051b6e5cd820cab7e3ec417a545f50925a33
Signed-off-by: Mike Lockwood <lockwood@android.com>
sb_vendors.c
a48d43a0777494b3a686fa0c6d58f986547982eb 14-Dec-2009 Romain Guy <romainguy@android.com> Add adb reboot-bootloader to match fastboot reboot-bootloader.

Also fix the formatting of one of the options in the help message.
ommandline.c
a59387b508efd99031de2f23363092fdf4dfc130 28-Nov-2009 Mike Lockwood <lockwood@android.com> adb: fix -d and -e options for "adb forward" command.

Change-Id: I9166572a1c398ce5ef1423d19a30895385118ee5
Signed-off-by: Mike Lockwood <lockwood@android.com>
ommandline.c
6170404867631317ab57c67bf074494e6e775556 22-Dec-2009 Mike Lockwood <lockwood@android.com> adb: Add USB vendor ID for Foxconn

Change-Id: I88e4051b6e5cd820cab7e3ec417a545f50925a33
Signed-off-by: Mike Lockwood <lockwood@android.com>
sb_vendors.c
311add489e4a1712d201c3b83fa364d5569e6788 14-Dec-2009 Romain Guy <romainguy@android.com> Add adb reboot-bootloader to match fastboot reboot-bootloader.

Also fix the formatting of one of the options in the help message.
ommandline.c
255ed555d692853ac9b343c94371862bdbe0ca31 29-Nov-2009 Mike Lockwood <lockwood@android.com> 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.
3c0c6dca1abc350035efedafa9ee9d705499c334 29-Nov-2009 Mike Lockwood <lockwood@android.com> 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.
64e99545d4b5600bb5ca044fcad636ae8389b381 28-Nov-2009 Mike Lockwood <lockwood@android.com> adb: fix -d and -e options for "adb forward" command.

Change-Id: I9166572a1c398ce5ef1423d19a30895385118ee5
Signed-off-by: Mike Lockwood <lockwood@android.com>
ommandline.c
333a80cf9ffc975aee91d82bee2bb17cdfe458a7 15-Nov-2009 Jean-Baptiste Queru <jbq@google.com> merge from eclair
4b29fe640ae852c04d5d87d0f9527bdc32177ad1 13-Nov-2009 Jean-Baptiste Queru <jbq@google.com> eclair snapshot
ODULE_LICENSE_APACHE2
OTICE
db.c
db.h
ommandline.c
ramebuffer_service.c
et_my_path_darwin.c
dwp_service.c
ervices.c
ysdeps.h
ysdeps_win32.c
ransport.c
ransport_local.c
ransport_usb.c
sb_linux.c
sb_linux_client.c
sb_osx.c
sb_vendors.c
sb_windows.c
c923980e785c533e41e403e9644368643dbac952 09-Nov-2009 Jean-Baptiste Queru <jbq@google.com> 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
ef063fe3066153dab5389b6baba6cb4e36888106 09-Nov-2009 Jean-Baptiste Queru <jbq@google.com> merge from open-source master
3b01d5481931eae541afd9e429b6456b9487269d 02-Nov-2009 Xavier Ducrohet <xav@android.com> am 96f0d140: am df872bec: am 1b9f8c6a: am 23433b93: Add Sony-Ericsson to adb.

Merge commit '96f0d140df11c2efeecd8b0eed9ffad514456034'

* commit '96f0d140df11c2efeecd8b0eed9ffad514456034':
Add Sony-Ericsson to adb.
23433b93d1acb01650c9480d9bb5d5d869ba4f79 30-Oct-2009 Xavier Ducrohet <xav@android.com> Add Sony-Ericsson to adb.
sb_vendors.c
3b226f9e3b893a3e088d7b854b0e7c523e79063f 24-Oct-2009 Alexey Tarasov <tarasov@dodologics.com> 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)
ndroid.mk
et_my_path_freebsd.c
sb_libusb.c
3166410a82f43d39201be98a8d35c51baa86cb53 21-Oct-2009 Alexey Tarasov <tarasov@dodologics.com> Make get_my_path() safer

Adds maxLen parameter to get_my_path().
Some small cosmetic fixes.
db.c
db.h
ommandline.c
et_my_path_darwin.c
et_my_path_linux.c
et_my_path_windows.c
a01fdd534dd40865c966b5c5347cf74d0ff3116f 14-Oct-2009 Mike Lockwood <lockwood@android.com> 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.
74d7ff8cfd490852d3df1c4b9d8a21beed619caa 12-Oct-2009 Mike Lockwood <lockwood@android.com> 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>
db.c
db.h
ommandline.c
dwp_service.c
ysdeps.h
ysdeps_win32.c
ransport.c
ransport_local.c
1fbf27bf22d9bc47caea7373e31d472dcbef345a 21-Sep-2009 Robert CH Chou <Robert_CH_Chou@acer.com.tw> Add support for Acer devices

Change-Id: I7045249f86e2b628c31c888e95eb5ba6f6c47251
sb_vendors.c
89f9a84af07292e71b209aaab91001132e137b63 21-Sep-2009 Mike Lockwood <lockwood@android.com> adb: Add USB Vendor IDs for LG and Huawei

Change-Id: Ib47e3e39609bac9cf34f2b9334aa95184b3db71d
Signed-off-by: Mike Lockwood <lockwood@android.com>
sb_vendors.c
4a0da39db4b6a6062cfd1152ec3c9a266b907808 21-Sep-2009 Jean-Baptiste Queru <jbq@google.com> Add NOTICE file and license tag for adb

BUG=1716164
ODULE_LICENSE_APACHE2
OTICE
d6e3ecb70f0e6a037ea07f3f91a4c28988b8e434 19-Sep-2009 Mike Lockwood <lockwood@android.com> adb: Clean up argument passing for create_service_thread()

Change-Id: Id68b312e76215e8e217b42ca0301713dbddfee9e
Signed-off-by: Mike Lockwood <lockwood@android.com>
ervices.c
e5c8b6dd79787e74d7f6afd313352c19a001ab63 04-Sep-2009 Joe Onorato <joeo@android.com> Revert "adb: Another attempted workaround for the adb disconnect problem."

This reverts commit cc1de48dcdf06c76ee14abbe2a237aa51b5b3bad.

lockwood says to take this out.
ervices.c
8cf0d59f61ae0b8554ecf3fe051850508b761b79 12-Oct-2009 Mike Lockwood <lockwood@android.com> 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>
db.c
db.h
ommandline.c
dwp_service.c
ysdeps.h
ysdeps_win32.c
ransport.c
ransport_local.c
31dbed7b60d8237d6d05dc6bf230167a5854b77a 08-Oct-2009 Elliott Hughes <enh@google.com> 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.
ommandline.c
ff7d5835d91b979836b66dc42fac69adf2c6c3a3 24-Sep-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change 26093 into eclair

* changes:
Add NOTICE file and license tag for adb
7953b89e8d68565d15791618146a712231683d09 21-Sep-2009 Robert CH Chou <Robert_CH_Chou@acer.com.tw> Add support for Acer devices

Change-Id: I7045249f86e2b628c31c888e95eb5ba6f6c47251
sb_vendors.c
6ae9256322053354c7d2badccc0ce5c24b37c243 21-Sep-2009 Mike Lockwood <lockwood@android.com> adb: Add USB Vendor IDs for LG and Huawei

Change-Id: Ib47e3e39609bac9cf34f2b9334aa95184b3db71d
Signed-off-by: Mike Lockwood <lockwood@android.com>
sb_vendors.c
2fcdaf99070e69a73e76ac9b77135343aabb4dc4 21-Sep-2009 Jean-Baptiste Queru <jbq@google.com> Add NOTICE file and license tag for adb

BUG=1716164
ODULE_LICENSE_APACHE2
OTICE
b6b40079e6d5b32026cc2abfcb71adfd49e8d954 19-Sep-2009 Mike Lockwood <lockwood@android.com> adb: Clean up argument passing for create_service_thread()

Change-Id: Id68b312e76215e8e217b42ca0301713dbddfee9e
Signed-off-by: Mike Lockwood <lockwood@android.com>
ervices.c
154b7d7de4071ed73cde81eef3af47d1a24d7c6b 16-Sep-2009 Rebecca Schultz Zavin <rebecca@android.com> 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>
ramebuffer_service.c
8880093fe386ab0dcefec9ce41f8ce6f4e068b0e 11-Sep-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change 24493 into eclair

* changes:
Fix several issues in framebuffer_service
04bee29ad979ca770677338e343869a0d5662cfb 10-Sep-2009 Rebecca Schultz Zavin <rebecca@android.com> 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>
ramebuffer_service.c
91acb14877e7138879057f794a61ee2fd424a41d 04-Sep-2009 Joe Onorato <joeo@android.com> Revert "adb: Another attempted workaround for the adb disconnect problem."

This reverts commit cc1de48dcdf06c76ee14abbe2a237aa51b5b3bad.

lockwood says to take this out.
ervices.c
f56d1b5a76c6cb282a7689fc93f85de63bd205f6 03-Sep-2009 Mike Lockwood <lockwood@android.com> Revert "adb: "adb bugreport" now runs dumpstate via init rather than execing it in the shell."

This reverts commit be0045aafdbc2ec2ee448be86952082361f5d672.
This change broke compatibility with previous versions of adbd, so I will be implementing this
by modifying the bugreport command on the device instead.
ommandline.c
ervices.c
be0045aafdbc2ec2ee448be86952082361f5d672 03-Sep-2009 Mike Lockwood <lockwood@android.com> 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>
ommandline.c
ervices.c
cef31a02544d91b85481a5fa032b6126dbb32365 26-Aug-2009 Mike Lockwood <lockwood@android.com> adb: Fix emulator support.

Signed-off-by: Mike Lockwood <lockwood@android.com>
db.c
db.h
f71c71148cb65e61ab483b1b0351922c11d862d8 26-Aug-2009 Xavier Ducrohet <xav@android.com> Fix broken 'adb root' command.

Change-Id: I75bf01863e82967a7214d3e31b8db792690716c1
ommandline.c
2f38b699713dc2587a771bd5d4c6a47329728f5e 25-Aug-2009 Mike Lockwood <lockwood@android.com> 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>
db.c
db.h
ommandline.c
ervices.c
ransport.c
ransport_local.c
26f3de6738c3e07e581e2f9c112a8b3086f88abb 11-Aug-2009 Raphael <raphael@google.com> BUG 2033924: Add AdbWinUsbApi.dll to prebuilt for Windows SDK
ndroid.mk
ecfb75d9e43116133aca5cf7adba36783de89817 11-Aug-2009 Mike Lockwood <lockwood@android.com> adb: Fix infinite loop in Linux host device discovery.

Signed-off-by: Mike Lockwood <lockwood@android.com>
sb_linux.c
668cc771014380687936e79917e5e559262ad221 08-Aug-2009 Mike Lockwood <lockwood@android.com> 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>
ransport.c
a8be72f6538676543448a7a6adfd0a3664b59484 08-Aug-2009 Mike Lockwood <lockwood@android.com> adb: update call to register_usb_transport in Mac and Windows builds.

Signed-off-by: Mike Lockwood <lockwood@android.com>
sb_osx.c
sb_windows.c
95b837d38b730353af79f8669b5166007e038ac3 08-Aug-2009 Mike Lockwood <lockwood@android.com> 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>
db.h
ransport.c
ransport_usb.c
sb_linux.c
sb_linux_client.c
e64004d327c086eeb7a6ca32258d25bcbe7acb04 07-Aug-2009 Guang Zhu <guangzhu@google.com> adb: Use correct language ID when retrieving USB serial number.

Signed-off-by: Mike Lockwood <lockwood@android.com>
sb_osx.c
63e61527481c679a75cda358825ed71b156ad778 06-Aug-2009 Mike Lockwood <lockwood@android.com> adb: Remove adbd from simulator build.

It no longer compiles without recent kernel headers.

Signed-off-by: Mike Lockwood <lockwood@android.com>
ndroid.mk
5f4b051235c3e9e9e5b34b4af885e42a1c711fc4 05-Aug-2009 Mike Lockwood <lockwood@android.com> 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>
db.c
db.h
ommandline.c
ervices.c
3969080e232beed7c68a65cde7fdafc79ce55b0e 01-Jun-2009 Mathias Agopian <mathias@google.com> get rid of utils/executablepath.h, which now lives in the simulator
et_my_path_darwin.c
22048ef3257719a4e03e6a81a989b071abe7655c 07-May-2009 Nick Pelly <npelly@google.com> Allow adb to use ANDORID_SERIAL env variable to specify the device to talk to.

Overridden by -s.
ommandline.c
a3e8a6ad56d60d2ad6c580004f86920d73acc62c 26-Aug-2009 Mike Lockwood <lockwood@android.com> adb: Fix emulator support.

Signed-off-by: Mike Lockwood <lockwood@android.com>
db.c
db.h
1bba53f7c851068c127d16ba160cd3074d6027db 26-Aug-2009 Xavier Ducrohet <xav@android.com> Fix broken 'adb root' command.

Change-Id: I75bf01863e82967a7214d3e31b8db792690716c1
ommandline.c
ff19670d485fd5ee296e23b00b035ac22975c647 25-Aug-2009 Mike Lockwood <lockwood@android.com> 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>
db.c
db.h
ommandline.c
ervices.c
ransport.c
ransport_local.c
818806ad59ac09d5ee7de52891fa113ef614dbe0 12-Aug-2009 Raphael <raphael@google.com> 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
e3baafd85a5fecd1714441455e3f75f26b5c381e 11-Aug-2009 Raphael <raphael@google.com> BUG 2033924: Add AdbWinUsbApi.dll to prebuilt for Windows SDK
ndroid.mk
d70dc73d8d17a24a2a6dcdaa38f31dce47dd92aa 11-Aug-2009 Mike Lockwood <lockwood@android.com> adb: Fix infinite loop in Linux host device discovery.

Signed-off-by: Mike Lockwood <lockwood@android.com>
sb_linux.c
c52c602171cb29c4a4c38005f321cf95d50d3418 06-Aug-2009 Mike Lockwood <lockwood@android.com> 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>
ndroid.mk
704aa833382a73f8e02d49b7e9c2aef9a49c65bd 05-Aug-2009 Mike Lockwood <lockwood@android.com> 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>
db.c
db.h
ommandline.c
ervices.c
37d3111b1c1ce61c3d9b10ed3ccaed9e5fad1e06 08-Aug-2009 Mike Lockwood <lockwood@android.com> 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>
ransport.c
5c93dba771f11bb2228e69d1585c9fe8339c9275 08-Aug-2009 Mike Lockwood <lockwood@android.com> adb: update call to register_usb_transport in Mac and Windows builds.

Signed-off-by: Mike Lockwood <lockwood@android.com>
sb_osx.c
sb_windows.c
0927bf9690127bc45cf8837a1467759e9720399a 08-Aug-2009 Mike Lockwood <lockwood@android.com> 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>
db.h
ransport.c
ransport_usb.c
sb_linux.c
sb_linux_client.c
1a1f8189866196c5bd1ace378cf6b0ca69bff267 07-Aug-2009 Guang Zhu <guangzhu@google.com> adb: Use correct language ID when retrieving USB serial number.

Signed-off-by: Mike Lockwood <lockwood@android.com>
sb_osx.c
781d041892d488b8e20fb66cdc367f894f5f8e15 06-Aug-2009 Mike Lockwood <lockwood@android.com> adb: Remove adbd from simulator build.

It no longer compiles without recent kernel headers.

Signed-off-by: Mike Lockwood <lockwood@android.com>
ndroid.mk
ee15662140632672a6878787a1ff26f5ebdc1e68 05-Aug-2009 Mike Lockwood <lockwood@android.com> 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>
db.c
db.h
ommandline.c
ervices.c
1f4ff53517dc597e5cc902146558a613d9b339db 31-Jul-2009 Mike Lockwood <lockwood@android.com> 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.
cc1de48dcdf06c76ee14abbe2a237aa51b5b3bad 31-Jul-2009 Mike Lockwood <lockwood@android.com> 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>
ervices.c
1fde31c8fbe746473e01238be652a9c29ebf37d9 25-Jul-2009 Xavier Ducrohet <xav@android.com> am de6f62a6: Add support for Samsung and Motorola devices.

Merge commit 'de6f62a609120c3d9e4e53689c3b309842ec874b'

* commit 'de6f62a609120c3d9e4e53689c3b309842ec874b':
Add support for Samsung and Motorola devices.
de6f62a609120c3d9e4e53689c3b309842ec874b 24-Jul-2009 Xavier Ducrohet <xav@android.com> 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.
sb_linux.c
sb_vendors.c
dd8a23b774634880c49fbabd819cdc10397f4e43 10-Jul-2009 Mike Lockwood <lockwood@android.com> am 7bf68842: adb: Increment ADB_SERVER_VERSION

Merge commit '7bf68842d765ad7e6a51426b625d0de6d2331740'

* commit '7bf68842d765ad7e6a51426b625d0de6d2331740':
adb: Increment ADB_SERVER_VERSION
7bf68842d765ad7e6a51426b625d0de6d2331740 10-Jul-2009 Mike Lockwood <lockwood@android.com> 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>
db.h
df3fb65e983bcad35e71ff28b70e774fafabbffc 08-Jul-2009 Kenny Root <kenny@the-b.org> am c989199c: Fix typo in adb commandline help

Merge commit 'c989199ccfbe745a7109f57d2aee2577d2f72b8d'

* commit 'c989199ccfbe745a7109f57d2aee2577d2f72b8d':
Fix typo in adb commandline help
c989199ccfbe745a7109f57d2aee2577d2f72b8d 08-Jun-2009 Kenny Root <kenny@the-b.org> Fix typo in adb commandline help

Android developers are not expected to have PDP-11s.
ommandline.c
5089bd0a6e575a9692d9beaab2f0306454a7c701 08-Jul-2009 Mike Lockwood <lockwood@android.com> 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.
3d9b265b7d34d886a2f44e486c25e402d7df791b 08-Jul-2009 Mike Lockwood <lockwood@android.com> 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>
sb_linux.c
7490e4b170c7ca98146771ba72aab94131c33844 12-Jun-2009 Android (Google) Code Review <android-gerrit@google.com> am 34c34267: Merge change 3951 into donut

Merge commit '34c342677e4ffb57584d571d8996822bf4d879ef'

* commit '34c342677e4ffb57584d571d8996822bf4d879ef':
Revert "adb: Workaround for adb disconnect problem."
02d40b51c6d9f9dfc91f7d3b17a1f4f6db1ea972 11-Jun-2009 Mike Lockwood <lockwood@android.com> Revert "adb: Workaround for adb disconnect problem."

This reverts commit e38a31e305b0944c0cd1ae782e47e3145d731f0f.

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

Signed-off-by: Mike Lockwood <lockwood@android.com>
ervices.c
f4c94943a902550143027e0002bb569f9855c7b2 03-Jun-2009 Android (Google) Code Review <android-gerrit@google.com> am 87657782: Merge change 3008 into donut

Merge commit '876577823d7679fa18f175405ce77e5257161e3a'

* commit '876577823d7679fa18f175405ce77e5257161e3a':
adb: Workaround for adb disconnect problem.
e38a31e305b0944c0cd1ae782e47e3145d731f0f 03-Jun-2009 Mike Lockwood <lockwood@android.com> 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>
ervices.c
89ac364c54cca39892a342150f4f82c0636f959f 01-Jun-2009 Mathias Agopian <mathias@google.com> get rid of utils/executablepath.h, which now lives in the simulator
et_my_path_darwin.c
5b043d6182fef81adbd2858ea2fde649862cb3f7 26-May-2009 Mike Lockwood <lockwood@android.com> 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.
1f546e6d1f6ccd1964336ddf0d8e8b3b11b1e945 26-May-2009 Mike Lockwood <lockwood@android.com> 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>
db.c
db.h
64c6397b56a4290d5030694fb5134199066a6aa7 25-May-2009 Mike Lockwood <lockwood@android.com> 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.
6a3075c78287ea5a7ee7a3c85cde58e894350822 25-May-2009 Mike Lockwood <lockwood@android.com> adb: Add adbd to the AID_SDCARD_RW group to allow writing to the SD card.

Signed-off-by: Mike Lockwood <lockwood@android.com>
db.c
fc8e241871921584518bcfe75c3ed502164688e6 23-May-2009 Android (Google) Code Review <android-gerrit@google.com> am 0469d2c3: Merge change 2282 into donut

Merge commit '0469d2c37adddcb30cb0d88772bef33ac26c6500'

* commit '0469d2c37adddcb30cb0d88772bef33ac26c6500':
Support for 3rd party USB Vendor IDs in adb.
a481d096feba7cf6e61d54e416a68e2d46498df1 22-May-2009 Xavier Ducrohet <xav@android.com> Support for 3rd party USB Vendor IDs in adb.

Vendor IDs are read from ~/.android/adb_usb.ini. The format is very simple:
1 number per line. First number is ID count, followed by the ID themselves.
Lines starting with # are considered comments.

Other misc changes: moved VENDOR_ID_* to usb_vendors.c to prevent direct
access. Made transport_usb.c reuse the USB constant introduced in usb_osx
(moved them to adb.h)
db.c
db.h
db_client.c
ransport_usb.c
sb_osx.c
sb_vendors.c
sb_vendors.h
8a88939d6473e513cb3c38e74a53c0c5dbdfdded 21-May-2009 Xavier Ducrohet <xav@android.com> am a09fbd16: Preparation work for adb to support USB vendor Ids provided by SDK add-ons.

Merge commit 'a09fbd164d2e088bc5433d310e25640ae048d47d'

* commit 'a09fbd164d2e088bc5433d310e25640ae048d47d':
Preparation work for adb to support USB vendor Ids provided by SDK add-ons.
a09fbd164d2e088bc5433d310e25640ae048d47d 21-May-2009 Xavier Ducrohet <xav@android.com> Preparation work for adb to support USB vendor Ids provided by SDK add-ons.

Added usb_vendors.* which handles creating (and deleting) a list of vendor ids.
This list is meant to be used everywhere the built-in lists (usb_osx), or the
built-in vendor IDs (transport_usb) were used.

For now the list is only built with the built-in VENDOR_ID_*. Next step
is to read a small file created from all the SDK add-on.

Other misc changes: made is_adb_interface present only if ADB_HOST is true
to prevent accessing a list that doesn't exist (usb_vendors is only
compiled for the host version of adb).
ndroid.mk
db.c
db.h
ransport_usb.c
sb_osx.c
sb_vendors.c
sb_vendors.h
df849ca5f8cad85a86e586c878ce8782bbca8df3 21-May-2009 Android (Google) Code Review <android-gerrit@google.com> am a61755e5: Merge change 2077 into donut

Merge commit 'a61755e5fca065dfc89c7639bb672c20a4f9854e'

* commit 'a61755e5fca065dfc89c7639bb672c20a4f9854e':
move native_handle stuff from master_gl
adb: adbd no longer disables OOM and now sets children's OOM adjustment to zero
249ad57a887680538d1dc0195e746b1d877ebd6a 20-May-2009 Mike Lockwood <lockwood@android.com> adb: adbd no longer disables OOM and now sets children's OOM adjustment to zero

Signed-off-by: Mike Lockwood <lockwood@android.com>
db.c
ervices.c
342520f2ed0f06deaff4d9c227121c98581dd4a4 19-May-2009 Android (Google) Code Review <android-gerrit@google.com> am 1b154930: Merge change 1867 into donut

Merge commit '1b154930b2c2634dce9c04d5d5cec7acb229ccb0'

* commit '1b154930b2c2634dce9c04d5d5cec7acb229ccb0':
Cleaning up whitespace in adb sources. Nothing more, nothing less.
34c22c5ba951e4df7cc72d8d10da78064d5cfbe4 18-May-2009 David 'Digit' Turner <digit@google.com> am 414ff7d9: Move fdevent from libcutils into adb directory. ADB is the only client of this API, and I intend to modify it extensively to clean its codebase soon.

Merge commit '414ff7d98ac8d7610a26206335954ad15f43f3ac'

* commit '414ff7d98ac8d7610a26206335954ad15f43f3ac':
Move fdevent from libcutils into adb directory. ADB is the only client of this API, and I intend to modify it extensively to clean its codebase soon.
f6330a2eeb78c0971f33feee7fd1ee06472a7dba 18-May-2009 David 'Digit' Turner <digit@google.com> Cleaning up whitespace in adb sources. Nothing more, nothing less.
devent.c
devent.h
ile_sync_client.c
rotocol.txt
ysdeps.h
ysdeps_win32.c
sb_windows.c
414ff7d98ac8d7610a26206335954ad15f43f3ac 18-May-2009 David 'Digit' Turner <digit@google.com> Move fdevent from libcutils into adb directory. ADB is the only client of this API, and I intend to modify it extensively to clean its codebase soon.
ndroid.mk
devent.c
devent.h
ramebuffer_service.c
ysdeps.h
16b5d6e75c554905eedd822f6dde6928b7fdf782 10-May-2009 Dima Zavin <dima@android.com> am 3fd82b8: adb: osx: Match devices based on interface subclass and prot

Merge commit '3fd82b8861aa410fab7785074941b459d92220c1'

* commit '3fd82b8861aa410fab7785074941b459d92220c1':
adb: osx: Match devices based on interface subclass and protocol
3fd82b8861aa410fab7785074941b459d92220c1 09-May-2009 Dima Zavin <dima@android.com> adb: osx: Match devices based on interface subclass and protocol

Enumerating all vendor+product id combinations is not practical.
This modifies the matching algorithm to use the adb interface
subclass/protocol instead (0x42/0x1).

Signed-off-by: Dima Zavin <dima@android.com>
db.h
sb_osx.c
46f208e40d226b881736036088317c918cc5d5e7 08-May-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change 1171

* changes:
Allow adb to use ANDORID_SERIAL env variable to specify the device to talk to.
db4492640313be9d3fd65ee5bd7648a9570411bb 07-May-2009 Nick Pelly <npelly@google.com> Allow adb to use ANDORID_SERIAL env variable to specify the device to talk to.

Overridden by -s.
ommandline.c
b9e966f56b217bfd90ac0a0ee0dda11b5425dbbb 01-May-2009 Marco Nelissen <marcone@google.com> adb seems to build in 64 bit mode these days, so it's safe to build for the simulator too.
While adb is not needed for the simulator, it's handy to have around when you're working with the simulator but need to look at a device.
ndroid.mk
e037fd7e193ecccbb5c0888e49f6d58c224bc11d 13-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake_rel/...@138607
db.c
ommandline.c
ervices.c
2015549667fb77706a9879e974a3875ebccd8198 11-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@137873
db.c
dd7bc3319deb2b77c5d07a51b7d6cd7e11b5beb0 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
ndroid.mk
VERVIEW.TXT
ERVICES.TXT
db.c
db.h
db_client.c
db_client.h
ommandline.c
onsole.c
ile_sync_client.c
ile_sync_service.c
ile_sync_service.h
ramebuffer_service.c
et_my_path_darwin.c
et_my_path_linux.c
et_my_path_windows.c
istory.h
dwp_service.c
og_service.c
utex_list.h
rotocol.txt
emount_service.c
ervices.c
hlist.c
hlist.h
ockets.c
ockets.dia
ysdeps.h
ysdeps_win32.c
est_track_devices.c
est_track_jdwp.c
ransport.c
ransport_local.c
ransport_usb.c
sb_linux.c
sb_linux_client.c
sb_osx.c
sb_windows.c
tils.c
tils.h
e54eebbf1a908d65ee8cf80bab62821c05666d70 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
ndroid.mk
VERVIEW.TXT
ERVICES.TXT
db.c
db.h
db_client.c
db_client.h
ommandline.c
onsole.c
ile_sync_client.c
ile_sync_service.c
ile_sync_service.h
ramebuffer_service.c
et_my_path_darwin.c
et_my_path_linux.c
et_my_path_windows.c
istory.h
dwp_service.c
og_service.c
utex_list.h
rotocol.txt
emount_service.c
ervices.c
hlist.c
hlist.h
ockets.c
ockets.dia
ysdeps.h
ysdeps_win32.c
est_track_devices.c
est_track_jdwp.c
ransport.c
ransport_local.c
ransport_usb.c
sb_linux.c
sb_linux_client.c
sb_osx.c
sb_windows.c
tils.c
tils.h
1b8e5a6b14ca850920e19b3dfae41e6494475c1a 13-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@131421
og_service.c
13f797da7f190e9ea52f2f3d235210b8a4963b21 11-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@130745
sb_linux.c
5ae090ed949cea9d1e7ab1552b455a229f8f9757 10-Jan-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@125939
ndroid.mk
ERVICES.TXT
db.c
ommandline.c
dbg.c
ervices.c
35237d135807af84bf9b0e5b8d7f8633e58db6f5 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
ndroid.mk
VERVIEW.TXT
ERVICES.TXT
db.c
db.h
db_client.c
ommandline.c
ile_sync_client.c
ile_sync_service.c
ramebuffer_service.c
et_my_path_windows.c
dwp_service.c
ockets.c
ysdeps_win32.c
ransport_local.c
ransport_usb.c
sb_linux_client.c
sb_osx.c
sb_windows.c
tils.c
tils.h
4f6e8d7a00cbeda1e70cc15be9c4af1018bdad53 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
ndroid.mk
db.c
db.h
db_client.c
db_client.h
ommandline.c
onsole.c
ile_sync_client.c
ile_sync_service.c
ile_sync_service.h
ramebuffer_service.c
et_my_path_darwin.c
et_my_path_linux.c
et_my_path_windows.c
istory.h
dwp_service.c
dbg.c
og_service.c
utex_list.h
rotocol.txt
emount_service.c
ervices.c
hlist.c
hlist.h
ockets.c
ockets.dia
ysdeps.h
ysdeps_win32.c
est_track_devices.c
est_track_jdwp.c
ransport.c
ransport_local.c
ransport_usb.c
sb_linux.c
sb_linux_client.c
sb_osx.c
sb_windows.c