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

Skip to content
Commit 65556a87 authored by Ulya Trafimovich's avatar Ulya Trafimovich
Browse files

Preserve <uses-library> order in dexpreopt.config files.

Library order is important because it is used to construct class loader
context, which is then written into OAT/ODEX files and chacked against
class loader context constructed by PackageManager on the device. If the
orders are different, dexpreopted code is rejected.

Soong avoids using Go maps for class loader context representation
precisely for that reason. However, for the modules defined in makefiles
dexpreopt configs were serialized to JSON and unmarshaled to Go maps,
which resulted in wrong order of libraries. This CL changes Go
representation of class loader contexts imported from JSON and makes the
order stable.

Bug: 132357300
Test: lunch cf_x86_64_phone-userdebug && m && launch_cvd \
      adb wait-for-device && adb root && adb logcat \
      | grep -E 'ClassLoaderContext [a-z ]+ mismatch'
      # empty grep output, no errors
Change-Id: I15f51617f9573c0bbcb324cf2592daf719cad586
parent 56ca4e47
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