When I try to install an apk file through the monkeyrunner Python script, getting the error INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113. How can I resolve this issue?

Detail of the virtual device is listed as follows:

  • CPU/ARM: x86
  • API Level: 24
  • Target: Android 7.0 (Google Play)
  • You are trying to install an arm apk to a x86 (or x64) architecture which has missing arm libraries (libhoudini.so etc) , thus you are getting the error. – xavier_fakerat Jul 15 '17 at 8:21
  • So how can I install those missing libraries? @xavier_fakerat – talha06 Jul 15 '17 at 8:38

As mentioned here: INSTALL_FAILED_NO_MATCHING_ABIS when install apk:

INSTALL_FAILED_NO_MATCHING_ABIS is when you are trying to install an app that has native libraries and it doesn't have a native library for your cpu architecture. For example if you compiled an app for armv7 and are trying to install it on an emulator that uses the Intel architecture instead it will not work

To get around this, you need to get these libraries in /system/lib.

This is possible though the use of libhoudini.so libraries. You can root your emulator and push the libraries through adb into /system/lib.

You can find the libraries here and the instructions are given as well.

Generally you need to do the following:

  • Download a compressed package from the internet and extract it to / system / lib / arm (or / system / lib64, depending on whether the platform is 32-bit or 64-bit). x86 houdini libraries download link

  • Second, to the directory /proc/sys/ fs/ binfmt_misc under the name of "register" in the file written in a string of strings to tell the Linux kernel, all use the ARM instruction set executable and dynamic library ELF. The file is opened with the houdini program, and all the ARM64 instruction set executable and dynamic library ELF files are opened with the houdini64 program (on the binfmt_misc detailed explanation, you can refer to Linux how to specify a type of program with a specific program to open (through binfmt_misc )

  • You can remount adb as root and directly push the arm folder (with houdini libraries) to the /system/lib folder like so:

    adb -e push C:\Users\User25\Desktop\houdini\arm /system/lib

    (Remember to set the correct path and appropriate permissions)

  • Another second option that I tried personally is to get an avd image with native arm bridge enabled already (in case you encounter problems with rooting your emulator)

  • Preferably get the avd of RemixOS player or Genymotion and extract the system.img, userdata.img, ramdisk.img and other files like build.prop etc and place the in the system images folder of your emulator (e.g if the downloaded images are for an x86 avd, copy them to the system-images dir of your emulator and paste them in x86 folder of the correct api level - something like \system-images\android-26\google_apis\x86 and create an avd based on that (this is useful for just testing you arm apps on on your x86 avd)

    You should get over this error, if everything fails then just use an emulator with arm translation tools.

  • Note: the linked houdini file is just a tar file, not .tar.gz (despite the name). Use "tar xvf file" to untar. – C-Otto Dec 27 '20 at 20:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.