diff --git a/doc/Envs.md b/doc/Envs.md index 1c89195c..5d0356cf 100644 --- a/doc/Envs.md +++ b/doc/Envs.md @@ -10,3 +10,4 @@ this is useful for saving screen space on phone screens, as well as working arou `ATL_FORCE_FULLSCREEN` - if set, will fullscreen the app window on start; this is useful for saving screen space on phone screens, as well as making apps that can't handle arbitrary screen dimensions for some reason happier `ATL_SKIP_NATIVES_EXTRACTION` - if set, natives will not be extracted automatically; it's already possible to replace a native lib, but removing it entirely will normally result in it getting re-extracted, which may not be what you want `ATL_DIRECT_EGL` - if set, SurfaceViews will be mapped directly to a Wayland subsurface or X11 window instead of using GtkGraphicsOffload. This might be beneficial for CPU usage and rendering latency, but does not allow the application to render other Views ontop of the SurfaceView. +`ATL_VALIDATE_CERTS` - if set, the signing certificate of the APK file will be validated on startup. This adds a few extra seconds to the startup time for large APKs. diff --git a/src/api-impl/android/content/pm/PackageParser.java b/src/api-impl/android/content/pm/PackageParser.java index 1cf56b60..77e8ea39 100644 --- a/src/api-impl/android/content/pm/PackageParser.java +++ b/src/api-impl/android/content/pm/PackageParser.java @@ -629,7 +629,7 @@ public class PackageParser { Certificate[] certs = null; - if ((flags & PARSE_IS_SYSTEM) != 0) { + if ((flags & PARSE_IS_SYSTEM) != 0 || System.getenv("ATL_VALIDATE_CERTS") == null) { // If this package comes from the system image, then we // can trust it... we'll just use the AndroidManifest.xml // to retrieve its signatures, not validating all of the