yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] alritewhadeva:
nope no way you can brick your phone
[G1 Android Development] pensive:
Still testing but this is what is coming, re:nandroid

for option in $(getopt --name="nandroid-mobile v2.1" -l norecovery -l noboot -l nodata -l nosystem -l subname: -l backup -l restore -l compress -l getupdate -l delete -l path -l webget: -l webgettarget: -l nameserver: -l nameserver2: -l bzip2: -l help -- "cbruds:p:" "$@"); do

case $option in

--help)

echo "Usage: $0 {--backup|--restore|--getupdate|--delete|--compress|--bzip2|--webget:} [options]"

echo ""

echo "--help Display this help"

echo ""

echo "-s | --subname SUBSTRING In case of --backup the SUBSTRING is"

echo " the prefix used with backup name"

echo " in case of either --restore or "

echo " --delete SUBSTRING specifies backups on which to"

echo " operate"

echo ""

echo "-u | --getupdate Will search /sdcard/download for files named"

echo " *update*.zip, will prompt the user"

echo " to narrow the choice if more than one is found,"

echo " and then move the latest, if not unique,"

echo " to sdcard root /sdcard with the update.zip name"

echo " It is assumed the browser was used to put the *.zip"

echo " in the /sdcard/download folder"

echo ""

echo "-p | --path Requires an ARGUMENT, which is the path to where "

echo " the backups are stored, can be used"

echo " when the default path /sdcard/nandroid/$DEVICEID "

echo " needs to be changed"

echo ""

echo "-b | --backup Will store a full system backup on "

echo " $BACKUPPATH"

echo ""

echo "-r | --restore Will restore the last made backup which matches --subname"

echo " ARGUMENT for boot, system, recovery and data"

echo " unless suppressed by other options"

echo " if no --subname is supplied and the user fails to"

echo " provide any input then the latest backup is used"

echo ""

echo "-d | --delete Will remove all backups whose names match --subname ARGUMENT"

echo " Will allow to narrow down, will ask if the user is certain."

echo ""

echo "-c | --compress Will operate on chosen backups to compress image files,"

echo " resulting in saving of about 40MB out of 90+mb,"

echo " i.e. up to 20 backups can be stored in 1 GIG, if this "

echo " option is turned on with --backup, the resulting backup will"

echo " be compressed, no effect if restoring since restore will"

echo " automatically uncompress images if space is available"

echo "--bzip2 Turns on -c|--compress and uses bzip2 for compression instead"

echo " of gzip"

echo ""

echo "--webget: URL|\"\" Requires an argument, a valid URL for an *update*.zip file"

echo " If a null string is passed then the default URL is used"

echo ""

echo "--nameserver: IP addr Provide the first nameserver IP address, to override the default"

echo ""

echo "--nameserver2: IP addr Provide the second nameserver IP address, to override the default"

echo ""

echo "--webgettarget: DIR Target directory to deposit the fetched update, default is"

echo " /sdcard"

echo ""

echo "--norecovery Will suppress restore on the recovery partition"

echo "--noboot Will suppress restore on the boot partition"

echo "--nodata Will suppress restore on the data partition"

echo "--nosystem Will suppress restore on the system partition"

exit 0

;;
[G1 Android Development] diz305chico:
I have tried to install and now I have no recovery image whatsoever....what should I do

I am running ramjet with an 8 gig sd i folled the procedure that pensive just posted and from there I have no recovery image when I try to reboot with home+power it just boots normally and terminal will not let me boot into recovery either..wheat should I do
[G1 Android Development] pensive:
What exactly did you do?

The procedure was about how to find and get rid of the old recovery.img, not

so much about how to install a new one.

Did you flash the new recovery.img before you rebooted the phone? Did you

overwrite the old recovery.img with the new recovery.img? Did you download

the update.zip (http://n0rp.chemlab.org/android/cm-recovery-1.3.1-signed.zip) into the base of your card and do the normal update routine?

Camera+power, etc...?

What steps did you take to put the new recovery.img in?

You can download http://n0rp.chemlab.org/android/cm-recovery-1.3.1.img

into the base of the sdcard and

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

You may also need to copy /sdcard/cm-recovery-1.3.1.img into the same location on your file system where your OLD recovery.img was.

By old location I mean (It seems I have to be explicit)

If you have the file /sdcard/cm-recovery-1.3.1.img then

cp /sdcard/cm-recovery-1.3.1.img /data/recovery.img (/data is NOT necessarily where you had YOUR recovery.img)

Yours could be in /system/recovery.img or maybe in /system/data/recovery.img, where did you delete it or move it from??????????

If you did not save anything, or remember anything what you did or not do, then look again in /init.rc to see

grep recovery.img /init.rc

where your ROM expects it to be.
[G1 Android Development] Fear_Zoa:
I dont think so.. Last time i checked the only to brick your phone is to mess up a radio or spl update
[G1 Android Development] temporizer:
I did a nandroid back up last night at 1900 and the time stamp on the folder said 20090717-0411

shouldn't it show the date/time that I did the backup?
[G1 Android Development] pensive:
Re: modified nandroid-mobile.sh

Not totally perfect but close ;). Is able to make and restore partial backups.

One can do a full system backup once a week or when one swaps a rom and

just /data on a daily basis.

Constructive comments (and especially testing of different options) are welcome.

Wireless updates work only with WiFi, could not figure out how to bring up

the rmnet0 interface.
[G1 Android Development] pensive:
UTC time

Time stamps are based on UTC time, I suppose one could try to figure out different time zones based on gps but is it worth it?
[G1 Android Development] Denkai:
cyanogen is working on it as we speak.

follow his twitter.

or read the rest of the thread.
[G1 Android Development] Ryanmo5:
You are pretty freaking amazing man, love the new options and trackball control! Thanks for all you do for the community :)
[G1 Android Development] Gimpeh:
Cyan, will you continue to update this img just like your roms? Do you have any other features planned?
[G1 Android Development] lebron212:
Now I downloaded the new recovery image. Do I just copy it over to the sdcard and run the command in terminal or do I flash as a new update in recovery mode?
[G1 Android Development] alritewhadeva:
copy to sdcard and in the terminal type:

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

or in Adb type:

adb shell

flash_image recovery /sdcard/cm-recovery-1.0.img
[G1 Android Development] Denkai:
I can't speak for him, but I wouldn't be suprised if once he gets a stable release he sticks with it. no doubt from his reputation though that any ideas thrown at him he will try and implement though.
[G1 Android Development] ckessler235:
Cyanogen,

Dude, you are the reason i love my G1 more and more every day.. Your work is amazing and i really have no intentions on messing wit anything else, there is no sense to... YOUR THE MAN !!
[G1 Android Development] lebron212:
Appreciate it man!
[G1 Android Development] ckessler235:
...................
[G1 Android Development] matt_stang:
..just so you guys know, even though the console is broken, an adb shell has exactly the same function.

Just a temporary alternative in case anyone is confused and needs the console for converting partitions or repairing, etc.

Oh.. and this recovery img is AWESOME. Thank you!
[G1 Android Development] alritewhadeva:
no problem :D

Something wrong?
[G1 Android Development] caleoss:
when i type in terminal emulator it says "error writing recovery: permission denied
[G1 Android Development] Ryanmo5:
Just use adb, adb shell then

flash_image recovery /sdcard/cm-recovery-1.0.img
[G1 Android Development] Denkai:
did you type su <enter> in terminal and then the command line provided?
[G1 Android Development] robpet2:
great work on this... will try this out later tonight..
[G1 Android Development] GT30RSUBIE:
Never cease to amaze me bro!
[G1 Android Development] caleoss:
thanks, that worked, im guessing i always have to type su then enter....
[G1 Android Development] caleoss:
ive never used nandroid before but would like to start using it, so all i have to do is alt b or is there something else i have to install first?
[G1 Android Development] xidominicanoix:
yup just alt+b and you're set

it will backup to a folder on your sdcard called "nandroid"

P.S. cyan never ceases to amaze me :D can't wait for a new stable build :p
[G1 Android Development] Ryanmo5:
Yeah that is a must for using terminal
[G1 Android Development] diz305chico:
got it to work ..thanks
[G1 Android Development] big nu:
Any insight??

I keep getting this when i try to use gparted has anyone else ran into this??

Ive tried in both adb and recovery, no luck in either:( Also ive done this a bunch of times and it always work now that i have switch from JACHero to cyan's rom, i get this
[G1 Android Development] pensive:
Hm, would I be wrong in assuming that...

you are trying to partition a fresh, unformatted card?
[G1 Android Development] big nu:
Yeah thats the first thing i do to all my sd's before i even put them in my G1, atleast a fat32.. the weird thin g is i can partition it in paragon which im not to crazy about cause i cant seem to part the sd down to the exact mb..
[G1 Android Development] pensive:
Well, since it is a fresh card, no fear of data loss, so...

Just try taking the bull by the horns

mkpartfs primary fat32 32.3KB XXXXMB where XXXX is the end you want.
[G1 Android Development] big nu:
32.3kbs?

Why am I starting fat32 at 32.3kbs? Just wondering, I thought I had to start at 0. Also might you understand why I can part it in paragon and not parted?
[G1 Android Development] alritewhadeva:
Theres always some space in the beginning. Like in a 8gb sdcard you're not getting 8gb you're getting ah...7. Something.
[G1 Android Development] pensive:
Needs space for the DOS partition table.

Well, the title says it. If it says too many primary partitions then instead

resize 1 32.3kbs XXXXMB

One more thought, format your card directly in your g1, plug it into a usb and do the windows fat32 format.
[G1 Android Development] spinjason:
Commands

Does any one have a compiled list of commands used in the console?
[G1 Android Development] whitespy9:
a big big thanks to the OP for this recovery image.

also a big big thanks to pensive for his post below. I feel this might want to moved up into the OP.
[G1 Android Development] Coreburner:
Or better yet since bigger cards are getting cheaper it would be nice to get something that does the same function as gparted to run from the recovery menu and partition without typing in the console.

just a thought but has anyone tried using ghost or acronis to copy your sdcard to a bigger card I use it to swap 40 gig HDD's to 500 Gig drives using ghost, would this work with partitioned sdcards going from 4gig to a bigger card?
[G1 Android Development] Elloco305:
Maaaan. I can't make calls!!!! Please help someone!! A guide to how to do flash this rom or something? I flashed_recovery the .img file. Then installed the update.zip. But i couldn't make a call. And i re did it. But i wiped this time. And still. I can't make or receive calls. it reads 'Phone Application is not responding' and the only option is to force close. Can someone please help??
[G1 Android Development] ei8htohms:
are you sure you're in the right thread?

The recovery image is not responsible for making calls or really accessing very many of the phone's resources otherwise. It's only used to make repairs, flash updates (ROMs, OTA updates, themes) and now create and restore Nandroid backups.

What ROM are you using? Which radio? Which SPL? And how did you get your phone to a state where it can't make calls? You know what, forget I asked any of that until you find the right thread in the right forum to post all that stuff so someone may be able to help you out. Try the general Dream forum.
[G1 Android Development] anon1ski:
ok. so supposedly im having a problem with recovery 1.3.1, that i havent had untill i flashed a theme. and now when i flash ANY theme, my super user is all messed up. the thing is BEFORE i flashed the rom, i was running the same setup and everything worked fine, so i dont see how its got anything to do with the new recovery.. can anyone help me out here?
[G1 Android Development] B-man007:
try that in RECOVERY (just to be safe)

Home + Power

Alt-X

Hopefully that will fix your problem

I think temporizer left out a line which is why it didn't work at first.
[G1 Android Development] akapoor:
Okay, I just tried to upgrade upto Cyan.'s Recovery 1.3.1 and here's what I did:

1) D/l'd the zip file and renamed to update.zip

2) Placed on blank SD card

3) Rebooted and did alt+s to apply the update

It went fine and completed successfully, but when I rebooted the phone and tried to access the Home+Power -- it takes me right to the PVT board screen (as if I pressed the Camera button)

I also tried to manually do this through terminal, but still nothing.

Any ideas or am I just being an idiot?
[G1 Android Development] KaL-EL3038:
alright well...

I tried to free up some space...but no luck...I still can't do a save....how much memory am I suppose to free up???
[G1 Android Development] TheInfekted:
jw

I was wondering if there is any chance that the lockscreen from the HTC hero theme lockscreen by tehseano is going to be implemented and is there anyway I can do it myself o

If there isn't
[G1 Android Development] johnnylicious:
what does this have to do with the 1.3.1 recovery image? :confused: wthhh.
[G1 Android Development] Flanders64:
I applied this by renaming to update.zip on the sd then alt+s

then i was still getting the old one with a E:Can't open /cache/recovery/command message

but it still worked ok.

just done it again and it seems to work fine now?

is it normal to not take first time? or am i likely to have problems?

cheers
[G1 Android Development] johnnylicious:
ummm FYI, READ THE FIRST POST.

your NOT suppose to apply this as an "UPDATE.ZIP" your suppose to use terminal or adb to install the recovery.img into the phone.

the codes are all on the first page, don't know how you got the impression you had to change this to update.zip...
[G1 Android Development] cyanogen:
Two things..

1. Stop posting **** in the wrong thread.

2. If the update.zip doesn't work for you, follow the instructions for installing the raw .img with flash_image for fastboot.
[G1 Android Development] cmf:
You can of course just "fastboot boot cm-recovery-1.3.1.img" to run it one-time e.g. to restore a nandroid backup that you forgot to copy off the SDcard before you bricked the phone with an update.zip when you don't have a memory card reader handy. Just done this over the phone with somebody on a Vodafone Magic that I buggered up. What a life saver ;) Had the original SPL so couldn't do "fastboot flash system system.img" anyway.
[G1 Android Development] pensive:
This recovery image as an Autorooter.

I have been playing with the idea of using the cm recovery image as an auto-rooter. I played around with the update version of the recovery and changed it into an update which would flash recovery into the boot partition.

I got as far as being able to start flashing the image to the

boot partition but got stumped by the fact that recovery.img is about 5 meg and appears to be larger than the boot partition can take. I know that fastboot can boot the G1 into recovery.img by executing the following fastboot boot recovery.img. I wonder where fastboot puts the image before booting.

The goal here is to be able to load the update-recovery.zip file into the card, press camera+power and then totally automatically the recovery.img gets booted, a script is run to flash recovery.img into the recovery and then if there a new already rooted rom/system on the card flash that and if not root the phone.

I suppose it is possible to build a much leaner recovery.img to fit in the boot

partition but maybe someone has an idea on how to overcome the size issue

another way?

The goal here is to be able to boot into modded recovery starting with update.zip on the sdcard, unrooted g1.
[G1 Android Development] DBeCe:
***********
[G1 Android Development] DMaverick50:
I just flashed a nandroid backup for the first time, and now neither my trackball nor my usb work (it doesnt work for charging or connecting). I flashed to a different build but the issues remain, i ran a search of this thread and found no similar problems so i doubt it was the nandroid flash that did it but the problems did coincide with the timing of me flashing the backup, anyone have any experience with this? thanks
[G1 Android Development] dumfuq:
I know its not your issue but thought it might be helpful to people if there was a fix_accelerometer script in the /sbin. I added one to mine because it has broken multiple times and I can never remember what to do.

thanks for all btw
[G1 Android Development] Shaquiel Harris:
Um you do install by flashing it as an update what are you talking about.
[G1 Android Development] pensive:
I have seen a problem with USB one time.

I have done many backups and restores as I was experimenting with different

things. Couple of times I went back to JF1.51US rom to look at some settings.

All the backups and restores seemed to work Ok. I used both the PC based restore and the recovery based restore.

I have seen once, and I do not know if it had anything to do with restore, that USB was not charging the phone. The battery widget was stuck on 82% and would not budge. After a reboot the number went down to 60% and the phone started charging again.

Is not much help for you I suppose, but at least it confirms that the backups

probably work.

If you exhaust all your options and still have problems, I can do a data wipe on my phone, create a backup and send it to you via http://www.yousendit.com.
[G1 Android Development] lexotic_sc300:
hey Cyan - juz wondering if you could do this recovery image with different colors... that would be awesome... this recovery image kicks ass BTW ... just not diggin the color... maybe you could do ... red.. green... white.. Thanks
[G1 Android Development] DMaverick50:
i appreciate the help, the crack on the back of the device was worrying me and so i went ahead and paid the 130 to insurance and im getting a new g1 today. thats weird that it happened though, im almost afraid to nandroid from recovery again since that was the only time i tried it. ive made several backups before but yesterday was the first time i actually restored. thanks again though
[G1 Android Development] anddep:
OMG! makes it so easy to format an SDcard, did it so much i memorized the script :D thanks cyanogen
[G1 Android Development] c3c0l0n:
I have tried both the update.zip and flash_image methods, and I have successfully started Cyanogen's recovery image. BUT - after reboot - it disappears, and my phone reverts to the standard recovery image. What have I done wrong?

My phone is an ADP1. I have earlier had a custom SPL and ROM, but reverted to the original SPL (downloaded from this forum) and ROM (from HTC.com).

edit: After som reading, I guess I have the same problem as others, the recovery image is being reflashed upon reboot. If I flash a custom ROM right after installing Cyanogens recoveyr image, I will probably be fine, right?

Another question: is this recovery image a SPL? If not, do I need to download a custom SPL in addition to this recovery image?
[G1 Android Development] mavgink:
Ok, so i finally found out how to format my sdcard using this recovery method.

fat32, ext, swap... and it works.

but when I want to flash a new rom and want to delete al my apps on the ext3 filesystem.

What am I supposed to type into the console (parted)
[G1 Android Development] flexnix:
Hey guys.

Working on partitioning my 8GB Class 4 card. I follow these instructions but I'm running into an issue.

I went ahead with reading the last paragraph. My card says its total size is 7526. I went ahead and subtracted 128 for swap which equals 7526 then finally minus 512 for ext which is 6886.

So I go ahead with "mkpartfs primary fat32 0 6886" for the first mkpartfs line. It says that this partition is too big/small for something. When I use print it says it Starts at 32.2kb and ends at 7526. Am I missing something here? What is the 32.2kb worth of data on the SD card? I formatted both full and then a quick format. Do I have to do "mkpartfs primary fat32 33 6886 instead?
[G1 Android Development] flexnix:
Reading > Me.

Now I see some people having the same issue so you need to format from the console. How do you do this? What is the command?
[G1 Android Development] temporizer:
you can type from console (alt-x from recovery)

mount system/sd
rm -r system/sd/*

this formats your whole ext partition.

edit: if you do this from terminal emulator, you get force closes everywhere... FYI
[G1 Android Development] pensive:
The process to recover from recovery issues

There is an explanation and what you need to do in the earlier message with

the same title.
[G1 Android Development] pensive:
Question for Cyan.

Is this standard for all recovery images (factory, JF, CM)?

recovery.c

****

* 1. main system downloads OTA package to /cache/some-filename.zip

* 2. main system writes "--update_package=CACHE:some-filename.zip"

* 3. main system reboots into recovery

****

or is it specific to cm-recovery-1.3.1.img?
[G1 Android Development] pensive:
Formatting vs. Partitioning.

When you divide your sdcard into three pieces 1, 2, 3 that is partitioning.

When you put a specific type file system on a partition, that is formatting.

You must have have missed the instruction

rm 1

which tells parted to remove the original fat32 partition which spanned the

entire card. You can either remove it and then start from scratch creating

all three partitions or you can resize it.

resize 1 0 7000mb

mkpartfs primary ext2 7000mb 8000mb

mkpartfs primary linux-swap 8000mb 8032mb

You may have to play around with the beginnings and the ends of partitions

to get just right. Which involves creating partitions, deleting them if parted did not do it just right, adjusting then the edges, and creating them again.

If you have data on your sdcard, I would stay away from removing the 1st

partition. When you resize parted will move data around for you.
[G1 Android Development] mavgink:
awesome thanx alot!
[G1 Android Development] pensive:
Ok, how does everyone feel about cm-recovery-1.3.2.img?

Initially it may be a good idea to just provide the tweaked nandroid as a script without making it the default being run by the UI to make sure it is stable.
[G1 Android Development] mfrey0118:
Good stuff man, thanks.
[G1 Android Development] pensive:
[Re]Building the recovery UI

I am having a hell of a time trying to build the UI. I made certain assumptions that I can build it under cygwin with NDK, which obviously may not be correct.

What was the original build environment? Was it built under ARM Debian?

I can't make any progress with tweaking it unless I can build it at least :-)

So, some input would be welcome.

Thanks.
[G1 Android Development] cyanogen:
To build it you need to pull it into an existing AOSP tree.

There will be a 1.3.2 soon. I got a patch for update.zip globbing, there is donut stuff I want to add to it, and a few other things.
[G1 Android Development] temporizer:
Sweet!! I was just coming on here to ask when the next update is headed our way. Thanks Boss!
[G1 Android Development] smeat:
Any hope of changing the wildly distracting background?
[G1 Android Development] cyanogen:
New recovery image! The biggest thing here is a patch from krut0n that allows you to flash ANY .zip from a menu! Also redid the icons and colors and added pensive's Nandroid update. GNU Parted is updated and supports more filesystems.

I removed the .zip installer since people seem to have too many problems with it.

See the first post for info.

Enjoy.
[G1 Android Development] tinyaznboi:
SICKKKKKKKKKKK thanks