Commit graph

29691 commits

Author SHA1 Message Date
Christopher Ferris
1e3dea0034 Merge "Move libc_logging to libasync_safe."
am: deb19a631f

Change-Id: Ia1ebf75cd3c0a9640fa5f2367fb40d00ffeca2ad
2017-05-03 17:52:01 +00:00
Christopher Ferris
deb19a631f Merge "Move libc_logging to libasync_safe." 2017-05-03 17:43:35 +00:00
Mark Salyzyn
a255ab0cb0 Merge "libcutils: convert fs_config.cpp"
am: c50245e43e

Change-Id: I0681d0477f9782b0616ee65d8996db716541caab
2017-05-03 16:52:39 +00:00
Treehugger Robot
c50245e43e Merge "libcutils: convert fs_config.cpp" 2017-05-03 16:48:44 +00:00
Felipe Leme
35d7f65654 Merge "Don't display bugreport progress when it recedes, for real..."
am: 499af38623

Change-Id: I823fc5af425ddd5edfa747929a62a4003fabacbc
2017-05-03 15:27:35 +00:00
Treehugger Robot
499af38623 Merge "Don't display bugreport progress when it recedes, for real..." 2017-05-03 15:21:26 +00:00
Mark Salyzyn
163ecc68c7 libcutils: convert fs_config.cpp
C++ify fs_config.c

Test: gTest libcutils-test
Bug: 37703469
Change-Id: Id48ae22f203ed923942257575296c69b32345ae6
2017-05-03 08:04:35 -07:00
Christopher Ferris
ac225780dd Move libc_logging to libasync_safe.
Move the name of the "private/libc_logging.h" header to <async_safe/log.h>.

For use of libc_malloc_debug_backtrace, remove the libc_logging library.
The library now includes the async safe log functions.

Remove the references to libc_logging.cpp in liblog, it isn't needed because
the code is already protected by a check of the __ANDROID__ define.

Test: Compiled and boot bullhead device.
Test: Run debuggerd unit tests.
Test: Run liblog unit tests on target and host.
Test: Run libmemunreachable unit tests (these tests are flaky though).
Change-Id: Ie79d7274febc31f210b610a2c4da958b5304e402
2017-05-02 18:38:46 -07:00
Bowgo Tsai
ad7c7fe1aa Merge "init: fix first stage mount failure due to /dev/device-mapper not found"
am: 0447a3e5d1

Change-Id: Ie0ad21fc28ea7a692ef7b3dfbb663e8f6f3dfe93
2017-05-03 01:36:11 +00:00
Treehugger Robot
0447a3e5d1 Merge "init: fix first stage mount failure due to /dev/device-mapper not found" 2017-05-03 01:33:07 +00:00
Elliott Hughes
4b6b4e02ed Merge "Preserve errno better in native_handle functions."
am: dd6e73f432

Change-Id: Idbaadca2f8cdf450b47fc95a7a127e009a17740d
2017-05-03 01:07:09 +00:00
Elliott Hughes
dd6e73f432 Merge "Preserve errno better in native_handle functions." 2017-05-03 01:02:21 +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
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
Felipe Leme
4cc03611cd Don't display bugreport progress when it recedes, for real...
The previous fix was taking account just the progress reported by dumpstate,
not progress/percentage. As such, it was not detecting the cases where the
percentage decreased but the progress didn't.

Bug: 37878670
Test: m -j32 adb_test && ./out/host/linux-x86/nativetest64/adb_test/adb_test --gtest_filter=BugreportTest.*

Change-Id: I5830028f3191a9b17f63aeed5c049b29fa7d1179
2017-05-02 10:08:39 -07:00
Bowgo Tsai
ea5fca4cd0 init: fix first stage mount failure due to /dev/device-mapper not found
It has been reported that fs_mgr failed to open /dev/device-mapper
during the first stage mount. It's because other uevent (e.g., i2c
charger device) happens to be sent at the same time we're triggering
the device-mapper uevent to be sent. Current implementation returns
COLDBOOT_STOP unconditionally so it will only process the first received
uevent, leaving device-mapper uevent unhandled when the race happens.

Fix this by only returning COLDBOOT_STOP when the received uevent->path
matches that of device mapper.

Bug: 37745254

Test: first stage mount /vendor with vboot 2.0 (avb) on bullhead
Test: first stage mount /vendor with vboot 1.0 on sailfish
Change-Id: I4a77093ec8f90a5ca981a088f34d082d0270533b
2017-05-03 00:38:43 +08: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
Treehugger Robot
8fc6cc8910 Merge "adb: Support 'adb enable/disable-verity' when using AVB." 2017-05-02 15:24:25 +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
bf0492a9a1 Preserve errno better in native_handle functions.
So a caller of native_handle_clone can trust errno to be relevant.

Bug: http://b/37215366
Test: builds
Change-Id: I0992f38ad559db4a02fce07123842dbad8e3f473
2017-05-01 21:34:15 -07: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
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
e2865c0f54 Merge "init: add an initializer for keychord_id_"
am: 7c3f147070

Change-Id: I4fd25f216591ad19be6670be79a485995e377b19
2017-05-02 00:33:59 +00:00
Tom Cherry
7c3f147070 Merge "init: add an initializer for keychord_id_" 2017-05-02 00:30:17 +00:00
Elliott Hughes
0b771b33fd 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
Change-Id: I81a487ddbb5c884593b6426d1f41cfaece26ff90
2017-05-01 16:05:16 -07:00
Tom Cherry
c2c8f5e0dc Merge "ueventd: remove leftovers of the SELinux policy update mechanism"
am: 6a8314c8bf

Change-Id: I14053438d05ae8f9be8ddf7e4444c542706a974c
2017-05-01 22:55:22 +00:00
Tom Cherry
6a8314c8bf Merge "ueventd: remove leftovers of the SELinux policy update mechanism" 2017-05-01 22:48:29 +00:00
Tom Cherry
4be091d588 Merge "ueventd: fix typo from previous patchset"
am: c8877530c7

Change-Id: I57d29ff6df9cd02a2b48d218a1492bde0e7d408d
2017-05-01 22:46:21 +00:00
Tom Cherry
c8877530c7 Merge "ueventd: fix typo from previous patchset" 2017-05-01 22:36:12 +00:00
Tom Cherry
7da548578c init: add an initializer for keychord_id_
Add unit test to ensure all POD types of Service are initialized.

Bug: 37855222
Test: Ensure bugreport is triggered via keychord properly.
Test: New unit tests
Change-Id: If2cfea15a74ab417a7b909a60c264cb8eb990de7
2017-05-01 15:35:07 -07:00
Josh Gao
bcca79c4f6 Merge "base: remove execute bit from utf8.cpp, utf8_test.cpp."
am: 1879c00e64

Change-Id: Ia213b1e6f2870d63ee217f603ab531245f925b68
2017-05-01 22:05:43 +00:00
Josh Gao
67cfaf4b9a Merge "Revert "base: make boot_clock work on host linux, hide it on non-linux.""
am: dd3667059b

Change-Id: I82fbe0d20965fa9bb8d3b7c856bf12f7268850d4
2017-05-01 22:05:19 +00:00
Treehugger Robot
1879c00e64 Merge "base: remove execute bit from utf8.cpp, utf8_test.cpp." 2017-05-01 21:57:28 +00:00
Josh Gao
dd3667059b Merge "Revert "base: make boot_clock work on host linux, hide it on non-linux."" 2017-05-01 21:57:14 +00:00
Josh Gao
0b35b18f88 Revert "base: make boot_clock work on host linux, hide it on non-linux."
This reverts commit ae29339ca1, which broke the darwin build.

Change-Id: Ib33e2dab197532f04944cb12151002e9219b1bb5
2017-05-01 21:56:28 +00:00
Mark Salyzyn
2eecd3ab99 Merge "libcutils: fs_config.c mark vendor, odm and oem partitions in duplicate"
am: 43e9106410

Change-Id: I587999f0716b84ca9e1c8445be109dcefa037976
2017-05-01 21:14:34 +00:00
Treehugger Robot
43e9106410 Merge "libcutils: fs_config.c mark vendor, odm and oem partitions in duplicate" 2017-05-01 21:01:58 +00:00
Elliott Hughes
893a3c4468 Merge "Simplify "adb sync" documentation."
am: 05eed13247

Change-Id: I26034f7cb7bc005ed5ea631f35a6c762579ddedc
2017-05-01 20:57:38 +00:00
Josh Gao
2eef9831b7 Merge "base: make boot_clock work on host linux, hide it on non-linux."
am: eaad4e28e8

Change-Id: I32289827cf5e3506df6d77f4048377f4e4d41875
2017-05-01 20:57:16 +00:00
Elliott Hughes
05eed13247 Merge "Simplify "adb sync" documentation." 2017-05-01 20:51:43 +00:00
Josh Gao
eaad4e28e8 Merge "base: make boot_clock work on host linux, hide it on non-linux." 2017-05-01 20:49:50 +00:00
Erik Staats
fc6d71707a Merge "Change set_sched_policy to set slack for current thread."
am: d6f8b5f2d4

Change-Id: Ie4f9953e7ef30f144f9871a9710c2cc13065a332
2017-05-01 18:45:50 +00:00
Erik Staats
d6f8b5f2d4 Merge "Change set_sched_policy to set slack for current thread." 2017-05-01 18:35:30 +00:00
Elliott Hughes
0754cb929c Simplify "adb sync" documentation.
Remove -p (which only applied to "adb sync"), explicitly mention
$ANDROID_PRODUCT_OUT in the "adb sync" help text, and add "adb sync all"
as a synonym for "adb sync" for ease of documentation.

Bug: http://b/33761074
Test: "adb sync" still works, "adb --help" looks good
Change-Id: Ie5b2459a7e5e4140298f78815be25fa7c7bb47d0
2017-05-01 11:04:31 -07:00
Tom Cherry
f51c66b23b ueventd: fix typo from previous patchset
An forward declaration for a function that was removed in later
patchsets was merged anyway.  Since it's not used anywhere, this CL
removes it.

Test: build bullhead
Change-Id: Ie7223f7d23305b71438cb063b64a574ce32f96bb
2017-05-01 10:53:39 -07:00