No space left on device when I install a apk use adb - android

I have started an Android emulator, I have started getting the following error when i use adb to install a apk and this apk's size is only 1M.
There is enough space in data partition.
Can anyone suggest a reason this might be happening?

Related

Apk is disappearing after moving to system parition

I'm trying to install my apk on system partition. I've rooted device and here are the steps I'm following,
adb install -d -r <apk_name>
Now apk gets installed in /data/app/<apk_name>/
Move all contents present from /data/app/<apk_name> to /system/priv-app/<apk_name>
Clear the contents within /data/app/<apk_name> and reboot the device
Post reboot not able to find my apk under adb shell pm list packages | grep <apk_name>
I'm trying to read and write value to secure setting which is asking my app to be in system partition. When I'm trying to move I'm facing this issue. I could not find something suspicious from logs while installing the apk.
Tried all possible solutions listed here (Android 5.0/Lollipop: Force rescan of /system/priv-app) but none didn't help.
Any help to debug this issue would be really helpful.

android install failure - "cmd: Can't find service: package" (not emulator)

I'm trying to test some apks on a HiKey 960 with Android (AOSP), but whenever I try to install any apk I get:
adb: failed to install whatever.apk: cmd: Can't find service: package
This is with either
adb install -t whatever.apk
or through Android Studio 4.0
Almost all searches for this error suggest I cold boot my emulator, but I'm not using an emulator...
The only non-emulator result came up with it being a lack of space, but the HiKey is virtually empty, and has 3.3GB free, and my various trial apks are relatively small.
Has anyone struck this error before without an emulator, and have any ideas on what the problem might be? I'd like to avoid re-installing my whole HiKey if I can...
From feedback elsewhere I eventually found someone who'd had the same problem. The 'package' service doesn't startup when booted, and the only fix was to re-image the HiKey device.
So that's what I'm doing.
I had the same problem with Redmi Note 4 and after rebooting phone the error was gone.

Android Studio 2.1 Preview1 Gives No space left on device Error

I updated my android studio to 2.1 preview version, after that it's giving
No space left on device Error.
How to resolve this issue?
For me, this was due to my /tmp partition being too small. I got these errors both when trying to install a large device image (Android 7.1) and when trying to start an AVD. It seems that Android Studio will try to unzip big files in /tmp.
To increase the size of /tmp on Linux, set the size= parameter in /etc/fstab, e.g. on my Ubuntu I now have:
tmpfs /tmp tmpfs defaults,size=3g 0 0
A reboot is needed to apply that change.
Note that tmpfs is entirely held in RAM so you should probably undo this change after the installation of these components.
TL;DR(This happens if there is no free space in /tmp)
To increase the size of /tmp just type the below command in terminal
$ sudo mount -o remount,size=8G /tmp/
P.S.:- 8G is an arbitary value, you can set it to any size as far as its enough to done the job.
You can get rid of this error by restarting Android studio/your system.
To solve this issue, do not update your SDK directly from popup you get when there is any update available, instead
Goto -> SDK Platforms window,
or Goto File->Settings->Appearance and Behavior->System Settings->Android SDK
In that opened window you will see Launch Standalone SDK Manager
Click on that it will open another window,update your SDK from there.
You can also solve this by using TMPDIR=pathtodirectorytobeusedastmp before launching studio.sh from terminal.
eg: TMPDIR=/HOME/user/downloads studio.sh
P.S. This only applies if you are using any of the linux distributions.
What device are we talking about here? Is this for your emulator?
If so, try the following methods:
Try clearing the cache on the device. Cache storage can take up some unneeded space, especially on an emulator device.
In a console window, type the following commands.
android list avd
emulator -avd My_Avd_Name -wipe-data
What this will do is wipe the data for the emulator you choose to clear.
Create a new virtual device, and allocate more space to it. I'm not sure if you can edit your existing one add just add more space to it or not.
Resources:
StackOverflow: No space left on device
Android Emulator: No space left on device

ADB - failure of installing apk on android device that has 0.00b internal storage while it has free space?

I have changed my I9070 firmware and the Internal Storage 0.00B and can't install apps and save files.
In order to fix the problem I have tried to install busy box but not succeeded.
c:\adb>adb devices
List of devices attached
C074114C31720D21CD73F6306E34174 device
c:\adb>adb shell
$ su
# su
# exit
# exit
$ exit
c:\adb>adb install busybox.apk
3264 KB/s (2679743 bytes in 0.801s)
pkg: /data/local/tmp/busybox.apk
Failure [INSTALL_FAILED_INSUFFICIENT_STORAGE]
rm failed for -f, No such file or directory
Is there any help regarding this or other option?
As the error states it didnot have enough memory for installation either increase memory or delete some data and then try.
Thank you
You cannot install any app with 0B.
Now to your issue im not sure why the internal memory is 0B. either you format your device and see,or restart and check if it changes
Fix From Another Post
I found a solution, hopefully this can help someone in the future
The problem was i installed busybox using an installer which causing some file discrepancies.
To fix it :
1. Install Android Terminal Emulator, this app can be installed even if storage shows full. If you cant install the terminal use Uniflashv2 (open uniflashv2 and connect your device with the debug usb on, go to rom modding, then file manager)
copy /system/xbin/busybox to /system/bin, if busybox is installed the code is "busybox cp /system/xbin/busybox to /system/bin"
power off then power on (reboot)
When I did the above, all my previous apps and setting came back to normal
Source

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.
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
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:
Connect my device to my computer with adb, rooted etc
I started root by typing adb root
Changed the default install location to internal by going adb shell pm set-install-location 1 in console.
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.

Categories

Resources