Commit Graph

33143 Commits

Author SHA1 Message Date
Elliott Hughes 4df2bc7e8c Merge "Improve "adb sideload" error reporting." am: 66b25eb810 am: f2fe436d32 am: 2b0d807531
am: df3dc783af

Change-Id: I2d6489d7613acc4331f71e9c6199ef979e169d05
2017-05-03 01:04:09 +00:00
Elliott Hughes df3dc783af Merge "Improve "adb sideload" error reporting." am: 66b25eb810 am: f2fe436d32
am: 2b0d807531

Change-Id: I9540db5d8095aa81b8bbc9dca646b61a186a462c
2017-05-03 01:01:10 +00:00
Elliott Hughes 2b0d807531 Merge "Improve "adb sideload" error reporting." am: 66b25eb810
am: f2fe436d32

Change-Id: I38f7972668504f902f3924a0c1872c6f2fad017b
2017-05-03 00:59:08 +00:00
Elliott Hughes f2fe436d32 Merge "Improve "adb sideload" error reporting."
am: 66b25eb810

Change-Id: I46c6ec422611f6f930aa8658f8a91ca41b3b1824
2017-05-03 00:56:08 +00:00
Elliott Hughes 66b25eb810 Merge "Improve "adb sideload" error reporting." 2017-05-03 00:51:09 +00:00
Nick Kralevich 8e84a73787 Merge "Revert "libkeymaster1 split"" 2017-05-03 00:41:32 +00:00
Janis Danisevskis 8a0f637d41 Revert "libkeymaster1 split"
This reverts commit c5bb8c74d1.

Reason for revert: build breakage

Change-Id: I892346eec4a4628da893b0cd4182c8f546beb60a
2017-05-03 00:22:39 +00:00
Nick Kralevich 9879d11860 Merge "Stop writing NUL bytes in adbkey.pub." into oc-dev am: 39225a131b
am: fa60816271

Change-Id: Iff3fd27706c0a1d6a5fa919dc94a1288aa6b5b33
2017-05-02 23:03:46 +00:00
Nick Kralevich fa60816271 Merge "Stop writing NUL bytes in adbkey.pub." into oc-dev
am: 39225a131b

Change-Id: I605a444d9f1b421800f152e281ba93675fcefc2b
2017-05-02 23:01:16 +00:00
Nick Kralevich 39225a131b Merge "Stop writing NUL bytes in adbkey.pub." into oc-dev 2017-05-02 22:56:55 +00:00
Colin Cross 543b23e9ab Merge "Convert libnetutils to Android.bp" into oc-dev am: 178b0492ba -s ours
am: 74a923614f  -s ours

Change-Id: Iaad49c9edf3ff11eb96eb614280a5e22bfc69ed8
2017-05-02 22:46:55 +00:00
Colin Cross 74a923614f Merge "Convert libnetutils to Android.bp" into oc-dev
am: 178b0492ba  -s ours

Change-Id: I8e0b9a3aa56240d44997a422dbb243727427cd8a
2017-05-02 22:21:58 +00:00
TreeHugger Robot 178b0492ba Merge "Convert libnetutils to Android.bp" into oc-dev 2017-05-02 22:09:25 +00:00
Janis Danisevskis 1ad6f26641 Merge "libkeymaster1 split" 2017-05-02 21:51:20 +00:00
Elliott Hughes 09e794c05d Improve "adb sideload" error reporting.
Rather than quietly fall through to the legacy code with no explanation,
say why the first connection failed, and that the second attempt is only
going to be relevant for folks trying to sideload to a pre-KitKit device.

Before:

  $ adb sideload mysid-ota-424425.zip
  opening 'mysid-ota-424425.zip'...
  connecting...
  falling back to older sideload method...
  error: closed

After:

  $ adb sideload mysid-ota-424425.zip
  adb: sideload connection failed: no devices/emulators found
  adb: trying pre-KitKat sideload method...
  adb: pre-KitKat sideload connection failed: no devices/emulators found

Also switch the legacy code to just read+write blocks rather than trying to
load the whole OTA package into RAM (which is in short supply on Win32).
This is probably of no practical use other than that it lets us report a
better error message (better than "terminate called after throwing an
instance of 'std::bad_alloc'").

Bug: https://issuetracker.google.com/37139736
Test: "adb sideload" with no device/a mysid/an angler
Change-Id: Ia568044aac61bd054301ebfd7fcd5ad5d6f3147a
2017-05-02 14:41:04 -07:00
Mark Salyzyn 18e194017f libcutils: fs_config.c mark vendor, odm and oem partitions in duplicate am: fde19425f3
am: 9432fb8d8b

Change-Id: Id3a8a0a23600ccfd74b9097adcbbd050fef2f4a4
2017-05-02 21:39:06 +00:00
Elliott Hughes a761231b96 Stop writing NUL bytes in adbkey.pub.
In N we moved some code from C to C++ without realizing that EVP_EncodedLength
includes space for a terminating NUL and EVP_EncodeBlock writes one. Because
our key reading code copes with the NUL, we never noticed.

Distinguish between the required space returned by EVP_EncodedLength and the
actual number of bytes (not including NUL) used return by EVP_EncodeBlock.

Bug: http://b/36187819
Test: hexdump of ~/.android/adbkey.pub

(cherry picked from commit 0b771b33fd)

Change-Id: I6e16b8d48d097b4054417c1d1a225bf7ece985b9
2017-05-02 14:11:49 -07:00
Mark Salyzyn 9432fb8d8b libcutils: fs_config.c mark vendor, odm and oem partitions in duplicate
am: fde19425f3

Change-Id: Id2d51a818161b8345332ecbac82784eea4d82dab
2017-05-02 21:07:11 +00:00
Mark Salyzyn fde19425f3 libcutils: fs_config.c mark vendor, odm and oem partitions in duplicate
(cherry picked from commit f0b53d0726)
(added "system/vendor/bin/hostapd" to list)

Cover both direct and symlink indirect paths to the referenced
files in the vendor, odm and oem partitions.

Test: compile and hand-verify properties
Bug: 37703469
Change-Id: I5b3a887e904baee2ac193ac4a73aaaee0bbfdb9f
2017-05-02 11:17:54 -07:00
Jiwen Cai 6f273c95de Merge "Add NATIVE_WINDOW_CONSUMER_IS_PROTECTED enum" into oc-dev am: 6399d45725
am: 9815189c9d

Change-Id: Ie349a765da66ae6b140a17d9062c180a52e77cb3
2017-05-02 16:25:11 +00:00
Steven Moreland 99378eb4fc Merge "libsysutils: Android.mk -> Android.bp" into oc-dev am: d512ac99d9
am: 525ddd2ceb

Change-Id: I188cd352cb3e0cd80b66bf599f4ebfa1b3723809
2017-05-02 16:07:52 +00:00
David Zeuthen c8d19a571f Merge "adb: Support 'adb enable/disable-verity' when using AVB." am: 8fc6cc8910 am: 2b3a568171 am: 1855c98ac2
am: c14134bf1b

Change-Id: I749a17bb9db825e73e116b27a52a109cbef4e546
2017-05-02 16:07:26 +00:00
Tom Cherry 805097766f init: add an initializer for keychord_id_ am: 3ac3c02b25 -s ours
am: 2bdde6d241  -s ours

Change-Id: I7dfd60f3f22ff832110f846fb94c159b0b6f5249
2017-05-02 16:07:06 +00:00
David Zeuthen 6019363ccf Merge "fs_mgr: Clear AvbOps struct." am: 6ea4f213d8 am: 983d542d49 am: 86da4a42e8
am: 91a0f9e970

Change-Id: Ib243c4ad35eb104370b76f4308c3feee1682353a
2017-05-02 16:06:46 +00:00
Jiwen Cai 9815189c9d Merge "Add NATIVE_WINDOW_CONSUMER_IS_PROTECTED enum" into oc-dev
am: 6399d45725

Change-Id: Ic1b31382ccf4d658a1d36c23bbf276c8d143c620
2017-05-02 16:06:43 +00:00
Jiwen Cai 6399d45725 Merge "Add NATIVE_WINDOW_CONSUMER_IS_PROTECTED enum" into oc-dev 2017-05-02 15:59:26 +00:00
Steven Moreland 525ddd2ceb Merge "libsysutils: Android.mk -> Android.bp" into oc-dev
am: d512ac99d9

Change-Id: Ib65757a4316106bdf09c3f4235dacb46c5712868
2017-05-02 15:41:10 +00:00
TreeHugger Robot d512ac99d9 Merge "libsysutils: Android.mk -> Android.bp" into oc-dev 2017-05-02 15:36:34 +00:00
David Zeuthen c14134bf1b Merge "adb: Support 'adb enable/disable-verity' when using AVB." am: 8fc6cc8910 am: 2b3a568171
am: 1855c98ac2

Change-Id: I2a3946408b9543dfd40343698161a64eebf54277
2017-05-02 15:34:59 +00:00
David Zeuthen 1855c98ac2 Merge "adb: Support 'adb enable/disable-verity' when using AVB." am: 8fc6cc8910
am: 2b3a568171

Change-Id: I59cbbdaf00664f17cf04ee56c10f836e8daff0ab
2017-05-02 15:32:28 +00:00
David Zeuthen 2b3a568171 Merge "adb: Support 'adb enable/disable-verity' when using AVB."
am: 8fc6cc8910

Change-Id: I00ac80a2b878525a543e5fe080a9c5b147b0b141
2017-05-02 15:29:57 +00:00
Tom Cherry 2bdde6d241 init: add an initializer for keychord_id_
am: 3ac3c02b25  -s ours

Change-Id: Iaec2c9a46ade3962e920e5833882456c83bd3264
2017-05-02 15:28:12 +00:00
Treehugger Robot 8fc6cc8910 Merge "adb: Support 'adb enable/disable-verity' when using AVB." 2017-05-02 15:24:25 +00:00
David Zeuthen 91a0f9e970 Merge "fs_mgr: Clear AvbOps struct." am: 6ea4f213d8 am: 983d542d49
am: 86da4a42e8

Change-Id: I3ef678bce70cca718fdb9be28f570b58f1da8f40
2017-05-02 13:44:21 +00:00
David Zeuthen 86da4a42e8 Merge "fs_mgr: Clear AvbOps struct." am: 6ea4f213d8
am: 983d542d49

Change-Id: I77f3230373de0aff17fd66a784b7b25834b97f1b
2017-05-02 13:41:51 +00:00
David Zeuthen 1e033d6804 adb: Support 'adb enable/disable-verity' when using AVB.
Link with libavb_user and use this to enable/disable dm-verity if AVB
is in use.

Bug: 34124301
Test: Manually tested.
Change-Id: Ic03651312b955081cb3c126f6dafc46d6eeec0da
2017-05-02 09:39:55 -04:00
David Zeuthen 983d542d49 Merge "fs_mgr: Clear AvbOps struct."
am: 6ea4f213d8

Change-Id: Ie0e7ff7f1c2c0640912f10d4384f048a49820bea
2017-05-02 13:39:20 +00:00
Treehugger Robot 6ea4f213d8 Merge "fs_mgr: Clear AvbOps struct." 2017-05-02 13:35:58 +00:00
Elliott Hughes 23da485530 Merge "Stop writing NUL bytes in adbkey.pub." am: d340c1ebbe am: 68c9642a9d am: a404e8ffe8
am: 5ccb3b97b6

Change-Id: I103bf495648b4a003677969ff7bbd1aae1f7ad4f
2017-05-02 01:04:57 +00:00
Elliott Hughes 5ccb3b97b6 Merge "Stop writing NUL bytes in adbkey.pub." am: d340c1ebbe am: 68c9642a9d
am: a404e8ffe8

Change-Id: Ibc21fe68f20ac9df1cb1683073b7abd7651cf0b7
2017-05-02 00:58:30 +00:00
Chenjie Luo e8be8fa36c Merge "Modularize logd." am: ab28acef76 am: c955d890de am: e49500a041
am: f5e8d05be5

Change-Id: Ic299caa764b424eb2c008a5dc2f102ebe7f8dc7b
2017-05-02 00:58:30 +00:00
Chenjie Luo f5e8d05be5 Merge "Modularize logd." am: ab28acef76 am: c955d890de
am: e49500a041

Change-Id: I16c4c6eb7b13a98862a059e17d5c3703beec2370
2017-05-02 00:57:00 +00:00
Elliott Hughes a404e8ffe8 Merge "Stop writing NUL bytes in adbkey.pub." am: d340c1ebbe
am: 68c9642a9d

Change-Id: Ib0ebb4bd8a88437e221d448c545d7698634cd2ff
2017-05-02 00:56:59 +00:00
Elliott Hughes 68c9642a9d Merge "Stop writing NUL bytes in adbkey.pub."
am: d340c1ebbe

Change-Id: Ia0980152cdd937c440aa42c36577670d1e853eea
2017-05-02 00:55:01 +00:00
Chenjie Luo e49500a041 Merge "Modularize logd." am: ab28acef76
am: c955d890de

Change-Id: I2ab27da508f2a1212d3c0617bbf5037665cf3737
2017-05-02 00:55:00 +00:00
Chenjie Luo c955d890de Merge "Modularize logd."
am: ab28acef76

Change-Id: I4d60aa75895a335c9e79f9e069da1d8c873d74a5
2017-05-02 00:53:08 +00:00
Treehugger Robot d340c1ebbe Merge "Stop writing NUL bytes in adbkey.pub." 2017-05-02 00:51:48 +00:00
Chenjie Luo ab28acef76 Merge "Modularize logd." 2017-05-02 00:44:47 +00:00
Tom Cherry 29da2ad7a0 Merge "init: add an initializer for keychord_id_" am: 7c3f147070 am: e2865c0f54 am: ea3434e0dd
am: 67dfc3e691

Change-Id: Ia6cba845dff02ef112eabcf8f0236e08b89167b8
2017-05-02 00:41:01 +00:00
Tom Cherry 67dfc3e691 Merge "init: add an initializer for keychord_id_" am: 7c3f147070 am: e2865c0f54
am: ea3434e0dd

Change-Id: Ib640d4e04f223d353e6dd8f762acf57792532150
2017-05-02 00:38:32 +00:00