Installation Issue: Failure copying native libraries [errorCode=-113]

38 views
Skip to first unread message

Morne Galanos

unread,
Sep 12, 2019, 8:33:15 AM9/12/19
to CodenameOne Discussions

Good Day,

 

Recently we started noticing that our Applications (that used to install fine), are unable to install on most android devices.

After some investigation we discovered that the problem seems to be related to native libraries we use (these are used for printer integration) or at least how they are packaged in the final APK.

 

The following error can be seen when debugging the installation process:

2019-09-12 13:39:55.858 2058-2150/system_process W/NativeHelper: Failure copying native libraries [errorCode=-113]

2019-09-12 13:39:55.858 2058-2150/system_process E/PackageInstallerSession: Commit of session 1943415760 failed: Failed to extract native libraries, res=-113


The installation process was debugged using the Nexus 5X API 29 x86 Emulator (from Android Studio) with the following environment:

Model
Android SDK built for x86

Serial

EMULATOR29X1X12X0

Version
10

 

More about our Environment:

We use Netbeans as our IDE, on Windows Platforms, using the built-in CN1 Emulator and the Nexus 5X API 29 x86 Emulator (from Android Studio). Physical phones tested where a Samsung Galaxy S9+ and a Huawei P20 Lite.

 

More about our Application:
We have an AAR library (TPSLibrary.aar) containing .so native libraries in the jni/armabi folder - Library will be attached (update : attachment not working)

This AAR library is then included in our CN1 library (PrinterLibraryCN1.cn1lib) for Printing - Library will be attached (update : attachment not working)

Our PrinterLibrary is, inturn, included in our main Application (BankingMobile.apk) - Test Apk will be attached (update : attachment not working)

 

Previously, this setup installed perfectly and ran on all devices we came across.
However, recently we have not been able to install our Application on most devices I could find (including a Samsung Galaxy S9+ and a Huawei P20 Lite), due to this presumed library issue.

 

Has something changed in Android itself causing incompatibility? Has something changed on CN1 side that might cause this? Are we packaging our project incorrectly?
I assume it has to do with armabi now being armabi-v7a or something similar.

 

Assistance regarding this matter will be greatly appreciated.

Kind Regards,
Morné

Steve Hannah

unread,
Sep 12, 2019, 8:39:21 AM9/12/19
to codenameone...@googlegroups.com
Please file an issue in the issue tracker.  I think we may need to zipalign the apk (per https://github.com/microg/android_packages_apps_GmsCore/issues/280), but will need to investigate.

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/4ceaae5e-7d14-4ce8-a43a-d75dc861ec79%40googlegroups.com.


--
Steve Hannah
Software Developer
Codename One

Shai Almog

unread,
Sep 12, 2019, 10:33:12 PM9/12/19
to CodenameOne Discussions
AFAIK we sign as part of the gradle process so it should zipalign correctly. I think this might be related to the API level 28 migration. Try building for 26 to debug locally and see if the problem goes away. If so we need to check how the native libraries were impacted by 28.

Morne Galanos

unread,
Sep 18, 2019, 4:26:28 AM9/18/19
to CodenameOne Discussions
Reply all
Reply to author
Forward
0 new messages