History log of /frameworks/native/cmds/installd/tests/installd_utils_test.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
a40b6e3f5229ccc98660b1bee3461b523d91f0ea 13-Apr-2017 Calin Juravle <calin@google.com> Fix installd test

CreatePrimaryCurrentProfile was using the wrong userid for the expected
value.

Test: adb shell /data/nativetest/installd_utils_test/installd_utils_test
Bug: 36101738
Change-Id: I80b8212d09a0e4b600c00f85ac604a0e5fa1cc11
/frameworks/native/cmds/installd/tests/installd_utils_test.cpp
8348fa3545e0ad4e178b5f3faf37a3b68da727d6 17-Mar-2017 Calin Juravle <calin@google.com> Merge "Support profile guided compilation for secondary dex files" am: cb2e477f14 am: f01cd5f89f
am: 95c5f4b85d

Change-Id: I432fd0a8e7056b5d41e6beb9a71d8fd74c3a34b8
114f08107be384a3f9cc954bdec2b6b7619354ae 09-Mar-2017 Calin Juravle <calin@google.com> Support profile guided compilation for secondary dex files

Test: adb shell cmd package bg-dexopt-job works for sercondary dex files
Bug: 26719109
Change-Id: I4011a780f65378c23a4631c07c37cdb4f5fee41e
/frameworks/native/cmds/installd/tests/installd_utils_test.cpp
47ec28647af5ce9d7079ee2ab782cf42e6299cad 11-Mar-2017 Calin Juravle <calin@google.com> Merge "Use std::string for profile operations instead of const char" am: 7c7d888d94 am: ccaa1f3f78
am: 0045d606d1

Change-Id: I6ad63a777811dbc5e5d74870441d8c76dc3273af
76268c56febde9a77183387fbd4baabe6694e6b5 09-Mar-2017 Calin Juravle <calin@google.com> Use std::string for profile operations instead of const char

Will make things cleaner when adding secondary dex profile support.

Also, add tests to verify profile path creation.

Bug: 26719109
Test: /data/nativetest64/installd_utils_test/installd_utils_test
Change-Id: I8cb1a11cefee21f5001d2b729110696d52fc8323
/frameworks/native/cmds/installd/tests/installd_utils_test.cpp
2ee8cc08caf6c45c8550896b54387c7a42339d0f 08-Mar-2017 Jeff Sharkey <jsharkey@android.com> Allow "android" package name.

Test: /data/nativetest64/installd_utils_test/installd_utils_test
Bug: 36062649

(cherry picked from commit ab7ac8d5a04bd3f38b85ce20ae5bb382f2a26585)

Change-Id: I20d546fdd20813e96bcb5f061ca5b352dff44450
/frameworks/native/cmds/installd/tests/installd_utils_test.cpp
068ef2229e5493b2678b00ff875df486b561e00d 08-Mar-2017 Jeff Sharkey <jsharkey@android.com> Update is_valid_package_name() to match framework.

The framework has a new format for /data/app directory names in OC
to protect user privacy. This change updates the validation logic
in installd to support the new format.

For consistency the logic now mirrors the package name validation
logic used by PackageParser.

Test: /data/nativetest64/installd_utils_test/installd_utils_test
Bug: 33705143

(cherry picked from commit 367ace2f77105f7a09b34a50bc875fd4fa591177)

Merged-In: I41d270942479c52e063c29a2cb9552d7b238b86e
Change-Id: I15363803fb45310697e29be810e800dc1b1902d0
/frameworks/native/cmds/installd/tests/installd_utils_test.cpp
ab7ac8d5a04bd3f38b85ce20ae5bb382f2a26585 08-Mar-2017 Jeff Sharkey <jsharkey@android.com> Allow "android" package name.

Test: /data/nativetest64/installd_utils_test/installd_utils_test
Bug: 36062649
Change-Id: I9b41a34822a1a194d256f5b99d5955e51716029c
/frameworks/native/cmds/installd/tests/installd_utils_test.cpp
367ace2f77105f7a09b34a50bc875fd4fa591177 08-Mar-2017 Jeff Sharkey <jsharkey@android.com> Update is_valid_package_name() to match framework.

The framework has a new format for /data/app directory names in OC
to protect user privacy. This change updates the validation logic
in installd to support the new format.

For consistency the logic now mirrors the package name validation
logic used by PackageParser.

Test: /data/nativetest64/installd_utils_test/installd_utils_test
Bug: 33705143
Change-Id: I41d270942479c52e063c29a2cb9552d7b238b86e
/frameworks/native/cmds/installd/tests/installd_utils_test.cpp
871a8f236ef2a055b9955b47a342b2c44c020ef7 22-Feb-2017 Jeff Sharkey <jsharkey@android.com> Logic for atmoic/tombstone behavior; split mode.

Flesh out logic for cache directories that request new atomic and/or
tombstone clearing behaviors. Atomic directories are considered for
deletion as a single all-or-nothing unit, and tombstone directories
truncate any removed files instead of unlinking them.

Since these behaviors can be mixed together, add local tests that
quickly verify several different permutations.

Reduce memory footprint of CacheItem objects by only storing name
and pointer to parent (instead of full path). Fix ordering bug by
switching to std::stable_sort.

Add "V2_DEFY_QUOTA" flag so we can split clearing into two distinct
phases: clearing data for apps above their quotas, and then pushing
deeper by clearing data for apps below their quotas.

Test: adb shell /data/nativetest64/installd_cache_test/installd_cache_test
Bug: 34692014, 33811826
Change-Id: I156897de1d1d1c371b2b837128b2e286bf33d40d
/frameworks/native/cmds/installd/tests/installd_utils_test.cpp
f3e30b936ef103dc0f3d8697e0f86ba82b49609e 10-Dec-2016 Jeff Sharkey <jsharkey@android.com> Filename refactoring, remove DEXOPT_OTA flag.

Test: builds, boots
Bug: 13758960, 30944031
Change-Id: Ib60899fc70b12f76fad9dfad596b513777752703
/frameworks/native/cmds/installd/tests/installd_utils_test.cpp
2f720f7ec5c9d0b91defc85878e7330b10f8e89a 11-Apr-2016 Jeff Sharkey <jsharkey@android.com> Use inode numbers for CE storage, fix sizes.

Certain operations, such as clearing/destroying app data, or just
counting on-disk size, require us to know the CE storage directory
of a particular app. To facilitate these operations, offer a method
to get the inode of a CE directory, and accept that inode number
for later operations.

In previous releases, we started installing apps using a new
directory-based layout, where all app code, unpacked native libraries,
and optimized code is bundled together. So now we only have a single
path to measure for code size.

Start measuring both CE and DE storage data usage for apps, and tweak
the reporting so that empty cache/data directories actually show up
as "0 bytes".

Fix bugs in disk usage counting, since st_blksize has no bearing on
the allocated disk space. Also don't double-count "." and ".."
directories when measuring storage.

Bug: 27828915, 27197819
Change-Id: I350b951f5c24165edb253ac663c9aae020c24dc9
/frameworks/native/cmds/installd/tests/installd_utils_test.cpp
02d0de56c75347a0cb8d5a8565dc8c4ee7616057 12-Nov-2015 Andreas Gampe <agampe@google.com> Installd: Refactor in preparation for OTA

Refactor installd code so reuse with a few key plugin functions is
possible. Do a bit of code cleanup.

Bug: 25612095
Change-Id: I544604f0a391583a4c07887a8234343a3a255942
/frameworks/native/cmds/installd/tests/installd_utils_test.cpp
d792118c493806eeb24a8203f508e6e18fe93bd7 01-May-2015 Jeff Sharkey <jsharkey@android.com> Offer to move both code and data together.

We now move code under /data/app/com.example when a complete move
is requested. This really only works for new cluster-style installs
that also have native libraries and OAT contained inside.

Teach measuring code about cluster-style installs when measuring
app footprint. Also offer to measure private data space for all
users.

Bug: 19993667, 20275578
Change-Id: I6df7b947cb5cc8a4552f56f4b64a661e8512389f
/frameworks/native/cmds/installd/tests/installd_utils_test.cpp
41ea424413c0381ef2aa15fc5bd5d4b88abd23c4 09-Apr-2015 Jeff Sharkey <jsharkey@android.com> More volume UUID awareness.

Teach free_cache() and restorecon_data() about building per-volume
paths. Also clean up restorecon_data() by using std::string when
building paths.

Clearer names for path building utility methods, and tests to verify.

Bug: 19993667
Change-Id: Iacfbcdaa5b901cc2490bc8eba366dfdeb44f1d93
/frameworks/native/cmds/installd/tests/installd_utils_test.cpp
c03de09173f98506e73e7cf7df21fe11795d4b24 08-Apr-2015 Jeff Sharkey <jsharkey@android.com> Plumb through volume UUID when building paths.

Since app data paths can live on expanded storage devices, accept the
target volume UUID when building paths. The null UUID indicates the
default internal storage.

To improve readability, start using std::string in several places,
which throws when allocations fail. For now, perform last-second
sanity checks on incoming path arguments, but we'll eventually want
to check arguments as they come through installd.cpp, instead of
crashing the entire daemon.

Also remove "lib" symlink code from install() and make_user_data(),
since we're no longer supporting /data/app-lib. The framework
already uses linklib() to create the right symlink for the selected
ISA-specific library dir.

Bug: 19993667
Change-Id: Ib9343575ffb62bf3981e19375de8f3822fc31e28
/frameworks/native/cmds/installd/tests/installd_utils_test.cpp
19803807cd7ae01868fcfa50305f4a7dd13765e2 07-Apr-2015 Jeff Sharkey <jsharkey@android.com> Switch installd to compile as C++.

This is the minimal change needed to switch it over to C++, which
paves the way for using more robust utilities like std::string.

Change-Id: I80ed6280146875eb6ddbbb340c05450388ca13f0
/frameworks/native/cmds/installd/tests/installd_utils_test.cpp
c597b6dd895dbb2b28c757ce7a2651b3cdc9b00c 19-Aug-2014 Calin Juravle <calin@google.com> Fix validation of system paths in installd.

System apps are now installed under their own directory
(system_app_dir/app_dir/app.apk). The new path doesn't pass installd
validation because of obsolete checks which verify that the path does
not contain subdirectories past the system_app_dir.

The CL fixes the validation to accept at most on subdirectory.

Bug: 17109858
Change-Id: I13abb52c0016610ff436f6a26bb6b3b85dc4dfb0
/frameworks/native/cmds/installd/tests/installd_utils_test.cpp
fd88ff2edd954117e36372fb095b6f5f35aad0e3 15-Aug-2014 Calin Juravle <calin@google.com> Allow apk path to contain one subdirectory.

In the current directory layout this prevented rm_dex and move_dex
commands to validate the apk path and thus cleaning up resources.

Bug: 16888084
Change-Id: Iba579d075a9c6d7de047e7ffef95441498257086
/frameworks/native/cmds/installd/tests/installd_utils_test.cpp
abe4fe5b46157ecd2a52d28abf938c816c3ce878 11-Jul-2013 Jeff Sharkey <jsharkey@android.com> Change legacy "persona" references to userid_t.

Offers stronger typing with no functional change.

Change-Id: I09f0262470feec5cfdf26658f998c20550af84d4
/frameworks/native/cmds/installd/tests/installd_utils_test.cpp
94afecf4b6f437b3ee9a076242402e421c6c07a6 24-Oct-2012 Mike Lockwood <lockwood@google.com> Move non-Java commands over from frameworks/base

Change-Id: I0571813c1cfcf66abd36eb9f178fc49b618e88a6
Signed-off-by: Mike Lockwood <lockwood@google.com>
/frameworks/native/cmds/installd/tests/installd_utils_test.cpp