yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] devsk:
bzip2 is WAY slower than gzip. The idea is to strike a balance between the compressed size, the time it takes to make the backup. With gzip, the difference between -1 and -6 was about 8% in size but the time taken by -6 was almost 3 times the time taken by -1. That is clearly in favor of -1. Moreover, we need to think about the fact that the compression will hit the CPU and hence the battery really bad. May be we need to add a warning to the user about either attaching the USB or power cable to the thing while backing up with compression.
[G1 Android Development] devsk:
I think you should check if the /sdcard is already mounted rw and leave it that way.
[G1 Android Development] pensive:
Compression level, Battery

Currently there is a test for power level, at least 30 is required. Maybe it needs to be increased if the compression is on. One can never have enough warnings.

As far as gzip vs. bzip2 or zip, every one is at the mercy of the capo de tutti capo (sp?) If it is not in the image, nothing I can do about it. :(
[G1 Android Development] devsk:
cyanogen: Is it possible to restore the gzip executable in the next recovery image to the original one in 1.3.1? Its pretty small in size anyway. The gzip from busybox doesn't support compression levels and level 6 (default) is 3 times slower than level 1, whereas its only 8% smaller in size.
[G1 Android Development] RTX:
i also Cant LS the sd card ... its empty ?????

i tried 100 times already

it tells me no such file or directory

im not munting the sdcard

what is wrong

?????

please help
[G1 Android Development] pensive:
There are two types of mounting.

ums_mount mounts your card for access by PC making it inaccessible by the phone.

mount /sdcard

which mounts your card in the recovery to make it accessible to the phone

They are mutually exclusive.

If neither has been done, your sdcard is UNMOUNTED and is not accessible by either.

You want the latter for "ls" to see your files.
[G1 Android Development] tribalb:
Is it just me or did this new recovery take up 8 megs of the phone's memory. I have everything to sd. The only thing I could remember saving to the phone was flashing the new recovery
[G1 Android Development] chrisonline1991:
I'm having some trouble installing this, which i install it via terminal on the phone it says it works, but when i try to boot into it, it gets stuck at the G1 logo Screen. I've tried using fastboot and i get this

I have no idea why, i have the file there and the MD5 files match up.

I don't seem to be the only one having problems with getting stuck at the G1 logo Screen. I'm surprised no one has found the problem.
[G1 Android Development] jkz209:
I open up terminal an type it in but i get ""permission Denied" How do i go about fixing this? im currently on JF 1.51 ADP with hero theme
[G1 Android Development] HighRidas:
i've installed a couple times and and everytime it tkes memory from internal and seems to work but when i load into recovery i still see the jf 1.41 image im running JACHeroski 2.7.4
[G1 Android Development] chevycowboyusa:
Permission denied...

Did you type SU in the terminal? and iffa you do that, make sure when the root permission pops up you say allow, or allways allow....

Good luck!
[G1 Android Development] DOHCtor:
Much clearer. Why didn't you just put it that way in the first place :p
[G1 Android Development] jasonsplace:
About how long should it take restore a Nandroid backup? Yesterday I did a backup, switched out my SD card, and installed Hero. It was running too slow for me so I decided to revert back to my old setup. I swapped my old memory card back in and loaded up into the recovery image. I chose the option to restore the most recent backup. It's been running for about 30 minutes now. The entire screen is full of periods and they keep appearing. It doesn't seem like it should take this long though since the backup was so fast. I don't think I spent 30 minutes altogether backing things up and installing JacHero last night.
[G1 Android Development] devsk:
That's too long. Even a compressed backup takes 17 minutes to do and 3 minutes to restore! So, something is wrong.

cyanogen: I know you are not really fond of me (I haven't seen a single response from you on technical questions I have posted to you), but is there a log of nandroid script that you generate? nandroid script does output useful information. If the log is there, then it could be used to debug this kind of issue.

My switchrom.sh script keeps that log and points the user to it in case of errors.
[G1 Android Development] jasonsplace:
Is there anything that I can do? It's still going? Should I just take the battery out? I don't know of anyway to stop it.
[G1 Android Development] devsk:
You can 'adb shell' into it to debug. The kind of troubleshooting will be all over the place, so I can't give you step by step. But I would first look at my /sdcard with 'df' and see if its growing. Then, note anything in 'dmesg' output towards the end. May be look at 'ps' and 'top' output and see what's running.

If you are not familiar with Linux, it will be hard for you to debug without proper assistance. Either cyanogen or pensive need to chime in here. I think the "dots" are printed by cyanogen recovery image code while it waits for nandroid to finish.
[G1 Android Development] jasonsplace:
Unfortunately my Linux knowledge is very limited. I'll keep playing with it and see what I can do.

EDIT: I pulled out the battery and tried again. It worked quickly the 2nd time and I'm back up and running. Thanks for the help.
[G1 Android Development] markimar:
Forgive me. But is there a simple way within recovery to reformat ext 3 I'm at work with no access to partitioning program
[G1 Android Development] pensive:
Do not reboot.

You need to handle this gingerly. First of all, since it apparently hanging in restore somewhere your phone may be in some half-baked state.

If you have adb set up you should get in by using.

adb shell

ps | grep nandroid | grep -v grep

to see if it is still running

also see if you have this

ps | grep flash_image | grep -v grep

On the left-hand side observe process numbers for the nandroid and flash_image

kill -9 ## ##

those numbers

DO NOT REBOOT

umount /system /data /sdcard

Attempt to rerun the nandroid

from the command line (via adb shell) after you killed the previous one

nandroid-mobile.sh -r

If it hangs again, control-C out of it.

adb shell

again

reboot recovery

And try it again.

Hm, all is well that ends well. Good thing the reboot did not mess things up.

p.s. All the output is dumped into /cache/recovery/log

But it is a temporary log and would be cleaned out with a normal reboot, i.e. you can get at it if you stay within that

recovery session.
[G1 Android Development] pensive:
What exactly are you asking?

Do you simply want to delete everything on that partition? Or do you really

want to reformat?

If it is the former then

mount /system

mount /system/sd

cd /system/sd

ls

to make sure your old bad data is there

pwd

to make sure you are REALLY in /system/sd

rm -rf ./

In case your vision is not good, it is PERIOD SLASH not just slash.

If the latter

parted /dev/mmcblk0

print

partition #2 should the ext2 or ext3, etc...

if mkfs works, last time I checked it did not in 1.3.1

mkfs 2 ext2

if it does NOT work and gives an error

observe where your partition 2 starts and ends

rm 2

mkpartfs primary ext2 oldstart oldend

print

to make sure the partitions are still numbered

1) fat

2) ext2

3) linux-swap

If NOT you have to rm both 2 and 3

rm 2

rm 3

mkpartfs primary ext2 oldstart oldend

mkpartfs primary linux-swap oldswapstart oldswapend

Simple? I think not.

There are no simple solutions for the extremely complicated problem you are

facing. :rolleyes:
[G1 Android Development] markimar:
Thank you!

I may just wait till I get home from work... lol

It's more a matter of getting everything off the ext 3 before I flash a new build.
[G1 Android Development] devsk:
You may be interested in the script I wrote for this:

http://xdaforums.com/showthread.php?t=541183

Have a look. It allows you to switch between your complete ROM setups including what you have on the ext partition. The interface is simple and hides all nandroid options.
[G1 Android Development] shotad:
flashed and got the 1.4, but i still have to rename my zip file to 'update.zip'. and won't let me pick and choose which zip file i want to flash, also, when I flash a new ROM, it seems like the bar goes half way, and it just says 'done'. not sure if it fully flashed the ROM...the version does change to whatever i flashed...:confused:
[G1 Android Development] pensive:
Look inside the *.zip

There an update script which has various "progress" lines in it. If the time

was not divied up correctly between separate steps it just might do what

you describe.
[G1 Android Development] xidominicanoix:
Delete post
[G1 Android Development] shotad:
so i shoudl redownload the 1.4 and do the flash_image command on my terminal?
[G1 Android Development] shotad:
i DID not see apply any zip..option...LOL it was right in my face...der. sorry to waste anyone's time.
[G1 Android Development] purav:
Hi,

i just tried:

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

But i get "permission denied"

Im currently running JFv1.51_CRB43-EU
[G1 Android Development] Escobarretje:
I know have version 1.2 of the recovery image. I made a nandroid backup, and want to place it back, unfortunately 1.2 doesn't support this so I want to flash to 1.4.

Problem is, my phone acts very weird (why I began all this stuff). The keyboard of it doesn't work correctly (sometimes...). When I type a 'q', the phone writes 'pq'. When I write a 'p', it's 'pq' again. This is the same with an 'a'. When I type an 'a' it first recognises an 'Enter' and then the 'A' (capitalised). Also the Menu button of the phone is acting weird, in every program I start it doesn't work, when I press the Menu button there the program closes immediately and the home screen shows. There the menu **** pops up... :mad: I tried everything, wiped my phone, flashed a new image etc. but it doesn't work.

So, I want to put my nandroid backup back, then use MyBackup Pro to back up all my messages, then revert the phone to normal (no root) and check if it's working then, if not I can return it to the store.

The problem is that I can't type 'flash_image recovery /sdcard/cm-recovery-1.4.img' because when I'm at the 'a' it gives an enter... Is there ANY other way in which I can flash this recovery image to the phone, or to just put back on my nandroid backup?

I hope so, thanks in advance :)
[G1 Android Development] andonnguyen:
$su

#flash_image recovery /sdcard/cm-recovery-1.4.img
[G1 Android Development] garok89:
use the fastboot method given on the first post

that way you can use ur computer keyboard as opposed to phones
[G1 Android Development] amadorsg1:
is anyone else getting the same problem?

I used the 1.4 v. And successfuly did a couple of nand backups but now when I try to do a new backup it says it didn't do it and gives nothing else... can someone help?
[G1 Android Development] axlastro:
Problem restoring backup

Hi, I flashed 1.4 . I made a nandroid 2.2 backup and played with some roms. than I wiped and tried to restore, but it said it won;t restore the backup and I have to run it manually from console.
[G1 Android Development] pensive:
Hmm, what could it be, what could it be?

Have you considered the possibility that you have managed to waste all your

space on your card with a zillion of backups?:eek:

I suspect your sdcard is less than a terabyte in size, right?
[G1 Android Development] pensive:
Was your phone plugged in? Did your battery have 30% or more?

Charge it or plug it in to do a restore.
[G1 Android Development] Escobarretje:
Thanks, I succesfully flashed the new recovery image on my phone. Now I restored the backup, it's loading up now I hope it works. Waiting waiting....

YES it's working :D Thanks
[G1 Android Development] axlastro:
Well. I'm not quite sure about that. It said it couldn't perform backup and that I had to go to console and run the script manually. How do I run it manually?
[G1 Android Development] pensive:
Without bells and whistles.

Which one is it? You could not backup or restore?

Some of your posts say one some another.

Go to the console. (alt-x) I think.

nandroid-mobile.sh -b

You may need to delete some older backups

nandroid-mobile.sh --delete

Will provide you with choices.

The default is to delete the earliest first.

nandroid-mobile.sh -r

will restore, it has to be either charged or plugged in.
[G1 Android Development] tuto0503:
thank you very nice
[G1 Android Development] pensive:
Ok, I added several options to handle things for your script.

I am not sure if that is what you were looking for, but...

--ext2 when used with -b|--backup will preserve the ext2/3/4 partition.

nandroid-mobile.sh --save cyan (for example)

would save everything and compress

nandroid-mobile.sh --switchto cyan (for example)

would restore everything to that ROM/APPS.

Needs more error checking for the space/battery requirements

and in general needs to be restructured. I was kind adding code in

leaps and bounds and ended up with 1400 lines more than nandroid

script used to be.

I initially thought your script just preserves the ext2 but it actually invokes

the nandroid script.
[G1 Android Development] devsk:
Awesome! Can you add an option to 'list' the contents with names stored, so that if cyanogen wants to provide an option like 'Restore named backup', he can throw open a list (very much like 'any update') and users can choose to restore which backup they want to restore from that list?

Also, an option to delete named backups.

cyanogen: I have asked this before but I never heard from you. Is it possible for you to restore the gzip from 1.3.1 back into the next recovery build. It had the level option for compression. Level 1 works much much faster than level 6. @pensive: once we have the original gzip back, can you change the default compression level from "" to "-1"?
[G1 Android Development] pensive:
-d|--delete is already there in 2.2

nandorid-mobile.sh -d|--delete -s|--subname cyan

will look for and offer for deletion all those that match "cyan".
[G1 Android Development] ducamie:
im trying to flash 1.4 over 1.3.1 and its telling me it cant find the file?

my card has 3 partitions ext fat32 and swap.. the file is supposed to be on fat32 right?
[G1 Android Development] pensive:
What do you mean supposed to?

It is either there or not, no fuzzy logic there.

Become root

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

mount -o rw,remount /system

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

reboot

One of the copies is useless depending on your ROM but there will be

fewer problems one hopes.
[G1 Android Development] ducamie:
ah sorry about that - i was trying to flash from the bootloader whatsit

forgot you had to flash from androids terminal

sorted now thanks
[G1 Android Development] chrisonline1991:
Do you mean the directory were fastboot is on the phone or the computer? I tried placing the recovery image in the same folder as fastboot on the computer and still no luck. I can't find where fastboot is on the phone (if there is a folder)

I'm using ubuntu 9.04 btw.
[G1 Android Development] unk2009:
Thanx Man for all your hard work, it's greatly apprediated...Diggn the new recovery image
[G1 Android Development] HighRidas:
looks great...thank you for all your dedication
[G1 Android Development] smackiesfunkies:
amazing!

man this is awesome

thanks for ur work

even the whole theme of it is killer
[G1 Android Development] Oceanborn:
Whenever I start in recovery, then go to the terminal and enter the code given in the first post, I get the reply "sh: flash_image not found"

Anyone know how to fix this?
[G1 Android Development] xidominicanoix:
i dont think u can do it from recovery terminal ... try booting up the phone and doing the flash_image in a terminal there
[G1 Android Development] Oceanborn:
I appreciate the quick response, and that was the problem. Thanks!
[G1 Android Development] DMaverick50:
This program is an absolute must.

1 question; ive only flashed 1 nandroid backup, when i have several, how do i choose which to flash? the option says 'flash latest recovery' but will it let me select which one i want to use? thanks for any help
[G1 Android Development] jbomxda:
Works!!! Amazing as always!!! ;)
[G1 Android Development] xidominicanoix:
1.1 works like a charm :D
[G1 Android Development] SpyderMS:
+1

I would love to have this option!

ADB is not always readily available. Sometimes you f*ck up your phone in the first hour of working a 12 hour shift :(
[G1 Android Development] soba5150:
Cyan You are the man!!!!! Finally was able to clear out stale NFS errors with your recovery image!!! I've probably spent 10 hours this week messing around with stuff trying to fix it...finally data to sd is complete for me lol.....Donation coming!! I don't know what i would do without you and Lucid man!!!
[G1 Android Development] Thats BS:
Thank U!

Hey, next could you make my phone dispense beer and pretzels? I'm pretty sure you could do it.;)
[G1 Android Development] TheGreenJester:
Thanks cyanogen! I'll send some beer your way after payday :D
[G1 Android Development] xidominicanoix:
This *MIGHT* work .. I have never tried this, so try at your on risk

If system.img, boot.img, and data.img are on your sdcard, then:

Reboot into recovery

Go to the recovery terminal with ALT + X

mount sdcard
cd sdcard
flash_image system system.img
flash_image userdata data.img
flash_image boot boot.img
umount sdcard
reboot

Again, I have never tried this. Just my thoughts on how it could possibly work by just using the phone and no computer.
[G1 Android Development] malaeus:
any specific directions on how to use the fix_permissions.sh etc from console? just normal

sh /sdcard/fix_permissions.sh

or can we type in a command name for instance just typing fix_permissions and then hit enter?
[G1 Android Development] DreamcastDC:
cyanogen you rock, running great.
[G1 Android Development] defconoi:
I got an error while checking the filesystem, you may want to echo in more details so we dont have to do it from console, or.. have it go to console while it checks the fs

Also alt X I have no way to exit back to the recovery screen, you may want to create a fix so we can do that, instead of doing reboot recovery to get recovery again..

Thanks for the hard work

defcon

P.S. Verbose output would also help debug issues
[G1 Android Development] staticshadow:
dood. awesome work. it works perfectly
[G1 Android Development] beatle7777777:
can anyone make a quick guide on all the different commands this can do?
[G1 Android Development] xidominicanoix:
just type 'recovery' without quotes to get back
[G1 Android Development] cyanogen:
Yes, I need to pipe the output of e2fsck to the ui. This was just hacked together quickly. I'll see what I can do in the next couple of days.

Going to try to get the source for all these changes together and make it all available, similar to JF's build environment.
[G1 Android Development] defconoi:
awesome work, I look forward to what you hack together

defcon
[G1 Android Development] jmon777:
Any way to down load from the phone? I saved the link but. does the file have to have a particlar name
[G1 Android Development] clockedtouch:
props for the nice update...
[G1 Android Development] Phromik:
Just flashed 1.1 and looking good :) Props to you!
[G1 Android Development] hamshu:
I have 2 questions.

1. ALT+F is Fix_Permissions.sh correct?

2. I will not have to use ALT+M, if I use Cyno 3.4? 3.4 will automatically setup A2SD correct?
[G1 Android Development] calypso78:
great work as always!!
[G1 Android Development] pensive:
if you have 1.4 recovery

nandroid-mobile.sh -r

will provide you with further options.
[G1 Android Development] slimster:
I keep getting the message " -d delete recovery image after flash" or something similar after typing the "flash_image recovery/sdcard/cm-recovery-1.4.img". I spent the last two days searching this thread for any answers to this so I hope it wasn't answered previously. What do I type after that? I tried just typing "reboot recovery" but when it reboots I'm still looking at 1.3. Any help guys? Thanks
[G1 Android Development] pensive:
There are several posts related to this.

You just have not looked hard enough. Find the post with the title "Recovering

from the recovery issues."
[G1 Android Development] pensive:
nandroid-mobile.sh 2.2.1 (maybe 2.3?)

nandroid-mobile.sh -b -s MyROMName -e|--ext2

Add the contents of the ext2/ext3/ext4 partition to the backup.

nandroid-mobile.sh -l|--listbackup -q|--quiet|--silent

Find all the backups (in any folder) on the sdcard. --silent suppresses

all output EXCEPT backup folders paths(names). This output will be wrapped in a C

function to populate an array of string pointers to be passed to the UI.

Super options: Require zero brain power (battery power still required)

nandroid-mobile.sh --save MyROMName

Backup and compress absolutely EVERYTHING, including app2sd, dalvik cache.

Although most people probably would have the same apps for any ROM it is

possible to have completely different apps for different situations.

Going to work? Perhaps your work email should be on the main screen, and maybe

some unprofessional looking apps should be hidden. Going out? Then maybe all the music

apps should be right there for easy access along with the icons of your buddies.

nandroid-mobile.sh --switchto MyROMName

Restore the ENTIRE environment to that ROM.

Update: Fixed output which I broke modifying for --silent|--quiet.

Note: it is possible to customize the userinit.sh script for each different ROM

and tweak things like swappiness, niceness, etc... for different ROMS.

p.s.

Once the table of backup paths is populated and a choice is made

char exec_string[128];

backup_table[100];

int chosen_backup = 9; // Assume an user chose backup number 9

sprintf(exec_string, "/sbin/nandroid-mobile.sh --defaultinput --quiet --ext2 --restore --subname %s", backup_table[chosen_backup]);

{

char *args[] = {"/sbin/sh", "-c", exec_string, "1>&2", NULL};

execv("/sbin/sh", args);

fprintf(stderr, "E:Can't run nandroid-mobile.sh\n(%s)\n", strerror(errno));

}

Will restore that specific backup.
[G1 Android Development] slimster:
I appreciate the responce but how about a link? I don't mean to be rude but trying to find one post out of a thread with 120 pages is rediculous! It would've taken just as long to anwer the question than to post back with telling me I didn't look hard enough. Thanks for the help anyway
[G1 Android Development] pensive:
Hm, you mean you want me to do the search for you?

I have to do the same search as you. The string I gave you is exact. Just several pages back there is another set of instructions to a british guy. You can use

that if you do not need any explanations why.
[G1 Android Development] pReTTyUnG1:
Wen I click the link to dwnload it..a whole bunch of letters cum up?!? Is this a dwnload link?
[G1 Android Development] DOHCtor:
Did you really have to spell it like that?
[G1 Android Development] mrbishi:
Just right click on the link and 'save as'
[G1 Android Development] slimster:
Please someone throw me a bone here, I've spent days searching for an answer to this problem and I can't find the answer. I don't know why I'm unable to find the post refering to this problem but I don't seem to be able to. Please help.
[G1 Android Development] Abolfazl:
#1 rename the cm-recovery-1.4.img to recovery.img so it is easier to type and put it in /sdcard

Then go to your terminal while phone is loaded and type::

su

flash_image recovery /sdcard/recovery.img

You had "flash_image recovery/sdcard/cm-recovery-1.4.img" before. There is suppose to be a space between recovery & /sdcard
[G1 Android Development] pensive:
Copy the new image to these locations.

become root

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

mount -o rw,remount /system

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

reboot.

Yeah, I know this is NOT what people usually say to do, just do it.