Commit graph

473 commits

Author SHA1 Message Date
Elliott Hughes
14e28d39f7 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
2013-10-29 14:12:46 -07:00
Brian Carlstrom
93c91fad77 Improve some adb error logging
Bug: 11290643
Change-Id: Ibad4e9f0b69421cd6017b70a52237e7f27aab848
2013-10-27 16:56:55 -07:00
Colin Cross
6da66ef49b Merge "Handle screendumps for all framebuffer sizes" 2013-10-02 20:24:46 +00:00
Doug Zongker
8e5b63d045 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 515e1639ef)

Change-Id: Ib35643b3d864742e817ac6e725499b451e45afcf
2013-09-25 09:26:34 -07:00
Chris Dearman
85373f4280 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
2013-09-25 02:43:45 -07:00
astonehuang
48c5d7b6cd correct msi usb vendor id.
Change-Id: I13128531b8dd7758abddce47ce1c119381773c26
2013-08-28 10:53:17 +08:00
Wing Tseng
64a602942e Add USB Vendor ID for WACOM
Change-Id: I3deee6d5bdfb9c5bbc0fddcfa39814d27ee281c2
Signed-off-by: Wing Tseng <Wing_Tseng@pegatroncorp.com>
2013-08-15 09:33:59 +08:00
astonehuang
307d96a6e6 Add USB Vendor ID for MSI
Change-Id: I4f4bfb6ef08058bf749917119a2b08952e7bc337
2013-08-01 15:23:17 +08:00
Elliott Hughes
5d8554323c Merge "Add USB Vendor ID for ECS" 2013-07-25 16:50:39 +00:00
ecsgms
cae8b9df5c Add USB Vendor ID for ECS
Change-Id: Ib2fa70204d37f53dc642091eb927d865ddc585b5
2013-07-24 16:13:49 +08:00
Elliott Hughes
19188955b5 am d92e35eb: Merge "Add Qisda usb config"
* commit 'd92e35eb7b97f349054390cfee1d40154dba6d66':
  Add Qisda usb config
2013-06-18 11:32:58 -07:00
esther
001fe87e02 Add Qisda usb config
add Qisda usb config
Signed-off-by: esther <esther530@gmail.com>

Change-Id: I5b8a0e5bd2218ecdf417de357c9a7d9307c91932

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

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

Change-Id: If77699a27497b8641998930f14d4ee418b856080
2013-05-02 09:51:53 -07:00
Colin Cross
b544da0be4 am d7cab8bf: Merge "adb : add missing connection states"
* commit 'd7cab8bff1334ba48620a16d1b98f2ae623fee7d':
  adb : add missing connection states
2013-04-17 15:11:39 -07:00
Colin Cross
d7cab8bff1 Merge "adb : add missing connection states" 2013-04-17 21:45:45 +00:00
Elliott Hughes
ac76c1f16f am ffc5a4a5: Merge "Add OUYA VID to known VID list"
* commit 'ffc5a4a529338c834954e58de2701572eb0752f0':
  Add OUYA VID to known VID list
2013-04-17 09:27:37 -07:00
Al Sutton
21ec0516cf Add OUYA VID to known VID list
Add the OUYA VID to the list of known USB VIDs to allow developers with OUYA
consoles to have their device automatically recognized.

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

Change-Id: I00716024d6a0bdb68d6e2380c8cd7b5d056bd15f
Signed-off-by: trevd <trevd1234@gmail.com>
2013-04-17 14:34:23 +01:00
Benoit Goby
9f25178a9d am 7f8fb3ff: Merge "adb: Prevent registering usb_disconnect twice" into jb-mr2-dev
* commit '7f8fb3ffa2a234b704fc975fc9b1001f17df9cac':
  adb: Prevent registering usb_disconnect twice
2013-04-02 08:24:36 -07:00
Benoit Goby
b66356cab6 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
2013-04-01 17:39:06 -07:00
Colin Cross
b1d204648e am f5562cb6: Merge "adb: Remove execute permission on usb_vendor.c"
* commit 'f5562cb66c1c15d65bc372ede4c180430e1ce9d7':
  adb: Remove execute permission on usb_vendor.c
2013-03-29 17:13:45 -07:00
Benoit Goby
f8cfa8a1e4 adb: Remove execute permission on usb_vendor.c
Change-Id: Ia4f2e0171634764bde3593593b3c99184236528f
2013-03-29 16:33:02 -07:00
Benoit Goby
78420edc0f resolved conflicts for merge of 35200422 to jb-mr2-dev-plus-aosp
Change-Id: I754b8b17a7e3a6e4ef3ccf0a02beca0fc72ba749
2013-03-29 16:29:22 -07:00
sunxiaoqi
92eb583833 Add BYD's USB Vendor ID
Change-Id: I0694ed72d70638f0a4a252b1c802ae8f4e33385e
2013-03-29 14:57:44 -07:00
Gary Hua
d3b69404a1 Add USB Vendor ID for Xiaomi
Change-Id: I9f0622e05334a5074604bd88093172654b4c3e7d
Signed-off-by: Gary Hua <huachengping@xiaomi.com>
2013-03-29 14:56:53 -07:00
Sam Lin
df6d7666fd Add vendor IDs to adb
Adding vendor IDs to adb for device partners:
  AnyDATA, Harris & Oppo

Change-Id: Ib8c5196c53599bd6eb077871cd95ccac935c42e7
2013-03-29 14:51:15 -07:00
Sam Lin
644b6afdac Add vendor IDs to adb
Adding vendor IDs to adb for device partners:
  AnyDATA, Harris & Oppo

Change-Id: Ib8c5196c53599bd6eb077871cd95ccac935c42e7
2013-03-12 20:19:53 +08:00
Elliott Hughes
dd0d0e78af am 822ea9b3: am fd5c6b9f: Merge "Close adb_usb.ini after reading it"
* commit '822ea9b3d1cf240b16135e1b5c3bd926c02d17d6':
  Close adb_usb.ini after reading it
2013-03-08 18:32:02 -08:00
Elliott Hughes
fd5c6b9f13 Merge "Close adb_usb.ini after reading it" 2013-03-09 01:20:08 +00:00
Christopher Tate
0c06eb5017 DO NOT MERGE - Document new -obb flag for adb backup
Now that adb backup handles OBB file backup/restore.

(Cherrypicked)

Change-Id: Ie92b546e3898b62d74f552ab577b7756ad176ee6
2013-03-08 15:09:51 -08:00
Colin Cross
95b087fa90 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'
2013-03-05 18:52:29 +00:00
Magnus Eriksson
86ae6d587b Fix issues where the filename is referred to as 'sideload'
The adb sideload utility referes to the filename as 'sideload' in some
places. This patch changes the printouts to display the filename instead.

Change-Id: I38ada01a08bed53a8d9697c03f55ce8cee2abe12
Signed-off-by: Magnus Eriksson <eriksson.mag@gmail.com>
2013-03-05 07:37:32 +01:00
Nick Kralevich
277626e59d am 844306bd: am cc4499b6: Merge "adb: use correct header file."
* commit '844306bd9cb3c8b3e514e5d91e9514556e8f95f4':
  adb: use correct header file.
2013-02-28 23:22:04 +00:00
Nick Kralevich
e2864bf727 adb: use correct header file.
Change-Id: I7a66ced762dc077247fd7c2714ae8850ffdcaeb9
2013-02-28 14:12:58 -08:00
Nick Kralevich
4c609e9683 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
2013-02-27 13:15:02 -08:00
Benoit Goby
1531c966c1 Merge "adb: Fix secure adb when booting with usb attached" 2013-02-21 23:55:57 +00:00
Nick Kralevich
080427e4e2 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
2013-02-15 21:22:19 -08:00
Nick Kralevich
b9c087031b am e149855a: am 523a2090: Merge "adb: Use 64 bit capabilities."
* commit 'e149855a816c98149a95725139ae66f193049ddd':
  adb: Use 64 bit capabilities.
2013-02-15 10:22:08 -08:00
Nick Kralevich
109f4e16cb adb: Use 64 bit capabilities.
Fix the following kernel warning:

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

Change-Id: I3912302c5c577f1cb03f0c591834ab7b3a72ddf5
2013-02-15 09:33:13 -08:00
Benoit Goby
045a4a9c3a 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
2013-02-02 01:19:06 +00:00
Kenny Root
49f0f77693 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
2013-01-29 21:54:00 -08:00
Kenny Root
53e5b24231 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
2013-01-29 21:53:59 -08:00
Kenny Root
f8afaebec3 Merge "Windows adb: include stdint.h for uint8_t on MinGW-w64" 2013-01-30 05:44:17 +00:00
Kenny Root
d40fd86ec5 Merge "Windows adb: initialize on to 1 in disable_tcp_nagle" 2013-01-30 05:43:33 +00:00
Benoit Goby
8e85644aa1 Merge "adb: Add "unauthorized" connection state" 2013-01-29 00:17:43 +00:00