Commit Graph

56728 Commits

Author SHA1 Message Date
Treehugger Robot ecfdda2c14 Merge "Convert vts configs to Android.bp" 2020-03-10 05:00:33 +00:00
Josh Gao 2263bcb4d0 Merge "adb: defer acknowledgement of pushed files until the end." 2020-03-10 01:55:51 +00:00
Chih-hung Hsieh 262b58cd07 Merge "Fix bugprone-string-integer-assignment warnings" 2020-03-10 00:07:58 +00:00
David Anderson 66147bad94 Merge "libdm: Fix WaitForFile early-returning on failed accesses." 2020-03-10 00:06:09 +00:00
Treehugger Robot b34449d5fe Merge "Remove mips build." 2020-03-09 23:10:04 +00:00
Yifan Hong d8f7b26ed2 Merge "init: restorecon libsnapshot rollback indicator" 2020-03-09 23:09:05 +00:00
Tom Cherry ce71d36d13 Merge "liblog: minimum_log_priority should be atomic" 2020-03-09 23:06:12 +00:00
Chih-Hung Hsieh 5d13645bfe Fix bugprone-string-integer-assignment warnings
* mdns.cpp:153:20: warning: an integer is interpreted as a character code
  when assigning it to a string; if this is intended, cast the integer to
  the appropriate character type; if you want a string representation, use
  the appropriate conversion facility [bugprone-string-integer-assignment]

Test: WITH_TIDY=1 make
Change-Id: Id9a790ac31722c6ee8886703939977b913ce95fe
2020-03-09 15:05:54 -07:00
Treehugger Robot c6e64b3e1d Merge ""track-app" service showing debuggable/profileable apps" 2020-03-09 21:21:38 +00:00
Tom Cherry bbb16022c7 liblog: minimum_log_priority should be atomic
In case multiple threads try to reference this variable while it is
being set, it should be atomic so that all threads always see a valid
value.

Bug: 150898477
Test: liblog, libbase unit tests
Change-Id: If6c9e291f2471b96a752dc6e76e3e63458b71391
2020-03-09 12:43:18 -07:00
Jeffrey Huang 3a4e3825f4 Merge "Add new directory for stats metadata" 2020-03-09 18:09:21 +00:00
Treehugger Robot 9da07506de Merge "adb: improve logging of key loading slightly." 2020-03-09 18:00:25 +00:00
Dan Willemsen a8f188f011 Convert vts configs to Android.bp
Test: treehugger
Change-Id: Ibe8ed03555ac78ee38be6511eb4169cddfcd3555
2020-03-07 21:21:33 -08:00
Elliott Hughes 401c78780f adb: improve logging of key loading slightly.
In particular, always include the file name in the log.

Bug: http://b/144462309
Test: adb kill-server && adb devices -l && cat /tmp/adb.*.log
Change-Id: I66b5e063b00381f9dfa9ace222cad3e415e4f43b
2020-03-07 12:52:36 -08:00
Yifan Hong d91998f1c4 init: restorecon libsnapshot rollback indicator
The rollback indicator is created during first stage init and
is unlabeled. Need to restorecon it properly so that it can
be properly deleted by update_engine later.

Bug: 149956852
Bug: 150907679
Test: apply OTA, reboot, look at serial console
Change-Id: Ie954023b557865691fec2ae378145596bf1973a9
2020-03-06 22:50:08 -08:00
Elliott Hughes 49e6ee928f Remove mips build.
For now this leaves the ability to cross-unwind a mips process, but we
should probably clean that up too. We need to remove the build remnants so
that we can clean up the build system itself (otherwise it sees us talking
about an architecture it doesn't know about, and assumes that something's
wrong).

Test: treehugger
Change-Id: I2862c630cec95dbdd474e34c3568d0e1a6d44b16
2020-03-06 22:02:09 -08:00
Treehugger Robot cc642ec725 Merge "Move GetMountedEntryForUserdata to fs_mgr.h" 2020-03-07 05:14:38 +00:00
Ian Kasprzak 897444209c Merge "Revert "Fixed a typo in the version name"" 2020-03-06 21:57:57 +00:00
Shukang Zhou f4ffae1055 "track-app" service showing debuggable/profileable apps
Add a "track-app" service in adbd. For every debuggable or
profileable-from-shell process, ART sends related info to
adbd and adbd surfaces the info through the "track-app"
service.

The output format of "track-app" is a line summarizing
the number of reported processes, followed by a protobuf
message in human readable form. For example,

Process count: 2
process {
  pid: 3307
  profileable: true
  architecture: "arm64"
}
process {
  pid: 3341
  debuggable: true
  profileable: true
  architecture: "arm64"
}

Bug: 149050485
Test: manually unplugged/replugged, "adb track-app",
      "adb track-jdwp"
Change-Id: Id1f1a920e1afc148c7e4d2add790baab796178e1
2020-03-06 13:56:27 -08:00
Nikita Ioffe 30b0c01dd8 Move GetMountedEntryForUserdata to fs_mgr.h
Logic of unwinding dm-device stack to figure out what entry was used to
mount userdata turned out to be a little bit more involved, and it
shouldn't be part of libfstab

This CL just moves code around and cleans API a little bit, actual fix
will be in the follow-up CL.

Test: atest CtsFsMgrTest
Test: atest CtsUserspaceRebootHostSideTestCases
Bug: 148612148
Change-Id: If0f8a765dba63adb0e6a711eb81fffdcabea3480
Merged-In: If0f8a765dba63adb0e6a711eb81fffdcabea3480
(cherry picked from commit 8f50cfc28d)
2020-03-06 19:50:10 +00:00
Ian Kasprzak e6e87fd705 Revert "Fixed a typo in the version name"
This reverts commit eb94c7802d.

Reason for revert: b/150949964 - Broke boot test on aosp-master-with-phones.

Merged-In tags to revert just aosp-master/stage-aosp-master where boot
is broken.

Change-Id: Ic76e36b42060b5948f48af41f67544598d6f9f87
Merged-In: I0e1e7da1cfbe320ba6605f8de9dcdb5091c41e4f
Merged-In: Icff3bd68b31f8c1d5a71f05c7c52eae6e896bfc2
2020-03-06 19:38:13 +00:00
Elliott Hughes 151e74894f Merge "debuggerd: add an opt-out for OEMs that would rather collect core dumps." 2020-03-06 17:17:51 +00:00
Josh Gao 64ff82ba68 adb: defer acknowledgement of pushed files until the end.
Previously, we were waiting for the other end to respond after every
file sent, which results in massive slowdown when there's any amount of
latency on the transport.

This improves performance on a cuttlefish instance with ~7ms RTT from:

    system/: 2037 files pushed, 0 skipped. 2.8 MB/s (762803979 bytes in 262.964s)

to:

    system/: 2037 files pushed, 0 skipped. 11.9 MB/s (762803979 bytes in 61.278s)

Bug: https://issuetracker.google.com/150827486
Test: ./test_device.py
Change-Id: I3a0c893faa5d455cc6ccbc86915a17e1b5abbfbe
2020-03-05 19:48:11 -08:00
Jiyong Park fd4e66221a Merge "Fixed a typo in the version name" 2020-03-06 00:53:07 +00:00
Elliott Hughes 14dc6ad240 Merge "run-as: improve error messages." 2020-03-05 23:51:57 +00:00
Treehugger Robot 561df7bfb3 Merge "liblog: Fix bugprone-macro-parentheses warnings" 2020-03-05 22:44:04 +00:00
Tom Cherry 641e9e45b5 Merge "base: access all new liblog symbols through liblog_functions" 2020-03-05 21:29:09 +00:00
Tom Cherry d620ec7fb9 base: access all new liblog symbols through liblog_functions
The original CL was missing these.

Bug: 149591522
Test: build
Change-Id: I99615b81cfe9166a00c812a8642ecf1244bf08b9
2020-03-05 10:52:01 -08:00
Jeffrey Huang 58c88615f2 Add new directory for stats metadata
Also reordered the directories in alphabetical order

Test: m -j
Bug: 149838525
Change-Id: I1a918d189d8bcb394ec6f818d033dbf7e4518713
2020-03-05 08:53:11 -08:00
Jeffrey Huang 8c20f9e6b5 Merge "Update init.rc for statsd setup" 2020-03-05 16:49:39 +00:00
Yifan Hong 198651c202 Merge changes from topics "libsnapshot_delete_initiate", "snapshotctl_cleanup", "update_engine_vab_metrics"
* changes:
  libsnapshot: SnapshotMergeStats::Start/Finish
  libsnapshot: Expose SnapshotMergeStats
  libsnapshot: delete WaitForMerge.
  libsnapshot: handle errors in RemoveAllUpdateState appropriately.
  libsnapshot: remove snapshots properly after flashing
  libsnapshot: RemoveUpdateState on rollback.
  libsnapshot: NeedSnapshotsInFirstStageMount don't test for IsRecovery
  Allow ProcessUpdateState to be paused.
  libsnapshot: Re-expose InitiateMerge and ProcessUpdateState
  libsnapshot: Add prolog to RemoveAllUpdateStates.
  snapshotctl don't auto-merge.
2020-03-05 16:41:16 +00:00
Luca Stefani dfdbae0e11 liblog: Fix bugprone-macro-parentheses warnings
Change-Id: I91ab6d578e459b351468c0b6fc4b76b5f53d2441
2020-03-05 12:01:32 +01:00
Alan Stokes 541d0d28b1 Merge "Fix /data_mirror permission" 2020-03-05 10:02:35 +00:00
Treehugger Robot 5dbd893784 Merge "fix some liblp file access for win32" 2020-03-05 03:01:41 +00:00
Elliott Hughes 4a77a84a55 run-as: improve error messages.
Include the relevant argument when reporting failed calls.

Test: treehugger
Change-Id: I49c691d9edfb825dfee22ab5eb57e7d025c08c21
2020-03-04 18:11:18 -08:00
Peter Collingbourne 017a0acdca Merge "Create a ProcessInfo structure with the process-wide information from the crasher." 2020-03-05 01:25:14 +00:00
Haoran.Wang f7d1a07952 fix some liblp file access for win32
The file accessing API in liblp don't work on win32. Add the O_BINARY
to correct the file stream access.
This patch follow the AOSP change 829979.

Change-Id: I97180e2f07cacf109a86593b6a12975597552053
Signed-off-by: Haoran.Wang <elven.wang@nxp.com>
2020-03-05 08:34:52 +08:00
Jeffrey Huang 8dccf3ffd1 Update init.rc for statsd setup
Apexes do not support "on" macros, so we are moving
them into the system partition

Bug: 145923087
Test: m -j
Change-Id: Ic671a51f2ec5b91f2f631bae0f509b4aa2d057b4
Merged-In: Ic84e77269f80097b675d6a1b0d206c2bae7d918d
2020-03-04 15:14:37 -08:00
Yifan Hong 97ebd91b0a libsnapshot: SnapshotMergeStats::Start/Finish
Change API for SnapshotMergeStats so that it is easier
for update_engine to use.

Test: apply OTA and look at stats
Bug: 147696014
Bug: 138817833
Change-Id: Ie4036ac7382102c00f0761f443d78e00b9e585d5
2020-03-04 11:17:17 -08:00
Ricky Wai 1a5ae50943 Fix /data_mirror permission
Test: Able to boot without error
Bug: 150671726
Change-Id: If366d284f4f01ebfa660e85bad57861c120ada7e
2020-03-04 13:30:09 +00:00
Automerger Merge Worker e5e921b20a Merge "Refine the exported DSU status" am: 14ce87c7da
Change-Id: Ia92dfa7617cd0f921a8f307e86931510bfefc2a8
2020-03-04 09:34:58 +00:00
Howard Chen 14ce87c7da Merge "Refine the exported DSU status" 2020-03-04 09:16:47 +00:00
Jiyong Park eb94c7802d Fixed a typo in the version name
Bug: 149569129
Test: m
Merged-In: I7401e8c092d4ee329fb1b5f23b7797f706b58faa
(cherry picked from commit 3d79b37a41)
Change-Id: I7401e8c092d4ee329fb1b5f23b7797f706b58faa
2020-03-04 12:03:04 +09:00
Automerger Merge Worker 0545b24520 Merge "snapshotctl: init reports merge statistics" am: 81f46d954b
Change-Id: I8a37c9888292d9fa7a386d81e449e87b71ea9bb9
2020-03-03 21:22:00 +00:00
Automerger Merge Worker 2a8ffdaa2e Merge "snapshotctl: send snapshot merge report metrics" am: 4d3857512a
Change-Id: Ieab97b84d894e4e3a304a9a506e9a448cc0fdf0e
2020-03-03 21:21:58 +00:00
Yifan Hong 038d6d7656 libsnapshot: Expose SnapshotMergeStats
Test: builds
Bug: 147696014
Change-Id: Ia59a3f9226628558bdd1fdb0966812c2f652190c
2020-03-03 13:19:49 -08:00
Yifan Hong f21c7cdc4a libsnapshot: delete WaitForMerge.
Now that update_engine is responsible for initiating the
merge, WaitForMerge function becomes useless.

Bug: 147696014
Test: compiles
Change-Id: I3779bdf9dd8d1716238e21d09acf0499e3fc90a3
2020-03-03 13:19:49 -08:00
Yifan Hong 32253d92eb libsnapshot: handle errors in RemoveAllUpdateState appropriately.
In CheckMergeState / HandleCancelledUpdate, if removing update state
fails, just return the previous state. It used to return Cancelled,
and the error goes unnoticed.

Test: pass
Bug: 147696014
Change-Id: I9cb3d20c5c886afa1913740c903eaad08f0cc041
2020-03-03 13:19:49 -08:00
Yifan Hong 44b93df300 libsnapshot: remove snapshots properly after flashing
If updated then immediately flashed target slot at unverified
stage, update_engine attempts to call RemoveAllSnapshots, but
it used to fail because unmapping fails. In reality, these devices
are dm-linear targets, so unmapping them is optional.

- Introduce a GetSnapshotFlashingStatus function that expose more
information than AreAllSnapshotsCancelled. We can use the returned
map<string, bool> to determine whether a partition is flashed or
not.
- Introduce ShouldUnmapDeleteSnapshot which determines whether
unmapping / deleteting a snapshot is needed in RemoveAllSnapshots.

Test: apply OTA, flash target slot, then inspect logs
Bug: 147696014
Change-Id: I0853d1e213566af2a3401e46fac7d9586cee7aaf
2020-03-03 13:19:49 -08:00
Yifan Hong e256e3b7d4 libsnapshot: RemoveUpdateState on rollback.
If rollback is detected in ProcessUpdateState, call
RemoveUpdateState and return UpdateState::Cancelled. Now that
update_engine is reponsible for initiating the merge, it can react to
this state and clean up markers appropriately.

Test: libsnapshot_test
Test: apply OTA, manually rollback (by setting the active slot), then
  inspect /metadata/ota as well as /data/misc/update_engine/prefs.

Bug: 147696014

Change-Id: Ibfee11fb50e4f4fb7c6cf02b4921b35e77b8f5a5
2020-03-03 13:19:49 -08:00