Commit graph

305 commits

Author SHA1 Message Date
Elliott Hughes
77c0e66bef Work around an angler bootloader bug.
It's probably not the only device whose bootloader is similarly broken.
NVIDIA did a sufficiently good job with Nexus 9 that it's almost a bad
idea for me to do most of my development there...

Change-Id: I71436cc5c33023be077ca77f6dad5dbe75b11b09
2015-11-02 15:51:12 -08:00
Elliott Hughes
a2a6b0bfa9 Merge "Clarify and fix the intent of the partition-type checking code."
am: d0f45aa24c

* commit 'd0f45aa24c09c0802784263fe2dccd38e226e23a':
  Clarify and fix the intent of the partition-type checking code.
2015-11-02 23:47:39 +00:00
Elliott Hughes
8ab9a32323 Clarify and fix the intent of the partition-type checking code.
Change-Id: I202dab4ee91208b632bc2086d1e5c387a4c29edd
2015-11-02 14:05:57 -08:00
Elliott Hughes
1de89478ac Merge "Fix ParseInt/ParseUint to handle explicit "0x" hex."
am: ddf5edacc2

* commit 'ddf5edacc24125730b537265f69a081b19606246':
  Fix ParseInt/ParseUint to handle explicit "0x" hex.
2015-11-02 18:30:59 +00:00
Elliott Hughes
3ab05869d8 Fix ParseInt/ParseUint to handle explicit "0x" hex.
Also improve fastboot error reporting around max-download-size.

Change-Id: Ic3aec9460de01e5264a2803a0a6be3706d73026b
2015-11-02 09:01:53 -08:00
Elliott Hughes
5e58724b33 Merge "fastboot shouldn\'t erase non-existent cache partitions."
am: 9ebdf72a54

* commit '9ebdf72a5465b75ab4ce359e11c1ff6c2f3e376a':
  fastboot shouldn't erase non-existent cache partitions.
2015-10-30 21:42:04 +00:00
Elliott Hughes
2fd45a9cea fastboot shouldn't erase non-existent cache partitions.
Check that the cache partition exists before trying to erase it.

Also clean up some of the C string handling and int booleans.

Bug: http://b/25375777
Change-Id: I1880e542b729f2026ab3a2943d4bee9d659b1eeb
2015-10-30 14:15:22 -07:00
Elliott Hughes
259ad4a8e7 Fix the fastboot build.
load_file takes an int64_t rather than a size_t to support large files on LP32.

Change-Id: I8d3032cab63c30c4158dbc521d3d520415cdf58f
2015-09-02 20:33:44 -07:00
Elliott Hughes
45be42e89e resolved conflicts for merge of 7af48652 to mnc-dr-dev-plus-aosp
Change-Id: Icde642757a1335da49d2f884de33b368888ae709
2015-09-02 20:15:48 -07:00
Dan Willemsen
87a419c8b1 Remove USE_MINGW/CYGWIN; Whitelist windows modules
CYGWIN is not supported, USE_MINGW and HOST_OS==windows are being
replaced with LOCAL_..._windows variables.

Bug: 23566667
Change-Id: I3e4a1e4097dc994cf5abdce6939e83a91758fd75
2015-09-02 17:10:35 -07:00
Patrick Tjin
51e8b03f84 fastboot: add flashing bootloader commands
add the following commands:
    flashing unlock_bootloader
    flashing lock_bootloader
    flashing get_unlock_bootloader_nonce

Change-Id: Ia4f56ebdcb6785a5196cc669d68da1553ed53c58
Signed-off-by: Patrick Tjin <pattjin@google.com>
2015-09-01 12:40:12 -07:00
Elliott Hughes
3ab8b859c2 Fix missing <stdarg.h>.
system/core/fastboot/engine.cpp:84:5: error: use of undeclared identifier 'va_start'

Change-Id: I8aff9a40d33f403c0d0d91a15638863fe24dca2e
2015-08-25 19:34:13 -07:00
Elliott Hughes
fc79767fc2 Use 64-bit file sizes in fastboot.
Bug: 20110580
Change-Id: I5d3718103ff581ff3b5241c8b0e52b585b4f37e5
2015-08-25 19:11:52 -07:00
Elliott Hughes
b46964f3c9 fastboot should say which device it's waiting for.
Change-Id: Ia8a04b2727983cb05a9a3e85d9a9586b15c71600
2015-08-19 17:49:45 -07:00
Matt Reimer
81c24f6f86 Get fastboot working on OS X
Get fastboot working on OS X by calling USBDeviceOpen() before
calling SetConfiguration().

Change-Id: I5034721d5f33ef18273153ff40eb940baa8261cd
2015-08-19 14:46:17 -07:00
Elliott Hughes
2d4f852da4 Start iterating USB pipe endpoints from 1.
Bug: http://b/22829602
Change-Id: I5051880730ba8fadae5d78f1d19b5d527610d4a5
2015-08-13 16:00:12 -07:00
Elliott Hughes
e1746fda6a Remove the USB vendor id whitelist from fastboot.
Change-Id: I661a0538776d4ba74fcee37e2964d987eb861342
2015-08-10 15:30:54 -07:00
Elliott Hughes
2ae8d2ebae More Mac fastboot failure debugging.
Bug: http://b/22829602
Change-Id: I27738883eb545ed72eaae55fe3a077e6d1421302
2015-08-07 10:49:36 -07:00
Elliott Hughes
6e02c24cfc Include the error code if GetPipeProperties fails.
Bug: http://b/22829602
Change-Id: I90a89e70518053a4581e1862a7dbd5d09e06dadc
2015-08-06 10:48:19 -07:00
Elliott Hughes
93f65faee8 Document the current MAX_USBFS_BULK_SIZE situation.
Bug: http://b/22688598
Change-Id: I8e5b92996d635f6b939f3add4dda0b9023629a8b
2015-07-28 14:18:50 -07:00
Yusuke Sato
07447544ad Rename ZipEntryName to ZipString
since the struct is now used for other purposes. Also add some
comparator functions to the struct to simplify zip_archive.cc.

This is a follow-up CL for f1d3d3b247.

Bug: 21957428
Change-Id: I60d4171eeacc561d59226d946e9eb5f9c96d80cf
2015-06-26 10:34:01 -07:00
Elliott Hughes
fbcb93abe2 Fix Mac fastboot build.
Change-Id: I516c07cee39845caaa47608604eeb30ce15f06cb
2015-06-24 13:28:24 -07:00
Elliott Hughes
75d47421d0 Merge "Move fastboot's Windows code to C++." 2015-06-24 19:30:58 +00:00
Elliott Hughes
20750ad823 Move fastboot's Mac OS code to C++.
Change-Id: I4f452860a401a115b6e8349237923949f2f476d1
2015-06-24 11:17:28 -07:00
Elliott Hughes
c636b64e31 Move fastboot's Windows code to C++.
Change-Id: I92414594cbdbc1896402c6d950d890042f8df6cf
2015-06-24 10:48:43 -07:00
Elliott Hughes
b3748de33f Move fastboot to C++.
Minimal conversion.

Change-Id: I32cbf125be481a8757720d10fa303c38a7fd5e38
2015-06-23 20:56:01 -07:00
Elliott Hughes
08df533e2a Fix fastboot --help formatting.
Bug: http://b/21755417
Change-Id: I827d8e9ebe7ba8e8f75c2fa0ca975560817c18fa
2015-06-10 12:10:00 -07:00
Elliott Hughes
8bdd4bbc1c Add a working Windows tmpfile(3) to fastboot.
Windows' tmpfile(3) implementation requires administrator rights because
it creates temporary files in the root directory. Write an alternative
that uses the user's temporary directory instead.

Bug: http://b/21558406
Change-Id: Ic9aece5c69429797a332a97681a76b76ac3551bf
(cherry picked from commit a26fbeeaa4)
2015-06-05 13:28:44 -07:00
Elliott Hughes
966339b2d6 Don't say "update package missing" unless we mean it.
unzip_to_file reports failures itself these days, so there's it's unhelpful
of the caller to just guess what might have gone wrong.

Bug: http://b/21558406
Change-Id: I1e3d06c6cf902b8c6ef333dc60fd8f49680a493b
(cherry picked from commit acdbe92c60)
2015-06-04 13:26:57 -07:00
Elliott Hughes
c688c23286 'usb' doesn't need to be global in fastboot.
Bug: http://b/21558406
Change-Id: Id014399640865d889918661bae0161b3165eee48
(cherry picked from commit c0ce65f961)
2015-06-04 13:26:48 -07:00
Elliott Hughes
e283ca29c5 Add "fastboot --version".
So bug reporters can actually tell us what they're running.

Bug: http://b/21558406
Bug: http://b/21583225
Change-Id: If2a4ae97b4792aa321566603ce2c354a72d32307
(cherry picked from commit 379646b2ca)
2015-06-04 13:26:40 -07:00
Narayan Kamath
67ab5d9505 Use base::WriteFully in zip_archive.
We're already linking against libbase but we'll have to add
a libbase dependency to every target that includes libziparchive
as a STATIC_LIBRARY dependency, given that there's no way to
express that what we want (except by adding a LOCAL_WHOLE_STATIC_LIBRARY
dependency on libbase to libziparchive but that seems bad too)

Bug: http://b/21558406
Change-Id: I294ad389a9c61a1134a7bc323da25b0004a8f1e0
(cherry picked from commit e97e66ea7c)
2015-06-04 13:26:22 -07:00
Elliott Hughes
a26fbeeaa4 Add a working Windows tmpfile(3) to fastboot.
Windows' tmpfile(3) implementation requires administrator rights because
it creates temporary files in the root directory. Write an alternative
that uses the user's temporary directory instead.

Bug: http://b/21558406
Change-Id: Ic9aece5c69429797a332a97681a76b76ac3551bf
2015-06-03 15:27:52 -07:00
Narayan Kamath
f6e9ffbc73 Fix file descriptor leak when opening invalid archives.
Also add -Wunreachable-code to the set of compiler flags, otherwise
noreturn becomes considerably less useful.

bug: https://code.google.com/p/android/issues/detail?id=171099
Change-Id: I9a95d45633c731c7046d4e4a39844d9cebfd1718
(cherrypick of 241bcf05e0e394bbf2681f359f52646dd6c707f6.)
2015-06-03 12:16:43 -07:00
Elliott Hughes
acdbe92c60 Don't say "update package missing" unless we mean it.
unzip_to_file reports failures itself these days, so there's it's unhelpful
of the caller to just guess what might have gone wrong.

Bug: http://b/21558406
Change-Id: I1e3d06c6cf902b8c6ef333dc60fd8f49680a493b
2015-06-03 11:01:41 -07:00
Elliott Hughes
f26eb51c2a Merge "Add "fastboot --version"." 2015-06-03 02:36:50 +00:00
Elliott Hughes
379646b2ca Add "fastboot --version".
So bug reporters can actually tell us what they're running.

Bug: http://b/21583225
Change-Id: If2a4ae97b4792aa321566603ce2c354a72d32307
2015-06-02 13:50:00 -07:00
Elliott Hughes
c0ce65f961 'usb' doesn't need to be global in fastboot.
Change-Id: Id014399640865d889918661bae0161b3165eee48
2015-06-02 13:34:07 -07:00
Badhri Jagan Sridharan
a873e1dc02 fastboot: Add support for fastboot flashing commands
Commands added:
fastboot flashing lock
      - Prevents flashing partitions
fastboot flashing unlock
      - Enable user to flashing partitions
fastboot flashing lock_critical
      - Prevents flashing bootloader related
        paritions
fastboot flashing unlock_critical
      - Enables user to flash bootloader
        related partitions
fastboot flashing get_unlock_ability
      - Query bootloader to check if device is
        locked.

(cherry picked from commit bf11095f92)
Change-Id: Id6db16ba32f7a2b1c3f041a76bd3bdf2d3ab471e
2015-05-28 19:15:27 +00:00
Badhri Jagan Sridharan
bf11095f92 fastboot: Add support for fastboot flashing commands
Commands added:
fastboot flashing lock
      - Prevents flashing partitions
fastboot flashing unlock
      - Enable user to flashing partitions
fastboot flashing lock_critical
      - Prevents flashing bootloader related
        paritions
fastboot flashing unlock_critical
      - Enables user to flash bootloader
        related partitions
fastboot flashing get_unlock_ability
      - Query bootloader to check if device is
        locked.

Change-Id: Id6db16ba32f7a2b1c3f041a76bd3bdf2d3ab471e
2015-05-15 18:00:50 -07:00
Narayan Kamath
241bcf05e0 Fix file descriptor leak when opening invalid archives.
Also add -Wunreachable-code to the set of compiler flags, otherwise
noreturn becomes considerably less useful.

bug: https://code.google.com/p/android/issues/detail?id=171099
Change-Id: I9a95d45633c731c7046d4e4a39844d9cebfd1718
2015-05-13 09:20:44 +00:00
Elliott Hughes
fe93e8d2a7 Remove dead files.
Auto-imported from cupcake, not touched since then, or used anyway.

Change-Id: If2d50cddff0238dff818c7bae92fe8e1100fccdf
2015-05-11 21:57:33 -07:00
Narayan Kamath
e97e66ea7c Use base::WriteFully in zip_archive.
We're already linking against libbase but we'll have to add
a libbase dependency to every target that includes libziparchive
as a STATIC_LIBRARY dependency, given that there's no way to
express that what we want (except by adding a LOCAL_WHOLE_STATIC_LIBRARY
dependency on libbase to libziparchive but that seems bad too)

Change-Id: I294ad389a9c61a1134a7bc323da25b0004a8f1e0
2015-04-29 14:31:45 +00:00
Colin Cross
1c3a69151b am 10766eac: am 6de70784: am 631cf146: Merge "Fix windows adb build"
* commit '10766eac61120732f11b82b1695207a3a5870a47':
  Fix windows adb build
2015-04-20 20:53:10 +00:00
Colin Cross
dc1e482b20 Fix windows adb build
libc++ is not available on windows yet, but it already defaults to
static libstdc++.

Change-Id: I85a766ead84f71fe1f2f59be6ac739b0b833b6db
2015-04-20 12:43:02 -07:00
Colin Cross
454f35fd75 am 48131449: am 858cd9db: am b2b06de5: Merge "statically link adb and fastboot against libc++"
* commit '48131449d6258e369e5afeb6c665cc6a343ca297':
  statically link adb and fastboot against libc++
2015-04-20 18:56:32 +00:00
Colin Cross
55bf5f0017 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
2015-04-16 17:09:46 -07:00
Mohamad Ayyash
94cd52391c am a15881a9: am ed926596: am 6900d34e: Merge "Add verbose param to sparse_file_import_auto"
* commit 'a15881a9e9d2951eda7a7a85fbaadd93bfb9da9b':
  Add verbose param to sparse_file_import_auto
2015-04-01 18:04:50 +00:00
Mohamad Ayyash
80cc1f6864 Add verbose param to sparse_file_import_auto
Change-Id: I0c5607f7aa5e964abc2031bbe71ff5c6e6ef56cc
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
2015-03-31 12:09:37 -07:00
Elliott Hughes
ac6bc5f45a am 369aa9e9: am 99938804: Merge "fastboot/sparse: propagate error code"
* commit '369aa9e90d741545a7a639f7f0f4cd265faf252e':
  fastboot/sparse: propagate error code
2015-03-19 19:26:19 +00:00
Elliott Hughes
5b40fcbd1d am a782173a: am 261a82a6: Merge "Switch fastboot to ExtractEntryToFile."
* commit 'a782173a26f192fe9f51e1ee53e8d329501df409':
  Switch fastboot to ExtractEntryToFile.
2015-03-19 19:17:40 +00:00
Elliott Hughes
99938804a5 Merge "fastboot/sparse: propagate error code" 2015-03-19 19:05:24 +00:00
Elliott Hughes
a82c89da1f Switch fastboot to ExtractEntryToFile.
Rather than malloc, ExtractToMemory, and write.

Also fix the tmpfile error check (tmpfile returns NULL on failure),
and improve error reporting.

Bug: 19765860
Change-Id: I236923e883128083377607f1519bb2e27b8f03f8
2015-03-19 11:44:32 -07:00
Elliott Hughes
ddaabcf22f am 41233fcc: am 294d3f74: Merge "Remove a prehistoric fastboot hack."
* commit '41233fcc35ce8c5efa06348f013c31072505229b':
  Remove a prehistoric fastboot hack.
2015-03-19 18:27:08 +00:00
Elliott Hughes
787ed98d68 am f99e47a0: am 445e5ede: Merge "Switch fastboot to libziparchive."
* commit 'f99e47a0a0604aef2f3b1d07953d5f220662353c':
  Switch fastboot to libziparchive.
2015-03-19 17:39:57 +00:00
Elliott Hughes
7c6d884e2b Remove a prehistoric fastboot hack.
If you don't have android-info.txt in your zip file, you're probably
not using a current fastboot binary anyway.

Change-Id: Ic721dc5f068f704c6792493d1e99f05f907678ba
2015-03-19 10:30:53 -07:00
Elliott Hughes
b7ca152be0 am 8e70f63a: am 57bf3109: Merge "Prepare for switching to libziparchive."
* commit '8e70f63aba8e14f3b40b2a0769522505c1019c33':
  Prepare for switching to libziparchive.
2015-03-19 16:01:06 +00:00
Elliott Hughes
d30ad8a2ee Switch fastboot to libziparchive.
Bug: 19765860
Change-Id: I83ea56e3b317893995d7106852b65584f99c0e64
2015-03-18 23:23:11 -07:00
Elliott Hughes
253c18d2fb Prepare for switching to libziparchive.
Bug: 19765860
Change-Id: I58249d28fbc4975428d0dcac5107d1994c35676c
2015-03-18 22:47:54 -07:00
Jeremy Compostella
9f0d6bdd66 fastboot/sparse: propagate error code
sparse_file_write_block calls functions that might failed.  This patch
makes sparse_file_write_block catch the error code and propagate it.

Without this patch, fastboot crashes on a segmentation fault if
usb_write() fail during a sparse file image flashing.

Change-Id: If9c0e8dfac8fa380628a2504e13abe8cf7d62726
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
2015-03-01 11:54:02 +01:00
Elliott Hughes
7f4e0138ab am 0beef09b: am 58b81bf8: am a82f2b25: Merge "Support "fastboot reboot bootloader"."
* commit '0beef09b1c10ca7d1699078f7b9f2e0912854160':
  Support "fastboot reboot bootloader".
2015-02-25 18:57:43 +00:00
Elliott Hughes
ca85df0662 Support "fastboot reboot bootloader".
This matches the more general adb syntax, though the fastboot
protocol doesn't support rebooting into the recovery image.

Change-Id: I6d93d4c63d4a9b81c71e681e7a7bf76867fba019
2015-02-25 10:02:00 -08:00
Elliott Hughes
6c8de1b1be resolved conflicts for merge of c162dbb2 to master
Change-Id: If7ffc80560a807cb8e4338d42bec454f567fd9ad
2014-12-10 13:53:17 -08:00
Yabin Cui
71a968602d kill libunz
Bug: 18571533
Change-Id: I4214f9236f80629152d969a6ee9fce489079cefa
2014-12-09 22:24:07 -08:00
Christopher Ferris
67a7a4ae27 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
2014-12-09 16:03:29 -08:00
Elliott Hughes
58cd6d3573 am 7da97265: am ab0d5425: Merge "fastboot: Support USB 3.x SuperSpeed devices on Linux"
* commit '7da97265e596fc1bb112a4b2aa939057fef18fcb':
  fastboot: Support USB 3.x SuperSpeed devices on Linux
2014-12-09 23:44:45 +00:00
Elliott Hughes
7da97265e5 am ab0d5425: Merge "fastboot: Support USB 3.x SuperSpeed devices on Linux"
* commit 'ab0d542506b5fdbcc431ba2606248471d22322ba':
  fastboot: Support USB 3.x SuperSpeed devices on Linux
2014-12-09 14:40:58 +00:00
Jack Pham
1c02213e89 fastboot: Support USB 3.x SuperSpeed devices on Linux
When enumerating USB 3.x devices, an extra 6-byte SuperSpeed
companion descriptor follows each standard endpoint descriptor.
The loop parsing the descriptors will stumble if they're not
handled. Since they're not needed once the bulk endpoints are
identified, we can simply skip over them.

Change-Id: I7e73bcf9135f23c3059cd7c55b432557b28cb6ef
2014-12-05 12:11:20 -08:00
Badhri Jagan Sridharan
c8e84fe7d1 am ad32ebec: am 97133621: Merge "system: core: fastboot: Increase USB protocol buffer size to 1024"
* commit 'ad32ebecc9a0d781f66f39f467be0b30cc05f65b':
  system: core: fastboot: Increase USB protocol buffer size to 1024
2014-12-05 00:15:03 +00:00
Badhri Jagan Sridharan
ad32ebecc9 am 97133621: Merge "system: core: fastboot: Increase USB protocol buffer size to 1024"
* commit '971336213a32e5f3841bc22413632e0108f1c9e2':
  system: core: fastboot: Increase USB protocol buffer size to 1024
2014-12-04 22:38:14 +00:00
Badhri Jagan Sridharan
971336213a Merge "system: core: fastboot: Increase USB protocol buffer size to 1024" 2014-12-04 18:58:46 +00:00
Stephen Hines
622a75d5ab am fafbd329: am ba1552bd: Merge "Clarify the strcmp() with the empty string."
* commit 'fafbd329cb1685dc91172230a0671175e80ca8b3':
  Clarify the strcmp() with the empty string.
2014-11-27 14:01:26 +00:00
Stephen Hines
d97d6d524a am 8d49c8b0: am f66486ef: Merge "Fix incorrect path name check."
* commit '8d49c8b0bfdc7bed855acec603bacc355b5bcb8c':
  Fix incorrect path name check.
2014-11-27 14:01:25 +00:00
Stephen Hines
fafbd329cb am ba1552bd: Merge "Clarify the strcmp() with the empty string."
* commit 'ba1552bd2438a8a47779ed3d05d5ce15bfb5741c':
  Clarify the strcmp() with the empty string.
2014-11-27 13:54:31 +00:00
Stephen Hines
8d49c8b0bf am f66486ef: Merge "Fix incorrect path name check."
* commit 'f66486ef09bfc53da65ca6b4137c47d583f31356':
  Fix incorrect path name check.
2014-11-27 13:54:24 +00:00
Stephen Hines
04f895314d Clarify the strcmp() with the empty string.
Change-Id: Ie246b3c2de3f19b95693f634b0ebd46bdcf3962b
2014-11-26 14:54:43 -08:00
Stephen Hines
f66486ef09 Merge "Fix incorrect path name check." 2014-11-26 22:32:23 +00:00
Stephen Hines
60f21a7f61 Fix incorrect path name check.
This was caught by clang 3.6's -Wpointer-bool-conversion. The device_path
field is a char[256], and thus never NULL. The intention for this code was
to check whether or not there is a named path at all. Checking whether this
is an empty string matches the original intent.

Change-Id: I5ccedc03167e6a457e472089de26130aff7f96e3
2014-11-26 14:30:01 -08:00
Elliott Hughes
0e6d8a3ab4 am 87fdfc71: am cb321921: Merge "fastboot: add parameter for unbuffered stderr/stdout"
* commit '87fdfc718e9eccdd9c40e7bca7a48af40b6bf732':
  fastboot: add parameter for unbuffered stderr/stdout
2014-11-25 19:56:53 +00:00
Elliott Hughes
87fdfc718e am cb321921: Merge "fastboot: add parameter for unbuffered stderr/stdout"
* commit 'cb321921fe04f6ccaeb56c4bf3e8965ee4764738':
  fastboot: add parameter for unbuffered stderr/stdout
2014-11-25 18:52:01 +00:00
Florian Bäuerle
27ded4832d fastboot: add parameter for unbuffered stderr/stdout
This is useful for writing Windows GUIs that want to parse the output of
fastboot before it exits.

Change-Id: Ic0171fe379fc4db7b65b1501e5f2e771ac7c62c4
Signed-off-by: Florian Bäuerle <florian.bae@gmail.com>
2014-11-24 18:12:22 +01:00
Elliott Hughes
224c3735ee am 542324f4: am 0750f786: Merge "Remove explict use of ASCII encoding"
* commit '542324f4b48897d40adb010afc440261c599633d':
  Remove explict use of ASCII encoding
2014-11-21 22:32:42 +00:00
Elliott Hughes
542324f4b4 am 0750f786: Merge "Remove explict use of ASCII encoding"
* commit '0750f78659758352490e599d057a39dc44e93340':
  Remove explict use of ASCII encoding
2014-11-21 19:08:15 +00:00
Al Sutton
2a4b5f9e80 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
2014-11-21 15:56:59 +00:00
Elliott Hughes
b99dbe9aaf am 4c2aec09: am aa3e17e1: Merge "Return path including executable instead of without"
* commit '4c2aec09cf2da437f3995ff4cac87e4c20d1d4b0':
  Return path including executable instead of without
2014-11-20 18:47:24 +00:00
Elliott Hughes
4c2aec09cf am aa3e17e1: Merge "Return path including executable instead of without"
* commit 'aa3e17e1b685218cddeb7a05e68ff1721a322147':
  Return path including executable instead of without
2014-11-20 18:43:12 +00:00
Al Sutton
26b53bb75e 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
2014-11-20 13:33:57 +00:00
Elliott Hughes
6309cb35f7 am 2097e9a1: am 20860a28: Merge "Fix building on modern versions of Xcode and OS X."
* commit '2097e9a1491e850545cd0c38522c22dafd2cf6af':
  Fix building on modern versions of Xcode and OS X.
2014-11-19 22:00:18 +00:00
Elliott Hughes
2097e9a149 am 20860a28: Merge "Fix building on modern versions of Xcode and OS X."
* commit '20860a28c5be013da111cb794c92dae02aa30089':
  Fix building on modern versions of Xcode and OS X.
2014-11-19 21:55:28 +00:00
Al Sutton
f456d47c50 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
2014-11-19 19:50:48 +00:00
Channagoud Kadabi
b2117739ed system: core: fastboot: Increase USB protocol buffer size to 1024
With USB3.0 SS support the max packet size supported by USB protocol
is 1024 bytes. When connected to a USB device in SuperSpeed, if only
512 bytes are sent at a time the device would interpret each transfer
as a short packet and slows down overall throughput. To accommodate
for SuperSpeed USB bulk endpoints, increase the buffer size to 1024.

Change-Id: I4f447fe38045bc0008e2d6dd3f36c2d6819d6c15
2014-11-07 12:01:33 -08:00
Christopher Ferris
8e8ae85754 am ae7bf095: Fix adb/fastboot windows compilations.
* commit 'ae7bf0959bd3f79afbf365e41f015ed1c304afdc':
  Fix adb/fastboot windows compilations.
2014-11-07 03:49:08 +00:00
Christopher Ferris
ae7bf0959b Fix adb/fastboot windows compilations.
Many of the windows files where not including stdlib.h even though they
are using malloc/free calls.

Change-Id: If6959df9909d9d9928e9f4a2a96018166361cf3c
2014-11-06 14:34:24 -08:00
Stephen Hines
82921192f4 am f9d61a00: am 4acabfee: am 64f44b84: Merge "Remove obsolete reference to ddk; Fixes for -Werror" into lmp-dev
* commit 'f9d61a007426f47337f9842930b15c2160281c58':
  Remove obsolete reference to ddk; Fixes for -Werror
2014-10-02 13:52:59 +00:00
Stephen Hines
f9d61a0074 am 4acabfee: am 64f44b84: Merge "Remove obsolete reference to ddk; Fixes for -Werror" into lmp-dev
* commit '4acabfee9e00962be02d06a6771da2e7ade20859':
  Remove obsolete reference to ddk; Fixes for -Werror
2014-10-02 13:37:26 +00:00
Stephen Hines
1e95e0b19c am 64f44b84: Merge "Remove obsolete reference to ddk; Fixes for -Werror" into lmp-dev
* commit '64f44b8444dabd69cf391d42e10d44e8e926a79d':
  Remove obsolete reference to ddk; Fixes for -Werror
2014-10-01 23:21:09 +00:00
Andrew Hsieh
b75d6f1429 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
2014-09-30 02:24:07 -07:00
Daniel Rosenberg
aa3ed7844a am 81b857f3: Merge "fastboot: Remove tos from flashall" into lmp-dev
* commit '81b857f3a21f3ae96a5ec72e54982fe30278049f':
  fastboot: Remove tos from flashall
2014-09-17 14:12:09 +00:00
Daniel Rosenberg
4c13769dba am 24e834ab: am 81b857f3: Merge "fastboot: Remove tos from flashall" into lmp-dev
* commit '24e834ab6037cee0d3e8569d5fd45695f86865bd':
  fastboot: Remove tos from flashall
2014-09-16 21:46:37 +00:00
Daniel Rosenberg
24e834ab60 am 81b857f3: Merge "fastboot: Remove tos from flashall" into lmp-dev
* commit '81b857f3a21f3ae96a5ec72e54982fe30278049f':
  fastboot: Remove tos from flashall
2014-09-16 21:34:45 +00:00