question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

APKs in /data/app cause INSTALL_FAILED_INSUFFICIENT_STORAGE

See original GitHub issue

This is related to: https://github.com/appium/appium/issues/13970

I believe there needs to be another folder/file that needs to be deleted. See https://stackoverflow.com/questions/4709137/solution-to-install-failed-insufficient-storage-error-on-android

This is the only thing that helped me with my issue. Everytime I quit the driver I am deleting all APKs of my package in /data/app/

List<String> args = Arrays.asList(
		"-rf",
		" /data/app/[package_name]-*"
);
Map<String, Object> cmd = ImmutableMap.of(
		"command", "rm",
		"args", args
);
this.executeScript("mobile: shell", cmd);

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
mykola-mokhnachcommented, Oct 15, 2020

It looks like this behaviour is caused by a system bug in Android. We’ve investigated and reported it. Let see if there is any feedback from devs

1reaction
Jiurong-Yangcommented, Jun 16, 2020

@wulfihm Would this solution only work with simulator and rooted devices? For our devices this folder “/data/app” is protected (not even read permission). For Android OS 7,8,9 and 10

Read more comments on GitHub >

github_iconTop Results From Across the Web

Solution to INSTALL_FAILED_INSUFFICIENT_STORAGE ...
Which itself does not yet cause the update to fail, but it does cause there to be two APK files in /data/app ....
Read more >
How to Fix "Install Failed Insufficient Storage" errors? - PSPDFKit
Uninstall previous apps installed on the emulator to make room for the new app. Increase the internal storage size of your emulator via...
Read more >
Summary - EaseUS
Carefully follow the detailed guide to fix Android & SD card error INSTALL_FAILED_INSUFFICIENT_STORAGE without worrying about losing data.
Read more >
install failed insufficient storage error android emulator
Fix Android Emulator Error “INSTALL_FAILED_INSUFFICIENT_STORAGE”. ... time when an app is installed then the APK file is saved as /data/app/-1.apk (1.apk).
Read more >
Visible to Public - Issue Tracker
Package Manager returns INSTALL_FAILED_INSUFFICIENT_STORAGE when ample space is ... It is actually the extra /data/app-lib folder, left behind, not apk.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found