E Zygote : System zygote died with fatal exception E Zygote : java.lang.ExceptionInInitializerError E Zygote : at java.lang.Class.classForName(Native Method) E Zygote : at java.lang.Class.forName(Class.java:454) E Zygote : at com.android.internal.os.ZygoteInit.preloadClasses(ZygoteInit.java:301) E Zygote : at com.android.internal.os.ZygoteInit.preload(ZygoteInit.java:140) E Zygote : at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:889) E Zygote : Caused by: java.lang.IllegalStateException: overlay me.linjw.demo.overlay.overlay not present in partition /vendor/overlay in /vendor/overlay/config/config.xml at START_TAG (empty) <overlay package='me.linjw.demo.overlay.overlay' enabled='true'>@2:66 in java.io.FileReader@583e450 E Zygote : at com.android.internal.content.om.OverlayConfigParser.parseOverlay(OverlayConfigParser.java:372) E Zygote : at com.android.internal.content.om.OverlayConfigParser.readConfigFile(OverlayConfigParser.java:249) E Zygote : at com.android.internal.content.om.OverlayConfigParser.getConfigurations(OverlayConfigParser.java:220) E Zygote : at com.android.internal.content.om.OverlayConfig.<init>(OverlayConfig.java:152) E Zygote : at com.android.internal.content.om.OverlayConfig.getZygoteInstance(OverlayConfig.java:218) E Zygote : at android.content.res.AssetManager.createSystemAssetsInZygoteLocked(AssetManager.java:252) E Zygote : at android.content.res.AssetManager.getSystem(AssetManager.java:276) E Zygote : at android.content.res.Resources.<init>(Resources.java:347) E Zygote : at android.content.res.Resources.getSystem(Resources.java:236) E Zygote : at com.android.internal.telephony.GsmAlphabet.enableCountrySpecificEncodings(GsmAlphabet.java:1090) E Zygote : at com.android.internal.telephony.GsmAlphabet.<clinit>(GsmAlphabet.java:1495) E Zygote : ... 5 more
// https://cs.android.com/android/platform/superproject/+/android-13.0.0_r74:frameworks/base/core/java/android/content/pm/PackagePartitions.java /** * The list of all system partitions that may contain packages in ascending order of * specificity (the more generic, the earlier in the list a partition appears). */ privatestaticfinal ArrayList<SystemPartition> SYSTEM_PARTITIONS = newArrayList<>(Arrays.asList( newSystemPartition(Environment.getRootDirectory(), PARTITION_SYSTEM, Partition.PARTITION_NAME_SYSTEM, true/* containsPrivApp */, false/* containsOverlay */), newSystemPartition(Environment.getVendorDirectory(), PARTITION_VENDOR, Partition.PARTITION_NAME_VENDOR, true/* containsPrivApp */, true/* containsOverlay */), newSystemPartition(Environment.getOdmDirectory(), PARTITION_ODM, Partition.PARTITION_NAME_ODM, true/* containsPrivApp */, true/* containsOverlay */), newSystemPartition(Environment.getOemDirectory(), PARTITION_OEM, Partition.PARTITION_NAME_OEM, false/* containsPrivApp */, true/* containsOverlay */), newSystemPartition(Environment.getProductDirectory(), PARTITION_PRODUCT, Partition.PARTITION_NAME_PRODUCT, true/* containsPrivApp */, true/* containsOverlay */), newSystemPartition(Environment.getSystemExtDirectory(), PARTITION_SYSTEM_EXT, Partition.PARTITION_NAME_SYSTEM_EXT, true/* containsPrivApp */, true/* containsOverlay */)));
/** * Returns a list in which the elements are products of the specified function applied to the * list of {@link #SYSTEM_PARTITIONS} in increasing specificity order. */ publicstatic <T> ArrayList<T> getOrderedPartitions( @NonNull Function<SystemPartition, T> producer) { final ArrayList<T> out = newArrayList<>(); for (inti=0, n = SYSTEM_PARTITIONS.size(); i < n; i++) { finalTv= producer.apply(SYSTEM_PARTITIONS.get(i)); if (v != null) { out.add(v); } } return out; }
/** * An internal state used as the initial state of an overlay. OverlayInfo * objects exposed outside the {@link * com.android.server.om.OverlayManagerService} should never have this * state. * * @hide */ publicstaticfinalintSTATE_UNKNOWN= -1;
/** * The target package of the overlay is not installed. The overlay cannot be enabled. * * @hide */ publicstaticfinalintSTATE_MISSING_TARGET=0;
/** * Creation of idmap file failed (e.g. no matching resources). The overlay * cannot be enabled. * * @hide */ publicstaticfinalintSTATE_NO_IDMAP=1;
/** * The overlay is currently disabled. It can be enabled. * * @see IOverlayManager#setEnabled * @hide */ publicstaticfinalintSTATE_DISABLED=2;
/** * The overlay is currently enabled. It can be disabled. * * @see IOverlayManager#setEnabled * @hide */ publicstaticfinalintSTATE_ENABLED=3;
/** * The target package is currently being upgraded or downgraded; the state * will change once the package installation has finished. * @hide * * @deprecated No longer used. Caused invalid transitions from enabled -> upgrading -> enabled, * where an update is propagated when nothing has changed. Can occur during --dont-kill * installs when code and resources are hot swapped and the Activity should not be relaunched. * In all other cases, the process and therefore Activity is killed, so the state loop is * irrelevant. */ @Deprecated publicstaticfinalintSTATE_TARGET_IS_BEING_REPLACED=4;
/** * The overlay package is currently being upgraded or downgraded; the state * will change once the package installation has finished. * @hide */ publicstaticfinalintSTATE_OVERLAY_IS_BEING_REPLACED=5;
/** * The overlay package is currently enabled because it is marked as * 'immutable'. It cannot be disabled but will change state if for instance * its target is uninstalled. * @hide */ @Deprecated publicstaticfinalintSTATE_ENABLED_IMMUTABLE=6;