PackageParser: don't validate signing certificate by default

This significantly speeds up startup time with larger APK files.

NewPipe launches 0.5 s faster.
WhatsApp launches 3.5 s faster.
This commit is contained in:
Julian Winkler
2025-10-08 16:04:33 +02:00
parent 5f22164d82
commit d3c0a09331
2 changed files with 2 additions and 1 deletions

View File

@@ -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_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_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_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.

View File

@@ -629,7 +629,7 @@ public class PackageParser {
Certificate[] certs = null; 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 // If this package comes from the system image, then we
// can trust it... we'll just use the AndroidManifest.xml // can trust it... we'll just use the AndroidManifest.xml
// to retrieve its signatures, not validating all of the // to retrieve its signatures, not validating all of the