2

I know there are tons of questions about this, but I have tried many possible solutions to no avail. I believe the "Out of space" error is misleading...

I have a problem: I cannot install any .apk file no matter what I try... I can install apps using Play Store though. When I tap on an APK file in any file explorer, Android Package Installer launches. I tap the INSTALL button but I always got the following error:

Out of space {AnyAPKApp} couldn't be installed. Free up some space and try again.

I have plenty of space, but even a tiny 248 KB APK won't install with the same argument...

This is the only problem I have with the ROM and it is very frustrating... First, the details of my case:

  • Device: Samsung Galaxy Grand Prime+ SM-G532M, alias Galaxy J2 Prime (Xtreme detects my device as Model Number: SM-G950F)
  • Android: 6.0.1
  • ROM: Xtreme Ultimate V6.0 (15.07.2018)
  • TWRP: 3.0.2-0
  • Magisk: v17.1
  • Magisk Manager: 6.0.1 (151)
  • Storage: Adoptable
  • Internal storage: 7.02 GB used of 8.00 GB
  • SD card: 9.09 GB used of 14.70 GB
  • Root Essentials "View storage used": 9759/15787 MB (62%)
  • DiskUsage analysis: /system = 2.94 GiB; Free space 1.61 GiB

I've already done my homework and tried all of the following to no avail:

  1. Move all movable apps to SD
  2. Enable Adoptable storage
  3. Wipe Dalvik / ART Cache and Cache partitions with TWRP
  4. Full clean with SD Maid PRO
  5. Force move apps to SD using SD Maid PRO
  6. Uninstall Google Play Services and Google Play Store updates
  7. Overcome unauthorized device issue while using ADB
  8. Trying to install APK using ADB (e.g. adb install someApp.apk). I got: Failure [INSTALL_FAILED_INSUFFICIENT_STORAGE]
  9. Delete /data/log contents as suggested here
  10. Attempt to install in Safe Mode
  11. Using Termux and the df command, I got the following output and there is free space in each partition: <code>df</code> output
  12. Using pm install test.apk in a terminal emulator (Termux) I got [INSTALL_FAILED_INVALID_URI]. Using full path pm install /storage/emulated/0/Download/test.apk I got the same error: Failure [INSTALL_FAILED_INSUFFICIENT_STORAGE]

The problem still remains. I think this is not really related to the full storage device error, I have plenty and the error seems misleading. It has to be something else... I gave as much info as I thought it was useful. If more is needed, just tell me to share it.

I hope you can give me some advice to try to overcome this annoying issue.

P.S. I'll add more attempts to my list as I try them.

3
  • Curious if your SD card is partitioned? Also with which file system format it has (ntfs, fat32, etc..)?
    – CzarMatt
    Dec 27, 2018 at 18:26
  • 1
    @CzarMatt If I understand correctly adb shell mount output, it is sdcardfs, right? /mnt/expand/d02821cc-6e14-4015-ae94-1bbd69368dce/media /mnt/runtime/default/emulated sdcardfs rw
    – Metafaniel
    Dec 27, 2018 at 21:49
  • @CzarMatt I followed the steps of Root Essentials to use my SD card as Adoptable Storage if that's meaningful.
    – Metafaniel
    Dec 27, 2018 at 21:51

1 Answer 1

0

What are the permissions on the directories where the software will be installed (and the directories leading up to the installation directory)?

Do the application(s) you are using to install the APK's have the install software right denied? With LineageOS, this is handled by Privacy Guard. I use X-plore: try installing it (from Play Store) and see if you can install with it. With LineageOS, you would be prompted to allow X-plore to install software. (It may request root privilege too.) Perhaps you inadvertently denied the privilege earlier to your other programs (though you mention trying with adb)?

My suggestion is to backup and try reformatting the sdcard (or better yet use a new one) with the default filesystem using the built-in system utility. On my phone, this is handled by System Preferences -> Storage (I believe). Don't make any further changes, and try to install the APK's.

2
  • Thanks for your kind help. About the permissions, I download the APK files with Chrome browser to /storage/emulated/0/Download. According to SD Maid Pro, the permissions on the directory are rwxrwx--x (/0 as well. /emulated has rwx--x--x and /storage has rwxr-xr-x) which seems fine to me. All downloads including APK files have these permissions: rw-rw---- I even tried to set 777 permissions to an APK and install it with adb to test , but nothing. I'll add this to my attempt list. More comments to come about your answer/suggestions...
    – Metafaniel
    Dec 28, 2018 at 15:39
  • About the applications used to install, I've tried with the following (all with root privilegies): Root Essentials (Root Browser), SD Maid PRO (Explorer), Total Commander and now _X-plore_All of them launch Android's Package Installer. I've also tried with adb install test.apkand nothing... Using pm install test.apk in a terminal emulator (Termux) I got [INSTALL_FAILED_INVALID_URI]
    – Metafaniel
    Dec 28, 2018 at 16:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .