History log of /frameworks/base/services/coverage/java/com/android/server/coverage/CoverageService.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
ca3872ce36c94090ae18519dc7fe0cf39d834c4a 30-Oct-2017 Dianne Hackborn <hackbod@google.com> Fully implement "install" and "install-write" in PackageManagerShellCommand.

We can use the new mechanism to ask the calling shell to open
a file in order to implement the rest of these commands, allowing
you to give the path to an apk to install. That API is thus
extended to allow you to open readable files, not just opening
file for writing.

Doing this however means we no longer can pass a file path to
AssetManager for the apk to parse, we only have an already open
fd for that. Extending AssetManager to allow adding apks from
fds is not that hard, however, since the underlying zip library
already supports this.

This main thing this changes is in AssetManager.cpp where we
retrieve the open zip file for a particular apk that has been
added. This used to look up the zip file by path every time
it was needed, but that won't work anymore now that we can have
things added by fd. Instead, we keep track of each opened zip
in the AssetManager, so we can just directly retrieve it from
the asset_path representing the item that was added. As a
side-effect, this means for normal paths we no longer need to
look up by name, but just have the opened zip file directly
accessible. (This is probably good, but it does mean that we
no longer run the logic of seeing if the zip file's timestamp
has changed and re-opening it if it has. We probably shouldn't
be relying on that for an active AssetManager anyway, and maybe
it is even good that we don't allow the zip file to change
under it?)

A follow-up change will finally remove the Pm.java implementation
and turn the pm "command" into a simple shell script that runs
cmd package.

Test: manual

Change-Id: Ie103e3bdaa5b706796cc329254f2638151a3924f
/frameworks/base/services/coverage/java/com/android/server/coverage/CoverageService.java
1f556e3ba623f7d6d2841615f4000c478541c37f 12-Nov-2016 Allen Hair <allenhair@google.com> Provide a mechanism for dumping code coverage for the system server.

This service will only be enabled if the platform was built with
EMMA_INSTRUMENT=true

Test: Manual
Bug: 31077138
Change-Id: I4ba98b6568d31ded1b66da996b3c2e5a2ee07c75
/frameworks/base/services/coverage/java/com/android/server/coverage/CoverageService.java