Commit Graph

55790 Commits

Author SHA1 Message Date
Treehugger Robot be074feb93 Merge "Add libdm_test to presubmit" 2020-02-03 21:55:39 +00:00
Josh Gao d5bad7c021 Merge "adbd: actually dynamically link against libadbd_auth." 2020-02-03 20:15:20 +00:00
Treehugger Robot 962e3ddfd6 Merge "Missing UpdateState::Cancelled string conversions" 2020-02-03 20:03:56 +00:00
Treehugger Robot a911933a23 Merge "The darwin linker does not support version scripts" 2020-02-03 19:48:25 +00:00
Treehugger Robot 823beae16a Merge "Revert "Mount binderfs"" 2020-02-03 18:37:40 +00:00
Yifan Hong 3d3165702b Merge "charger: uses health HAL service." 2020-02-03 18:12:23 +00:00
Dan Willemsen a536b4280e The darwin linker does not support version scripts
Fixes: 148774297
Test: m nothing   on a mac
Change-Id: I4000b2076fe2dde3776b112b506ee3266a529fc6
2020-02-03 10:02:41 -08:00
Oli Lan 0460f65f78 Merge "Allow apexd to snapshot and restore DE data." 2020-02-03 17:50:51 +00:00
Alessio Balsini d7cc465481 Add libdm_test to presubmit
Also add libdm_test to the TEST_MAPPING's presubmit of fs_mgr to run the
test on TH whenever changes are applied to the fs_mgr contents.

Test: TH
Bug: none
Change-Id: Icc6adeeacaefbcfeb494f37fc776eb5a886a5183
Signed-off-by: Alessio Balsini <balsini@google.com>
2020-02-03 17:34:44 +00:00
Treehugger Robot ad9190e340 Merge "Update assertion on DmTargetDefaultKey param string" 2020-02-03 17:15:47 +00:00
Nikita Ioffe 64e28438c8 Merge "Don't retrigger bootstat during userspace reboot." 2020-02-03 17:02:49 +00:00
Ray Essick bd3ba782f2 build crash_dump.policy files using Android.bp
use Android.bp instead of Android.mk to build and install the
crash_dump.policy files. This also allows mainline modules to pull
the files into their apex (dependency wasn't handled for Android.mk)

Bug: 147914640
Test: build, examine generated filesystem
Change-Id: Iae92d4f9d683ccfddf1716e7eb2877b7bff0c737
2020-02-03 08:57:46 -08:00
Alessio Balsini a60f6a35ec Missing UpdateState::Cancelled string conversions
Add the missing UpdateState::Cancelled conversions from/to string.

Bug: none
Test: build
Change-Id: I097d80e21521725fbb02f3ef37b22e95a5e83929
Signed-off-by: Alessio Balsini <balsini@google.com>
2020-02-03 16:37:51 +00:00
Tom Cherry db8881b769 Merge "init: handle process actions when waiting for exec services" 2020-02-03 14:02:40 +00:00
Oli Lan a466ca8ff4 Allow apexd to snapshot and restore DE data.
This calls into apexd to allow it to snapshot and restore DE apex data
in the case of a rollback. See the corresponding apexd change for more
information.

Cherry-pick from (unsubmitted) internal CL: ag/10163227

Bug: 141148175
Test: atest StagedRollbackTest#testRollbackApexDataDirectories_DeSys
Change-Id: Ia4bacc9b7b7a77038ba897acbc7db29e177a6433
2020-02-03 11:47:15 +00:00
Zimuzo Ezeozue 294c16024b Merge "Harden /mnt/pass_through paths" 2020-02-03 11:34:52 +00:00
Alessio Balsini fb19ed9130 Update assertion on DmTargetDefaultKey param string
Due to some recent code updates that introduced some additional
extra_argv, the DmTargetDefaultKey::GetParameterString() test was
failing.
Update the string accordingly.

Bug: none
Test: libdm_test
Change-Id: I63fab27e32a08211a43d4804d90a6f19ea4edc06
Signed-off-by: Alessio Balsini <balsini@google.com>
2020-02-03 10:37:36 +00:00
Nikita Ioffe 4d8e3eaf9f Don't retrigger bootstat during userspace reboot.
Userspace reboot can be treated as extension of runtime restart: instead
of restarting just system_server, it restarts all post-data services.

Test: adb reboot userspace
Test: checked bootstat didn't run again.
Test: system/core/bootstat/boot_reason_test.sh
Bug: 135984674
Change-Id: Ieda4b201f9b9294a3a54b7f0118ee769f5dd2065
2020-02-03 10:30:06 +00:00
Treehugger Robot e6acbfe556 Merge "Add AID_EXT_DATA_RW / AID_EXT_OBB_RW GIDs." 2020-02-03 10:14:33 +00:00
Josh Gao 28bf90f32b Merge "libadbconnection_client: apply version script to library." 2020-02-03 09:28:57 +00:00
Nikita Ioffe 03aaecbd99 Merge "Don't reset sys.usb.configfs during userspace reboot" 2020-02-03 08:12:38 +00:00
Treehugger Robot cb1a8e7fdd Merge changes from topics "dm-default-key-v2", "metadata_cipher"
* changes:
  Set metadata cipher in fstab
  Add support for v2 of dm-default-key
2020-02-01 16:12:30 +00:00
Treehugger Robot afb6b354a9 Merge "Propagate failure of MetadataBuilder creation in CreateUpdateSnapshots" 2020-02-01 12:22:38 +00:00
Howard Ro de6a99d702 Merge changes from topic "libmetricslogger"
* changes:
  Deprecate libmetricslogger
  Remove libmetricslogger dependency from bootstats
2020-02-01 06:56:38 +00:00
Treehugger Robot a6c834f960 Merge "Check /sys/kernel/tracing for tracefs" 2020-02-01 06:50:45 +00:00
Daniel Rosenberg ebfe359ca8 Make /data/media case insensitive
Use chattr to apply +F to /data/media
This will fail on devices who do not support casefolding on userdata.

Bug: 138322712
Test: /data/media is set to +F.
Change-Id: Ib341c23a0992ee97b23113b3a72f33a61e583b04
2020-01-31 18:34:03 -08:00
Daniel Rosenberg 29bc5d4924 Add support for casefold and product ID to format
Product ID Quotas require wider inodes. For Ext4, quotas and casefolding
are enabled later via tune2fs

Bug: 138322712
Bug: 138321217
Test: Build with and without casefolding and quotas. Verify fs features
Change-Id: I99819f6c38adabcf7a1f944085f9005134e6fc5f
2020-01-31 18:34:03 -08:00
Howard Ro 327240192b Deprecate libmetricslogger
There's no more usage of libmetricslogger.

Bug: 147777989
Test: compiles and confirmed that there's no usage of it
Merged-In: Ie990f7f1651b7717f21553481dc8635a01993777
Change-Id: Ie990f7f1651b7717f21553481dc8635a01993777
2020-01-31 17:52:12 -08:00
Howard Ro fe0b389190 Remove libmetricslogger dependency from bootstats
These are either already migrated or are planned to be migrated to
statsd.

Bug: 147777989
Bug: 148575354
Test: compiles
Merged-In: I00b110dcf5cf4a0fb1673fe05004662b6f3327d0
Change-Id: I00b110dcf5cf4a0fb1673fe05004662b6f3327d0
2020-01-31 17:39:02 -08:00
Maciej Żenczykowski 8fda5feb25 Merge "symlink /dev/net/tun -> ../tun" 2020-02-01 01:24:57 +00:00
Josh Gao 24b01d2de8 libadbconnection_client: apply version script to library.
Previously, we were using the version script for only the stubs in the
library, which led to symbols from libc++_static leaking out.

Bug: http://b/148504737
Test: booted a user build
Change-Id: Ie22856f7d16cc837eb961f70195d49898bf7fb49
2020-01-31 16:51:54 -08:00
Greg Kaiser 49a542a979 Revert "Mount binderfs"
This reverts commit 8e50be74ae.

Reason for revert: Several devices did not boot
Test: Local build with this reverted had the device boot
Bug: 148689473
Merged-In: I97e96bd86d02a9fe70c5ef02df85c604b0cfb3c3

Change-Id: Ic4a2990e7c0cb08c374a336422c08d9aad28049d
2020-01-31 23:37:21 +00:00
Paul Crowley 3d8e105510 Set metadata cipher in fstab
Bug: 147814592
Test: Cuttlefish can use adiantum
Change-Id: I9207ffcdb74dcd36c8b2534b51233a3f8e80dc0b
2020-01-31 14:45:00 -08:00
Paul Crowley f1b264f17c Add support for v2 of dm-default-key
Version 2 of dm-default-key has an extra parameter and always sets the
DUN.

Bug: 147814592
Test: Cuttlefish boots with keydirectory flag
Test: Crosshatch formatted before this change boots after it
Change-Id: I309bcc3f907a6df745f5c073b0017a7dd5b5354b
2020-01-31 14:45:00 -08:00
Paul Crowley 60a55d91dc Merge "Rename key_dir to metadata_key_dir and refactor" 2020-01-31 21:49:13 +00:00
Yifan Hong 3aa3b3c627 charger: uses health HAL service.
hwservicemanager starts in charger, so directly get the health HAL
service.

Also sets up Android base kernel logging.

Bug: 142674987

Test: turn off device and charge, health HAL starts before charger, and inspect logs
      to confirm charger is reading from health HAL
Test: make health HAL start after charger, and inspect logs to confirm
      charger is reading from health HAL.

Change-Id: I5ba50a4b931735d1d14a50940e37c1e407dda34d
2020-01-31 13:29:21 -08:00
Tom Cherry 2f6f86ff72 Merge "libbase: Have LogdLogger use LOGGER_ENTRY_MAX_PAYLOAD for its buffer" 2020-01-31 21:03:31 +00:00
Tom Cherry 42ee2e4f8f libbase: Have LogdLogger use LOGGER_ENTRY_MAX_PAYLOAD for its buffer
LogdLogger has its own buffer for adding the file and line number to
FATAL messages, but it is much lower than LOGGER_ENTRY_MAX_PAYLOAD and
that causes problems now that more logs are piped through this logger,
so increase the limit to maximum.

Also, in the case that the file and line number are not added, simply
pass the buffer through to liblog, since there is no reason to copy to
a separate buffer.

Bug: 148678509
Test: build, unit tests
Change-Id: I064aa34641e784dca6c529c51cb192069821d64a
2020-01-31 20:01:47 +00:00
Treehugger Robot 938379de5b Merge "Mount binderfs" 2020-01-31 18:46:14 +00:00
Chih-hung Hsieh e2a1705f1f Merge "Allow LOG_ALWAYS_FATAL_IF in constexpr functions" 2020-01-31 18:15:06 +00:00
Tom Cherry 44d5ec37a7 init: handle process actions when waiting for exec services
We currently do not handle process actions (restarting services or
exiting timedout services) when we are waiting for an exec service,
but this seems to be the wrong behavior.  Particularly, an exec
service may depend on a previously started service and if that service
crashes, we will deadlock unless init restarts it.

Bug: 146920034
Test: build, boot
Change-Id: Id2fc936b8a7b989862ba4c32c398a544941e0e76
2020-01-31 08:33:36 -08:00
Zim a67b40bc2a Harden /mnt/pass_through paths
Only the FUSE daemon (with media_rw gid) needs access to paths on
/mnt/pass_through. And even then, it only needs execute access on the
dirs, since there will always be a bind mount either from sdcardfs or
the lower filesystem on it and that bind mount correctly handles ACLs
for the FUSE daemon.

Test: manual
Bug: 135341433
Change-Id: I999451e095da355e6247e9e18fb6fe1ab8fc45d6
2020-01-31 16:26:13 +00:00
Nikita Ioffe 4f8e05663e Don't reset sys.usb.configfs during userspace reboot
Test: adb reboot userspace (on blueline)
Test: adb reboot userspace (on cuttlefish)
Bug: 147726967
Change-Id: Id4a367e74b418a85e8454e952e12e0723efc9b8a
2020-01-31 15:59:19 +00:00
Nikita Ioffe abe52dcb88 Merge "Whitelist reboot reasons related to userspace reboot failure" 2020-01-31 15:11:12 +00:00
Martijn Coenen 4501ed5c2e Add AID_EXT_DATA_RW / AID_EXT_OBB_RW GIDs.
These will be used as a GID for the Android/data and Android/obb
directories respectively, on devices that don't have sdcardfs.

Bug: 146419093
Test: builds
Change-Id: I52a3235e872eb4b0402f918d5c47661f16626ba6
2020-01-31 15:12:31 +01:00
Hridya Valsaraju 6a879b25d9 Check /sys/kernel/tracing for tracefs
When debugfs is not mounted, atrace should look for
tracefs in /sys/kernel/tracing.

Test: CtsAtraceHostTestCases
Bug: 148436518
Change-Id: I45c0e664892bcda277fd9612106ad5216aea0a1b
2020-01-30 17:38:51 -08:00
Josh Gao 7f72945eff adbd: actually dynamically link against libadbd_auth.
libadbd_auth was accidentally linked as a static library, which defeats
the entire purpose.

Test: treehugger
Test: readelf -d $ANDROID_PRODUCT_OUT/apex/com.android.adbd/bin/adbd
Change-Id: Id5b66745946a8b92e368ee5f3965275ff03e056d
2020-01-30 16:18:43 -08:00
Paul Crowley 7823e327c1 Rename key_dir to metadata_key_dir and refactor
Bug: 147814592
Test: Crosshatch boots
Change-Id: I18b03486d2e93c6103880d1af68d9f70147fde63
2020-01-30 16:03:45 -08:00
Josh Gao 7e015871db Add adbd_test to mts.
Bug: http://b/137798163
Test: mts-tradefed run mts-adbd
Change-Id: I875f224bbcd7b1f81365fffdd8de8d2df4e87c84
2020-01-30 23:53:20 +00:00
Treehugger Robot d7c1bc73dc Merge "Skip snapshot tests for non-Virtual A/B devices" 2020-01-30 23:49:19 +00:00