Commit graph

2820 commits

Author SHA1 Message Date
android-build-team Robot
60ef2aa95e Snap for 5647767 from cfc8afa3c4 to qt-c2f2-release
Change-Id: I08363db4c895bc4fba0d84ad6967dd3ed14e7d9a
2019-06-10 19:43:03 +00: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
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
android-build-team Robot
13772a9d51 Snap for 5626642 from c7ad0d7657 to qt-c2f2-release
Change-Id: Ia8e606440d44e75ae409936cda73034c9d048edd
2019-06-01 23:16:59 +00: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
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
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
9db42907b5 Merge "Stop using trigger_reset_main." into qt-dev 2019-05-01 17:45:23 +00: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
Sudheer Shanka
36bdf7ab54 Update remountUidLegacy to handle "full" mount mode.
Bug: 130791955
Test: manual
Change-Id: I078c2922d1d5a8d16bbb213201a3cad7b1bf4b86
2019-04-18 15:18:30 -07:00
Sudheer Shanka
0a9469e923 Merge "Allow sandboxed apps to access only package specific dirs." into qt-dev 2019-04-17 22:07:47 +00:00
Sandeep Patil
e802d475bf Add visible logs about fstrim run for block based checkpoints
Bug: 120095226
Test: Tested by forcing /data/system/last-fstrim last modified time back
      2 years & manually trigger checkpoint using 'vdc checkpoint startCheckpoint 1'

Change-Id: I0cb8b6a85ae787e1ba2cdd7998a46942ca69760f
Signed-off-by: Sandeep Patil <sspatil@google.com>
2019-04-15 10:12:19 -07:00
Sudheer Shanka
a05ea743f0 Allow sandboxed apps to access only package specific dirs.
Bug: 130427780
Test: manual
Test: atest cts/hostsidetests/appsecurity/src/android/appsecurity/cts/ExternalStorageHostTest.java
Change-Id: I7afcea090306336c4033860084a2a436d2bb4740
2019-04-12 16:40:57 -07:00
Woody Lin
3654986ae5 [automerger skipped] Fsync directories before delete key
am: a598e04a91 -s ours
am skip reason: change_id Ib8c349d6d033f86b247f4b35b8354d97cf249d26 with SHA1 37c82f5c0f is in history

Change-Id: Ifec2d700dbe6bbe55e65e6e07003d1e77fb3dbc2
2019-04-10 07:06:41 -07:00
Paul Crowley
c6f4d9d5ae [automerger skipped] Fsync directories after creating files
am: 2e58acb412 -s ours
am skip reason: change_id I53d252942c21365983b4f8b6e0948b1864f195c1 with SHA1 621d9b9732 is in history

Change-Id: Icdb62b1d4e6e7ca7d18df1083020d61d9b215165
2019-04-10 07:06:31 -07:00
Narayan Kamath
15ad33a8b1 AppFuseUtil: Call ForceUnmount before PrepareDir.
We'd previously call ForceUnmount after the call to PrepareDir,
which would sometimes fail because the userspace counterpart of a
FUSE FS that was previously mounted at that mountpoint has gone
away. This is usually reproducible after a runtime restart.

Bug: 128459728
Test: Loop (adb shell start; atest MediaStore_Images_MediaTest; adb shell stop;)
Change-Id: I38d3908487123614c338266f983afb04e3ed78d4
2019-04-09 18:45:32 +01:00
Eric Biggers
143498f797 Merge "vold: downgrade lookup_key_ref() failure message to DEBUG level" 2019-04-03 21:38:28 +00:00
Daniel Rosenberg
c7da9acdce Merge "Retry opening loop device" am: c8f5cbb5b1 am: de841f6d89
am: dde25e9167

Change-Id: I14fc99509f8b5f83cc2dd0a035d1b127c581b027
2019-04-02 15:52:12 -07:00
Daniel Rosenberg
dde25e9167 Merge "Retry opening loop device" am: c8f5cbb5b1
am: de841f6d89

Change-Id: Ia0765900543f1778fbbe5d26dcadaff8364a89b5
2019-04-02 15:08:19 -07:00
Daniel Rosenberg
de841f6d89 Merge "Retry opening loop device"
am: c8f5cbb5b1

Change-Id: I5657465fe50f61e3c45e7d13eb5953ef7771d5fa
2019-04-02 14:23:59 -07:00
Daniel Rosenberg
c8f5cbb5b1 Merge "Retry opening loop device" 2019-04-02 20:28:44 +00:00
Eric Biggers
d103404985 vold: downgrade lookup_key_ref() failure message to DEBUG level
Now that lockUserKey() will be called for every user each time the
framework is started, it's a normal case that the key being removed
doesn't exist.  So downgrade the log message about being unable to find
a key from ERROR to DEBUG.

Test: build and boot, message is now debug level.
Change-Id: I2d1dce8dd8825b02982eab1c902aa10fe5b54b84
2019-04-02 11:13:57 -07:00
Daniel Rosenberg
4538cb20b9 Retry opening loop device
If more than the default number of loop devices is in use, we may need
to wait for the device path to be available.

Bug: 128873591
Bug: 122059364
Test: Set up adopted virtual disk and check that it loads on boot
Change-Id: I201dcc32043664076f50b0d6f40de6e5e1a65342
2019-04-01 17:37:47 -07:00
Jaegeuk Kim
cd1f06f6ec Merge "idle-maint: don't need to change discard_granularity" am: 444a24558d am: a970ff8448
am: 240ca70d8d

Change-Id: I249d4dd70c4f13d46d539a769e918613eea539b4
2019-04-01 07:22:06 -07:00
Jaegeuk Kim
240ca70d8d Merge "idle-maint: don't need to change discard_granularity" am: 444a24558d
am: a970ff8448

Change-Id: I2be93b1bf2e1cd81b54ec9f197043ae8156003df
2019-04-01 07:17:59 -07:00
Jaegeuk Kim
a970ff8448 Merge "idle-maint: don't need to change discard_granularity"
am: 444a24558d

Change-Id: If0679363fb8563dedb43f8bd6266c74e4869d44f
2019-04-01 07:13:28 -07:00
Jaegeuk Kim
444a24558d Merge "idle-maint: don't need to change discard_granularity" 2019-04-01 14:04:24 +00:00
Nick Kralevich
58e1a816ba VolumeManager: more O_CLOEXEC changes
Test: compiles and boots
Bug: 129350825
Change-Id: Ie6a0e05f1814d744eb16863f749c939ab1e097e0
2019-03-29 19:23:40 -07:00
Nick Kralevich
87fcd8b36a Merge "vold: add android-* to tidy_checks" am: 1820b9b3b9 am: 874b841223
am: 2215bd7a75

Change-Id: I4d1be96b9e7285aada712482c366a22451b6dacc
2019-03-29 18:46:25 -07:00
Nick Kralevich
9bda3fe810 Merge "vold: cleanups for O_CLOEXEC tidy checks." am: a59868d6de am: 5af0c75525
am: 4197c098df

Change-Id: Ibe3636abcfafab7854c7b0434095b6e91fadcacf
2019-03-29 18:46:07 -07:00
Nick Kralevich
2215bd7a75 Merge "vold: add android-* to tidy_checks" am: 1820b9b3b9
am: 874b841223

Change-Id: Ica87cf75eadfff9a12c08204240e2d31b10f51a1
2019-03-29 18:42:20 -07:00
Nick Kralevich
4197c098df Merge "vold: cleanups for O_CLOEXEC tidy checks." am: a59868d6de
am: 5af0c75525

Change-Id: I19cae40b342d339bf5752dfba304c37a0abecea8
2019-03-29 18:42:05 -07:00
Nick Kralevich
874b841223 Merge "vold: add android-* to tidy_checks"
am: 1820b9b3b9

Change-Id: I5b1c6926f050df8b24ee3d52b93080dab0745571
2019-03-29 18:38:21 -07:00
Nick Kralevich
5af0c75525 Merge "vold: cleanups for O_CLOEXEC tidy checks."
am: a59868d6de

Change-Id: Ice4a6009beb2d41d381e461b00be93471b100778
2019-03-29 18:38:04 -07:00
Nick Kralevich
1820b9b3b9 Merge "vold: add android-* to tidy_checks" 2019-03-30 01:27:57 +00:00
Nick Kralevich
a59868d6de Merge "vold: cleanups for O_CLOEXEC tidy checks." 2019-03-30 01:27:38 +00:00
Paul Lawrence
25fe272764 Merge "Fix checkpoint on Taimen" am: 3889f17ad1 am: e2d9258979
am: 471325ad5a

Change-Id: I96523c193353d8d0f3cf775447b07c018ff810a8
2019-03-29 17:58:01 -07:00
Paul Lawrence
471325ad5a Merge "Fix checkpoint on Taimen" am: 3889f17ad1
am: e2d9258979

Change-Id: Id0768b2cb6aa645d528d21738456a72308936ace
2019-03-29 17:38:20 -07:00
Paul Lawrence
e2d9258979 Merge "Fix checkpoint on Taimen"
am: 3889f17ad1

Change-Id: I06af82f6534b26e595be3aa1d39588175920d0db
2019-03-29 17:16:19 -07:00
Treehugger Robot
3889f17ad1 Merge "Fix checkpoint on Taimen" 2019-03-29 23:09:52 +00:00
Nick Kralevich
d78fb53378 vold: add android-* to tidy_checks
Bug: 129350825
Test: compiles and boots
Change-Id: If5a6267cc56bfc0ba73602bfa520035197b4fb90
2019-03-29 16:07:58 -07:00
Nick Kralevich
e7e89acbc8 vold: cleanups for O_CLOEXEC tidy checks.
Bug: 129350825
Test: compiles and boots
Change-Id: I83a484ca15df1b757b670008f15af5504bc94df1
2019-03-29 16:04:47 -07:00
Paul Lawrence
e81f4c1945 Fix checkpoint on Taimen
Bug: 129494872
Test: VtsKernelCheckpointTest runs and passes
Change-Id: Ib2de866db7c847d569789d1aa6cdbad7c3ee7ff4
2019-03-29 13:22:19 -07:00
Bernie Innocenti
a83d0fe1b6 Merge "Fix bogus error checking on unique_fd" am: 95587b085e am: 3e9b69bf77
am: eb2be538c0

Change-Id: I7bf25301ca157fc7d508e03d32d037987a29ecf3
2019-03-28 21:32:18 -07:00
Bernie Innocenti
eb2be538c0 Merge "Fix bogus error checking on unique_fd" am: 95587b085e
am: 3e9b69bf77

Change-Id: Id54116718b97057f978e1410a96bfb449999f832
2019-03-28 21:15:34 -07:00
Bernie Innocenti
3e9b69bf77 Merge "Fix bogus error checking on unique_fd"
am: 95587b085e

Change-Id: Ic11222fdc81a9a2e15546378f1bc5012107c50af
2019-03-28 21:09:18 -07:00
Treehugger Robot
95587b085e Merge "Fix bogus error checking on unique_fd" 2019-03-29 03:52:46 +00:00
Jaegeuk Kim
dc7162be6f idle-maint: don't need to change discard_granularity
F2FS changes proper configurations along with gc_urgent, so idle-maint doesn't
need to set this redundantly.

Change-Id: I4a71a5d877a3bb9636e2b65132ec806edc56a8fe
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2019-03-28 06:40:12 -07:00