Commit graph

12730 commits

Author SHA1 Message Date
Colin Cross
6de70784ef am 631cf146: Merge "Fix windows adb build"
* commit '631cf146274e4f0ef425fd491d39c969a20628a1':
  Fix windows adb build
2015-04-20 20:18:56 +00:00
Colin Cross
631cf14627 Merge "Fix windows adb build" 2015-04-20 20:09:51 +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
858cd9db3f am b2b06de5: Merge "statically link adb and fastboot against libc++"
* commit 'b2b06de5fc9605919a06d7757c8ef4a7a48f3e87':
  statically link adb and fastboot against libc++
2015-04-20 18:17:11 +00:00
Colin Cross
b2b06de5fc Merge "statically link adb and fastboot against libc++" 2015-04-20 18:05:29 +00:00
Nick Kralevich
20f21e88d1 am 63fba52c: Merge "create /data/misc/gatekeeper"
* commit '63fba52c2cc90c237df85bc76c364a1deec0b081':
  create /data/misc/gatekeeper
2015-04-20 16:10:39 +00:00
Nick Kralevich
63fba52c2c Merge "create /data/misc/gatekeeper" 2015-04-20 16:01:07 +00:00
Nick Kralevich
1450586ffd create /data/misc/gatekeeper
Change-Id: I7631401ac21b60a22f6fd4052814186bf3bc2b05
2015-04-20 08:55:12 -07:00
Narayan Kamath
46745cb244 am 4d0cb5e8: Merge "Reserve space on disk using fallocate"
* commit '4d0cb5e8064cecb25cd7bce7e9932f95a9bef7f4':
  Reserve space on disk using fallocate
2015-04-20 09:58:32 +00:00
Narayan Kamath
4d0cb5e806 Merge "Reserve space on disk using fallocate" 2015-04-20 09:49:36 +00:00
Łukasz Szymczyk
e1d5a6aa5c Reserve space on disk using fallocate
There were crashes when android failed to extract
zip archives due to out of free space on disk, with stacks like:

  #00 pc 00000000000156b0 /system/lib64/libc.so (memcpy+176)
  #01 pc 000000000002e5b8 /system/lib64/libandroidfw.so
  #02 pc 000000000002f488 /system/lib64/libandroidfw.so (ExtractToMemory+328)
  #03 pc 000000000002f5c8 /system/lib64/libandroidfw.so (ExtractEntryToFile+268)
  #04 pc 00000000000287d8 /system/lib64/libandroidfw.so (android::ZipFileRO::\
  uncompressEntry(void*, int) const+12)

Space for the file is now allocated using fallocate rather than
ftruncate, since ftruncate dont actually reserve space on disk. When writes
to the mmaped pointer fails to be realized due to out of space SIGBUS
is the result. With this change we make sure that there is space available
before mmaping the pointer.

Change-Id: Ic5e8c33dbe729edb57919dacff73811b34cc2dc2
2015-04-20 09:49:26 +00:00
Elliott Hughes
924869d4ee am 34c91edd: Merge "Fix the Windows adb build."
* commit '34c91eddb09ab86ffe6c965b25c5253c37ded227':
  Fix the Windows adb build.
2015-04-19 20:39:09 +00:00
Elliott Hughes
34c91eddb0 Merge "Fix the Windows adb build." 2015-04-19 20:30:26 +00:00
Elliott Hughes
53daee6a2b 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
2015-04-19 13:17:01 -07:00
Elliott Hughes
f08baf8212 am 623aa1c4: Merge "Use escape_arg in "adb backup"."
* commit '623aa1c47a51990259fbbc271d7f9f40046153fd':
  Use escape_arg in "adb backup".
2015-04-18 03:47:53 +00:00
Elliott Hughes
623aa1c47a Merge "Use escape_arg in "adb backup"." 2015-04-18 03:37:14 +00:00
Elliott Hughes
6c34bbaa68 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
2015-04-17 20:30:09 -07:00
Elliott Hughes
613584a24b am 81fa3039: Merge "Remove yet more fixed-length buffers (and their overruns)."
* commit '81fa3039fa7b5c6a18747cf5bdac32a1c6091427':
  Remove yet more fixed-length buffers (and their overruns).
2015-04-18 01:10:38 +00:00
Elliott Hughes
81fa3039fa Merge "Remove yet more fixed-length buffers (and their overruns)." 2015-04-18 01:03:14 +00:00
Elliott Hughes
a7090b94c1 Remove yet more fixed-length buffers (and their overruns).
Bug: 20317724
Change-Id: If137fc96f5f23576ccecd388ac87afefa47337c6
2015-04-17 17:58:35 -07:00
Elliott Hughes
3621ee6fdb am 340e62f0: Merge "Fix comment typo."
* commit '340e62f05e27c7665641e68c5d0654e310e251fb':
  Fix comment typo.
2015-04-18 00:28:51 +00:00
Elliott Hughes
340e62f05e Merge "Fix comment typo." 2015-04-18 00:17:34 +00:00
Elliott Hughes
1daf86aa20 Fix comment typo.
Change-Id: I2d7082c44123e90d74b2669ab29d787b9aa64863
2015-04-17 17:08:16 -07:00
Elliott Hughes
c0e6eebfae am 8d2abbea: Merge "Switch adb over to clang."
* commit '8d2abbea76f13b76ef814ff426d88f70526f6923':
  Switch adb over to clang.
2015-04-17 22:53:14 +00:00
Elliott Hughes
8d2abbea76 Merge "Switch adb over to clang." 2015-04-17 22:42:36 +00:00
Elliott Hughes
a2fd312840 am 61a004c0: Merge "Fix more buffer overruns."
* commit '61a004c05f100741048d284fa527ac28c242d0bc':
  Fix more buffer overruns.
2015-04-17 22:30:41 +00:00
Elliott Hughes
2083fa6b01 Switch adb over to clang.
Change-Id: Ib5511dcba56e80ffce6bc293d99251ccfd61c330
2015-04-17 15:27:13 -07:00
Elliott Hughes
61a004c05f Merge "Fix more buffer overruns." 2015-04-17 22:24:27 +00:00
Elliott Hughes
5830577bd8 Fix more buffer overruns.
Also add some tests.

Bug: 20323050
Change-Id: I9eaf3dc04efd85206663c4cca4f8c1208620a89a
2015-04-17 15:23:31 -07:00
Elliott Hughes
50ba7354e0 am adc4a8b8: Merge "Use PRI* macros to fix the Windows build."
* commit 'adc4a8b8ce89d6ba2af3170b28ff652150e397e2':
  Use PRI* macros to fix the Windows build.
2015-04-17 21:20:58 +00:00
Elliott Hughes
adc4a8b8ce Merge "Use PRI* macros to fix the Windows build." 2015-04-17 21:10:28 +00:00
Elliott Hughes
2940ccff86 Use PRI* macros to fix the Windows build.
Change-Id: Icd400be05c2bc726265832875b5a05dba7966847
2015-04-17 14:07:52 -07:00
Elliott Hughes
ace56f5c3b am 3538b409: Merge "Remove various fixed-length buffers (and their overflows)."
* commit '3538b40942b65927e65b446bca9842a9f915c5e3':
  Remove various fixed-length buffers (and their overflows).
2015-04-17 19:53:02 +00:00
Elliott Hughes
3538b40942 Merge "Remove various fixed-length buffers (and their overflows)." 2015-04-17 19:42:29 +00:00
Elliott Hughes
2baae3a876 Remove various fixed-length buffers (and their overflows).
Bug: 20323052
Bug: 20323051
Bug: 20317728
Bug: 20317727
Bug: 20317726
Bug: 20317725
Change-Id: I57a5e30a5b7867715f55cee7429aa36d7ce21484
2015-04-17 10:59:34 -07:00
Elliott Hughes
ef995f8322 am 0b8ecb32: Merge "Remove extern "C" barriers to using C++."
* commit '0b8ecb32908f0ccde550dd510f4a562239085806':
  Remove extern "C" barriers to using C++.
2015-04-17 17:43:58 +00:00
Elliott Hughes
3f82fef75c am 9a22039b: Merge "Show if authentication fails."
* commit '9a22039be8bbfd5772e40d6f37b7ecc3c5d93e47':
  Show $ADB_VENDOR_KEYS if authentication fails.
2015-04-17 17:32:33 +00:00
Elliott Hughes
0b8ecb3290 Merge "Remove extern "C" barriers to using C++." 2015-04-17 17:31:51 +00:00
Elliott Hughes
9a22039be8 Merge "Show $ADB_VENDOR_KEYS if authentication fails." 2015-04-17 17:23:44 +00:00
Elliott Hughes
2d4121c0dc Remove extern "C" barriers to using C++.
Change-Id: Ic046d6aa540738cb46b54531bc59ba3b47b0136d
2015-04-17 09:47:42 -07:00
Elliott Hughes
7be29c819b 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
2015-04-16 22:54:44 -07:00
Dan Albert
6e58f4a96b am a4802ca0: Merge "Move usb_osx to C++."
* commit 'a4802ca08bfcbf0124f5e9b959ed4e3a198d5f46':
  Move usb_osx to C++.
2015-04-17 04:46:49 +00:00
Dan Albert
2c93697cfc am c4f8fa7b: Merge "Link libraries needed for Darwin adb tests."
* commit 'c4f8fa7b36a8ba397f1c0ad3c7fb5a5c09520272':
  Link libraries needed for Darwin adb tests.
2015-04-17 04:46:48 +00:00
Dan Albert
a4802ca08b Merge "Move usb_osx to C++." 2015-04-17 04:37:47 +00:00
Dan Albert
c4f8fa7b36 Merge "Link libraries needed for Darwin adb tests." 2015-04-17 04:37:41 +00:00
Elliott Hughes
38cb7caf33 am d393e71f: Merge "Move sysdeps_win32 to C++."
* commit 'd393e71f397110ef182708596aaca870141c9978':
  Move sysdeps_win32 to C++.
2015-04-17 03:13:31 +00:00
Elliott Hughes
d393e71f39 Merge "Move sysdeps_win32 to C++." 2015-04-17 03:04:43 +00:00
Dan Albert
7447dd05bd Move usb_osx to C++.
Change-Id: I21673211a702cc4f31d4311c36e2a4b22e55fac8
2015-04-16 19:20:40 -07:00
Elliott Hughes
56a78ef26e am 2cba9405: Merge "[MIPS] Fast android_memset for Mips64, Mipsr6"
* commit '2cba9405f94f94a8fc50b351393b6e1d71d97712':
  [MIPS] Fast android_memset for Mips64, Mipsr6
2015-04-17 02:17:44 +00:00
Dan Albert
f8d6b9b1ef Link libraries needed for Darwin adb tests.
Change-Id: I1c3c3a7bbd3824f5f3a37ee80c24d1c2a9b98748
2015-04-16 19:13:58 -07:00