Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit c3d9dce9 authored by Eric Biggers's avatar Eric Biggers
Browse files

installd: only delete contents of user's CE and DE dirs

The /data/user/$userId, /data/user_de/$userId, and /data/media/$userId
directories (or their /mnt/expand equivalents) are created by vold, so
they should be deleted by vold as well, and in fact that would already
happen except that installd deletes them recursively before vold gets to
it.  Change installd to delete just the contents of these directories.

This is a prerequisite to locking down the ability to create these
directories (https://r.android.com/2078213), which is needed to stop
subdirectories from accidentally being created too early.  Technically
we could achieve this goal without limiting delete access, as it's
create access that really matters, but having the operations be paired
properly is much cleaner.

Test: Created and deleted a user, and verified that all their
      directories still got deleted.
Bug: 156305599
Change-Id: I93f0f86df10829818d0becb65af31190dd008b3c
parent 27590051
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment