yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] Kasuko:
Can't Upgrade

My phone is a Roger HTC Dream SPL 1.33.2005

I have v1.2 successfully installed but when I attempt to update to v1.4 using flash_image recovery /sdcard/cm-recovery-1.4.img I get the following output.

mtd: read error at 0x00000000 (Out of memory)
mtd: read error at 0x00020000 (Out of memory)
mtd: read error at 0x00040000 (Out of memory)
mtd: read error at 0x00060000 (Out of memory)
mtd: read error at 0x00080000 (Out of memory)
mtd: read error at 0x000a0000 (Out of memory)
mtd: read error at 0x000c0000 (Out of memory)
mtd: read error at 0x000e0000 (Out of memory)
mtd: read error at 0x00100000 (Out of memory)
mtd: read error at 0x00120000 (Out of memory)
mtd: read error at 0x00140000 (Out of memory)
mtd: read error at 0x00160000 (Out of memory)
mtd: read error at 0x00180000 (Out of memory)
mtd: read error at 0x001a0000 (Out of memory)
mtd: read error at 0x001c0000 (Out of memory)
mtd: read error at 0x001e0000 (Out of memory)
mtd: read error at 0x00200000 (Out of memory)
mtd: read error at 0x00220000 (Out of memory)
mtd: read error at 0x00240000 (Out of memory)
mtd: read error at 0x00260000 (Out of memory)
mtd: read error at 0x00280000 (Out of memory)
mtd: read error at 0x002a0000 (Out of memory)
mtd: read error at 0x002c0000 (Out of memory)
mtd: read error at 0x002e0000 (Out of memory)
mtd: read error at 0x00300000 (Out of memory)
mtd: read error at 0x00320000 (Out of memory)
mtd: read error at 0x00340000 (Out of memory)
mtd: read error at 0x00360000 (Out of memory)
mtd: read error at 0x00380000 (Out of memory)
mtd: read error at 0x003a0000 (Out of memory)
mtd: read error at 0x003c0000 (Out of memory)
mtd: read error at 0x003e0000 (Out of memory)
mtd: read error at 0x00400000 (Out of memory)

and I can no longer boot into the recovery.

Then I try using fastboot and I get OKAY for erasing sending and writing but still can not boot into recovery.

I then fastboot v1.2 back on and it works.

Any ideas?

Kasuko
[G1 Android Development] stellarman:
This is from one of the first two or three posts on the first page of this thread:

If you have problems with a "no space on device" error, try using fastboot and erasing first:

Code:

fastboot erase recovery

fastboot flash recovery cm-recovery-1.4.img

----------------------------------------------------------------------------
[G1 Android Development] B-man007:
if you have apps2sd then it should be fine. i havent tried booting after wiping, but it should still boot. i would recommend that you move the downloaded update to the root of the sd and flash it immediately after wiping
[G1 Android Development] Kasuko:
I mentioned in my post that I tried that and I got all OKAY's for erasing, loading and writing and it still hangs when attempting to boot into recovery THEN I tried flashing the old recovery v1.2 using fastboot and it works but v1.4 doesnt work EITHER method.

So let me reiterate I do the following.

(I do this both through adb shell and terimnal editor on the phone)

MAGI.kasuko tools: sudo adb -d pull /sdcard/cm-recovery-1.4.img ./device-1.4.img
581 KB/s (4098048 bytes in 6.879s)
MAGI.kasuko tools: sudo md5sum device-1.4.img | grep f5135a878c705215f4012786e4261cfe
f5135a878c705215f4012786e4261cfe device-1.4.img
MAGI.kasuko tools: adb -d shell
# su
su: access granted, courtesy of www.magicandroidapps.com
# flash_image recovery /sdcard/cm-recovery-1.4.img
# exit
# exit

MAGI.kasuko tools: sudo wget http://n0rp.chemlab.org/android/cm-recovery-1.4.img
--2009-09-18 11:18:27-- http://n0rp.chemlab.org/android/cm-recovery-1.4.img
Resolving n0rp.chemlab.org... 216.151.80.50
Connecting to n0rp.chemlab.org|216.151.80.50|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4098048 (3.9M) [text/plain]
Saving to: `cm-recovery-1.4.img'

100%[=====================================>] 4,098,048 418K/s in 11s

2009-09-18 11:18:39 (360 KB/s) - `cm-recovery-1.4.img' saved [4098048/4098048]

MAGI.kasuko tools: sudo md5sum cm-recovery-1.4.img | grep f5135a878c705215f4012786e4261cfe
f5135a878c705215f4012786e4261cfe cm-recovery-1.4.img
MAGI.kasuko tools: fastboot erase recovery
erasing 'recovery'... OKAY
MAGI.kasuko tools: fastboot flash recovery cm-recovery-1.4.img
sending 'recovery' (4002 KB)... OKAY
writing 'recovery'... OKAY

MAGI.kasuko tools: fastboot boot cm-recovery-1.4.img
downloading 'boot.img'... OKAY
booting... OKAY

All of the above do not work,

BUT!

MAGI.kasuko tools: fastboot flash recovery recovery-1.2.img
sending 'recovery' (3562 KB)... OKAY
writing 'recovery'... OKAY
MAGI.kasuko tools: fastboot boot recovery-1.2.img
downloading 'boot.img'... OKAY
booting... OKAY

and this works, succesfully loads up CyanogenMod v1.2 + JF. recovery-1.2.img is the recovery.img from Haykuro's rogers_root_unzipme.zip.

Am I the only one confused?

Kasuko

P.S. You will also note that I no longer get the mtd: read error at 0x00000000 (Out of memory) errors anymore. If this is cause for worry I don't know.

Again my phone is HTC Dream from Rogers bought June 5th 09, with SPL 1.33.2005. I have never flashed a radio.img or any custom ROMs.
[G1 Android Development] pensive:
Hmm, it is still not quite clear what the sequence of

your actions is. That said, do the following to help diagnose and maybe (just maybe) solve the problem.

In the terminal emulator

1) become root

2) zero out the recovery partition (observe what the error is, hopefully

"device out of space")

cat /dev/zero > /dev/mtd/mtd1

if you get a write error before it runs off the edge you may have a bad flash block.

3) find your old recovery.img in the file system, using the terminal emulator,

not recovery shell

su

cd /

find / | grep recovery.img

4) Overwrite the old image with the new image

cp /sdcard/cm-recovery-1.4.img /THEPATHWHEREYOUFOUNDTHEOLDIMAGE/recovery.img

reboot

You may have provided TOO much information ;) confusing the issues. Hm, is there such a thing as too much information? Maybe.
[G1 Android Development] Kasuko:
Sorry about the wait, had to install busybox manually as I didnt have a custom rom.

Looks good here

# cat /dev/zero > /dev/mtd/mtd1
write: No space left on device

Slight issue here ... there is no recovery.img.

# find / | grep recovery.img
/sdcard/nandroid/HT95MNH00621/20090918-1551/recovery.img
find: /proc/112/task/211/fd/46: No such file or directory
find: /proc/112/task/211/fd/47: No such file or directory
#

Kasuko

I also only posted the output of all the possible 'fixes' that were posted on this thread so you know I did them right.
[G1 Android Development] pensive:
Not necessarily an issue.

In the normal mode, not recovery take a look at the various *.rc files

I am not sure about your ROM, so look for anything that initializes the

device at the boot time.

look in / /etc /system/etc and such.

See if you can find in any of them a reference to recovery.img

on my device there is a line like this in /init.rc.

service flash_recovery /system/bin/flash_image -d recovery /data/recovery.img

So, recent Cyan ROMS use /data for that. Find out if you have a line like

that and see what the folder is.

Then stick the new image in that folder.

In any case, before you even do that try to flash the image again.

flash_image recovery /sdcard/cm-recovery-1.4.img

reboot recovery
[G1 Android Development] Kasuko:
Ah I see what you mean, a quick 'find / -name "*.rc" | xargs grep -n recovery.img' fixes that right up :)

So /init.rc has service flash_recovery /system/bin/flash_image recovery /system/recovery.img

# export PATH=$PATH:/data/busybox
# md5sum /system/recovery.img
f5135a878c705215f4012786e4261cfe /system/recovery.img
# flash_image recovery /sdcard/cm-recovery-1.4.img
# reboot recovery

and still nothing.

EDIT: I should like you to know I have NOT followed ANY of the steps in this thread http://xdaforums.com/showthread.php?t=544654&highlight=stock+kernel I don't know if that's important or not?

Thanks for your persistance to my issue.
[G1 Android Development] pensive:
Ok, maybe we are getting somewhere.

Where is not clear yet.

cd /

mount -o rw,remount /system

cp /sdcard/cm-recovery-1.4.img /system/recovery.img

reboot

I am not sure if the code you inserted means you had already installed the new image in /system or not.
[G1 Android Development] Kasuko:
ok I did

adb -d remount

cp /sdcard/cm-recovery-1.4.img /system/recovery.img

reboot

and it went back to v1.2 that I had so I repeated with my last post steps

I will do all again though.

# cd /
# mount -o rw,remount /system
Usage: mount [-r] [-w] [-o options] [-t type] device directory
# mount -orw,remount -t yaffs2 /dev/block/mtdblock3 /system
# cp /sdcard/cm-recovery-1.4.img /system/recovery.img
# reboot

it then reboots normally.

When I attempt to boot into recovery (after a normal reboot) still nothing.

Also I don't know if you saw my edit I was a little late on the submit button but I should like you to know I have NOT followed ANY of the steps in this thread http://xdaforums.com/showthread.php?t=544654&highlight=stock+kernel I don't know if that's important or not?
[G1 Android Development] pensive:
When you try to invoke the recovery

what do you do? Press down the home key (and hold it down) and then press the end call key and hold it, right?

Check the size of the recovery.img in /system, make sure it corresponds to

the 1.4 version.

I do not see how any of that other thread stuff is relevant.
[G1 Android Development] Kasuko:
Yes I turn it off normally

Then I press and hold the home key, then press the power button until it comes on (and a bit after for safe measure).

Then it shows the Rogers screen and hangs there till I take the battery out and reboot.

I did one better, if you look at my above post I md5sum it, its definatly the same (unless you consider this the way out there probability that md5 collides here)

I wasn't sure if it needed that second boot.img from the thread.
[G1 Android Development] pensive:
Did it revert to the old recovery?

Without you doing it explicitly? Yeah, I saw the md5 sums, I am just wondering if you inadvertently overwrote the new version with the old

one.

Run the md5 sum directly on /system/recovery.img and compare it with the

web. The probability of md5 sum collision is close to zero.

"and it went back to v1.2 that I had so I repeated with my last post steps"
[G1 Android Development] Kasuko:
No I did not overwrite it with the old one. When I copied over the img the version in the ROM was 1.2.

I copied it over and shutdown normally.

Then I attempted to go to recovery and it took me to v1.2 which is what I had in the ROM to start. Which suggested that it didnt get flashed.

So I did a normal reboot, then did and md5sum on the recovery image to confirm that it was infact cm-recovery-1.4.img, it was.

I then attempted to flash_image it and reboot.

I went through one normal boot.

Then I shut down normally.

Attempted to go to recovery and it hung.

I then redid it using the (almost) stock commands you used and still hung to no avail.
[G1 Android Development] pensive:
Makes no sense, I must say.

What happens if you from the terminal emulator enter a root shell and

then do "reboot recovery," still hangs?

su

reboot recovery

p.s.

do you have /dev/mtd/mtd4 (/cache)? 1.4 mounts /cache in recovery mode, I wonder if this is where it hangs. Does /cache exist in your ROM?

If you have /cache what folders do you have in there?

Just to make sure, what is the size of /system/recovery.img now?
[G1 Android Development] Kasuko:
when I attempt to do reboot recovery from terminal editor from the phone I get "not permited!" (Yes I am superuser)

also I have mtd0 through mtd5 and their mtd#ro counterparts in /dev/mtd/ and there is a /cache on the device with some downloadfile-#.apk, an empty recovery folder and lost+found

Size is 4098048 on phone and 4098048 on my computer.
[G1 Android Development] pensive:
I just want to be precise here.

When you say "Size is 4098048 on phone" you mean you did

ls -l /system/recovery.img

and that is the number it gave you, right?

Since you were using fastboot before I think I can assume you have the engineering bootloader installed.

If you zero out the /dev/mtd/mtd1 again and attempt to enter recovery, it should throw you into the

bootloader instead. This will tell us that at least the buttons are working for you.
[G1 Android Development] Kasuko:
Yes the size is the number of bytes of the recovery.img on the device reported tome by ls -l.

I zero'd out mtd1and attempted to boot into recovery and it still hung on the rogers screen.

Also I have HBOOT-1.33.2005
[G1 Android Development] pensive:
Not very logical but might be worth a try.

Download instead the cm-recovery-1.3.1.img and try to install that, depending on what happens we may learn something new. If the link is not there, just edit the 1.4.img link, it should download ok.

Install it in /system/recovery.img

By the way, the question was not so much about using "ls -l", the question was that it was the size of /system/recovery.img and not some other recovery.img.

Actually, since you cannot "reboot recovery," if you had a recovery.img sitting in /system it got flashed on reboot. You had to hold the home key and end call

down as the device was booting to bypass the normal boot.
[G1 Android Development] Kasuko:
Nope, sorry it's not there, I did

MAGI.kasuko ~: wget http://n0rp.chemlab.org/android/cm-recovery-1.3.1.img
--2009-09-18 13:23:21-- http://n0rp.chemlab.org/android/cm-recovery-1.3.1.img
Resolving n0rp.chemlab.org... 216.151.80.50
Connecting to n0rp.chemlab.org|216.151.80.50|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2009-09-18 13:23:21 ERROR 404: Not Found.

I also navigated to http://n0rp.chemlab.org/android/ but it's not there either, only 1.4.

Did a little light googling and got it, md5matches the archive on H@ckdroid.

Replaced and shut down (I did not flash anything) and nothing. Attempting normal boot and then recovery ... and nothing.

I try to flash_image and it gives me the mtd error (Out of Memory) again.

Also about the reboot recovery, Iunderstand this, thats why I don't reboot I just shut down normally.

This is real odd.
[G1 Android Development] JimmyJayCEO:
Is this updater completely compatible with all of the donut features that are in the new ROM. For some reason it isn't recognizing my "restore latest back up" feature. NOw I am stuck on the recovery screen with nowhere to go. HELP
[G1 Android Development] pensive:
More thoughts.

It looks like it is hanging on that screen but it does not mean necessarily

that it is not possible to connect using "adb shell". It may be possible to

connect using adb and see where it is hanging.

If you have an e-mail address about which you are not concerned posting here I can upload the 1.3.1 using yousendit.com
[G1 Android Development] Kasuko:
I have tried adb earlier but it just stayed at the waiting for device stage.

I will try again with 1.3.1 when you send it to lingwoXR at hotmail dot com, thanks
[G1 Android Development] Kasuko:
Nope no go.

MAGI.kasuko Internet: adb push cm-recovery-1.3.1.img /sdcard
1490 KB/s (4120576 bytes in 2.700s)
MAGI.kasuko Internet: adb push cm-recovery-1.3.1.img /system/recovery.img
1325 KB/s (4120576 bytes in 3.036s)
MAGI.kasuko Internet: adb shell
# flash_image recovery /sdcard/cm-recovery-1.3.1.img
# reboot recovery
MAGI.kasuko Internet: adb devices
List of devices attached
[G1 Android Development] pensive:
You have to be careful about what you do.

You do not appear to have remounted /system for read/write, your push

to /system must have failed.

I thought "reboot recovery" is not allowed by your ROM.
[G1 Android Development] Kasuko:
I had done adb remount before the commands I posted. It succedded because there is an error when it is read only.

adb push cm-recovery-1.3.1.img /system/recovery.img

failed to copy 'cm-recovery-1.3.1.img' to '/system/recovery.img': Read-only file system

Also reboot recovery is not permitted from the phone but apparently adb shell can do it.
[G1 Android Development] pensive:
The only option I think remains is

to temporarily install a different ROM, play with installing the recovery under that ROM and then put your old ROM back. At this point all the tools are suspect. Maybe flash_image is not working on larger files.
[G1 Android Development] zambezy:
Could some one integrate switchrom.sh instead nandroid. I know switch rom uses nandroid but it also backs up the /system/sd/
[G1 Android Development] Kasuko:
I don't have any ROMs infact the reason I want to get this recovery to work is to flash a ROM
[G1 Android Development] Graph.Two:
Argh....

Damn man i though 1.4 would work for me but its a no go I cant even boot into recovery I can get into fastboot but nothing else when ever i try to go into recovery it hangs I cant do anything from there so I have to pull the battery \

can anyone send 1.3.1
[G1 Android Development] pensive:
No need to do it anymore, new options take care of it.

I am attaching the new version which you can put on your sdcard and run directly from sdcard like so:

mount /sdcard

/sdcard/nandroid-mobile.sh --save ROMNAME

or

mount /sdcard

/sdcard/nandroid-mobile.sh --switchto ROMNAME

after the new version of the recovery comes out there will not be any need

to mount the sdcard first.
[G1 Android Development] pensive:
Why can't you use the 1.2 version to flash the new ROM?

The 1.2 should be able to flash a new ROM.

Go here

http://n0rp.chemlab.org/android/update-cm-4.0.4-signed.zip

Download the latest stable ROM.

Put it in /sdcard/update.zip

Reinstall the 1.2 recovery (if you have not already), the 1.2 works for you, right?

Invoke the recovery

(alt-l (ell) I think will display the options)

alt-s

Will apply the update.

You may want to wipe the user data since you are coming from a totally different ROM.

If this does not work for you there is one more method, but I do not see why this should fail.
[G1 Android Development] Automization:
JF to Cyanogen: My recovery.img problem has been solved finally !!!

Hi,

I habe desperately tried for hours to "flash_image" the update-cm-4.0.4-signed.zip to the 'recovery' partition. Although the OS told me silently success, after rebooting with 'home' and 'power' keys the recovery screen didn't come up. Instead the JF fastboot screen (with the three Androids on skaters).

I will not go in detail, but at least a corrupted update-cm-4.0.4-signed.zip seemed to be the problem: The direct G1 download was a problem before- I strongly assume the corruption happened here. WGET didn't work either ... (found this as a known problem in other postings!)

I think, at least I got the right version by donwloading it on PC first and then pushing the file by ADB to the right directory. My recommendation, check the file size byte numbers: 4.098.048 Bytes should be the right size. The corupted file had (only) fairly 3.000 bytes less !!!

Unfortunately the 'flash_image can't signal the corruption ...!

Important: A recovery erase by fastboot is needed before being able to do the flash_image with the right file size successfully in a second try again! :D

Good luck to you all - keep my fingers crossed for you!

-------------------------------------------

Please substitude by the file name "update-cm-4.0.4-signed.zip" by "cm-recovery-1.4.img" in the text above - sorry!
[G1 Android Development] rondey-:
You dont flash a ROM update to recovery. You flash the recovery.img file listed in the OP via flash_image recovery cyanogen14recovery.img (or whatever it is named). After that you boot into the recovery (by holding home and pressing power) then choose the option to apply any update from sd card then select the cyanogen404signed.zip and follow instructions to flash that
[G1 Android Development] Automization:
Thank you rondey!

Sorry - that is right- I was too tired - when writing the post:

Please substitude by the file name "update-cm-4.0.4-signed.zip" by "cm-recovery-1.4.img" in my post before!
[G1 Android Development] ivanmmj:
You've been so busy making awesome strides for the Android community that this project has started to get dusty...

Where's the source code for this anyways?

It needs some of the features from this and more.
[G1 Android Development] Burag:
He will probably back it to life when he release CM 4.2 :cool:
[G1 Android Development] ThR1LL:
there's only like 3 things that other recovery image has that this one doesn't and they aren't even that vital
[G1 Android Development] JimmyJayCEO:
One of the things that I think could be added to this is the ability to pull files from the CM-updater from the recovery menu. Since the updater flashes everything by itself, if you get frozen and have to restore, this would give you teh opportunity to pull any of the downloaded ROMs. I think that is one of the only features that needs to be added. I hope that made sense.
[G1 Android Development] DavidChill:
i would have to agree with my comrade here, it's useful enough to where you can copy the file from the "cm-updates" folder to /sdcard, but adding the option all together would be awesome. also maybe an option to switch from Ext3 to Ext4? :D

Either way, i love Cyan work and am an avid CyanMod user.
[G1 Android Development] JimmyJayCEO:
Ok so I got some information on the cm-updater thread about how to do this. Right now when you download something through the updater it is sent to a folder on the root of the sdcard called "cm-updates". With v4.1 of the updater there is "advanced settings" option that you can go into. All you have to do is remove the name of the update folder and every download will be an individual file on the root of the sdcard....which will be accessible from the recovery menu; tested and works great..:D:D:D:D:D
[G1 Android Development] sirocyl:
Source code can be found here: http://github.com/cyanogen/android_bootable_recovery/tree
[G1 Android Development] DavidChill:
Checking Ext File Systems with Theme Installed

This definitely works but personally I don't want a bunch of updates on /sdcard because I'm a bit of a neat freak. I think just an option in general that is meant to pull updates from "cm-updates" specifically would work great.

Additionally, I've noticed something (i think) with the checking Ext File Systems option when having a theme installed. I've recently done a full wipe of the phone and my Ext3, installed the newest experimental and did a Nandroid backup. After the backup was done, I did the "Check Ext File Systems" and it yielded no errors so I flashed the EnochX & Palm Pre theme's at seperate times and on both occasions got this error "Ext files could not be checked, please run 'esfck' in console" or something to that nature.

I did not know if it was an issue with theme's or the recovery or a combination of the two but just wanted to get that out there.
[G1 Android Development] ThR1LL:
Just use the getcyan script in console
[G1 Android Development] n1ghtl1fe:
can anyone message me with a link to download cyans 1.4? i just got a replacement phone and rooted and cant find it anywhere...just my luck
[G1 Android Development] area5x1:
Would appreciate it too if anyone has a mirror to 1.4 recovery image.
[G1 Android Development] n1ghtl1fe:
i can still flash hero roms with no problem with jf recovery right?
[G1 Android Development] cvking360:
my g1 bricked because of this
[G1 Android Development] n1ghtl1fe:
because of what?
[G1 Android Development] ivanmmj:
How could this brick a G1? (Unless you accidentally flash it to the wrong part of the ROM.)
[G1 Android Development] Zixx:
recovery-RAv1.2.1H.img alike

Hey Cyanogen i was wondering if you could add the option to format The sd card as in recovery-RAv1.2.1H.img i like his image but i Trust your images :X
[G1 Android Development] Charrion:
I don't think we'll be seeing any new works from Cyanogen for a while. At least not until the dust settles.
[G1 Android Development] Zixx:
Gee True that ...that sucks
[G1 Android Development] rainman987:
Miss you, you recently right?
[G1 Android Development] 2.0t03speed:
does anyone still have this? im getting a replacement g1 sent to me in the mail and id like to have this recovery for it.
[G1 Android Development] himom:
http://www.4shared.com/file/120930789/555ebc1f/cm-recovery-14.html