Commit graph

11268 commits

Author SHA1 Message Date
Dan Albert
e4fe1e967c am 06352ccb: Merge "Add a missing include."
* commit '06352ccb291554c13c1a3e714b558436050b6b74':
  Add a missing include.
2014-11-21 21:28:04 +00:00
Dan Albert
06352ccb29 Merge "Add a missing include." 2014-11-21 21:19:23 +00:00
Elliott Hughes
b0669f5aa2 am caed3d9f: Merge "notify: dynamically allocate filename buffer"
* commit 'caed3d9fae1fd372dfa01cb60fbf157233c9052e':
  notify: dynamically allocate filename buffer
2014-11-21 20:25:58 +00:00
Elliott Hughes
f799fac243 resolved conflicts for merge of bc2168c9 to lmp-mr1-dev-plus-aosp
Change-Id: Ic53ce9bdb658838368b4e9029a1f7a4137dd0499
2014-11-21 11:22:00 -08:00
Elliott Hughes
caed3d9fae Merge "notify: dynamically allocate filename buffer" 2014-11-21 19:13:01 +00:00
Elliott Hughes
30ebda5838 am 97e1e170: Merge "Disable vendor id filtering for OS X."
* commit '97e1e1704245d4c2edd8a9e155669aaae7341b7d':
  Disable vendor id filtering for OS X.
2014-11-21 19:08:16 +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
Dan Albert
592d335055 Add a missing include.
Needed following the pthread.h/signal.h cleanup.

Change-Id: I9a43732eefdf49ecf769659dee1170626cf8fff9
2014-11-21 11:03:17 -08:00
Elliott Hughes
bc2168c9b0 Merge "Remove the adb usb vendor id whitelist." 2014-11-21 18:53:06 +00:00
Elliott Hughes
c66aed8a14 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
2014-11-21 10:44:10 -08:00
Elliott Hughes
97e1e17042 Merge "Disable vendor id filtering for OS X." 2014-11-21 18:42:28 +00:00
Elliott Hughes
0750f78659 Merge "Remove explict use of ASCII encoding" 2014-11-21 18:37:19 +00:00
Elliott Hughes
aa98c83546 am 01d49e85: Merge "adb: Add USB vendor ID for Ubiquiti Networks, Inc."
* commit '01d49e854fa09a776c9673b229efcfa2d53adfea':
  adb: Add USB vendor ID for Ubiquiti Networks, Inc.
2014-11-21 18:09:16 +00:00
Elliott Hughes
01d49e854f Merge "adb: Add USB vendor ID for Ubiquiti Networks, Inc." 2014-11-21 17:44:06 +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
Al Sutton
8e01cc6e0b 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
2014-11-21 14:14:58 +00:00
Chih-Hung Hsieh
dd6b662c4f am 84babf39: Merge "Fix format string"
* commit '84babf397420528df3944636bc46bab741e21aea':
  Fix format string
2014-11-21 04:10:03 +00:00
Chih-Hung Hsieh
84babf3974 Merge "Fix format string" 2014-11-21 04:00:36 +00:00
Chih-Hung Hsieh
fcc8115dcf Fix format string
Make a format string match the type of the parameter it represents

Change-Id: I0af88636448084b56450996ea9dafdba3c1fd2a3
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org
2014-11-20 19:38:26 -08:00
Chih-hung Hsieh
7474c77cf8 am 07148ea2: Merge "Make mkdirAndChown do what it claims to do"
* commit '07148ea2be8110e2310860c5e6a391e542a656be':
  Make mkdirAndChown do what it claims to do
2014-11-21 02:07:26 +00:00
Chih-hung Hsieh
07148ea2be Merge "Make mkdirAndChown do what it claims to do" 2014-11-21 00:58:14 +00:00
Dan Albert
5ef3bcc768 am 5d8a5ade: Merge "Add a pre-C++11 constexpr compatibility macro."
* commit '5d8a5ade620be65e0e658dbb99e66398f3ffdc74':
  Add a pre-C++11 constexpr compatibility macro.
2014-11-20 20:21:55 +00:00
Dan Albert
5d8a5ade62 Merge "Add a pre-C++11 constexpr compatibility macro." 2014-11-20 20:13:20 +00:00
Dan Albert
e4c649c9fc Add a pre-C++11 constexpr compatibility macro.
Needed for cases where something should be constexpr if possible, but
not being constexpr is fine if in pre-C++11 code (such as a const
static float member variable).

Bug: 18466763
Change-Id: I635d062575ba2fbc4cbe3a89f730128c404d95e1
2014-11-20 10:47:55 -08: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
Elliott Hughes
1bc314d3dd am 51184950: Merge "Disable vendor id filtering for Linux."
* commit '511849507a7b2f4e259f6763c62f0c8619977b06':
  Disable vendor id filtering for Linux.
2014-11-20 18:36:18 +00:00
Elliott Hughes
aa3e17e1b6 Merge "Return path including executable instead of without" 2014-11-20 18:35:12 +00:00
Elliott Hughes
511849507a Merge "Disable vendor id filtering for Linux." 2014-11-20 18:28:06 +00:00
Johan Redestig
80bf9a456e notify: dynamically allocate filename buffer
use asprintf to dynamically allocate filename buffer
rather than just reserving 512 bytes on the stack to
avoid potential overflow.

Change-Id: Ieeb9c6c2e5f97a9574f8128d84eba0b8efdb7263
2014-11-20 15:25:18 +01: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
55664906a8 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
2014-11-19 22:07:34 -08:00
Yabin Cui
ebd8ba674d am 46ee85fc: Merge "kill HAVE_PREAD"
* commit '46ee85fcc301471aff9d95a817599349570dcef8':
  kill HAVE_PREAD
2014-11-20 05:21:54 +00:00
Yabin Cui
46ee85fcc3 Merge "kill HAVE_PREAD" 2014-11-20 05:15:04 +00:00
Yabin Cui
70160f4454 kill HAVE_PREAD
Bug: 18397613
Change-Id: I3990bd0f95cf38c5a9229180a1ddc699941892fc
2014-11-19 20:47:18 -08:00
Nick Kralevich
477fd01483 logd: throttle SELinux denials to 20/sec
automerge: 83d8556

* commit '83d85563c51fa39cb61b836302a8c26fe0e2ace6':
  logd: throttle SELinux denials to 20/sec
2014-11-19 22:45:31 +00:00
Nick Kralevich
421e2d55c8 am 606bb5f2: Merge "logd: throttle SELinux denials to 20/sec"
* commit '606bb5f2e5f2913d5cb30ed87dd18da23dda1705':
  logd: throttle SELinux denials to 20/sec
2014-11-19 22:13:38 +00:00
Nick Kralevich
83d85563c5 logd: throttle SELinux denials to 20/sec
Impose a limit of 20 selinux denials per second. Denials beyond
that point don't add any value, and have the potential to cause
crashes or denial of service attacks.

Do some other misc cleanup while I'm here.

Bug: 18341932

(cherry picked from commit c234a1b879)

Change-Id: Ic5c96003db82e504baf301e87be5c8c539c73c2a
2014-11-19 14:06:53 -08:00
Nick Kralevich
606bb5f2e5 Merge "logd: throttle SELinux denials to 20/sec" 2014-11-19 22:02:15 +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
Elliott Hughes
20860a28c5 Merge "Fix building on modern versions of Xcode and OS X." 2014-11-19 21:48:32 +00:00
Nick Kralevich
c234a1b879 logd: throttle SELinux denials to 20/sec
Impose a limit of 20 selinux denials per second. Denials beyond
that point don't add any value, and have the potential to cause
crashes or denial of service attacks.

Do some other misc cleanup while I'm here.

Bug: 18341932
Change-Id: I6125d629ae4d6ae131d2e53bfa41e1f50277d402
2014-11-19 13:35:36 -08: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
Jeremy Chang
868cf42557 adb: Add USB vendor ID for Ubiquiti Networks, Inc.
Change-Id: Iedb86b9ff8dc55aea5d0df201a98c96418002207
Signed-off-by: Jeremy Chang <jeremy@ubnt.com>
2014-11-19 22:13:24 +08:00
Yabin Cui
26d2b64ba8 am 81906d4b: Merge "kill HAVE_MADVISE"
* commit '81906d4b0c508dc308606ca232eaa055255abd1e':
  kill HAVE_MADVISE
2014-11-19 04:35:27 +00:00
Yabin Cui
81906d4b0c Merge "kill HAVE_MADVISE" 2014-11-19 04:25:59 +00:00
Yabin Cui
745c5f6ad0 kill HAVE_MADVISE
Change to avoid "unused parameter" warning. 

Bug: 18397020
Change-Id: I4b26de55314c78237daead8e873385b97cafe4d4
2014-11-19 04:03:27 +00:00
Yabin Cui
ad450e6361 am c8ad1809: Merge "kill HAVE_MADVISE"
* commit 'c8ad180983fb50c89179b7895896ad1f35cb885a':
  kill HAVE_MADVISE
2014-11-19 03:30:45 +00:00
Yabin Cui
c8ad180983 Merge "kill HAVE_MADVISE" 2014-11-19 03:17:46 +00:00
Yabin Cui
819b480b93 kill HAVE_MADVISE
Bug: 18397020
Change-Id: Ibc8d886d729c51932a403531888214de4e541452
2014-11-18 18:15:40 -08:00
Elliott Hughes
eda507e492 am 0655d38b: Merge "Revert "adb: Add USB vendor ID for Honeywell""
* commit '0655d38b0c998f294ad52f1f8e84233a48046e97':
  Revert "adb: Add USB vendor ID for Honeywell"
2014-11-18 21:23:58 +00:00