Starting March 27, 2025, we recommend using android-latest-release
instead of aosp-main
to build and contribute to AOSP. For more information, see Changes to AOSP.
Enable 16 KB backcompat option
Stay organized with collections
Save and categorize content based on your preferences.
16 KB toggle
lets you to run a device with a 16 KB kernel. The 16 KB backcompat
option is available when a device is running with a 16 KB kernel. The
package manager runs an app in 16 KB backcompat mode if the app has ELF
files (with an .so
extension) with a LOAD segment alignment of 4 KB, or
if the zipped APK has uncompressed ELF files that are 4 KB zip aligned. If
the package manager has enabled 16 KB backcompat mode for an app, the app
displays a warning when it's first launched saying that it's running in
16 KB backcompat mode.
Figure 1. Warning in page size compat mode.
16 KB backcompat mode allows some apps to work,
but for best reliability and stability, apps should still be 16 KB aligned.
To enable the 16 KB backcompat option, follow these instructions:
Follow the steps in Enable 16 KB toggle
to enable 16 KB toggle.
Enable 16 KB backcompat mode using any of the following methods:
Android runs apps in backcompat mode where it is needed. There are two
separate parts to backcompat that can be enabled independently: the
bionic.linker.16kb.app_compat.enabled
property controls how libraries
are loaded, and the pm.16kb.app_compat.disabled
property controls how
APKs are installed.
To force 16 KB backcompat on for every app on the device:
adb shell setprop bionic.linker.16kb.app_compat.enabled true
adb shell setprop pm.16kb.app_compat.disabled false
To force 16 KB backcompat off for every app on the device:
adb shell setprop bionic.linker.16kb.app_compat.enabled false
adb shell setprop pm.16kb.app_compat.disabled true
Set the android:pageSizeCompat
property to enabled
or disabled
to
turn on or off backcompat mode for a specific app in its
AndroidManifest.xml
. When this property is set, the app won't display
backcompat mode warnings when it launches.
On the app info page, under Advanced toggle the setting Run app with
page size compat mode to enable or disable the 16 KB backcompat mode
for specific app. This setting is only visible when the device is running with
16 KB page size.
Figure 2. Page size compat mode setting.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-07-02 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-02 UTC."],[],[],null,["# Enable 16 KB backcompat option\n\n[16 KB toggle](/docs/core/architecture/16kb-page-size/16kb-developer-option)\nlets you to run a device with a 16 KB kernel. The 16 KB backcompat\noption is available when a device is running with a 16 KB kernel. The\npackage manager runs an app in 16 KB backcompat mode if the app has ELF\nfiles (with an `.so` extension) with a LOAD segment alignment of 4 KB, or\nif the zipped APK has uncompressed ELF files that are 4 KB zip aligned. If\nthe package manager has enabled 16 KB backcompat mode for an app, the app\ndisplays a warning when it's first launched saying that it's running in\n16 KB backcompat mode.\n\n**Figure 1.** Warning in page size compat mode.\n\n16 KB backcompat mode allows some apps to work,\nbut for best reliability and stability, apps should still be 16 KB aligned.\n\nTo enable the 16 KB backcompat option, follow these instructions:\n\n1. Follow the steps in [Enable 16 KB toggle](/docs/core/architecture/16kb-page-size/16kb-developer-option)\n to enable 16 KB toggle.\n\n2. Enable 16 KB backcompat mode using any of the following methods:\n\n - Android runs apps in backcompat mode where it is needed. There are two\n separate parts to backcompat that can be enabled independently: the\n `bionic.linker.16kb.app_compat.enabled` property controls how libraries\n are loaded, and the `pm.16kb.app_compat.disabled` property controls how\n APKs are installed.\n\n - To force 16 KB backcompat on for every app on the device:\n\n adb shell setprop bionic.linker.16kb.app_compat.enabled true\n adb shell setprop pm.16kb.app_compat.disabled false\n\n - To force 16 KB backcompat off for every app on the device:\n\n adb shell setprop bionic.linker.16kb.app_compat.enabled false\n adb shell setprop pm.16kb.app_compat.disabled true\n\n - Set the `android:pageSizeCompat` property to `enabled` or `disabled` to\n turn on or off backcompat mode for a specific app in its\n `AndroidManifest.xml`. When this property is set, the app won't display\n backcompat mode warnings when it launches.\n\n - On the app info page, under **Advanced** toggle the setting **Run app with\n page size compat mode** to enable or disable the 16 KB backcompat mode\n for specific app. This setting is only visible when the device is running with\n 16 KB page size.\n\n **Figure 2.** Page size compat mode setting."]]