You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
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:
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user