android-gpuimage icon indicating copy to clipboard operation
android-gpuimage copied to clipboard

Not compatible with 16 KB PageSize

Open house0000 opened this issue 6 months ago • 15 comments

With new android studio (Android Studio Narwhal Feature Drop | 2025.1.2 Canary 5), building my app causes a caution that says:

APK app-production-debug.apk is not compatible with 16 KB devices. Some libraries have LOAD segments not aligned at 16 KB boundaries: lib/arm64-v8a/libyuv-decoder.so Starting November 1st, 2025, all new apps and updates to existing apps submitted to Google Play and targeting Android 15+ devices must support 16 KB page sizes. For more information about compatibility with 16 KB devices, visit developer.android.com/16kb-page-size.

I found this library uses libyuv-decoder.so, which is not compatible with 16 KB page sizes as mentioned above. Is there a plan on making this library compatible with 16 KB page size? Google says the deadline is 2025/11/1.

house0000 avatar Jun 26 '25 09:06 house0000

I'm working on this too.

linversion avatar Jul 01 '25 09:07 linversion

@linversion are you working on addressing this problem? is there any timeline you expected this to be published? thanks a lot in advance.

maikelvdh avatar Jul 15 '25 10:07 maikelvdh

@linversion are you working on addressing this problem? is there any timeline you expected this to be published? thanks a lot in advance.

@maikelvdh check my forked repository: https://github.com/linversion/android-gpuimage

linversion avatar Jul 18 '25 10:07 linversion

@linversion how i can use your version gpuimage ?

re-LIF3 avatar Jul 20 '25 06:07 re-LIF3

@linversion how i can use your version gpuimage ?

@maikelvdh @re-LIF3 I already published a release aar

linversion avatar Jul 21 '25 02:07 linversion

In my case, I solved the problem by creating my own OpenGL ES filter library. (It only includes the features necessary for my own Android app, but here it is: https://github.com/house0000/PS_GPU_Android)

So, I will leave this issue. But this issue should be kept open because the problem is not resolved as long as libyuv-decoder.so exists.

I think the solution would be to create a Pull Request that either comments out the functionality handled by libyuv-decoder.so (probably color space conversion) or replaces it with different code. Would anyone be able to create one? I hope so.

house0000 avatar Jul 24 '25 21:07 house0000

@linversion how i can use your version gpuimage ?

@maikelvdh @re-LIF3 I already published a release aar

@linversion it shows checkout release v2.2.0 but the mavencentral url still shows 2.1.0 as latest version how we can download aar? do we have to import as module?

soorajlh avatar Jul 28 '25 05:07 soorajlh

@linversion how i can use your version gpuimage ?

@maikelvdh @re-LIF3 I already published a release aar

@linversion it shows checkout release v2.2.0 but the mavencentral url still shows 2.1.0 as latest version how we can download aar? do we have to import as module?

@soorajlh https://github.com/linversion/android-gpuimage/releases/tag/v2.2.0

linversion avatar Jul 28 '25 06:07 linversion

The solution to 16KB is very easy, you just need to update all the libraries implemented in this and you just have to set 16KB page size in the CMakeList.txt file and the issue will be resolved. I'm trying to recreate this whole library in kotlin where I run into this problem when I added c++ files in my project, than I added the following line in the CMakeList.txt to resolve the issue

set(CMAKE_ANDROID_ARM64_PAGE_SIZE 16384)

adnanaslamdev avatar Aug 22 '25 06:08 adnanaslamdev

@linversion I am using jetpack.io

I have already added this:

implementation 'com.github.linversion:android-gpuimage:2.2.0'

but gradle can not resolve

ice6 avatar Sep 29 '25 10:09 ice6

@linversion I am using jetpack.io

I have already added this:

implementation 'com.github.linversion:android-gpuimage:2.2.0'

but gradle can not resolve @ice6 @soorajlh @maikelvdh @house0000 https://github.com/linversion/android-gpuimage/releases/download/v2.2.0/android-gpuimage-2.2.0.aar

linversion avatar Sep 30 '25 03:09 linversion

@linversion thank you.

ice6 avatar Sep 30 '25 04:09 ice6

Try out my fork

  • https://central.sonatype.com/artifact/io.github.goooler.gpuimage/gpuimage
  • https://github.com/Goooler/android-gpuimage

Goooler avatar Oct 16 '25 09:10 Goooler

download this library add to your progect and find CMake file, add this line to solve this problem:

target_link_options(yuv-decoder PRIVATE -Wl,-z,max-page-size=0x4000)

Harbor2 avatar Nov 10 '25 03:11 Harbor2

target_link_options(yuv-decoder PRIVATE -Wl,-z,max-page-size=0x4000)

That will make all targets support 16 KB page size, including armeabi-v7a and x86. I believe you need

android {
    defaultConfig {
        externalNativeBuild {
            cmake {
                // 16 KB page sizes.
                arguments '-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON'
            }
        }
    }
}

See https://github.com/Goooler/android-gpuimage/pull/9.

Goooler avatar Nov 10 '25 03:11 Goooler