yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] pensive:
You need su priviledges when you zero out recovery.

You did cat as root, right?

I tried it (as an experiment) as root and it told me that "write: no space left on device", which is what I would expect if it zeroed out the partition and

ran off the edge. Were you root?

After I zeroed out the recovery partition my phone also kicked me into the boot-loader when I tried to enter recovery, but I was

able to flash the new image successfully thereafter. flash_image did complain about "all zero blocks" but worked fine.
[G1 Android Development] Orange Crush:
Yup, I ran it as root. Just did it again to double-check. This time I flashed from the command line rather than copying to /data and here's what I got:

I'm guessing that means a bad block. This might also explain why the vanilla recovery image w/ testkeys works fine . . . small enough to not hit the bad block.
[G1 Android Development] pensive:
Some other things to try.

What error did you get from "cat" running it as root?

I am thinking that padding the image with zeros in front may allow to bypass that sector.
[G1 Android Development] Orange Crush:
# cat /dev/zero > /dev/mtd/mtd1

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

write: I/O error

#
[G1 Android Development] pensive:
Grasping at straws :-)

Although it is unlikely to help but, while tinkering with this problem, have done a

hard reset? No power, no battery. The recovery is based in non-volatile memory of course but it is possible it could be reset.
[G1 Android Development] Orange Crush:
Yup. Tried again just for kicks. Same results.

I think I'll just call tmo and ***** about the keyboard to get a warranty replacement. (The period key does occasionally stick, and the left-alt only registers if I press it good and hard. . . perhaps I'll just exaggerate that the whole bottom row is messed up.

Beats explaining how I could know there's one or more bad blocks in the internal memory.

Edited to add: and thank you very much for your help, pensive.
[G1 Android Development] :
Yeah orange crush, phone companies don't like it when we are smart and know how to do more with our phones than we are supposed to, that just want teenie boppers that want to just complain about some things and not the inner workings of the os and they really don't like it when you know more about it than their tech department
[G1 Android Development] pensive:
One last thing to amuse yourself.

Try erasing via fastboot, since it uses the boot-loader maybe it can bypass

the error.
[G1 Android Development] Orange Crush:
fastboot erase recovery

and

fastboot flash recovery cm-recovery-1.4.img

both came back with "OKAY" but still it still barfs back to the SPL when I attempt to enter recovery.
[G1 Android Development] pensive:
I assume these are not the actual commands, right?

You did

fastboot erase recovery

and

fastboot flash recovery cm-recovery-1.4.img

right?
[G1 Android Development] Orange Crush:
^Yes, I used the correct commands.
[G1 Android Development] gtrplr71:
I would love to see an ext wipe command without going to the console in the next recovery image. Just sayin I don't know if has been discussed.
[G1 Android Development] joejjeman:
i dont get this..

i have placed the recovery image on my sdcard

rooted the phone as su user

downloaded betterterminal

and write in terminal

su

flash_image recovery /sdcard/-recovery-1.4.img

but nothing happens... after restart its the old recovery

whats wrong?
[G1 Android Development] chevycowboyusa:
spelling counts

By what you posted, you need to type the correct file name ie. cm-recovery-1.4.img

Did you get an error when you typed it in?
[G1 Android Development] RSchmauk:
Thanks, that worked! I've been trying to flash it a long time...
[G1 Android Development] chevycowboyusa:
Glad I could help!

I've done that before... Have fun!
[G1 Android Development] joejjeman:
sorry i just write wrong here.. i write correct filename in the better terminal.. i have tried around 10 times

nothing happans..i just get to the next line
[G1 Android Development] maybeoneday:
Chemlabs site is down anyone have a copy of i.4 they can send over to me?

please please:p

email address jakus4@msn.com
[G1 Android Development] miketaylor00:
Did you try going into recovery to see if it updated? If you don't get an error message it probably did.
[G1 Android Development] highrolla1866:
Site down

Did anyone have a copy of 1.4? The site seems to be down and all the places i have searched lead me to the same link.

Thanks
[G1 Android Development] joejjeman:
No its not updated.. just the same old as before...

No error message.. the marker jumps to next lane

look like this

#
[G1 Android Development] Chris_P:
I found a mirror here. md5sum checks out, just installed it myself :)
[G1 Android Development] mrmonto:
Having an issue. Running Cyan 3.6.8.1 with EXT2 partition and Fat32. Recently turned on airplane mode and got the dreaded "Damaged SD card notification". What's weird is that the EXT2 partition is working fine (all my apps). It's the Fat32 that's hosed. Any suggestions to fix this issue?
[G1 Android Development] coredalae:
you can try backing up and reformatting the Fat32 partition, and see if it fixes it, also i'd sugest update to 4.0.4 its very stable ^^
[G1 Android Development] Coderedpl:
how come whenever i run an update or something i go back to the same old recovery screen?
[G1 Android Development] griemar:
unable to flash recovery img

hello all, im somewhat new to all of this and im having a issue with getting the recovery img to flash. i reboot, go into terminal and typed flash_image recovery /sdcard/cm-recovery-1.4.img and get the following error:

sh: flash_image: not found

i tried the fastboot method also and get a simular error:

sh: fastboot: not found

can anyone help me out?

here is my phone info in case its needed:

firmware: 1.5

kernel: 2.6.29.6-cm4

shade@toxygene

mod version: cyanogenmod-4.0.4

build: crc1

thanks again
[G1 Android Development] ei8htohms:
are you trying this from recovery console?

When you say "i reboot", it leads one to suspect you may be booting into recovery first and trying to run these commands from the terminal (console) there. A lot of folks in this thread have made this mistake, and equally often been instructed to do this from Terminal while fully booted into the OS. Do not do this from recovery console, but from a regular Terminal window.
[G1 Android Development] griemar:
OK, from terminal while in the OS I did the following:

SU

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

The phone paused for a second and then came back with a promt. I would assume that it was sucessful. How do I double check to make sure I'm now using the updated recovery image?

Again, sorry for asking these questions but I am rather new still.

Thanks
[G1 Android Development] miketaylor00:
Recovery has a console, not a terminal emulator. By saying terminal you are defining where you are running it, inside the OS.
[G1 Android Development] miketaylor00:
Reboot while holding down the home button. That will take you to the recovery screen.
[G1 Android Development] griemar:
Wow...so much nicer then the old JF i was using. Thanks sooo much everyone. Now to figure out why i cant flash my boot splash...grrr.
[G1 Android Development] ei8htohms:
in a perfect world...

But language is as easily misused as used, maybe more so even. :)
[G1 Android Development] miketaylor00:
That and 95% of the people on here probably don't know that there is a difference between the two.
[G1 Android Development] traspler:
I wanted to make a NANDROID backup today but I always get an error and it won't perform the backup (I just get the message that an error occured, nothing more) does anyone know what the problem could be?

(My setup is listed in my signature and I have a ext3 partition on my sd card)
[G1 Android Development] pensive:
Too much binary crap on the card.

It is time for some autumn cleaning.
[G1 Android Development] traspler:
hmmm.... neither the FAT Partition nor the ext partition are close to be full. The ext partition is nearly 1GB and I have only very little installed. The FAT parititon has about 14GB+ free.

What exactly should I clean from what?
[G1 Android Development] pensive:
The free space on ext2 is not relevant, however,

if you have correctly read the amount of free space on the fat partition then

there is a different problem. I would make sure you have 14GIG free instead of

14MEG free.

Run the nandroid again, then without rebooting, enter the recovery console

and look at the /cache/recovery/log file to see what the error was.

p.s. it would also fail if the battery is lower than 30% and it is not plugged in.
[G1 Android Development] traspler:
Thank you for all the help. It seems like the battery charge was the problem, now everything works just fine with a fully charged battery
[G1 Android Development] mr_deimos:
I ran into a strange problem when doing a nandroid backup from the Cyanogen recovery 1.4. I'm not sure if it's more a problem with the recovery, the nandroid itself, or CM rom, but since i'm attempting to backup from within the recovery i decided to post here.

The trouble is that ever since i upgraded to CM 4.1 i can't do a backup: the process starts, but it takes a looong time - much too long. When backup is executed from recovery menu, progress dots fill the entire screen and keep going on. When execuded from console by nandroid.mobile.sh -backup, i can see that all partitions are backed up properly, but the problem is with data.img - it's backup doesn't end and keeps going on and on. If i reset the phone after some time and take a look at the backup, i see that the data.img is unusually large - actually it seems to grow in size until it fills the entire sd card. I tried backing up on the card i normally use (8GB SDHC divided into a FAT, ext3 and swap), and the data.img was 1.43GB, leaving 0 bytes free on the FAT partition of the card. I also tried with a 1GB card with just one partition. Effect was the same - data.img filling entire free space (840MB). There's no error report since the process doesn't end even though there's no more room left on the card. I have to reset (or do a ctrl+c when running from console) to manually interrupt it.

Any ideas what could cause such behavior? Sure, i could wipe and see if that solves the problem (and it probably would), but i'd rather avoid that since my last backup is from the 3.6.0.1 version of CM rom ;)

Currently i'm running the latest CM (v4.0.4).
[G1 Android Development] pensive:
Strange indeed.

Do a couple of experiments, just to nail down your issue.

Run the nandroid script from the console but suppress the /data dump.

nandroid-mobile.sh -b --subname TEST --nodata

and then

nandroid-mobile.sh -b --subname TEST --noboot --nosystem --norecovery --nomisc --nocache

to see if you are still experiencing the same problem.

If you are reasonably comfortable with the command line, examine if perhaps

/data in the current release of the ROM contains circular references. Perhaps

something is being mounted in the /data which itself then has a part or all of

/data mounted there.
[G1 Android Development] mr_deimos:
Thanks for the suggestions.

Now 100% i'm sure that it's the problem with data partition. Backing up everything else works just fine.

As for the console, ive been a linux user for a few years so i'm comfortable with using it. I'll take a closer look at the data. Some kind of circular reference is what i was suspecting, but what puzzles me is that nobody else seems to encounter this problem (and if someone did see such behavior then don't be afraid, speak up ;) ). So i suspect it's not a problem with a rom version but more with successive rom changes. I started off with a clean install of CM 3.6.8, then continued along the stable branch without wipe - 3.6.8.1 -> 4.0.1 -> 4.0.4. I did some tinkering along the way but i don't think i did anything that would cause nandroid to hang like that.
[G1 Android Development] :
Just Installed This And It's Great. Suggestion To The XDA Though, Take Off The Quick Reply Button In Order To Reply. It's Annoying Lol.
[G1 Android Development] pensive:
Ok then, perhaps a quick and dirty way to see

what is happening is to tar off the contents of /data with -v turned on into

the fat partition and eyeball the output for the same paths being spooled more than once.

Perhaps there is a symbolic link pointing somewhere it should not.

/data is about 15 meg, once the tar output grows beyond the 15 meg you are inside

your circularity (hm, I don't think it is a real word, but, what the hell, language is a living, changing thing, maybe

it'll end up in Webster's one day) you should be seeing then a pretty steady state main path.
[G1 Android Development] mr_deimos:
Thanks man, problem solved. At first, i tried to do a recursive ls and see if it gets stuck in a loop as well, but it didn't report any errors. however using tar was a brilliant idea - it has thrown an error: bad address (or something along these lines), and the last directory it processed turned out to really be somehow damaged (/data/data/com.ea.spore/fi): i couldn't cd into it even though i had root privileges. Since i didn't care much about this app, i just deleted the whole com.ea.spore dir and backup works fine now. I don't know if it's a faulty app or some random filesystem corruption yet, but the important thing is that nandroid works again :) Too bad i screwed up apps2sd in the process (booted with a wrong card inserted) :rolleyes:
[G1 Android Development] jcarrz1:
Feature Request

just been thinking about features that would be awesome, one is to wipe ext partition! that would be amazing, instead of going into terminal, mounting, and then rm -r *. i'm sure lots of you know what i'm talking about, but i'm not sure if cyanogen will even see this.. oh well
[G1 Android Development] maek_it_happen:
i re flashed my cyan 4.0.2 , but when i try to install cyan recovery 1.4 it says access denied any solutions ? ..

and superuser app that is built in is not there , and when i try to download market version it says uncompatible ?
[G1 Android Development] anon1ski:
are you pushing it threw adb?
[G1 Android Development] maek_it_happen:
no m not familiar with adb ,

it says access denied , as if i have no root , could the superuser apps be messed up ,
[G1 Android Development] xxcaptainxx:
What should i do if i get a permission Denied?
[G1 Android Development] akapoor:
Hey,

I've got a pretty weird problem.

When I try to install the 1.4 recovery image, all goes fine.

I do:

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

#

Then when I try to reboot and access the recovery, the phone keeps rebooting and eventually gets stuck at a blank, black, screen.

Sometimes it shows streams of red across the screen with the Tmobile G1 logo imprinted in the background and then slowly fades away.

I'm forced to pull the battery to reboot into android.

I've tried to do this 3 times, still no luck.

Any ideas?

EDIT: Issue resolved. This post can be ignored.
[G1 Android Development] Lazzzara:
Also having the permission denied message appear when trying to apply using terminal emulator.

I could push it across with ADB... I'm just unsure where I need to push it to?

Also, can I still access fastboot if I'm running 1.3.1? That could be another solution.

Sorry if this has been already answered, 150 pages is a bit daunting...
[G1 Android Development] Nyanchew:
Hi,

I want to know a difference between 'restore latest backup' command and 'apply any zip from sd' command on flashing boot.img.

Because my HTC Magic (Japan model) can't be booted after 'restore latest backup', but can be boot after 'apply any zip from sd'.

I tried to restore manually using nandroid-mobile.sh from console, and I got a error when it tries to flash boot.img:

mtd: erase failure (Input/Output)

Does it mean my NAND flash is broken?

But 'apply any zip from sd' command is successfully done, and my phone is booted.
[G1 Android Development] pensive:
Firstly you need to make certain that

the update mechanism in fact updates successfully. Just because you can

boot successfully afterward does not mean it was successful. Do a couple of

updates with different versions of Cyan ROMS and look in the phone menus

for the modification version. If the version corresponds to the version you

flashed then you know it worked.

Second, make an attempt to flash the boot partition directly. Assuming

that you have v1.4 of the recovery already, you should have flash_image

in your /sbin. If not, see if you have flash_image* in /sbin and use that

instead.

flash_image boot /sdcard/nandroid/BACKUPNAME/boot.img

see what happens and post the results here.
[G1 Android Development] S3bast1an:
With "apply any zip from SD" in recovery I cannot use the images downloaded before with CM-Updater, so I can only access images in root-directory. Is it possible to change that? I droddled around an hour yesterday till found the image on SD and copying it to root-dir.

AND:

Obviously I dont have to root the SD in console when accessing (and aborting) "apply any Update from SD" before. Perhaps "mount SD" (and also "fix_permissions") could be useful "script"-menuentrys also, would make it even more comfortable and more useful.

Greets

S.
[G1 Android Development] MaliceMcGuire:
you can always alt-x to the terminal and ums_enable, from there it mounts your sd as a mass storage device.. move your files out from there folders from your pc... then ums_disable ..reboot.. or type recovery and that should work .. works for me :)
[G1 Android Development] Nyanchew:
Pensive,

Thank you for reply.

I tried flash_image command, and got following messages.

mtd: erase failure at 0x000c0000 (Input/output error)

mtd: erase failure at 0x000c0000 (Input/output error)

mtd: skipping write block at 0x000c0000

error writing boot: No space left on device

After that, I reboot the phone, but freeze at first screen. I re-enter recovery mode and try to update, then it failed with these messages:

Deleting files...

Formatting SYSTEM....

Copying files...

Deleting files...

Deleting files...

Deleting files...

Deleting files...

Copying files...

E:Failure at line 88:

copy_dir PACKAGE:data DATA:

Installation aborted.

reboot again, re-enter recovery mode, try update again. This time it completed. I can boot my phone.

Now, I'm using JACxHEROSkiv1.6r2 - MoDaCo custom Hero 1.51 merge.

I think updating is success. Because I have no problem with MoDaCo ROM and also CyanogenMod 4.0.4 that I was using for a week before MoDaCo. I just want to know why nandroid restore is failed.
[G1 Android Development] pensive:
It is possible you have a bad memory location at

0x000C0000. The difference between the nandroid version of boot.img and

the update boot.img is the size. When the nandroid backs up the boot partition it

backs up the entire 2.5meg. The actual useful portion is actually smaller but

all the junk after the useful data is also backed up.

There are a couple of things you can try to investigate this further.

Attempt to zero out the boot partition.

cat /dev/zero > /dev/mtd/mtd2

It should give you the "no space left on device" error if it successfully zeroed

out the flash. Otherwise it would fail earlier with a "write" error.

You can also try to truncate the nandroid boot.img to below 0xC0000 address, hopefully the truncated version would include all the useful blocks

and would just truncate the end junk. Take a look at what the size of boot.img is in the update.zip file. To create a truncated version you can use

"dd" linux command, look at the manual page.

I suspect that the quality control at HTC is lacking. They probably just flash

some boot.img which does not cover the entire partition and assume everything is fine. When a larger boot.img is flashed, however, all kinds of hell breaks out.

You also seem to have some intermittent problem with installing /data, but it

appears not be serious.
[G1 Android Development] wardy277:
Is it possible to change the lising of zip files to look in the cyanogen updator folder. Its nice to use the updator but its a pain if i want to do a nandroid backup first. preferably i would like to download it via the updator, reboot into recovery and then use the recovery to nand backup adn then install the update

Chris
[G1 Android Development] Nyanchew:
pensive,

Thank you for a good explanation.

I'm happy with current custom ROM and play with it. I'm afraid of something will happen if I do this kind of hacking more.

Thank you!
[G1 Android Development] tjungus:
All,

I ran the command in terminal emulator and it says permission denied?
[G1 Android Development] YoungJ030:
mount /sdcard

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

reboot recovery

worked for me!
[G1 Android Development] chevycowboyusa:
Did you su??

When you open terminal emulator did you type "su" (without quotes)?

If yuo have root you should get a # symbol and then you can type the rest of the commands.

Good Luck
[G1 Android Development] perevers:
Is it possible to flash this recovery image, and then go back to the original recovery image later if needed?
[G1 Android Development] mattharrison:
Auto SD Card Partiton

Just wondering if you have thought about an auto sd card partion, i.e. Will do fat32, ext2 and swap in one click. i think i have seen this on another recovery image but i cant remember where. Just a thought
[G1 Android Development] iRobC:
Best Practice

Is it a good idea to do an Alt-W (Wipe) every now and again even if things are running relatively smoothly? And..Any downside?
[G1 Android Development] pistol4413:
if things r running smooth there i no need to wipe. i wipe every few updates just to keep things fast
[G1 Android Development] bobwhat:
After doing:

flash_image recovery cm-recovery-1.1.img

options:

-d delete the image file after a successful flash

Is returned to me. I have no idea if this means this has been done correctly. Help? Do i need to reboot after the flashing? I tried searching for help with this, btu found nothing.

I am on

Adp jf 1.5

Radio image installed

Thanks
[G1 Android Development] B-man007:
dont wipe unless you are going to flash the update again if your using cyans rom

if you wipe without flashing an update, you will lose some required files. however, its a good idea to wipe between updates as it keeps things clean.

I wipe before i update (though its not always required)
[G1 Android Development] iRobC:
Best Practice

I use the CM Updater from the market.

I'm currently (happily) on v4.1.10.1. If I go to Recovery and do a wipe and then go back into the CM Updater and re Apply the v4.1.10.1 ROM are you saying it should be OK and there should be no issues?