Commit graph

56132 commits

Author SHA1 Message Date
Tom Cherry
24808cdee0 Merge changes I303549ae,Ia36e0d2e,Ibdea2961
am: 20610c3082

Change-Id: I821dda4d6ecab52392c57c2db889757fd34bf2ba
2020-01-29 08:29:29 -08: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
c082f8f47c Merge "Trigger boot animation on userspace reboot"
am: 2d88794a7d

Change-Id: Ie828fa6ea8b54ac7832b45153247d838f0566a7e
2020-01-29 03:32:55 -08:00
Nikita Ioffe
2d88794a7d Merge "Trigger boot animation on userspace reboot" 2020-01-29 11:24:01 +00:00
Josh Gao
baef7c2982 Merge "Move jdwp connection abstraction from ART apex to adbd apex."
am: e30aa60128

Change-Id: I6be637e9d3873c4b8b0abe76505d9d82cccbc516
2020-01-28 16:09:09 -08: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
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
06ae836095 Merge "liblog: always restore errno in logging functions"
am: 077839ab23

Change-Id: Iae9738f2c6b7df4ed30681432489a470b2051b5f
2020-01-28 09:24:10 -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
311002ec79 Merge "libunwindstack: add simpleperf presumit test."
am: 15778b7439

Change-Id: I68b1db3dffda20b74a842fa1ab23b40503fd3cc9
2020-01-27 19:57:26 -08:00
Maciej Żenczykowski
2b80b6e514 Merge "add nodad argument to ifc_act_on_address() and add it to header file"
am: 144f42d23d

Change-Id: I3ee666a3e3585a7f9191f4ce2882a7ba0b88f267
2020-01-27 19:52:51 -08: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
e7a707cfbd Merge "libprocessgroup: Prevent aggregate profiles from referencing stale ones"
am: 5562b076b7

Change-Id: I96db8c4038d17bb200946204a0548236ffb76c1a
2020-01-27 16:54:08 -08: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
f74ad17a65 Merge "liblog: use default tag for loggability checks if no tag is provided"
am: 347d6406f0

Change-Id: Ib1df6a955d2420c050e7876898df32e31636f4b4
2020-01-27 12:41:22 -08: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
Quentin Perret
e1b817abd3 Merge "libprocessgroup: ensure schedboost_enabled is true with uclamp"
am: 16604b4141

Change-Id: Ib43b0aef04eba827977f496bd3a81b650a52c26f
2020-01-27 10:18:51 -08: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
3f52b42db0 Merge "Fix mounting /data on Virtual A/B devices without metadata encryption."
am: 21394f6e85

Change-Id: I6b413b57485f56cc31091a03dddbd78be4239fa3
2020-01-27 09:10:29 -08:00
David Anderson
21394f6e85 Merge "Fix mounting /data on Virtual A/B devices without metadata encryption." 2020-01-27 16:01:59 +00:00
Maciej Żenczykowski
9b2e06a4ff Merge "add NOLINTNEXTLINE(google-explicit-constructor)"
am: e32697ee3e

Change-Id: Id80e6fa820ac9f604f38883b726ae81f469f5bc8
2020-01-27 07:05:08 -08:00
Treehugger Robot
e32697ee3e Merge "add NOLINTNEXTLINE(google-explicit-constructor)" 2020-01-27 14:52:49 +00:00
Zimuzo Ezeozue
0a93a2edd9 Merge "Change gid bit of /mnt/media_rw to external_storage"
am: 4858f38514

Change-Id: I83cf3d38d056ad3550edf399ae756a44253c062b
2020-01-27 05:05:06 -08: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
ed326eafc0 Merge "Add external_storage gid"
am: 8e4cf5b436

Change-Id: I875dfb09a68457b9144ac5c8583af44b5e6b94f1
2020-01-27 04:25:00 -08:00
Zimuzo Ezeozue
8e4cf5b436 Merge "Add external_storage gid" 2020-01-27 12:22:16 +00:00
Ryan Savitski
6f29c7aa13 Merge "unwindstack: RegsArm64: fix harmless off by 1 + iterate GPRs contiguously"
am: 98b185a8b1

Change-Id: Ica6b555de66f43a747b730f622ff43feb47565e1
2020-01-27 04:21:00 -08: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
49e66cc894 Merge changes from topic "ramdisk"
am: d66e442c21

Change-Id: If16d9e37a50ff3de093f37c6200d29f9f22e3703
2020-01-24 16:38:51 -08:00
Yifan Hong
31bd607f6c Make ramdisk_available.
am: 7dd4553991

Change-Id: I161449e90ad91359cb7bb98c91078ab51e3b54b5
2020-01-24 16:38:26 -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
Automerger Merge Worker
db35eb2c53 Merge "Support casefolded encryption" am: be27975fff
Change-Id: Ic5d84fb0c33f612d486358b2c4b780069a6eec10
2020-01-24 02:26:51 +00:00
Daniel Rosenberg
be27975fff Merge "Support casefolded encryption" 2020-01-24 02:09:55 +00:00
Automerger Merge Worker
a996f11aac Merge "libsnapshot: fix null pointer deref" am: f3700b9e42
Change-Id: I5c21edc690f3ea5e428f6ea0e1cae6f6c979e63d
2020-01-24 01:23:21 +00:00