Commit graph

7 commits

Author SHA1 Message Date
Jeff Sharkey
bd2ecd8e6d Allocate a GID range for external cache files.
We can't reuse the GID range for internal cache files, otherwise
we don't have a way to tease apart the difference when deciding if
it's safe to move apps.

Test: builds, boots
Bug: 37193650
Change-Id: I22c4e575cd557636e74c5c73035adb1d4dcbb7f7
2017-04-17 14:59:51 -06:00
Jeff Sharkey
7e5d0b1fae Define GID range for external data and OBBs.
To quickly answer the question of "how much data is a UID using?" we
need a GID range to label files on external storage, similar to
the GID ranges already defined for cached and shared data.

Also define a new GID that will be used to label the OBB files shared
between all users under /data/media/obb.

Test: builds, newly added tests pass
Bug: 34263266
Change-Id: I16fb7d166c3dcdeafbf477162d191d3b73ae8ac2
2017-01-18 17:11:05 -07:00
Jeff Sharkey
dff44709cf Define range of GIDs for cached app data.
To support upcoming disk usage calculation optimizations, this change
creates a new GID for each app that will be used to mark its cached
data.  We're allocating these unique GIDs so that we can use
quotactl() to track cached data on a per-app basis.

This change also tightens up the implementation of both the cache
and shared GID calculation to ensure that they stay inside the valid
ranges, and includes tests to verify.

Test: builds, boots, tests pass
Bug: 27948817
Change-Id: Ie4377e5aae267f2da39a165888139228995987cb
2016-12-13 13:28:08 -07:00
Calin Juravle
807f23aff2 Create profiles folders
Current profiles (the ones which have not been used for
compilation) are stored in /data/misc/profiles/cur/0/pkgname/.

Reference profiles (the merged of all user profiles, used for
compilation) are stored in /data/misc/profiles/ref/pkgname/.

Add a method to get the shared app gid from an uid or appid.

Bug: 26719109
Bug: 26563023
Change-Id: I89601d7dbeb3041df882c141a9127dac200a645e
2016-02-19 13:42:37 +00:00
Jeff Sharkey
9685194fc9 File-system utilities for installd and zygote.
Bug: 7008879
Change-Id: Ia54b8d4ad434e8973f235e2a4728651814bef8a9
2012-08-30 10:29:41 -07:00
Jeff Sharkey
885342a0f2 Multi-user external storage support.
Remount rootfs as recursively shared, so that mount changes are
propagated into child namespaces.  Mount external storage for access
from adb.

Clean multi-user dependencies for use in Dalvik.  Also define
external storage paths.

Bug: 6925012
Change-Id: I375de581a63f4f36667894c56a34a9dd45361e8f
2012-08-15 21:10:07 -07:00
Jeff Sharkey
9509d27252 Native utils for working with user and app IDs.
Bug: 6925012
Change-Id: I56f18826fd324f60b6e446cebd30719258e40990
2012-08-07 17:56:48 -07:00