I have a relatively old phone that I would like to make some use of again. It's the GT-I9000, and it's currently stuck in a bootloop.

I'd like to install CyanogenMod on it. I've already flashed it with the CWM, however, I'm experiencing problems when trying to finally put the actual mod on the internal sd card.

First off, when I execute: adb push cm.zip /sdcard, ADB complains that /sdcard is a directory... Of course it is!

So, I've tried to be a bit more specific... adb push cm.zip /sdcard/Videos - I didn't expect any significant change, but there was. It now complained about the permission being denied.

I overcame this on Linux by becoming root, and executed the command again...

Then, it complained about not having enough space...

I used the CWM recovery to navigate internal storage, and noticed that it really was crammed with all my data.

In order to get more space, I tried factory resetting, data wiping, and partitioning. The first two finished successfully, but didn't delete any of my files, and CWM recovery couldn't partition the thing.

After that, I noticed that ADB can provide a shell connection, so I tried adb shell.

On both Windows and Linux, this is the error:

link_image[1963]:  2950 could not load needed library 'libm.so' for '/system/bin/sh' (reserve_mem_region[832]: OOPS:  2950      prelinked library 'libm.so' mapped at 0x40008000, not at 0xafc00000)CANNOT LINK EXECUTABLE

So I suspect it has something to do with my Android phone, not my computers.

And the best thing is: my phone cannot read external cards for some reason. What a great combination!

How can I wipe internal storage without a shell connection?


First, if your source is a file, adb push requires the target to be a file as well. Hence, the correct syntax would be:

adb push cm.zip /sdcard/cm.zip

Second, a usually doesn't touch the SDCard (internal or external), unless there's an option offered to do so and you checked that.

As for the link error: That looks like something on the device is screwed up. You're probably in recovery mode when trying this, and (just a guess, but a good one) the partition holding the required library file was not mounted.

I don't know what options are available for your device specifically, but there are generally several ways to flash a device, as e.g.:

  • update.zip via recovery (which is what you're just trying)
  • side-loading via adb sideload
  • using
  • using a device (or manufacturer) specific flash tool, in your case , , or

I'd suggest the last mentioned method: you could e.g. first flash the latest official ROM via Odin/Heimdall, so it is able to boot correctly again. After that, you would have a working device again, and could cleanup your SDCard to use the update.zip method for flashing your CM image.

Another way to free some space: If you know some of the "big filenames", you could try using adb push to overwrite them with "small ones". Say, if there's a video file with 500 MB size in /sdcard/Videos/bigmovie.mp4, you could take an empty text file empty.txt ( 0 Bytes ) and push it over the video:

adb push empty.txt /sdcard/Videos/bigmovie.mp4

This should set enough space free to finally push your cm.zip to the card.

  • Glad to read! Could you solve your issue with this information? Which path did you chose, and how did it work out? – Izzy Jul 2 '13 at 18:59
  • I'm glad that you're asking, because I think I'm about to nag you a bit longer... I'd appreciate your help here. The thing is, I'm unable to choose a path - because I can't get my phone to boot into recovery anymore. Everything was working fine last night, but when I woke up and tried to follow your advice - my phone just kept rushing into a bootloop instead of actually getting into recovery mode from which I could have used ADB. Please see this if you have the time... – jcora Jul 2 '13 at 19:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.