Commit graph

55523 commits

Author SHA1 Message Date
Treehugger Robot
77840a1877 Merge "Revive ACgroupController_getFlags LLNDK function to detect missing cgroups" 2020-01-29 18:50:12 +00:00
Treehugger Robot
30abf7a9fc Merge "libsnapshot_test runs as root" 2020-01-29 18:43:53 +00:00
David Anderson
c335a34f6b Merge "set-verity-state: Link to libfs_mgr_binder." 2020-01-29 17:55:06 +00:00
David Anderson
21dcbd15bc Merge "remount: Use /data for backing scratch storage." 2020-01-29 17:55:06 +00:00
Suren Baghdasaryan
cee468fb79 Revive ACgroupController_getFlags LLNDK function to detect missing cgroups
ACgroupController_getFlags was reverted due to LLNDK breakage, however
it allows detection of cgroups that failed to mount in a more efficient
way. Revive the function as a weakly linked symbol to allow for it to
be missing in case older LLNDK library is being used with the new
system software. This effectively reverts the commit
aa1d54f0cc "Remove ACgroupController_getFlags to fix API breakage"'
except it declares ACgroupController_getFlags function as weak and
targets it for API level 30. If LLNKD library does not contain
ACgroupController_getFlags the behavior falls back to the current
way of identifying cgroups that failed to mount.

Test: build and verify correct operation with a missing cgroup
Change-Id: I9158ef53aba97972d41d71dd3396ac43796a7004
Merged-In: I9158ef53aba97972d41d71dd3396ac43796a7004
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2020-01-29 17:24:06 +00:00
Alessio Balsini
a7383b4001 libsnapshot_test runs as root
Add flag in Android.bp to force the execution of libsnapshot_test as
root.

Test: m
Bug: 142513589
Change-Id: I9d047a9e1f9ea6d6e5540fa66fb42603ea136641
Signed-off-by: Alessio Balsini <balsini@google.com>
2020-01-29 16:31:06 +00:00
Tom Cherry
20610c3082 Merge changes I303549ae,Ia36e0d2e,Ibdea2961
* changes:
  liblog: fix host tests
  liblog: do not allow loggers to write to binary buffers
  liblog: remove fake_log_device
2020-01-29 16:02:14 +00:00
Nikita Ioffe
2d88794a7d Merge "Trigger boot animation on userspace reboot" 2020-01-29 11:24:01 +00:00
Josh Gao
e30aa60128 Merge "Move jdwp connection abstraction from ART apex to adbd apex." 2020-01-29 00:03:22 +00:00
Tom Cherry
5676f3d916 liblog: fix host tests
1) Fix up the host tests for new logging format
2) Add recently added tests to the host test
3) Ensure that properties are cleaned up by liblog-unit-tests

Test: unit tests
Change-Id: I303549aecc26d11ec87e59d48758ced4c198b72c
2020-01-28 13:07:11 -08:00
Tom Cherry
f48f685e60 liblog: do not allow loggers to write to binary buffers
Do not write to binary buffers, this was already done for logd,
but wasn't explicitly done for other loggers, so do that too.

Test: unit tests
Change-Id: Ia36e0d2e1b6c833780239a5ef459abea99bc4a1f
2020-01-28 13:07:11 -08:00
David Anderson
c13586faea remount: Use /data for backing scratch storage.
Currently, this is only enabled for Virtual A/B devices. When /data uses
F2FS, then proper pinning support must be enabled.

Because /data cannot be mounted in recovery, we can't delete the scratch
image backed by /data while in fastbootd. Instead, we mark it as
disabled in /metadata. The remount command now has an init script that
checks for and removes a disabled scratch partition.

Bug: 134949511
Test: adb remount on V A/B device with patched F2FS
Change-Id: Ifc8720378259654472d3822e97059b6c366f601d
2020-01-28 12:04:38 -08:00
Tom Cherry
e2187bfbbc liblog: remove fake_log_device
This is now dead code as __android_log_stderr_logger() has superseded it.

Bug: 147496863
Test: build
Change-Id: Ibdea2961ec4fc093bf9e35581dc1c46db2cff06a
2020-01-28 10:42:02 -08:00
Tom Cherry
077839ab23 Merge "liblog: always restore errno in logging functions" 2020-01-28 16:25:12 +00:00
Nikita Ioffe
764c1ac8ba Trigger boot animation on userspace reboot
Also reset some more properties to make bootanimation work properly.

Test: adb reboot userspace
Bug: 148172262
Change-Id: I0154d4fe9377c019150f5b1a709c406925db584d
2020-01-28 10:42:44 +00:00
Yabin Cui
15778b7439 Merge "libunwindstack: add simpleperf presumit test." 2020-01-28 03:51:44 +00:00
Maciej Żenczykowski
144f42d23d Merge "add nodad argument to ifc_act_on_address() and add it to header file" 2020-01-28 03:51:01 +00:00
Suren Baghdasaryan
5562b076b7 Merge "libprocessgroup: Prevent aggregate profiles from referencing stale ones" 2020-01-28 00:49:07 +00:00
Tom Cherry
ff464b1288 liblog: always restore errno in logging functions
Some recent changes can have these logging functions potentially set
errno.  This change places android::base::ErrnoRestorer at the entry
point of the public functions where we want to guarantee errno is
restored to ensure this will not happen again.

Test: build
Change-Id: Iab4170ab16b9c7301474a509ee42d38b370b91a4
2020-01-27 13:50:44 -08:00
Suren Baghdasaryan
8438595f21 libprocessgroup: Prevent aggregate profiles from referencing stale ones
Currently when vendor overrides a profile the profile object is being
replaced with a new one. However the old profile might have been
referenced by an aggregate profile and with such profile replacement
the aggregate profile is left referencing a stale object. Fix this by
replacing the content of the old profile with the content from the new
one instead of replacing the object itself.

Bug: 148311066
Test: override profiles referenced in aggregate profile and verify
Test: correct replacement
Change-Id: Iabddbf3580455e5263fedad6665cf52fb323e50a
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2020-01-27 21:07:27 +00:00
Tom Cherry
347d6406f0 Merge "liblog: use default tag for loggability checks if no tag is provided" 2020-01-27 20:36:28 +00:00
Tom Cherry
2ec6a53a46 liblog: use default tag for loggability checks if no tag is provided
Bug: 116329414
Bug: 119867234
Test: new unit tests
Change-Id: I92a3f4f95e5f482f6fe20f17ed83c8ed367b06dc
2020-01-27 09:38:54 -08:00
Quentin Perret
16604b4141 Merge "libprocessgroup: ensure schedboost_enabled is true with uclamp" 2020-01-27 17:24:06 +00:00
David Anderson
21394f6e85 Merge "Fix mounting /data on Virtual A/B devices without metadata encryption." 2020-01-27 16:01:59 +00:00
Treehugger Robot
e32697ee3e Merge "add NOLINTNEXTLINE(google-explicit-constructor)" 2020-01-27 14:52:49 +00:00
Zimuzo Ezeozue
4858f38514 Merge "Change gid bit of /mnt/media_rw to external_storage" 2020-01-27 13:01:52 +00:00
Zimuzo Ezeozue
8e4cf5b436 Merge "Add external_storage gid" 2020-01-27 12:22:16 +00:00
Ryan Savitski
98b185a8b1 Merge "unwindstack: RegsArm64: fix harmless off by 1 + iterate GPRs contiguously" 2020-01-27 12:18:53 +00:00
Quentin Perret
64811b7b13 libprocessgroup: ensure schedboost_enabled is true with uclamp
In the current state, schedboost_enabled() is true if and only if
schedtune is in use. As a result, all tests conditioned by
schedboost_enabled() will be skipped on devices using uclamp since it is
and extension of the CPU controller.

Fix this by making schedboost_enabled() return true if either schedtune
or the CPU controller is enabled.

Bug: 44953631
Change-Id: Idaadf252c9cf411a176180ab8988d559ca8a1332
Signed-off-by: Quentin Perret <qperret@google.com>
2020-01-27 11:04:03 +00:00
Maciej Żenczykowski
041f8f5054 add NOLINTNEXTLINE(google-explicit-constructor)
Test: builds without warnings
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Iac7c63816dd7bf2536c0d465ef1e845330be505b
2020-01-26 20:15:07 -08:00
Maciej Żenczykowski
9943ed2597 add nodad argument to ifc_act_on_address() and add it to header file
Test: atest
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ia45f00ecc5eae035ed2e25d5b73008acb77fa6c2
2020-01-26 06:35:30 -08:00
David Anderson
671bd812cf Fix mounting /data on Virtual A/B devices without metadata encryption.
When using partitions backed by /data, for example during a Virtual A/B
merge or "adb remount" on a Virtual A/B device, the userdata block
device is seen as in-use when /data mounts in second-stage init. This
subsequently prevents mount() or e2fsck from working. Metadata-encrypted
devices are not affected, because dm-default-key provides a wrapping
block device that can be used exclusively.

This patch addresses the problem by detecting when userdata has
device-mapper dependencies. If it does, and the device is not
metadata-encrypted, we introduce a dm-linear wrapper around userdata.
It is created on demand, but like logical partitions, it exists until
the device reboots.

Bug: 134949511
Test: adb remount, cuttlefish boots
Change-Id: Ifbfea1591a6e58978fdaffd6ef889afabd10e270
2020-01-25 10:39:47 -08:00
Yifan Hong
d66e442c21 Merge changes from topic "ramdisk"
* changes:
  Add e2fsck to fs_config
  Make ramdisk_available.
2020-01-24 22:39:35 +00:00
Zim
c1b53de450 Change gid bit of /mnt/media_rw to external_storage
To allow apps with MANAGE_EXTERNAL_STORAGE permission and therefore
external_storage gid to access unreliable volumes directly on
/mnt/media_rw/<volume>, they need access to the /mnt/media_rw path.

This change doesn't break the FUSE daemon, the only process that should
have media_rw gid in R because the FUSE daemon accesses the lower
filesystem from the pass_through bind mounts of the public volume mount
itself so it doesn't need to walk the /mnt/media_rw path itself

Test: With FUSE enabled, a reliably mounted public volume is accessible
on /storage
Bug: 144914977

Change-Id: Ia3fc9e7483894402c14fb520024e2acca821a24d
2020-01-24 22:13:58 +00:00
Josh Gao
bb7fc92ee1 Move jdwp connection abstraction from ART apex to adbd apex.
Test: ./art/tools/run-jdwp-tests.sh
Change-Id: I3114b8403f3548700a45df5d7bb72ebe727adec1
2020-01-24 12:31:59 -08:00
Yabin Cui
f667bf7b19 libunwindstack: add simpleperf presumit test.
Bug: none
Test: run `atest --test-mapping system/core/libunwindstack`.
Change-Id: I62521f63ca748bb1980282ed6399328573d4de41
2020-01-24 11:51:30 -08:00
Ryan Savitski
92237bad6a unwindstack: RegsArm64: fix harmless off by 1 + iterate GPRs contiguously
The memcpy should be for 31 GPRs, [x0, x30]. Currently it (accidentally)
also copies over the SP register (which ends up being harmless, as the
layouts match, and the value is reassigned again anyway).

Separately, I'm including an optional change for the iteration order,
since LR is the x30 GPR, it makes slightly more sense to print it
immediately after x29. However, this is a change in behaviour, so I can
undo the change if you think it's not worth it.

Tested: atest libunwindstack_unit_test
Change-Id: Ib6b81f8ee3a9a526bfabe4b09b327f083c855fb8
2020-01-24 19:50:45 +00:00
Zim
bdeaf57da3 Add external_storage gid
This gid allows processes full access to public areas of external
storage. This includes the following:
1. EmulatedVolumes: All files and directories excluding the app
specific directories under Android/
2. PublicVolumes: Including 'unreliable' volumes (USB OTG) that are
not typically accesible to ordinary apps

Apps with the MANAGE_EXTERNAL_STORAGE permission will automatically
have this gid

Test: m
Bug: 144914977
Change-Id: I17da0b2367e356edc031d063e214574463afc985
2020-01-24 16:54:03 +00:00
Daniel Rosenberg
be27975fff Merge "Support casefolded encryption" 2020-01-24 02:09:55 +00:00
Treehugger Robot
f3700b9e42 Merge "libsnapshot: fix null pointer deref" 2020-01-24 01:12:33 +00:00
Mike Ma
e3a7783686 Merge "Relax permissions on /data/misc/logd" 2020-01-24 01:04:03 +00:00
Josh Gao
427006042c Merge "Build test_com.android.adbd.apex." 2020-01-23 23:58:43 +00:00
Treehugger Robot
071c4b37e8 Merge "When encountered an unexpected status, mention it" 2020-01-23 21:30:31 +00:00
Yifan Hong
39de68cb6d libsnapshot: fix null pointer deref
Bug: 148129196
Test: TH
Change-Id: If6a628fe1bcb3006c7a21021162488a807a7f9f7
2020-01-23 12:58:25 -08:00
Treehugger Robot
b40c15e101 Merge "Move default tag from libbase to liblog" 2020-01-23 20:32:25 +00:00
Josh Gao
7da5d8a977 Build test_com.android.adbd.apex.
Build a test apex with an INT_MAX version code for the purposes of
update/rollback testing.

Test: atest adbd_e2e_tests # in internal master
Change-Id: I0e616db03dcbc940af2741dfca5b4c5f50a5a654
2020-01-23 11:55:03 -08:00
Christopher Ferris
8bf4e29e44 Merge "Properly handle empty map after read-only map." 2020-01-23 17:45:26 +00:00
Tom Cherry
69ee5dde99 Move default tag from libbase to liblog
Bug: 119867234
Test: log tags look right, libbase/liblog unit tests
Change-Id: I3670c3fdce3d0238a23a53bba2877ffed1291f9c
2020-01-23 08:39:31 -08:00
Elliott Hughes
f8c0350eaa Merge "debuggerd: remove the raw stack dump." 2020-01-23 16:07:42 +00:00
Treehugger Robot
2148b252c2 Merge "Use SOONG_HOST_OUT_EXECUTABLES" 2020-01-23 16:02:29 +00:00