Commit graph

12327 commits

Author SHA1 Message Date
San Mehat
d05ab3952e init: Implement 'exec' command.
Change-Id: Id6d9bb32e51a0ad090ed8240cc505dc45b57b35d
2015-01-29 01:30:11 +00:00
Paul Lawrence
a35676d402 am 116d81ae: am 07dcb12e: Merge changes If22008be,Id0049ce6
* commit '116d81ae27514b5d3d7517bfee47d164ed7e1ef6':
  Make encryption configurable
  Provide a way to select force encryption from vendor partition
2015-01-28 22:08:21 +00:00
Elliott Hughes
d2ac374909 am 2e14f617: am 06b4e982: Merge "Add missing <malloc.h> and <string.h> includes."
* commit '2e14f61731adbb1f0d0d54bab82bc2f0ecee6a11':
  Add missing <malloc.h> and <string.h> includes.
2015-01-28 22:08:15 +00:00
Paul Lawrence
116d81ae27 am 07dcb12e: Merge changes If22008be,Id0049ce6
* commit '07dcb12e3ee7b7a6f959ae531ffe87f038786730':
  Make encryption configurable
  Provide a way to select force encryption from vendor partition
2015-01-28 21:21:29 +00:00
Paul Lawrence
07dcb12e3e Merge changes If22008be,Id0049ce6
* changes:
  Make encryption configurable
  Provide a way to select force encryption from vendor partition
2015-01-28 21:14:09 +00:00
Elliott Hughes
2e14f61731 am 06b4e982: Merge "Add missing <malloc.h> and <string.h> includes."
* commit '06b4e9826a33ddbdbddf7e74076ac29f9450414a':
  Add missing <malloc.h> and <string.h> includes.
2015-01-28 19:57:27 +00:00
Elliott Hughes
06b4e9826a Merge "Add missing <malloc.h> and <string.h> includes." 2015-01-28 19:46:59 +00:00
Paul Lawrence
36d0eaecd7 Make encryption configurable
Delay mounting encryptable but unencrypted volumes until we can
check the ro.vold.forceencrypt flag, then optionally encrypt.

Requires matching vold change from
    https://googleplex-android-review.git.corp.google.com/#/c/615309/

Bug: 18764230
Change-Id: If22008be8de6a4f3216b349f81ace49be1730314
2015-01-28 11:41:53 -08:00
Paul Lawrence
2f7ee6b7dd Provide a way to select force encryption from vendor partition
This allows a vendor to force encryption on devices via a vendor
partition flag:

ro.vold.forceencryption 1

Bug: 18764230
Change-Id: Id0049ce64e34e4f6f96e593aadd70c277ac131c8
2015-01-28 11:41:35 -08:00
Elliott Hughes
a744b05984 Add missing <malloc.h> and <string.h> includes.
Change-Id: Ia41756e607663d056e7d2fdd7ecbec7e5841a913
2015-01-28 11:37:57 -08:00
Sami Tolvanen
519ec1aab8 am 42f058f7: am 9c4c5a6e: Merge "Verify token length before adb signs it"
* commit '42f058f7e867ccb7b3a3dc955b83ee6e236c031f':
  Verify token length before adb signs it
2015-01-28 14:48:49 +00:00
Sami Tolvanen
42f058f7e8 am 9c4c5a6e: Merge "Verify token length before adb signs it"
* commit '9c4c5a6ed934490ba0fcce661594975a6f4c2c89':
  Verify token length before adb signs it
2015-01-28 14:43:10 +00:00
Sami Tolvanen
9c4c5a6ed9 Merge "Verify token length before adb signs it" 2015-01-28 14:32:52 +00:00
Elliott Hughes
2017f01f12 am 0e90714a: am a034362b: Merge "Make server port option work on windows"
* commit '0e90714ae7fda2b84caa37ce46982d28c0801943':
  Make server port option work on windows
2015-01-28 03:48:19 +00:00
Elliott Hughes
0e90714ae7 am a034362b: Merge "Make server port option work on windows"
* commit 'a034362be4dc69d3432d7587089d371dc871e811':
  Make server port option work on windows
2015-01-28 03:45:32 +00:00
Elliott Hughes
a034362be4 Merge "Make server port option work on windows" 2015-01-28 03:29:06 +00:00
Elliott Hughes
040b946da1 am 13aa2a4e: am 9e376744: Merge "adb: tracing: don\'t make strings if runtime tracing is disabled"
* commit '13aa2a4e32ea0ba84ca5a62cb1767cb7f449aba1':
  adb: tracing: don't make strings if runtime tracing is disabled
2015-01-28 00:42:55 +00:00
Yabin Cui
3f83554d22 am 631965a3: am e862350b: Merge "Kill HAVE_PTHREADS."
* commit '631965a32eb503dc6782a298eb534881aa3697b8':
  Kill HAVE_PTHREADS.
2015-01-28 00:42:36 +00:00
Elliott Hughes
13aa2a4e32 am 9e376744: Merge "adb: tracing: don\'t make strings if runtime tracing is disabled"
* commit '9e376744d39c8fee2f8da4f693e3bc74291f7a45':
  adb: tracing: don't make strings if runtime tracing is disabled
2015-01-28 00:17:31 +00:00
Elliott Hughes
9e376744d3 Merge "adb: tracing: don't make strings if runtime tracing is disabled" 2015-01-28 00:05:58 +00:00
Elliott Hughes
a0b7380673 am a3029782: am c6091d6b: Merge "adb: Win32: set socket buffer sizes properly"
* commit 'a3029782d481d4b7442800ae1471646184da2181':
  adb: Win32: set socket buffer sizes properly
2015-01-27 23:42:33 +00:00
Spencer Low
0de77ffec6 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>
2015-01-27 15:42:14 -08:00
Yabin Cui
631965a32e am e862350b: Merge "Kill HAVE_PTHREADS."
* commit 'e862350bb2eb3d3eda526da7f3b6d5c2dd40a445':
  Kill HAVE_PTHREADS.
2015-01-27 22:45:14 +00:00
Yabin Cui
e862350bb2 Merge "Kill HAVE_PTHREADS." 2015-01-27 22:33:28 +00:00
Yabin Cui
4a6e5a3b64 Kill HAVE_PTHREADS.
Bug: 19083585
Change-Id: Ic09eb3dd250bc5c5b63cac7998f99f5fa007f407
2015-01-27 14:23:22 -08:00
Elliott Hughes
a3029782d4 am c6091d6b: Merge "adb: Win32: set socket buffer sizes properly"
* commit 'c6091d6bfd1c74df7f5352b3de2b3dbdd64a98bd':
  adb: Win32: set socket buffer sizes properly
2015-01-27 18:33:49 +00:00
Dan Albert
849b339249 am 40c6d420: am a76f057a: Merge "Protect from eng vs userdebug build breaks."
* commit '40c6d420349707d0e8d4baa2bc7f53620e160cc8':
  Protect from eng vs userdebug build breaks.
2015-01-27 18:33:05 +00:00
Dan Albert
89ff1ff505 am 72760253: am fe685787: Merge "Fix userdebug build."
* commit '72760253f02b9946caf2d0a452d2c8b3b19c8af6':
  Fix userdebug build.
2015-01-27 18:33:04 +00:00
Dan Albert
577d63a6d6 am 3346eb65: am accebbfc: Merge "Fix win_sdk build."
* commit '3346eb65f978d53bc43d9cd73a65a486e83713e6':
  Fix win_sdk build.
2015-01-27 18:33:03 +00:00
Dan Albert
0167fc6303 am 73f4d914: am 64a5ff96: Merge "Begin moving code from adb to libadb."
* commit '73f4d91481944084a8bb8803fca44e538de6ab9a':
  Begin moving code from adb to libadb.
2015-01-27 18:32:58 +00:00
Christopher Ferris
0d208fa504 am 5661de2f: am 55dfa96b: Merge "Remove the pt_regs_mips_t structure."
* commit '5661de2f9b747469d9967b7dbe21f1c066c6331d':
  Remove the pt_regs_mips_t structure.
2015-01-27 18:32:57 +00:00
Elliott Hughes
c6091d6bfd Merge "adb: Win32: set socket buffer sizes properly" 2015-01-27 18:17:40 +00:00
Sami Tolvanen
7b9c20d3b2 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
2015-01-27 17:19:35 +00:00
Spencer Low
f055c193b8 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>
2015-01-26 21:56:26 -08:00
Dan Albert
40c6d42034 am a76f057a: Merge "Protect from eng vs userdebug build breaks."
* commit 'a76f057af81b7a03c9c18af0bcb763f7e7f03fbf':
  Protect from eng vs userdebug build breaks.
2015-01-27 02:23:38 +00:00
Dan Albert
72760253f0 am fe685787: Merge "Fix userdebug build."
* commit 'fe68578716290d93fd42005622adade8d345de3c':
  Fix userdebug build.
2015-01-27 02:18:48 +00:00
Dan Albert
3346eb65f9 am accebbfc: Merge "Fix win_sdk build."
* commit 'accebbfc3e05005719ef3a1510f4b19c22978333':
  Fix win_sdk build.
2015-01-27 02:18:47 +00:00
Dan Albert
73f4d91481 am 64a5ff96: Merge "Begin moving code from adb to libadb."
* commit '64a5ff963c894f9ff622ae1de370a98f2bd5af62':
  Begin moving code from adb to libadb.
2015-01-27 02:08:49 +00:00
Christopher Ferris
5661de2f9b am 55dfa96b: Merge "Remove the pt_regs_mips_t structure."
* commit '55dfa96b1f3587f6c003f3c9d0f4ff794a5fc329':
  Remove the pt_regs_mips_t structure.
2015-01-27 02:08:48 +00:00
Dan Albert
a76f057af8 Merge "Protect from eng vs userdebug build breaks." 2015-01-27 02:04:57 +00:00
Dan Albert
1f09bdaf59 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
2015-01-26 17:49:17 -08:00
Dan Albert
fe68578716 Merge "Fix userdebug build." 2015-01-27 01:30:24 +00:00
Dan Albert
accebbfc3e Merge "Fix win_sdk build." 2015-01-27 01:16:06 +00:00
Dan Albert
030b76fc1d Fix userdebug build.
Apparently this code I thought was unused is just unused for eng
builds...

Bug: 17626262
Change-Id: I2e5f411a2ead7f23d9f5822935de66c992750a03
2015-01-26 17:14:23 -08:00
Dan Albert
4626b71057 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
2015-01-26 17:07:47 -08:00
Dan Albert
64a5ff963c Merge "Begin moving code from adb to libadb." 2015-01-27 00:50:49 +00:00
Dan Albert
630b9afeb0 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
2015-01-26 16:45:34 -08:00
Christopher Ferris
55dfa96b1f Merge "Remove the pt_regs_mips_t structure." 2015-01-27 00:44:00 +00:00
Christopher Ferris
f084942a54 am d848d703: am fb538fb1: Merge "Fix the v2 descriptor handling."
* commit 'd848d7038b0a09c99430a90bc2f281fbeac153b4':
  Fix the v2 descriptor handling.
2015-01-26 22:09:41 +00:00
Christopher Ferris
b817094081 Remove the pt_regs_mips_t structure.
The kernel finally has the pt_regs structure properly defined for mips,
so we don't need to define it ourselves.

Change-Id: Ifdf75ed827cd2390962e9b3a182bdbbf02fe0732
2015-01-26 13:52:35 -08:00