yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] amadorsg1:
yea thought of that...

Yea I thought of that i have space on that card... and just to make sure i slaped in a unused card just onether of the many i have... and still the same thing no real explanation .... i even rebooted with said new card and again nothing... so yea thanx ;)
[G1 Android Development] devsk:
May be if you run the script manually, it will tell you what went wrong.
[G1 Android Development] slimster:
Thank you so much Abolfazl! I was missing the space before /sdcard. Worked as advertised......I knew i'd kick myself when I found out what I was doing wrong! Thanks again
[G1 Android Development] markimar:
Is wiping sd cards or formating partitions ever going to be menu options on recovery?
[G1 Android Development] pReTTyUnG1:
Ok thank u!
[G1 Android Development] madunix:
i didn't think it was possible to mess this one up...
[G1 Android Development] amacg1:
im having trouble applying this recovery img i cant get it to work i go to terminal emulator and type in <flash_image recovery /sdcard/cm-recovery-1.4.img> and then it says <error opening img: no such file or directory> i put it on the root of my sd card i dont know y it dosnt work can someone help me out
[G1 Android Development] miketaylor00:
@amacg1 - either you are typing the name of the file incorrectly or it is not in the right location. Rename it to recovery.img to make it easy on yourself.
[G1 Android Development] mookie3three:
Guys I'm having trouble making a backup with v1.4. Everything worked fine in 1.3.1 but it is giving me an error when trying to make a backup then stops. I've checked the sd card and it makes a folder but there is nothing in it.

Any suggestions would be great. cheers
[G1 Android Development] mookie3three:
Don't worry I figured it out.

You need to remove old backups from Nandroid 2.1 and it worked. This maybe of help to someone.

cheers anyway
[G1 Android Development] pensive:
It is NOT so much that you need to remove old backups.

You simply need to have enough space on the card. At least 100 meg is required

to make a backup. Yep, 10 backups will take up a GIG, ouch.
[G1 Android Development] coire90:
problem

I am trying to download this over wifi on my g1 and all I get is a .txt file. Is this a problem with the link or my g1? Any1 else getting this? I know this is probably the wrong thread but if its a dodgy link it should probably be said here.

Cyanogen, I salute you!
[G1 Android Development] ERamseth:
mkfs.vfat, cfdisk

[i'm not sure if this is a recovery image issue or a busybox issue... please let me know if it's a busybox issue and doesn't belong here...]

I know the busybox in recovery image 1.4 has parted and fdisk in it, but is there a reason not to include cfdisk or the mkfs.vfat command (or mkfs.ext# commands). I only ask because I am used to using fdisk and cfdisk to set up partitions then mkfs.vfat, etc to format them. (I know mkfs.* are just links to mke2fs and mkdosfs or something similar).

Anyhow I found parted and found out how to use it so that's fine. Just curious as to the lack of what I mentioned above, and I guess a suggestion to include them if it's possible.
[G1 Android Development] slimster:
All you have to do is rename it "cm-recovery-1.4.img" and you're good to go, flash as advertised.
[G1 Android Development] revwillie:
I just need to say again how kickass this recovery is. Since installing it, I've flashed about five different cm builds, three different themes on top of the CM builds, and I've recovered two backups when things got a little hinkey.

I also prefer to use the built in console instead of adb. I've fixed numerous app issues that way on the last three of CM's recovery images.

I bought a G1 so that I could have a linux toy to fiddle with, and the pimped out recovery images make it so easy to try new things.
[G1 Android Development] DMaverick50:
When i flash a nandroid, the build flashes ok and then ive got all of my apps, except they dont show up on the build. when i go to market it says i have them but i have to uninstall and reinstall all of them. Im sure there is an easy work around for this but i havent used nandroid much so i dont know what im supposed to do. Can anyone help? thanks
[G1 Android Development] miketaylor00:
Nandroid does not backup your ext partition. If you were using a2sd then your applications do not exist when you restore your backup.
[G1 Android Development] pReTTyUnG1:
i cant get this to wrk either i renamed it to recovery.img it says -d delete image file after a successful flash or somthn like that...any ideas????
[G1 Android Development] pensive:
The next version will have that option.

--ext2|-e

Will backup the ext2 partition
[G1 Android Development] sillyshy:
Other then installing via terminal is there any other way cause I keep getting permission's error :( I just don't know why I got everything else fixid.
[G1 Android Development] slimster:
I had the same problem.....make sure you're not forgetting the space between "recovery" and "/sdcard". It should be "flash_image recovery /sdcard/cm-recovery-!.4.img"
[G1 Android Development] pReTTyUnG1:
Nope I typed exactly the way it is like 1000 times...doesn't wrk...idk..any other ideas???
[G1 Android Development] iso67:
In order to load this image should I use the terminal application with the phone on, or the terminal in recovery mode?
[G1 Android Development] NeoBlade:
[Suggestion]

You want to load the flashed recovery image? If so there are a few ways...

Terminal Emulator and type in

su

reboot recovery

The phone will then reboot into the lovely pimped out recovery image. If you are talking about actually flashing the recovery image then follow the steps in the very first post of this thread.
[G1 Android Development] pensive:
The general rule is

You cannot mess with the recovery partition if you are IN RECOVERY. And vice

versa you cannot change the boot partition if you are running the boot partition.

Although this general rule holds for most recoveries, since cm-recovery is memory

resident it is possible to flash even the recovery partition, obviously that is what

the nandroid restore does. Unless you already have a previous cm-recovery that

is memory resident (RAM disk) you cannot flash recovery from recovery.

So, it means you can flash recovery.img in normal mode. That said, what

you can do in recovery is copy the recovery.img into locations in the file system

to make the phone flash it automatically upon the boot.

Assuming your /sdcard, /data, /system are mounted already, which is not necessarily the case

in recovery.

So, mount, mount, mount

mount /sdcard

mount /data

or

mount /system

first.

cp /sdcard/newrecovery.img /data/recovery.img (if you run cyan ROMs)

or

mount -o rw,remount /system

cp /sdcard/newrecovery.img /system/recovery.img (if you run some other ROMS)

The new image will be flashed automatically when you reboot into the normal mode.

p.s.

To find out whether you need to copy into /system or /data

IN NORMAL MODE AT THE TERMINAL, NOT IN RECOVERY

grep recovery.img /init.rc

The output will tell you where the ROM expects the recovery.img to be.
[G1 Android Development] pensive:
You can post a 1000 times that it does not work, but...

if you want help, what you need to post is the detailed description what the heck you are doing, and what the heck you are seeing.

p.s.

You see the post just above this ONE, do that instead.
[G1 Android Development] thatronnieguy:
Make sure when you go into Terminal emulator you type "su" that will ask you for super user permission and change the $ into a #. After that type flash_image recovery /sdcard/cm-recovery-1.4.img and you should be fine. Hope that helps.
[G1 Android Development] slimster:
Then I don't know what to tell you; I had the exact same problem and it was because I wasn't putting the space before the backslash......you might want to try it 1001 times and make sure you're typing it exactly.
[G1 Android Development] bassbox:
flash_image recovery /sdcard/cm-recovery-1.4.img

flash_image: not found
[G1 Android Development] alexfix:
seems to me 1.4 version is not bootable on Rogers Dream, any ideas?

1.2+JF is good.
[G1 Android Development] bassbox:
atm nothing but fastboot via cmd@vista works for me

C:\Users\Utz\Desktop>fastboot flash boot recovery.img
sending 'boot' (4002 KB)... OKAY
writing 'boot'... FAILED (remote: image update error)

zong

boot, need recovery xd worked^^
[G1 Android Development] pensive:
Question, why the hell are you flashing the recovery.img

into the boot partition? Unless you are trying to run some wild experiments like I do, you are to flash recovery.img into the recovery partition, NOT boot.

The boot partition is only 2.5 meg and cm-recovery-1.4.img will not fit there

ANYWAY.
[G1 Android Development] DMaverick50:
so using 1.4 i put that into recovery console then make the backup? thank you
[G1 Android Development] pensive:
It is not in the 1.4 recovery.

You have to download the more up to date version.
[G1 Android Development] DMaverick50:
sorry im confused, you dont mean the newer version of cyanogen recovery right? i think 1.4 is the newest recovery image so im guesing maybe you mean newer nandroid program? sorry for my ignorance, thanks for the help
[G1 Android Development] pensive:
1.4 is the most current recovery image, but

2.2 is no longer the most current nandroid-mobile.sh script.
[G1 Android Development] kyleds:
apply from download

Is there gonna be an update for this that will allow you to flash .zip files from the download folder on your sdcard? so that you can download roms and themes from your phone into the download file on your sd and flash it from there. Because when I try to move from the download folder to the main sdcard, the file is saved as /sdcard/theme.zip not just theme.zip which even renaming can't change. It would be cool not to have to download onto computer, connect phone and transfer new roms/theme updates.
[G1 Android Development] pensive:
Can do from the recovery command console now.

You can even do something like this:

nandroid-mobile.sh --webget http://........./theme.zip --autoapplyupdate

Will fetch and install the theme.

But you need a WiFi connection to do this.
[G1 Android Development] kyleds:
Yeah... don't usually have wifi where I am. And hawaii doesn't even have 3g yet...
[G1 Android Development] pensive:
Hm, in that case

nandroid-mobile.sh --getupdate

This option by default looks in /sdcard/download for updates, but it expects that the

file would be named *update*.zip

will do what you want but it is a bit more prosaic than the other option.
[G1 Android Development] amarkow2:
nevermind! I figured it out...lol
[G1 Android Development] jacsonmoore3:
how do u flash this recovery..it want read when i do the steps so what im doing wrong..do i put it n a zip n rename it to update or plz someone help this newb
[G1 Android Development] pensive:
Noone wants to read previous posts!

Read this post.

#1217

Old 5th August 2009, 02:11 PM
[G1 Android Development] omerzzz:
Hi,

I flashed the recovery 1.4 on HTC Magic.

How can I use console to run upgrade_fs ?
[G1 Android Development] sw20matt:
Can you please make a update.zip for this? I am having trouble getting SU on the new jacxhero....
[G1 Android Development] JKshowman:
can somebody help me?

on Terminal Emulator, the command su isn't working for me, and yes, i tried SU too. help?
[G1 Android Development] pensive:
You have no physical keyboard, right?

The simple answer is you cannot use the console.

The useful answer is that you have to use ADB from your PC to connect

to your Magic and run upgrade_fs that way.
[G1 Android Development] sw20matt:
Can I make an update.zip myself? I tryed just zipping the .img file but that didnt work... any advice? I am still on 1.3
[G1 Android Development] miketaylor00:
That means you don't have root.
[G1 Android Development] miketaylor00:
It's not that easy. It has to be an image. Just flash it from the terminal. It takes 2 seconds.
[G1 Android Development] sw20matt:
how do i do that?
[G1 Android Development] Noel3903:
Read the first post it tells u how, also mine gave me an error first time but when i (home+power tried it out) i was running 1.4 :D
[G1 Android Development] justjimjpc:
I have had this happen to me a few times ... but I was aware

I was getting close ... with my 4GB so now have an 8GB
[G1 Android Development] keemyb:
cool tool for a fool lool

Thanks for this, i'm a dream noob but has memorised how to flash this off by heart:

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

Wait for the # then yaaay me.

One thing I'm having a problem with is that is will occasionally take itself off my device, leaving me with the original exclamation mark, so i have to flash again every once in a while
[G1 Android Development] Gilliland12:
Having a problem with the recovery. When I hit the recover to last backup option, it fails. It does work though if I move the files from the nandroid folder to the root of the sd card. Looks like for some reason it's not finding the most recent backup.
[G1 Android Development] free-sidux:
nice one, but I still have problems:

where to save the script?

tried it on the sdcard, but this fails when the script mounts the sdcard again. where does cm-recovery look for the scripts?

another q: what is the wrapper for?

maybe you can add the instructions in the comments inside the script, or did I miss something?

greets
[G1 Android Development] pensive:
This version was mostly done for the next release.

When and if the next release of the cm-recovery comes out the newer

script may be included. Actually there is one more option which has been put

in.

--listupdate will search the entire card for updates, not just root. The C wrapper can be used to populate the name table. The C wrapper is for

use by Cyan or Cruton or myself (if I can find time now)

the C wrapper is intended to hookup the --listbackup option of the script into the

C code of the recovery.c to populate a backup path table, so that the

UI could choose any backup to restore.

Until this version is part of the new recovery image, it is kind of inconvenient to use.

Certainly it is not for the most people here :-)

You can put it anywhere on the card but you have to copy it into the ram

disk before use to avoid the hassles.

mount /sdcard

cp /sdcard/nandroid-mobile.sh /sbin/nandroid-mobile.sh

chmod 755 /sbin/nandroid-mobile.sh

cd /sbin

(overwriting the old version that is already there is not a big deal, since the change is

not permanent, if things go awry just reboot)

The issue with mounting is the resource is busy if you run the script from

the card so the /sdcard cannot be unmounted.
[G1 Android Development] pensive:
What is happening is most probably not what you think.

Your latest backup is probably corrupted. When you move it nandroid no

longer sees it and restores the earlier backup which is not corrupted.

And another possibility which could be occurring is when you remove the *.img

files the script assumes there are no images to restore, so it is basically a null

operation. You just assume it did something.
[G1 Android Development] devsk:
Pensive: Thanks for including some of my ideas into your script. I see the newer options.

Another idea for this tool: Write a small backup GUI. It takes options as input like a backup name, whether full ROM or just the nandroid, with compress or without etc., modifies the init of recovery to run itself, saves options in /sdcard/nandroid.xml, reboots into recovery, reads options from /sdcard/nandroid.xml, does a backup with the specified options, and reboots back into the phone.

No typing!

No manual options!

The user plugs it into AC power and just clicks "Backup my Phone."

I think this is a deficiency of the script. It doesn't really need to unmount if the /sdcard is already mounted rw. I looked at the code and its not clean in this aspect. It should check for mount point in /proc/mounts and leave it alone if its already mounted rw, and remount if its in ro. It should never umount unless exiting.
[G1 Android Development] pensive:
You are welcome to clean it up.

Sadly I was not born with a trust fund (I'll never forgive myself :rolleyes:) and

have to spend time making a living. You can restructure it to your heart's

content and cross the Ts and dot the Is. I always assume that people understand more than they do and are able to handle little issues (like reading the help section). And often I am wrong.

No one is going stop you from writing that GUI. If it makes my life easier I will be happy to use it, I am sure every one else here will be happy to use it.

I personally hate UIs, I type fast and can get a lot more done at the command line than I can twiddling a mouse or a trackball. I still use emacs and vi (sometimes even sed) depending of what I need to do. Most programmers these days have never heard of any of them.

Oops, l think I am in danger of writing an off topic post.

Go for it. Do the UI!
[G1 Android Development] devsk:
That's pretty condescending you know! I write C code for living too and use vi/sed all the time. But you aren't the first open source coder with a complex that I have encountered.

Anyhow, GUIs are important! Proper clean up and logging is important! For the avg Joe!
[G1 Android Development] pensive:
Hm, Apparently I have struck a raw nerve.

I do not want to waste the bandwidth here, so I'll be brief.

1) I have nothing to do with the open source community, I always charge

money for my work. Mods to this script was the first and probably the last

exception that proves the rule. I did it for my own amusement and nothing

else.

2)I program in APL and I am not really a programmer, I do math.

3)This the first time I have ever done shell programming, if you are

unhappy with the result, step up to the plate and fix it.

4)If you are looking for accolades take over the improvements and

maintaining the script.
[G1 Android Development] garok89:
had a quick look over and couldnt find the answer to this...

how do i change the directory for update.zips?

i am helping develop the cmupdater and it puts the zips in /sdcard/cmupdater/

for automated flashing from the app

i would really like to know how to change the directory if anyone can help

thanks
[G1 Android Development] devsk:
Whoever said anything about accolades?

I don't do stuff for amusement or accolades. I do it because people find the end result useful and I have spare time (or I make some).

Your attitude is negative man! But its ok.
[G1 Android Development] realcyberbob:
By installing this will it delete anything already on my phone?
[G1 Android Development] pensive:
With cm-recovery-1.4.img you can...

do the following.

nandroid-mobile.sh --path /sdcard/cmupdater --getupdate

will offer choices of *zip to move to /sdcard for flashing (with

some bookkeeping done for names and m5sums)

After taking a closer read of your post you should consider having your app

(assuming your app is root) write the blablabla.zip to /cache/blablabla.zip

and then write a command line into /cache/recovery/command

echo "--update_package=CACHE:blablabla.zip" >/cache/recovery/command

and then execute

reboot recovery

Which would apply the update.
[G1 Android Development] pensive:
That is the whole point.

Out with the old, in with the new.
[G1 Android Development] realcyberbob:
I guess I should've specified, I meant things like applications or data. Also, I'm already running Cyanogen's 3.6.8.1, would I have to install it again after I install the recover image?
[G1 Android Development] pensive:
Recovery images have nothing to do with

other partitions. You will only overwrite the recovery. And if you want to save

yourself grief over things not working just do the following:

After you download the new image cm-recovery-1.4.img to lets say

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

using your browser

then (after su)

cp /sdcard/download/cm-recovery-1.4.img /data/recovery.img

reboot

The image will be flashed for you automatically as part of the boot

sequence.
[G1 Android Development] garok89:
there is no problem applying the update from the app

i just meant for a manual reflash - perminantly change the directory to search for the update.zips in /sdcard/cmupdater

would that command be temporary or perminant? looking at it, it looks to be just for that instance
[G1 Android Development] pensive:
You are correct, --path

Changes the path for that run, to change the default you have to change

DEFAULTUPDATEPATH=/sdcard/cmudater

inside the script.
[G1 Android Development] santana00:
Can someone help me everytime I type in the command in the terminal it keep saying delete the image file after a successful flash. What do I suppose to do?
[G1 Android Development] copolii:
I have the same problem ... 1.2 works, but anything newer than that just hangs on the Rogers logo. Did you ever find a solution?
[G1 Android Development] garok89:
i had this problem when using the "new and improved apps2sd" method...

if u backup ur ext partition and wipe the contents of /app and /app-private and then stick the stuff back on it later, it should be fine

no guarantee, i am not using rogers phone or build
[G1 Android Development] Stigy:
Anyone else get this error trying to run a Nandroid Backup in 1.4:

Performing backup........

Error running nandroid backup. Backup not performed.
[G1 Android Development] justjimjpc:
From looking at your signature... I would assume you have plenty of room but I know i have run out of space before... and the backup will fail... so try moving a bunch of you old backups off the phone and onto the PC and trying the backup again ...

I am running a 8GB Class 6 and ext3 @ 885MB
[G1 Android Development] Stigy:
I think you may have hit the nail on the head.

I only have 44MB available on my FAT32 partition.

Thanks.
[G1 Android Development] Stigy:
Sorry to double post, but that was it. I had about 16 nandroid backups on my phone taking up 2GB of space... :o

Thanks so much -- didn't even think of that.
[G1 Android Development] justjimjpc:
My Backups run at above 46 - 48 MBs so that would cause the error
[G1 Android Development] pensive:
Just to clue everyone in.

When the UI runs the nandroid-mobile.sh script all the informative output

about problems, etc... is being dumped into /cache/recovery/log

The redirect happens in recovery.c

This log is temporary, if you reboot it is gone. So instead, use the console

in recovery to look at it first.
[G1 Android Development] brios86:
how can i download it trew terminal emulator? i know is possible i am on my phone and not near a computer for a while would like to try this now
[G1 Android Development] uansari1:
Here you go.

su

cd /sdcard

wget http://n0rp.chemlab.org/android/cm-recovery-1.4.img

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

For more details, you can see here.
[G1 Android Development] brios86:
thank you so much
[G1 Android Development] brios86:
i get this

$ su

# cd /sdcard

# wget http://n0rp.chemlab.org/android/cm-recovery-1.4.img

wget: bad address 'n0rp.chemlab.org'

# wget http://n0rp.chemlab.org/android/cm-recovery-1.4.img

wget: bad address 'n0rp.chemlab.org'

#
[G1 Android Development] pensive:
You are supposed to do it in the terminal emulator,

not in recovery. And it is a ZERO(0) in n0rp not nOrp, check it just in case.
[G1 Android Development] brios86:
i did in terminal thats what i got and i did put (number) 0
[G1 Android Development] miketaylor00:
You can also download it through the browser and then copy the file from /sdcard/downloads to /sdcard
[G1 Android Development] brios86:
i tryed in the browser but it would not load the page by the way i am on the new google ION ROM can it be because of the browser the ROM has??
[G1 Android Development] miketaylor00:
It sounds like a DNS issue. How long have you been on that ROM?
[G1 Android Development] uansari1:
The url works fine when I click on it using my laptop... so you're having connectivity issues. Are you connected to the network via wifi or 3g? I've seen Edge and GPRS connections act flakey like that due to the limited bandwidth...
[G1 Android Development] brios86:
2 to 3 days
[G1 Android Development] brios86:
my browser show a white page with a bunch of letters and simbols