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

Commit 767b1214 authored by Jiakai Zhang's avatar Jiakai Zhang
Browse files

Update the logic for inheriting dexopt artifacts during inherit install.

The old code path assumes that the oat dir is in the following
hierarchy:

oat/
  <isa-1>/
    <filename-1>
    <filename-2>
    ...
  <isa-2>/
    ...

where <isa-*> are supported instruction sets.

At the time of writing, this assumption is true, but it may not be true
in the future as ART evolves. Besides, the old code path depends on the
InstructionSets class, a class for legacy dexopt, preventing us from
removing it.

The new code path preserves the entire oat dir hierarchy regardless of
the directory names and the depth, and it doesn't depend on
InstructionSets.

Bug: 258223472
Test: -
  1. Install a base APK using `adb install`.
  2. Check the files in the oat dir and their inodes.
  3. Install a split APK using `adb install -p` (inherit install).
  4. Verify that the existing files are there in the oat dir at the
     destination and their inodes are unchanged.
Flag: android.content.pm.alternative_for_dexopt_cleanup
Change-Id: Id6a7801b9f8bcec4fa81ce4c4543fee560847526
parent bfc47e1e
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