Commit graph

2946 commits

Author SHA1 Message Date
Daniel Rosenberg
87d1282e5e Defer deleteKey in KeyStorage in Checkpointing mode am: 8cc5716ef1
am: cfc8afa3c4

Change-Id: Ia3f0ed4c31a4f02908f8212a577e97cd802ddc5a
2019-06-07 13:11:43 -07:00
Daniel Rosenberg
cfc8afa3c4 Defer deleteKey in KeyStorage in Checkpointing mode
am: 8cc5716ef1

Change-Id: Iecd54afeec49d27ce0c74d1ee41fa3aefe169c84
2019-06-07 13:05:41 -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
23075d4986 [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: 46ac19c936

Change-Id: Ib29f405e28836c18782939629017ef775136334a
2019-06-07 00:35:42 -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
b9269e6395 [automerger skipped] DO NOT MERGE - Skip pi-platform-release (PPRL.190605.003) into stage-aosp-master am: 3a6c897d05 -s ours
am: 0951d225f3

Change-Id: Ie8a0e65cf1f8d66b7ae33254f841ce39ab6c2e98
2019-06-07 00:26:39 -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
d7ec044c97 Merge "Match src paths with aidl package name" am: 94f300295d am: 4be1fb5196
am: 6da4bcb295

Change-Id: Id85523087b8c059262d1146d10fbc95cf12da2cf
2019-06-05 21:41:02 -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
c84f782026 Support "full" mode when updating bind mounts of a process. am: 8f2ff80e87
am: 10cb7d0c71

Change-Id: I034d2fe4c9d5efcf247064a7d96b7840b70736af
2019-05-31 15:21:42 -07:00
Sudheer Shanka
a5f435c8d6 Support "full" mode when updating bind mounts of a process. am: 8f2ff80e87
am: c7ad0d7657

Change-Id: I7ab086d3ed5ac3d72507a949718c6a58fcb9aea8
2019-05-31 15:15:38 -07: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
c7ad0d7657 Support "full" mode when updating bind mounts of a process.
am: 8f2ff80e87

Change-Id: I160a6a09eccea8fc5d766ed268d4c7c702e4c5dd
2019-05-31 15:04:20 -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
6d49bd165b Merge "Replace manual dm ioctls with libdm." am: bc5818774c am: f1fa57d602
am: 75a9d0e65b

Change-Id: Ideeb099a64e45217b994530973da05dbe2da0e3c
2019-05-22 04:41:09 -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
34a1e24977 Merge "FsCrypt.cpp: Do delayed restorecon on /data/vendor_ce" am: 3b290ece1a am: 07d6eff5d5
am: 0ad48dd1b8

Change-Id: I93a91b38415829f64c7ada10f31a76e544fe42b6
2019-05-16 04:44:45 -07:00
Nick Kralevich
505ee89967 FsCrypt.cpp: Do delayed restorecon on /data/vendor_ce am: 6a3ef488e5
am: a9b07fd2c0

Change-Id: I5506b7a4827a9e578c430b2251ca83aa183b13c6
2019-05-15 16:42:38 -07: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
Paul Lawrence
c2a145ff33 Fail startCheckpoint if checkpoints not supported
Bug: 131815738
Test: vdc checkpoint startCheckpoint 2 succeeds on blueline
      It fails with a modified fstab with no checkpoint=fs flag

Change-Id: I6d55810a1f711a670f18fbd10d8779c15f4e3cba
2019-05-15 10:16:15 -07: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