Commit graph

2895 commits

Author SHA1 Message Date
Daniel Rosenberg
b7d05eb2fb Merge "Fix include order" am: 0a0b5b5f02
am: 44c18e1723

Change-Id: I80ae48916a7cb5182bb802c6919387204b860b09
2019-06-07 18:55:10 -07:00
Daniel Rosenberg
44c18e1723 Merge "Fix include order"
am: 0a0b5b5f02

Change-Id: I002b546d733dd55ced79aeb118c6394ce973d609
2019-06-07 18:49:05 -07:00
Treehugger Robot
0a0b5b5f02 Merge "Fix include order" 2019-06-08 01:30:38 +00:00
Daniel Rosenberg
5890c72489 [automerger skipped] Merge "Defer deleteKey in KeyStorage in Checkpointing mode" am: fc4ad04ffe
am: 288fca9266 -s ours
am skip reason: change_id Ie5fc2d098355e2d095c53e9a95a6a8c7ab7ed051 with SHA1 8cc5716ef1 is in history

Change-Id: I7d9f111a30c196b86f84cdaa3fd1081733be789f
2019-06-07 16:06:51 -07:00
Daniel Rosenberg
288fca9266 Merge "Defer deleteKey in KeyStorage in Checkpointing mode"
am: fc4ad04ffe

Change-Id: Ib4f127130bdf05fe092fec15d999e5d645441303
2019-06-07 16:00:50 -07:00
Treehugger Robot
fc4ad04ffe Merge "Defer deleteKey in KeyStorage in Checkpointing mode" 2019-06-07 22:48:00 +00:00
Xin Li
fd11fee219 Merge "Restore historical behavior with fsck_msdos (always accept fixes)." am: a2518c7fe7
am: 8941a145a0

Change-Id: I3ccf537b4802baf6ff43b1ff3b24f44c59e9fa08
2019-06-07 15:23:25 -07:00
Xin Li
8941a145a0 Merge "Restore historical behavior with fsck_msdos (always accept fixes)."
am: a2518c7fe7

Change-Id: I91202edd2dbca6e8eb4c58fa25453da22045a062
2019-06-07 15:17:24 -07:00
Treehugger Robot
a2518c7fe7 Merge "Restore historical behavior with fsck_msdos (always accept fixes)." 2019-06-07 22:05:20 +00:00
Daniel Rosenberg
d2906b8b5f Fix include order
Change-Id: Id839cc52801f3d0fce2d46faecf813812613e431
Test: None
2019-06-07 14:18:40 -07:00
Daniel Rosenberg
a48730a0fd Defer deleteKey in KeyStorage in Checkpointing mode
Don't delete keys in checkpointing mode. Instead wait until the
checkpoint has been committed.

Bug: 134631661
Test: Flash A with a working build. Flash B with a broken build. Test
      that the device rolls back to A without getting sent to recovery.
Merged-In: Ie5fc2d098355e2d095c53e9a95a6a8c7ab7ed051
Change-Id: Ie5fc2d098355e2d095c53e9a95a6a8c7ab7ed051
2019-06-07 14:11:01 -07:00
Daniel Rosenberg
923f8f04e4 Defer deleteKey in KeyStorage in Checkpointing mode
am: 8cc5716ef1

Change-Id: I38a8d0de1760f0d526cb00c441129dc025049358
2019-06-07 13:05:41 -07:00
Xin Li
46ac19c936 [automerger skipped] Merge "DO NOT MERGE - Skip pi-platform-release (PPRL.190605.003) into stage-aosp-master" into stage-aosp-master
am: b02c30cbf3 -s ours
am skip reason: subject contains skip directive

Change-Id: I456b2e5bf172a79d1c6aaf535de73b96897f5a4a
2019-06-07 00:29:27 -07:00
Xin Li
0951d225f3 [automerger skipped] DO NOT MERGE - Skip pi-platform-release (PPRL.190605.003) into stage-aosp-master
am: 3a6c897d05 -s ours
am skip reason: subject contains skip directive

Change-Id: Ie610a4b4078750bd62db70c8998643689dc6e25c
2019-06-07 00:16:31 -07:00
TreeHugger Robot
b02c30cbf3 Merge "DO NOT MERGE - Skip pi-platform-release (PPRL.190605.003) into stage-aosp-master" into stage-aosp-master 2019-06-07 07:06:19 +00:00
Daniel Rosenberg
8cc5716ef1 Defer deleteKey in KeyStorage in Checkpointing mode
Don't delete keys in checkpointing mode. Instead wait until the
checkpoint has been committed.

Bug: 134631661
Test: Flash A with a working build. Flash B with a broken build. Test
      that the device rolls back to A without getting sent to recovery.

Change-Id: Ie5fc2d098355e2d095c53e9a95a6a8c7ab7ed051
2019-06-06 20:42:55 -07:00
Xin Li
3d3a9a7f1c Restore historical behavior with fsck_msdos (always accept fixes).
Bug: 133725065
Change-Id: I1d50a7e52fda34e59eb6f051c7fde115a6cd5255
2019-06-06 11:33:51 -07:00
Dan Willemsen
6da4bcb295 Merge "Match src paths with aidl package name" am: 94f300295d
am: 4be1fb5196

Change-Id: I19f23733b9114fe661b2e59b792cb9b1a2490465
2019-06-05 21:23:39 -07:00
Dan Willemsen
4be1fb5196 Merge "Match src paths with aidl package name"
am: 94f300295d

Change-Id: I0e7afb27913038f302e43a97091825a0689dc1b6
2019-06-05 20:36:52 -07:00
Treehugger Robot
94f300295d Merge "Match src paths with aidl package name" 2019-06-06 02:19:19 +00:00
Xin Li
3a6c897d05 DO NOT MERGE - Skip pi-platform-release (PPRL.190605.003) into stage-aosp-master
Bug: 134605042
Change-Id: I6b90349f94ffd8a05d5f04e8a6fb24018d93bedd
2019-06-05 15:43:40 -07:00
Dan Willemsen
87c7f882dd Match src paths with aidl package name
In order for the build system to track updates to the header files
during incremental builds, always specify the src files using the same
path as the package for C++ compilations.

Bug: 112114177
Test: treehugger
Change-Id: I9a2d638cbde46f67e2d5761f5b5113cc7e068ec5
2019-06-05 17:03:31 +00:00
android-build-team Robot
1571f66c29 Snap for 5524043 from a736dde3f4 to pi-platform-release
Change-Id: I9998fe9b732b39b669a06a30fa7a22847c6b65ee
2019-06-05 02:04:18 +00:00
Sudheer Shanka
10cb7d0c71 Support "full" mode when updating bind mounts of a process.
am: 8f2ff80e87

Change-Id: I63eb199ebc731cafa137d8e12802abf2e078e909
2019-05-31 15:06:48 -07:00
Sudheer Shanka
8f2ff80e87 Support "full" mode when updating bind mounts of a process.
Bug: 133829348
Test: manual
Test: atest cts/hostsidetests/appsecurity/src/android/appsecurity/cts/ExternalStorageHostTest.java
Change-Id: I5f48ecbfe8cce243fa75a2e8447ce1d4676003ad
2019-05-30 16:40:20 -07:00
David Anderson
75a9d0e65b Merge "Replace manual dm ioctls with libdm." am: bc5818774c
am: f1fa57d602

Change-Id: I8f49bf924272195c6ae2e827cfb78766d644d154
2019-05-21 21:12:08 -07:00
David Anderson
f1fa57d602 Merge "Replace manual dm ioctls with libdm."
am: bc5818774c

Change-Id: Id7ebd240d7c3e16397fcdd044113b54700b11fd5
2019-05-21 17:13:45 -07:00
David Anderson
bc5818774c Merge "Replace manual dm ioctls with libdm." 2019-05-21 21:46:38 +00:00
Nick Kralevich
0ad48dd1b8 Merge "FsCrypt.cpp: Do delayed restorecon on /data/vendor_ce" am: 3b290ece1a
am: 07d6eff5d5

Change-Id: I7f461143877014399c9a4f207af94ac75d7aa0a6
2019-05-15 12:31:03 -07:00
Nick Kralevich
07d6eff5d5 Merge "FsCrypt.cpp: Do delayed restorecon on /data/vendor_ce"
am: 3b290ece1a

Change-Id: I7d25b2611fb9c8e84139e3a00ccd88a1cc145f3b
2019-05-15 12:25:11 -07:00
Treehugger Robot
3b290ece1a Merge "FsCrypt.cpp: Do delayed restorecon on /data/vendor_ce" 2019-05-15 19:06:04 +00:00
Nick Kralevich
1bfc01e663 FsCrypt.cpp: Do delayed restorecon on /data/vendor_ce
When Android boots after file_contexts has changed, the boot process
walks the entire /data partition, updating any changed SELinux labels as
appropriate. However, credential encrypted ("ce") directories are
deliberately excluded from this early boot directory walk. Files within
ce directories have their filenames encrypted, and as a result, cannot
match the file_contexts entries. Only after the user has unlocked their
device are the unencrypted filenames available and a restorecon
appropriate.

Ensure that we do a post-unlock restorecon on /data/vendor_ce, like we
do for /data/system_ce and /data/misc_ce. This ensures the labels on
files within these directories are correct after the device has been
unlocked.

(cherrypicked from commit 6a3ef488e5)

Bug: 132349934
Test: See bug 132349934 comment #12 for test procedure
Change-Id: Ifcbef5fdfb236ec6dea418efa9d965db3a3b782f
2019-05-15 09:33:13 -07:00
Nick Kralevich
a9b07fd2c0 FsCrypt.cpp: Do delayed restorecon on /data/vendor_ce
am: 6a3ef488e5

Change-Id: I900196a62e3fb2bd806a0f2980dca5aad138a7dd
2019-05-15 09:17:58 -07:00
Nick Kralevich
6a3ef488e5 FsCrypt.cpp: Do delayed restorecon on /data/vendor_ce
When Android boots after file_contexts has changed, the boot process
walks the entire /data partition, updating any changed SELinux labels as
appropriate. However, credential encrypted ("ce") directories are
deliberately excluded from this early boot directory walk. Files within
ce directories have their filenames encrypted, and as a result, cannot
match the file_contexts entries. Only after the user has unlocked their
device are the unencrypted filenames available and a restorecon
appropriate.

Ensure that we do a post-unlock restorecon on /data/vendor_ce, like we
do for /data/system_ce and /data/misc_ce. This ensures the labels on
files within these directories are correct after the device has been
unlocked.

Bug: 132349934
Test: See bug 132349934 comment #12 for test procedure
Change-Id: Ifcbef5fdfb236ec6dea418efa9d965db3a3b782f
2019-05-14 09:30:29 -07:00
David Anderson
b92247368a Replace manual dm ioctls with libdm.
This mostly 1:1 replaces manual ioctls to device-mapper with calls to
libdm. There were two exceptions:

(1) There is a very old table-load-retry loop to workaround issues with
    umount (b/7220345). This loop has been preserved, however, it now
    includes DM_DEV_CREATE as well as DM_TABLE_LOAD.
(2) There was some ancient code to set DM_DEV_GEOMETRY for obb
    dm-devices. This never did anything since geometry must be set after
    loading a table. When setting it before (as vold was doing), the
    subsequent DM_TABLE_LOAD will clear it.

Bug: 132206403
Test: FBE device boots
      FBE device w/ metadata encryption boots
      FDE device boots
      atest StorageManagerIntegrationTest
Change-Id: Ib6db6b47329f093ac7084edaf604eddace8b9ac6
2019-05-13 13:07:12 -07:00
Sudheer Shanka
4cb696eb0d [automerger skipped] Remove storage sandboxes related code.
am: ebce4cc16b -s ours
am skip reason: change_id Ib3272a47a901ed106474039e72f123b11f5443ff with SHA1 5fceb48da1 is in history

Change-Id: I0d248b5b041118b318c36858882342d626fcb7b0
2019-05-09 23:58:25 -07:00
Sudheer Shanka
5fceb48da1 Remove storage sandboxes related code.
Bug: 131115422
Test: manual
Test: atest --test-mapping packages/providers/MediaProvider
Test: atest cts/hostsidetests/appsecurity/src/android/appsecurity/cts/ExternalStorageHostTest.java
Test: atest DownloadProviderTests
Test: atest cts/tests/app/src/android/app/cts/DownloadManagerTest.java
Test: atest cts/tests/app/DownloadManagerLegacyTest/src/android/app/cts/DownloadManagerLegacyTest.java
Test: atest cts/tests/app/DownloadManagerApi28Test/src/android/app/cts/DownloadManagerApi28Test.java
Change-Id: Ib3272a47a901ed106474039e72f123b11f5443ff
Merged-In: Ib3272a47a901ed106474039e72f123b11f5443ff
2019-05-09 17:48:04 -07:00
Sudheer Shanka
ebce4cc16b Remove storage sandboxes related code.
Bug: 131115422
Test: manual
Test: atest --test-mapping packages/providers/MediaProvider
Test: atest cts/hostsidetests/appsecurity/src/android/appsecurity/cts/ExternalStorageHostTest.java
Test: atest DownloadProviderTests
Test: atest cts/tests/app/src/android/app/cts/DownloadManagerTest.java
Test: atest cts/tests/app/DownloadManagerLegacyTest/src/android/app/cts/DownloadManagerLegacyTest.java
Test: atest cts/tests/app/DownloadManagerApi28Test/src/android/app/cts/DownloadManagerApi28Test.java
Change-Id: Ib3272a47a901ed106474039e72f123b11f5443ff
Merged-In: Ib3272a47a901ed106474039e72f123b11f5443ff
2019-05-09 17:46:30 +00:00
Martijn Coenen
676e2e0221 Merge "Stop using trigger_reset_main." am: 91a6c016ec
am: 19e74b3d1f

Change-Id: Ic1b955827da8e13e60734bd4fbbad7523ac97561
2019-05-07 00:01:48 -07:00
Martijn Coenen
19e74b3d1f Merge "Stop using trigger_reset_main."
am: 91a6c016ec

Change-Id: Id4baa15b619a941c7059d19c59645a45b9060433
2019-05-06 23:57:12 -07:00
Martijn Coenen
91a6c016ec Merge "Stop using trigger_reset_main." 2019-05-07 06:41:01 +00:00
Martijn Coenen
ac62753649 Merge "Stop using trigger_reset_main." into qt-dev
am: 9db42907b5

Change-Id: Ife6711c5e0ad5180ce805c8e1df02487c2a957be
2019-05-01 12:42:48 -07:00
Martijn Coenen
9db42907b5 Merge "Stop using trigger_reset_main." into qt-dev 2019-05-01 17:45:23 +00:00
Paul Crowley
b81297878b Create /data/vendor_ce/0/facedata in vold_prepare_subdirs
am: b409ade4d7

Change-Id: I6b3a1624a1bfc0053c75f842a1c6f219071a3fb5
2019-04-29 22:27:14 -07:00
Martijn Coenen
aec7a0a165 Stop using trigger_reset_main.
This trigger was used on FDE devices to bring down the minimal
framework, and worked by shutting down the 'main' service class.

With APEX being introduced, we want to restart all services that were
started after the tmpfs /data was mounted, as those are the services
that haven't been able to use updated APEXes in the (real) /data.

In order to do this, we need to reset more classes; that in turn
made the 'shutdown_main' trigger pretty much similar to the
previously existing 'trigger_shutdown_framework' trigger; so instead
of keeping two duplicate triggers, use only the
'trigger_shutdown_framework' one.

Bug: 118485723
Test: Taimen configured as FDE boots, Taimen configured as FBE boots
Change-Id: I0d80ef2528bd70870b063a2c580cd00a03de9961
2019-04-26 14:05:28 +02:00
Paul Crowley
b409ade4d7 Create /data/vendor_ce/0/facedata in vold_prepare_subdirs
Bug: 131084614
Test: Modified sepolicy to match, ensured directory was created on
    Crosshatch

Change-Id: I0978a630149158eb3b8f446abecb12e137e6fae5
2019-04-25 19:27:26 +00:00
Martijn Coenen
f629b009b8 Stop using trigger_reset_main.
This trigger was used on FDE devices to bring down the minimal
framework, and worked by shutting down the 'main' service class.

With APEX being introduced, we want to restart all services that were
started after the tmpfs /data was mounted, as those are the services
that haven't been able to use updated APEXes in the (real) /data.

In order to do this, we need to reset more classes; that in turn
made the 'shutdown_main' trigger pretty much similar to the
previously existing 'trigger_shutdown_framework' trigger; so instead
of keeping two duplicate triggers, use only the
'trigger_shutdown_framework' one.

Bug: 118485723
Test: Taimen configured as FDE boots, Taimen configured as FBE boots
Change-Id: I0d80ef2528bd70870b063a2c580cd00a03de9961
2019-04-24 10:41:11 +02:00
Paul Lawrence
f603a1d3b2 Merge "Use correct Statuses from Checkpoint code" am: 8d4164f92f
am: 7d9a965419

Change-Id: If69ffb3d977cd545ff04609b1240dbef563f0748
2019-04-23 16:33:08 -07:00
Paul Lawrence
7d9a965419 Merge "Use correct Statuses from Checkpoint code"
am: 8d4164f92f

Change-Id: I35ffbb3bc89eb695aa86c45f4aa0a8633cfd11b9
2019-04-23 16:25:53 -07:00
Treehugger Robot
8d4164f92f Merge "Use correct Statuses from Checkpoint code" 2019-04-23 23:07:27 +00:00