Categories: Apps

Get your apps ready for 16 KB page size devices



Posted by Yacine Rezgui – Developer Relations Engineer, Steven Moreland – Staff Software Engineer

Android is evolving to deliver even faster, more performant experiences. One key improvement is the adoption of a 16 KB memory page size. This change enables the operating system to manage memory more efficiently, leading to noticeable performance gains (5-10%) in both apps and games. We provided an in-depth technical explanation and highlighted the performance improvements in Adding 16 KB Page Size to Android.

To help you test your app on 16 KB devices, this functionality is available as a developer option on Google Pixel 8 and 9 devices, and Samsung devices will soon offer similar support, as well as Xiaomi, vivo, and other Android OEMs.

To ensure compatibility with 16 KB devices, apps that utilize native code, either directly or through libraries or SDKs, might require rebuilding. However, the transition is significantly easier than the previous shift from 32-bit to 64-bit architecture. This article will guide you through the necessary steps to prepare your apps for the upcoming devices. The next generation of devices is on its way, with the first models supporting 16 KB page sizes expected to arrive in a couple of years.

Getting ready for 16 KB: SDK developers

If you develop your own SDKs and libraries, we encourage you to update them to be 16 KB page size compatible and test them on 16 KB devices as soon as possible. This will give app developers ample time to incorporate the necessary changes. Registering with Play SDK Console is a great way to ensure you receive advanced notices like these in the future and in a timely manner.

Getting ready for 16 KB: app developers with no native code

Apps written in and with dependencies entirely in Kotlin or the Java programming languages will work as-is!

Getting ready for 16 KB: app developers with native code

To check if your app has native code, you can utilize tools like APK Analyzer in Android Studio. However, the only way to ensure app compatibility is to test.

Rebuild your app

To ensure your app works on devices with a 16 KB page size, follow these steps:

      1. Upgrade your tools: Start by upgrading to Android Gradle Plugin (AGP) 8.5.1 or higher. These updated tools incorporate the necessary 16 KB page size configuration for your App Bundle and the APKs generated from it using bundletool.

      2. Align your native code: If your app includes native code, use NDK version r28 or higher, or rebuild it with 16 KB page size alignment. You should also ensure that your native code does not rely on or hardcode the value of PAGE_SIZE.

      3. Update SDKs and libraries: Confirm that all SDKs and libraries used in your app are compatible with 16 KB page size. If necessary, contact the SDK or library developers for updated versions.

Test your app in 16 KB mode

To make sure your application does not assume the page size to be 4 KB anywhere, test it with a 16 KB page size emulator or virtual device in addition to how you have been testing (with a 4 KB page size). This helps identify and resolve any compatibility issues from the move to 16 KB page sizes. You can also test on physical devices with the developer option available on Pixel 8, 8a, and 8 Pro starting with the Android 15 QPR1 and Pixel 9, 9 Pro, 9 Pro XL in the Android 15 QPR2 Beta 2, with more devices on the way.

The Future is Faster and More Efficient

The move to 16 KB page size benefits the Android ecosystem. It unlocks performance improvements, paves the way for future innovations, and provides users with smoother and richer app experiences.

We’ll continue to provide updates and resources to help you through this transition. Start preparing your apps today to ensure you’re ready for the future of Android!



Source link

Washington Digital News

Share
Published by
Washington Digital News

Recent Posts

DOC finalizes semiconductor awards totaling nearly $7 billion for Samsung, Texas Instruments and Amkor

The US Department of Commerce on Friday announced its awards for Samsung, Texas Instruments and…

4 hours ago

How to Make Money As A Pet Sitter

Are you an animal lover? If so, you might be interested in learning how to…

4 hours ago

‘She is single and has a low-wage job’: I want to give my daughter, who is in her 30s, $50,000 for retirement. What could go wrong?

“She can invest aggressively, as she has over two decades to see her principal grow.”…

5 hours ago

An Alternative Perspective on PCE Deflator Inflation: Instantaneous Inflation

PCE deflator below 2%: Figure 1: Instantaneous inflation (T=12, a=4) for PCE deflator (black), for…

6 hours ago

No, BlackRock Can't Change Bitcoin

Recently, BlackRock released an educational video explaining Bitcoin, which I thought was great—it's amazing to…

6 hours ago

Amazon NYC warehouse targeted by Teamsters as strike expands

Workers at one of Amazon’s air cargo hubs, in San Bernadino, California, were also joining…

6 hours ago