John McKenzie
John McKenzie

Reputation: 420

Fail to install random APKs on Android

I'm running AICP on my Nexus 5, with android 5.1.1. I've been trying to install a few APKs I've found online, and I always get the same error which is Failure [INSTALL_FAILED_CONTAINER_ERROR]. I see other people online who have been able to install them, so I'm unsure why mine is failing. Although it only seems to happen with some APK files and not others. Is there anyway I can figure out more on why it would fail to install on my device?

If it helps I've tried running the APK files on phone and through ADB and same problem. I've tried running my own APK files (signed) and they work perfect. Unknown sources is definitely allowed. Also free space is about 6GB at the moment, so don't think thats the issue.

Upvotes: 0

Views: 1156

Answers (2)

John McKenzie
John McKenzie

Reputation: 420

I finally found a work around for the installation problem! Due to the help from varunkr, it does seem to be a storage problem from what I can tell. I was able to get it working though by changing the default install location of my device. Basically I had to do the following:

  1. Connect my device to my computer with adb, rooted etc
  2. I started root by typing adb root
  3. Changed the default install location to internal by going adb shell pm set-install-location 1 in console.
  4. Typed adb install applicationName.apk and everything work perfectly!!

I'm not sure if you want to place the default application installation back afterwards by placing it back to auto as follows: adb shell pm set-install-location 0

But by doing this I was able to get the application to install, and am happy I can get around it now.

Upvotes: 0

varunkr
varunkr

Reputation: 5552

This usually happens when android:installLocation is set to "preferExternal" and your AVD has a too small SD card. You have to increase the size of the SD card or change installLocation to auto in AndroidManifest.xml as below, but I think you can't that.

android:installLocation="preferExternal"

to

android:installLocation="auto"

Also please have a look at this

Upvotes: 1

Related Questions