Jump to content
Hans♫

Delphi 12.3 Android app fails on ChromeOS - same app built with Delphi 12.2 didn't fail

Recommended Posts

We just released an update to our Android app, which is now built with Delphi 12.3 (and API level 35). Unfortunately it looks like it wont run on most Chromebooks with ChromeOS (it works fine on Android). The previous version built with Delphi 12.2 did work on ChromeOS.

We can reproduce it on our own Chromebook and have exported a log from this device (see attached). One line in the log attracts my attention:

 

09-08 14:16:27.109 10076  2581  2581 W NativeActivity: NativeActivity LoadNativeLibrary("/data/app/~~E-VhoBM1TL6eFtEyKe6GJw==/com.MYAPP.android-_-VEr2wdpUe0s69SzjhivA==/split_config.arm64_v8a.apk!/lib/arm64-v8a/libMYAPPFMX.so") failed: dlopen failed: library "libz.so" needed or dlopened by "/data/app/~~E-VhoBM1TL6eFtEyKe6GJw==/com.MYAPP.android-_-VEr2wdpUe0s69SzjhivA==/split_config.arm64_v8a.apk!/lib/arm64-v8a/libMYAPPFMX.so" is not accessible for the namespace "(default)"
 

Any ideas? - Did Delphi 12.3 change the way it links "libz.so" on Android?

 

arc-bugreport_MYAPP.txt

Share this post


Link to post
5 hours ago, Hans♫ said:

Any ideas? - Did Delphi 12.3 change the way it links "libz.so" on Android?

Just checked System.ZLib from 12.2 against 12.3 - no changes there. It would be odd if ChromeOS or Chromebooks left out this library, so perhaps it is failing to load due to an incompatibility?

 

This, from Google:

"We are not aware of any issues with public API, but struct layout in particular has changed over time and will likely continue to do so. Note that new API in later zlib versions will obviously not be available on OS versions that predate the API. It is possible to avoid all these problems (at the cost of increased APK size) by always using the static libz.a instead of libz.so."

Share this post


Link to post

Thank you Dave. I see that in "System.ZLib.pas" it defines all functions like this, which did not change from Delphi 12.2 to 12.3:

libzlib = '/usr/lib/libz.so';
function compress(dest: PByte; var destLen: LongWord; source: PByte; sourceLen: LongWord): Integer; cdecl; external {$IFDEF POSIX} libzlib name _PU + 'compress'{$ENDIF};

Since its the same Chromebook that does work with a Delphi 12.2 build, the version of libz.so did not change either, so I think that the note  you added from Google could not be the problem.

 

The strange thing is that everything works fine on real Android devices. Its only ChromeOS running Android apps that has this problem.

 

Something must have changed with Delphi 12.3 that cause this error.

The API level did change to 35 with the new Delphi version, and probably a lot of internal tweaks to load the binary built with Delphi? - and maybe also the way it internally loads dynamic libraries?

Edited by Hans♫

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×