[Q] ADB "No space left on device"

Search This thread

decoyjoe

Senior Member
Dec 30, 2009
67
1
Hey guys

So I am currently running 2.3.3 on my N1. I manually flashed the update from Here. I used the "Modified GRI40".

So after update, I noticed that my adfree wasn't working. Running the app, it tells me my host file is up to date. However, no ads are being blocked. Same after uninstalling and re-installing the app. So then I decided to try to copy the host file over manually using adb.

I run adb and get root prompt. Then I mount /system as rw using
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
It appears to work. So then I try copying the host file to /system/etc using
Code:
cp hosts /system/etc
Then I get the following error.
"write error: No space left on device"

But i do, over 30mb of free space.

So I don't know what the issue is. Im thinking that maybe /system isn't being mounted as RW so it is giving the error??

Any help would be much appreciated.

Thanks!
 

decoyjoe

Senior Member
Dec 30, 2009
67
1
Try doing a df -h from the terminal to verify that you do, indeed, have free space on /system as well as /data, as Jack_R1 mentioned.

Well looks like somehow I don't have any space left. I went to go download a terminal application from the market but it errored saying no space left.

So now I can't even install new apps.

However, under settings->storage it says I have 28MB of free space left.

Any ideas?


Sent from my Nexus One using XDA App
 

Jack_R1

Senior Member
Aug 9, 2009
4,365
962
Reboot, wipe Dalvik cache.
Go to Manage Applications, clear browser cache.
If it restores you some space - great, proceed with what codesplice suggested above.
If it doesn't - backup, wipe and reflash.
If no backup installed - you're out of luck.
 

codesplice

Senior Member
Jun 17, 2008
2,678
951
Huntsville, AL, USA
Since you seem to have adb functioning, you can run adb shell df -h to get a readout of your available space on your different file systems. This could help troubleshoot the issue.

Additionally, rather than doing a long manual "mount" command, you could simply do an adb remount to automagically remount all file systems in read/write mode.

The indication under Settings --> Storage indicates free space on /data, I believe, and gives no indication of /system (where you're trying to copy the hosts file).

Another thought (sorry this isn't really coherent at this point...): What if you were to remove your default hosts file and then push the new one?

Code:
> adb remount
Remount succeeded
> adb shell rm /system/etc/hosts
> adb push hosts /system/etc/hosts
> adb shell chmod 644 /system/etc/hosts
 
Last edited:

decoyjoe

Senior Member
Dec 30, 2009
67
1
Another thought (sorry this isn't really coherent at this point...): What if you were to remove your default hosts file and then push the new one?

Code:
> adb remount
Remount succeeded
> adb shell rm /system/etc/hosts
> adb push hosts /system/etc/hosts
> adb shell chmod 644 /system/etc/hosts

Well that's thing, that is why I started this thread because I was trying to use ADB to push a new hosts file but got the no space error. So I already tried that.

Sent from my Nexus One using XDA App
 

decoyjoe

Senior Member
Dec 30, 2009
67
1
Oh I see what you mean. But no I have not, let me give it a shot.


**Nope didn't work. I still got the same error, no space left on device.
 
Last edited:

Brownbay

Senior Member
Mar 5, 2010
72
4
Toronto
Since you seem to have adb functioning, you can run adb shell df -h to get a readout of your available space on your different file systems. This could help troubleshoot the issue.

Additionally, rather than doing a long manual "mount" command, you could simply do an adb remount to automagically remount all file systems in read/write mode.

The indication under Settings --> Storage indicates free space on /data, I believe, and gives no indication of /system (where you're trying to copy the hosts file).

Another thought (sorry this isn't really coherent at this point...): What if you were to remove your default hosts file and then push the new one?

Code:
> adb remount
Remount succeeded
> adb shell rm /system/etc/hosts
> adb push hosts /system/etc/hosts
> adb shell chmod 644 /system/etc/hosts

No to hijack this thread, but I just wanted to ask, does "adb remount" require root?
 

Jack_R1

Senior Member
Aug 9, 2009
4,365
962
You don't have busybox. Try running "adb shell df", maybe it'll still give some info.
 

decoyjoe

Senior Member
Dec 30, 2009
67
1
Ok when I ran adb shell df I got a listing of filesystems. /system says size 145M and used 145M. So apparently it is full.

How could that be though?
 

codesplice

Senior Member
Jun 17, 2008
2,678
951
Huntsville, AL, USA
It could be that you have some bad blocks on your /system partition (you can generally only check by doing a wipe operation in recovery and then viewing the log). These bad blocks could take up space that would otherwise store your system data, and could push you over capacity.

Or you could just have some extra bloat related to that ROM. You could drive to remove some of the applications on /system that you don't have use for (the Amazon MP3 thing, for instance). I'd suggest using Titanium Backup to do this, but you can also do it by manually using the adb shell.

Alternatively, a full wipe and clean reinstall may help make sure you don't have anything left over taking up space.
 

decoyjoe

Senior Member
Dec 30, 2009
67
1
I'm thinking about just flashing a new ROM altogether as I am also having issues with the battery. Under usage, Android OS now shows somewhere around 35% of the usage. This only started happening after updating to 2.3.3.

I've always ran stock ROMs, so I haven't played with any of the custom ROMs out there. Are there any ROMs you recommend for a first timer? :D

*Sidenote* So a nandroid backup is a complete backup of the system state correct?
So after flashing a ROM, I can just restore the nandroid backup and my phone will be exactly as it was with the old ROM and user data?
 

codesplice

Senior Member
Jun 17, 2008
2,678
951
Huntsville, AL, USA
I'm thinking about just flashing a new ROM altogether as I am also having issues with the battery. Under usage, Android OS now shows somewhere around 35% of the usage. This only started happening after updating to 2.3.3.

I've always ran stock ROMs, so I haven't played with any of the custom ROMs out there. Are there any ROMs you recommend for a first timer? :D

*Sidenote* So a nandroid backup is a complete backup of the system state correct?
So after flashing a ROM, I can just restore the nandroid backup and my phone will be exactly as it was with the old ROM and user data?

I've been really impressed with the Kang-o-rama ROMs. Basically prettied-up versions of Cyanogen. The latest release is a beta based on CM7, so still has a few issues. The prior release (KOR 1.1Final) is still quite solid.

And yes, a nandroid backup creates a copy of your current disk image, which can then be restored at any time to revert back to a previously-working configuration (great for when you break stuff!).
 

k_myk

Senior Member
May 6, 2009
228
25
Warsaw
I'm thinking about just flashing a new ROM altogether as I am also having issues with the battery. Under usage, Android OS now shows somewhere around 35% of the usage. This only started happening after updating to 2.3.3.

I've always ran stock ROMs, so I haven't played with any of the custom ROMs out there. Are there any ROMs you recommend for a first timer? :D

*Sidenote* So a nandroid backup is a complete backup of the system state correct?
So after flashing a ROM, I can just restore the nandroid backup and my phone will be exactly as it was with the old ROM and user data?

Exactly:) Remember to wipe before restoring:)
 

decoyjoe

Senior Member
Dec 30, 2009
67
1
Oh and that brings up another thought.

So if before I flash a new ROM, I do a Titanium Backup and then flash the ROM...
Would I then be able to restore that Titanium Backup made on the previous stock ROM to restore all my apps and user data?