Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mehdiyari/f062aaf79297db0b9f9cc5294bb768e8 to your computer and use it in GitHub Desktop.
Save mehdiyari/f062aaf79297db0b9f9cc5294bb768e8 to your computer and use it in GitHub Desktop.
This gist is part of Zygote article by mehdiyari.
Function Description
preloadClasses Loads core Java classes listed in /system/etc/preloaded-classes, which are necessary for the system and apps.
cacheNonBootClasspathClassLoaders Loads libraries and classes commonly used by many apps but not part of the boot classpath, such as HIDL libraries, android.test.base, apache.http and certain AndroidX window manager components.
preloadResources Loads frequently used resources like drawables, colors, strings, and typed arrays so they can be shared across processes.
nativePreloadAppProcessHALs Loads HAL native libraries, including Audio HAL, Camera HAL, and other shared native components, to prepare them for sharing.
nativePreloadGraphicsDriver Loads native graphics drivers and libraries (e.g., OpenGL ES, Vulkan) required by the runtime and apps for rendering and GPU acceleration.
preloadSharedLibraries Preloads Android core native libraries and JNI graphics libraries, along with compiler runtime components.
preloadTextResources Loads text-related resources such as font caches.
HttpEngine.preLoad Preloads the HTTP engine to minimise load time during app startups.
prepareWebViewInZygote Performs WebView-related preparations, such as reserving memory space for the native WebView library to be loaded later.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment