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

Skip to content
Commit 4f6027a7 authored by David Brazdil's avatar David Brazdil
Browse files

dexopt: Open class loader context dex files for dex2oat

When compiling secondary dex files, the class loader context may contain
files with 'app_data_file' selabel which dex2oat/dexoptanalyzer are not
allowed to open. Extend installd/dexopt to open these files for them and
pass in their file descriptors.

Dexopt of secondary dex files now starts by invoking dexoptanalyzer with
'--flatten-class-loader-context'. In this mode, dexoptanalyzer will only
parse the given class loader context, flatten it and print a
colon-separated list of dex files to standard output. Dexopt captures
the output and splits the string to obtain a list of context dex files.

It then continues by opening these files for dexoptanalyzer under
dropped privileges, passing the FDs using command line arguments, and
later opening the files again for dex2oat.

Bug: 126674985
Test: atest installd_dexopt_test
Change-Id: Ib9017a67c514ed711e1a03cfac313df796af6af9
parent 7cee1b48
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