Don't write nonexistent DEX file paths to dexpreopt.config files.
A path to an nonexistent file caused dex2oat to write an empty path in the class loader context stored inside of the OAT/ODEX file, which resulted in class loader context mistmatch and a failure to load dexpreopt code on device. An example of a faulty class loader context for GoogleDialer, can be seen either with oatdump or by grepping logcat for class loader context mimatch messages (the first empty PCL[] is expected, note the second empty PCL[] in the subcontext for shared libraries): PCL[]{PCL[]#PCL[/system/framework/org.apache.http.legacy.jar*22205474] This CL removes the nonexistent path from the generated dexpreopt.config file, which works in conjunction with a change in makefiles that stops using the removed config field. This is possible because makefiles can access DEX files using a module name and "intermediates-dir-for" macro. 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: I8d16f77c6f76ad6234cc4114ad3545cbe572ef13
Loading
Please register or sign in to comment