Commit e681bf76 authored by Jeff Hao's avatar Jeff Hao
Browse files

Allow dex2oat to handle relative paths.

During installation at compile time, the PackageManager is passing
shared libraries to dex2oat with -classpath. For split apps, we want the
splits to have the proper dependencies, and are now passing previous
parts of the split apk as shared libraries as we compile them all. These
apks are staged in a temp dir during compilation, so we pass a relative
path for them instead.

Since PackageManager can now pass relative paths to dex2oat as shared
libraries, dex2oat has an added --classpath-dir switch to specify the
directory to use for relative class paths. At runtime when checking
shared libraries, we use oat file functionality to resolve relative paths
to determine if the paths match.

Bug: 34169257
Test: cts-tradefed run singleCommand cts -d --module
CtsAppSecurityHostTestCases -t android.appsecurity.cts.SplitTests

(cherry-picked from commit f79ac83a)

Change-Id: Ib1f93b6920474d4ed008492da67d3a63174c5397
parent 26013c94
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment