[GUIDE] How to add Flash_Image to rom using terminal - myTouch 4G Android Development

Okay, so i know several of you, like myself, have been trying to flash the recovery 3.x using flash_image through terminal but keep getting an error. This is because the rom you are using doesn't have the flash_image file in the /system/bin folder. I found these instructions on another section of the xda forums.
Disclaimer: I'm not responsible for any damage done to your phone. do this at your own risk..
1. Download and extract the file i have attached.
2. Copy the file to the root of your sdcard.
3. Open the terminal and type in these commands.
su [hit enter]
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system [hit enter]
cp /sdcard/flash_image /system/bin [hit enter]
Now your able to flash recovery 3.x from terminal using these commands
su [hit enter]
flash_image recovery /sdcard/(recovery name).img (recovery name is whatever you have your recovery 3.x named)
i hope this helps at least one person...
Happy Flashing

Thanks bud, saved me the trouble .

No problem...like I said , if it helps at least one person im happy to know it was worth my time...

1. Make sure you have Rom Manager Installed (Free in Market).
2. rename "recovery3......img" with "recovery-clockwork-2.5.1.4-glacier.img"
3.put this "recovery-clockwork-2.5.1.4-glacier.img" on sdcard/clockworkmod/download/koush.tandtgaming.com/recoveries/
4. Open Rom Manager and choose 2.2.1.4 from "All ClockworkMod Recoveries"
that earlest !!! then ClockworkMod Recovery v3..... will now be installed on your phone.

ls1xtreme said:
Okay, so i know several of you, like myself, have been trying to flash the recovery 3.x using flash_image through terminal but keep getting an error. This is because the rom you are using doesn't have the flash_image file in the /system/bin folder. I found these instructions on another section of the xda forums.
Disclaimer: I'm not responsible for any damage done to your phone. do this at your own risk..
1. Download and extract the file i have attached.
2. Copy the file to the root of your sdcard.
3. Open the terminal and type in these commands.
su [hit enter]
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system [hit enter]
cp /sdcard/flash_image /system/bin [hit enter]
Now your able to flash recovery 3.x from terminal using these commands
su [hit enter]
flash_image recovery /sdcard/(recovery name).img (recovery name is whatever you have your recovery 3.x named)
i hope this helps at least one person...
Happy Flashing
Click to expand...
Click to collapse
Great guide! Will add this to my post on how to flash cwr3.

ls1xtreme said:
I found these instructions on another section of the xda forums.
Click to expand...
Click to collapse
Source would be nice.

neidlinger said:
Source would be nice.
Click to expand...
Click to collapse
Sorry but I honestly don't remember...i just did a google search for "flash_image with terminal"or something like that...

Thanks for help working excellent

says.file not.found
Sent from my HTC Glacier using XDA App

suwei said:
1. Make sure you have Rom Manager Installed (Free in Market).
2. rename "recovery3......img" with "recovery-clockwork-2.5.1.4-glacier.img"
3.put this "recovery-clockwork-2.5.1.4-glacier.img" on sdcard/clockworkmod/download/koush.tandtgaming.com/recoveries/
4. Open Rom Manager and choose 2.2.1.4 from "All ClockworkMod Recoveries"
that earlest !!! then ClockworkMod Recovery v3..... will now be installed on your phone.
Click to expand...
Click to collapse
YOU NEED TO MAKE THAT A THREAD IT WORKED LIKE A CHARM TEN MINUTES LATER I AM RUNNING CM7 I CANT BELEIVE OT WAS AS SIMPLE AS THAT THUMBS UP THANKZZ
Sent from my HTC Glacier using XDA App

rich2thad said:
says.file not.found
Sent from my HTC Glacier using XDA App
Click to expand...
Click to collapse
Where exactly is it giving u this message???
Oops...didn't realize u had figured it out...

after the second command it gives me an messege saying
cp not found

JXTONY said:
after the second command it gives me an messege saying
cp not found
Click to expand...
Click to collapse
I wonder if this procedure requires busybox?

Okay I have tried multiple methods as posted in this section and I cannot get to Clockwork recovery 3.xxx... I did it once before and then reverted back to the version flashable via Rom Manager. It takes me straight to fastboot when I try to reboot into recovery. Any clues what I'm doing wrong? I'm running CM6 currently and I'm slightly annoyed that I got it to work once but can't again
Sent from my HTC Glacier using XDA App

Geoi1006 said:
Okay I have tried multiple methods as posted in this section and I cannot get to Clockwork recovery 3.xxx... I did it once before and then reverted back to the version flashable via Rom Manager. It takes me straight to fastboot when I try to reboot into recovery. Any clues what I'm doing wrong? I'm running CM6 currently and I'm slightly annoyed that I got it to work once but can't again
Sent from my HTC Glacier using XDA App
Click to expand...
Click to collapse
Have you tried to go into Rom Manager and flash the latest recovery for your phone? You can also try my method of installing ClockworkMod Recovery. It can be found HERE. If you have ADB/Fastboot set up you can also try pushing a new recovery img to your phone. If you dont have ADB set up you can use MY GUIDE to get it set up.
It sounds like your phone cant find the recovery img (could be missing).
Hit me with a PM and I can help walk ya through it if you need.

help. i downloaded the file and flashed it. i was able to boot to clockwork 3.0 and flash cm7. now when i choose 2.5.1.4 it says "an error occurred while flashing your recovery". not sure what to do. i can still get 2.5.1.2, but it won't let me get back to 2.5.1.4 which should be 3.xxx. i would like to flash to a newer nightly, but can't get the clockwork 3.xxx.

cveez11 said:
help. i downloaded the file and flashed it. i was able to boot to clockwork 3.0 and flash cm7. now when i choose 2.5.1.4 it says "an error occurred while flashing your recovery". not sure what to do. i can still get 2.5.1.2, but it won't let me get back to 2.5.1.4 which should be 3.xxx. i would like to flash to a newer nightly, but can't get the clockwork 3.xxx.
Click to expand...
Click to collapse
If you are on iced glacier try going into your settings/applications/Rom Manager and uninstall updates. Then go back to Rom Manager and try flashing 2.5.1.4

i am on cm7 nightly 24. i thought i would try to uninstall updates anyway. i went settings, applications, manage applications and rom manager is not there. i went to the market, thinking i would uninstall and reinstall rom manager and it only gives me the option to open. no uninstall. not sure what to do now,

There its a new zip I posted in the cm7 thread a page or so back
Sent from my HTC Glacier

i deleted the file i had. downloaded the latest file, flashed it and i still get the same error message.

Related

[GUIDE] How to mod/root a virgin hero

I'M NOT RESPONSIBLE FOR ANY DAMAGE TO YOUR PHONE
Infos
Why Should I root my phone?
Read Here
What can I do with recovery?
With recovery you can principally flash cooked roms, but also other things like make nandroid backups (Internal memory backups), partition your sdcard, fix problems etc...
If you want root there are 2 methods:
First Method
Is very simple, just download and install InstantRoot.apk (attached)
To install this from sdcard you need a file explorer like ASTRO
After the install a notify that says root access gained should appear, if not try second method
Second Method
This will install also recovery
1. Enable Debug USB from Settings->Applications
2. Download flashrec and install it with file manager like ASTRO
3. Download Amon_RA's recovery and put it in your sdcard
4. Run flashrec and tap Backup Recovery
5. Tap in the textbox and write this path:
Code:
/sdcard/recovery-RA-hero-vx.x.x.img
At moment of writing last version is 1.5.2, so the path should be
Code:
/sdcard/recovery-RA-hero-v1.5.2.img
6. Tap Download then flash recoery
7. If you get an error retry from step 3, else continue
8. Turn off your phone and reboot it keeping pressed Home button, recovery should start
9. Connect your phone via usb
10. Download Android SDK and extract all in the same folder
11. Download this and extract it in your sdk/tools folder
12. Open cmd (if you are on windows, if you are on a mac or on linux open terminal) and move to sdk/tools folder using this command
Code:
cd path
13. Give this commands in order
On windows:
Code:
adb shell mount /system
adb push su /system/bin/
adb shell chmod 4755 /system/bin/su
adb push Superuser.apk /system/app/
adb shell umount /system
adb shell reboot
On linux/mac
Code:
./adb shell mount /system
./adb push su /system/bin/
./adb shell chmod 4755 /system/bin/su
./adb push Superuser.apk /system/app/
./adb shell umount /system
./adb shell reboot
14. Now you have root access on your phone
If you want recovery:
Just follow root's second method to the step 7
Flashing Custom roms using recovery:
Custom roms are in Zip format, to flash it is really easy once you have recovery.
Once downloaded a rom put it in your sdcard root, then reboot into recovery (Keep home button pressed while turning on your phone)
Now make a wipe going to Wipe->Wipe data, then come back to main menu and go to Flash zip from sd card, select your zip and you're done
Thanks for the guide How does Nandroid backup fit into this?
maybe you need to tell how to downgrade(or a link to a guide )
nice guide, only i have already rooted my phone(2 months ago or something xD)
@Culturelol
nandroid backup is recommeded when you install a new rom, so you can always back to your original/past rom
So i root with this guide, then nandroid and then i can flash the new rom?
One more small question Is there anything special i should know about flashing the radio?
culturelol said:
So i root with this guide, then nandroid and then i can flash the new rom?
Click to expand...
Click to collapse
Yep
culturelol said:
One more small question Is there anything special i should know about flashing the radio?
Click to expand...
Click to collapse
No, only that you can't flash a GSM radio on a CDMA phone and back, if you do this you'll brick your phone
Exit93 said:
Yep
No, only that you can't flash a GSM radio on a CDMA phone and back, if you do this you'll brick your phone
Click to expand...
Click to collapse
Is that done the same way? Boot to recovery and then flash the radio? And is this done before or after wipe / install of the new rom?
culturelol said:
Is that done the same way? Boot to recovery and then flash the radio? And is this done before or after wipe / install of the new rom?
Click to expand...
Click to collapse
You can install radio whenever you want, it's flashed in another nand partition
nice rom - but the Home button doesnt work - is that normal?
krueck83 said:
nice rom - but the Home button doesnt work - is that normal?
Click to expand...
Click to collapse
Wrong discussion...
If you refer to CKDroid you need to flash googlebits to get home button working...
Exit93 said:
You can install radio whenever you want, it's flashed in another nand partition
Click to expand...
Click to collapse
But it is flashed through the recovery screen?
culturelol said:
But it is flashed through the recovery screen?
Click to expand...
Click to collapse
Yes, it is
Thank you - it works.
Thanks for the instructions.
1-Do you need to follow step 8-12 to get root and flash rom`s or is the android sdk and superuser only if you want to develope yourself?
2- If ypu do this and after want back to stock rom . As far as i`ve read it`s as easy as just flashing from HTC website and you`re back ? Won`t recovery still be left on your phone?
Thanks
Rui-Cruz said:
Thanks for the instructions.
1-Do you need to follow step 8-12 to get root and flash rom`s or is the android sdk and superuser only if you want to develope yourself?
2- If ypu do this and after want back to stock rom . As far as i`ve read it`s as easy as just flashing from HTC website and you`re back ? Won`t recovery still be left on your phone?
Thanks
Click to expand...
Click to collapse
1. Steps from 8 to 12 are only to get root access on stock rom, if you want to change rom you don't need to make those steps
2. To get back to stock rom just flash official update, as far as i know recovery will be deleted
Thanks
Thanks for the guide.
Was being anal and following the guide to the letter (not wanting a brick!) and it just rebooted to stock recovery
Code:
4. Run flashrec and tap Backup Recovery
5. Tap in the textbox and write this path: /sdcard/recovery-RA-hero-v1.5.2.img
6. If you get an error retry from step 3, else continue
Should we be tapping the download button once we entered the img location?
Ne0
alfie196 said:
Thanks for the guide.
Was being anal and following the guide to the letter (not wanting a brick!) and it just rebooted to stock recovery
Code:
4. Run flashrec and tap Backup Recovery
5. Tap in the textbox and write this path: /sdcard/recovery-RA-hero-v1.5.2.img
6. If you get an error retry from step 3, else continue
Should we be tapping the download button once we entered the img location?
Ne0
Click to expand...
Click to collapse
Yes, sorry it's my fault, correcting...
Sorry silly question
Please could someone tell me, if using the first method the InstantRoot.apk. Will this wipe the current ROM/data/apps etc from the phone or will it just enable Root privilages and leave everything else the same?
Many thanks
Jeremy
It just roots your phone and leaves everything in tact, just did it now.
The guide is not clear on how to flash the rom though. Because it says "If you want recovery" I don't want recovery I just want to flash. I have root now what's next? In simple steps, no recovery required just want CKDroid.
hatski said:
It just roots your phone and leaves everything in tact, just did it now.
The guide is not clear on how to flash the rom though. Because it says "If you want recovery" I don't want recovery I just want to flash. I have root now what's next? In simple steps, no recovery required just want CKDroid.
Click to expand...
Click to collapse
You need recovery to flash roms, it's written on the start of the first post

where do i put a file i want fastboot to see

I have no idea where to put the new ra-evo recovery file so that fastboot sees it. I have looked sorry for the stupid question
your fast boot should be installed in ur android sdk tools folders so if thats where ur fast boot is then put the file in the tools folder
Fastboot flashes files from your computer not on the sdcard or anything.
Ex. Fastboot flash recovery /User/downloads/recovery.img
Sent from my PC36100 using XDA App
i am so confused
so if I am rooted and unlocked and I already have the original amon recovery i just put the new amon recovery in the tools folder. then how do I get it on my phone
if you already rooted you should have android sdk installed
easyest way
go to start
my computer
c drive or your main drive
android sdk or sdk (wat ever you named it)
tools folder
put recovery in tools forder
open a command prompt and
cd \android-sdk
cd tools
now your in the tools folder
fastboot flash recovery /recovery.img
it is easyer and faster no searching for the files if you put the recovery in the tools folder its already there no going to filesfoldersdownloads you dont need them commands its faster and easy look through the adb and sdk guides it has all commands and most recover forums tell you all this
so i need to change the name of the amon recovery image to recovery.img
No he was just using recovery.img as a example.
Sent from my PC36100 using XDA App
Here's how i did it this morning, downloaded file to pc, connect phone as disk drive, opened disk drive, placed the amon file into the sdcard, changed phone back to charge only, went to astro to verify that the amon file was on the home list of files, then wen to market and downloaded terminal emulator free, and just follow Amon's instructions to apply using terminal or adb, it was reall easy that way, i kept trying to load the fastboot way and just couldn't figure it out, so i tried this was and perfect, new recovery, and hopefully i can wipe dalvik now.
You don't need fastboot to flash a new recovery image. Like tomh said in the post above this one, put the new recovery on the root of your sdcard, open a terminal emulator on your phone and type the following:
flash_image recovery /sdcard/name_of_recovery.img
I haven't used my computer to update a recovery image since I first got my Hero.
with a terminal app you'll want to use this exact cmd's
su(press enter)
flash_image recovery /sdcard/recovery-RA-evo-v1.8.0.img(press enter)
reboot recovery(press enter)
that's just as amon_ra has it, same as what i used as well.
thanks for the help
shawnten said:
thanks for the help
Click to expand...
Click to collapse
Somewhere on your PC. You just have to give the path to the fastboot command.
Sent from my HummerPhone using the XDA App
i just downloaded the terminal emulator onto my evo but when i type the first cmd "su" it says permission denied. please tell me how do i get passed that.
ro2themax said:
i just downloaded the terminal emulator onto my evo but when i type the first cmd "su" it says permission denied. please tell me how do i get passed that.
Click to expand...
Click to collapse
Root your phone..
i jsut use rom manager. I am to lazy to do everything else currently rom manager has the latest amon ra you can tell it to flash as an "alternative" recovery. takes 2 seconds and no typing out "long" commands in terminal.
i was under the impression i was rooted...i did the OTA update to 2.2 then used the method to root that came out a week ago using unrevoked3 and unrevoked forever. but instead of going back to a rooted 2.2 i stayed on a rooted 2.1.
ro2themax said:
i was under the impression i was rooted...i did the OTA update to 2.2 then used the method to root that came out a week ago using unrevoked3 and unrevoked forever. but instead of going back to a rooted 2.2 i stayed on a rooted 2.1.
Click to expand...
Click to collapse
Huh, that's weird. What rom are you using?
If you're using a rooted rom then you should be getting a # when you type "su" into the terminal..
Do you have the SU app installed? Did you get an SU Permission request when you opened the terminal for the first time? If so, did you grant the terminal emulator SU permission?
im using a stock 2.1 rom and i do have superuser permissions installed. i also have setcpu for root users installed and "su" grants "setcpu" permission.
i also forgot to mention that i also put a "netarchy kernal" on their also which appears to me, works as it said. right now if i want to go into recovery it goes through clockwork, but i want to get amon ra's recovery on there instead.
ro2themax said:
im using a stock 2.1 rom and i do have superuser permissions installed. i also have setcpu for root users installed and "su" grants "setcpu" permission.
Click to expand...
Click to collapse
hmm.. which 2.1 stock? Was it a rooted stock (with busybox and su already in there) or did you install the su app?
Although sounds like it already had busybox if setcpu is getting permission.
If you are near your computer see if you can get a # using the adb shell. I'm a little stumped here..
the 2.1 stock came with the "su" already. i just posted a quick update on the my previous post that i flashed a netarchy kernal on my evo also. i dont know if that helps but i just forgot to mention it...
please bare with me, im by my computer and to go into adb shell do i need to plug my evo in as charge only and open a cmd from android tools to see if i get # ???

[RECOVERY] ClockworkMod Recovery for Galaxy Tab - BETA

THIS IS BETA SOFTWARE
If you don't know what you are doing, don't use this.
Restoring to factory after using this process (you need using stock images):
heimdall flash --kernel stockzImage --recovery stockzImage --factoryfs factoryfs.rfs
TMobile Tab Users:
How it works: The recovery is packaged as an update.zip that you run from a modified STOCK recovery. The update.zip unpacks Clockwork Recovery onto the ramdisk and restarts recovery. When you reboot, it reverts back to the original stock recovery. So, you will need to keep the recovery on the root of your SD card as an update.zip, and apply the zip every time you want to start Clockwork. However, ROM Manager handles this all pretty seamlessly for you.
Installation instructions for TMOBILE TAB:
Download the kernel:
TMobile - http://koush.tandtgaming.com//samsung/tab/tmobile_zImage
Installation instructions:
Flash the kernel using flash_image: http://koush.tandtgaming.com//test/flash_image (This will flash both boot and recovery)
adb push flash_image /data/local/bin/flash_image
adb push tmobile_zImage /sdcard/
adb shell
su
chmod 755 /data/local/bin/flash_image
/data/local/bin/flash_image boot /sdcard/tmobile_zImage
sync
exit # This should take you back to your computer's console
Download ROM Manager from the Market.
Flash Recovery.
Choose the appropriate Galaxy Tab version.
Accept the Superuser prompt.
Use ROM Manager to create a Backup.
Verizon Tab Users:
Want to save your self some command line headaches and risk and donate to a developer? Then go download the Verizon Tab Recovery Bootstrap off the Market and use that instead of this guide.
Download the kernel:
Verizon - http://koush.tandtgaming.com//samsung/tab/verizon_zImage
Installation instructions for VERIZON TAB:
You do NOT need to do this if you used the Bootstrap application
Flash the kernel using flash_image: http://koush.tandtgaming.com//test/flash_image (This will flash both boot and recovery)
adb push flash_image /data/local/bin/flash_image
adb push verizon_zImage /sdcard/
adb shell
su
chmod 755 /data/local/bin/flash_image
/data/local/bin/flash_image boot /sdcard/verizon_zImage
sync
exit # This should take you back to your computer's console
adb reboot recovery # Boot into recovery
It will now convert your rfs partitions to ext4.
Download ROM Manager from the Market.
Flash Recovery.
Choose the appropriate Galaxy Tab version.
Accept the Superuser prompt.
Use ROM Manager to create a Backup.
Euro Tab Users:
Want to save your self some command line headaches and risk and donate to a developer? Then go download the Euro Tab Recovery Bootstrap off the Market and use that instead of this guide.
Download the kernel:
Euro - http://koush.tandtgaming.com//samsung/tab/international_zImage
Installation instructions for EURO TAB:
You do NOT need to do this if you used the Bootstrap application
Flash the kernel using flash_image: http://koush.tandtgaming.com//test/flash_image (This will flash both boot and recovery)
adb push flash_image /data/local/bin/flash_image
adb push international_zImage /sdcard/
adb shell
su
chmod 755 /data/local/bin/flash_image
/data/local/bin/flash_image boot /sdcard/international_zImage
sync
exit # This should take you back to your computer's console
adb reboot recovery # Boot into recovery
It will now convert your rfs partitions to ext4.
Download ROM Manager from the Market.
Flash Recovery.
Choose the appropriate Galaxy Tab version.
Accept the Superuser prompt.
Use ROM Manager to create a Backup.
If you appreciate my work, please buy the Premium version of ROM Manager!
I bought my Tab in the UK, its not locked to a carrier but I use it on the 3 network. Which of these kernels is the right one for me?
Keep up the good work!
Rom Manager has the ATT recovery but when you try to flash it it says invalid certificates. I'm running JMA firmware.
Greenarcher707 said:
Rom Manager has the ATT recovery but when you try to flash it it says invalid certificates. I'm running JMA firmware.
Click to expand...
Click to collapse
ATT is not available yet. If you read the instructions, you would see you need to manually replace the kernel first before using ROM Manager.
Sprint Tab
Will there be a version for the sprint tab? or can I use the verizon version for the Sprint tab since both are CDMA?
Thanks
This is very exciting work!
Now I can't wait to get a Tab!
Sent from my PC36100 using Tapatalk
Nice... but I'm assuming that this won't work for Euro (P1000) Tabs atm because there's no kernel image listed above?
Koush congrats on the rom recovery first of all. I must ask since sooner or later it will be asked, what happens for the ones who have the ATT sgt and proceeded to convert to the newer euro rom flash. Are we up a creek without a paddle or will you be developing the rom recovery futher for this kind of situation. Again thanks for your help and my donation will be coming very shortly Koush!!!
Backing up right now.
Thanks for the hard work.
Nice work @koush but still no go for euro tab i hope you can make one for us too
keep up the good work...
Well done, and thank you Koush.
Think we'll eventually see a way that doesn't require Odin or other coding to do stuff with the kernel?
Wow, thanks!
D'oh! my apologies.
Koush said:
ATT is not available yet. If you read the instructions, you would see you need to manually replace the kernel first before using ROM Manager.
Click to expand...
Click to collapse
I tried this, but came up with errors in recovery:
update media, please wait
update media, finished
--Install from package ...
Finding update package ...
Opening update package ...
Verifying update package ...
E:failed to verify whole-file signature
E:signature verification failed
--Appling Muti-CSC ...
Installing Muti-CSC
Installation aborted.
What did I miss?
bhagiratha said:
I tried this, but came up with errors in recovery:
update media, please wait
update media, finished
--Install from package ...
Finding update package ...
Opening update package ...
Verifying update package ...
E:failed to verify whole-file signature
E:signature verification failed
--Appling Muti-CSC ...
Installing Muti-CSC
Installation aborted.
What did I miss?
Click to expand...
Click to collapse
On VZW? I pulled that version due to bugs. I'll figure it out.
Hello and congratulations to the new advanced Kush for this product.
Is this compatible P1000 France?
Thank you in advance
Does it work with G Tab EU and if it work , which model (Verizon , TMobile , AT&T) shoud i choose pls ?
Thanks for the great progress. Cant wait for the VZW kernel
Sent from my SGH-T959 using XDA App
great work
great work koush. the link seems to be down all i get when i click it is the text. thanks in advance edit tmobile tab

How To Flash CW Rocovery (noobs)

Ok just follow step by step and even you can do this...
Download the .img file from here:
http://www.megaupload.com/?d=T4DAGUR8
Put that on file(Yes The One You Just Downloaded) on the root of your SD Card. open term emulator And type:
su
Then push enter then type:
flash_image recovery /sdcard/recovery.img
Then type Enter.
For adb
Make sure you android sdk folder is in you C: and its named
AndroidSDK
Next open cmd the type: ( AFTER cd\ MAKE SURE YOU PUSH ENTER AFTER EVERY LINE AND SPACE BEFOR YOU TYPE A NEW LINE)
cd\
cd AndroidSDK\tools\
adb reboot bootloader
fastboot flash recovery recovery.img...
NOW THAT WASN'T ROCKET SCIENCE WAS IT!
RECORCES:
http://gridlock.euroskank.com/glacier/recoveries/
Jaywan said:
Ok just follow step by step and even you can do this...
Download the .img file from here:
http://www.megaupload.com/?d=T4DAGUR8
Put that on file(Yes The One You Just Downloaded) on the root of your SD Card. open term emulator And type:
su
Then push enter then type:
flash_image recovery /sdcard/recovery.img
Then type Enter.
For adb
Make sure you android sdk folder is in you C: and its named
AndroidSDK
Next open cmd the type: ( AFTER cd\ MAKE SURE YOU PUSH ENTER AFTER EVERY LINE AND SPACE BEFOR YOU TYPE A NEW LINE)
cd\
cd AndroidSDK\tools\
adb reboot bootloader
fastboot flash recovery recovery.img...
NOW THAT WASN'T ROCKET SCIENCE WAS IT!
RECORCES:
http://gridlock.euroskank.com/glacier/recoveries/
Click to expand...
Click to collapse
That did not work. error recovery.img doesnt exist. when using adb. and flash_image not found when using emu.
I have been flashing recoveries since the G1 and im to stubborn to ask for help, but i cannot get CW3 to flash. Maybe im getting old lol. And i have tried both these methods.
ive tried multiple times..
for terminal emulator after i put in the commands it doesnt do anything. (is that what its supposed to do?) it shows like this
su
flash_image recovery /sdcard/recovery.img (ive renamed file to recovery.img)
then when i goto check Rom manager at the top it says rom manger premium v3.0.0.2
Flash clockwork mod recovery
current recovery:2.5.1.2
latest recovery:2.5.1.2
by the way im currently on the rom
CyanogenMod for Glacier (myTouch 4G) :: V6.1.2-RC2 (12/21/2010, #2)
This is what I got
$ su
# flash_image recovery/sdcard/recovery.img
usage: flash_image partition file.img
#
nyctrini3 said:
This is what I got
$ su
# flash_image recovery/sdcard/recovery.img
usage: flash_image partition file.img
#
Click to expand...
Click to collapse
You're missing a space between the "recovery" and "/sdcard...."
Psyclism said:
You're missing a space between the "recovery" and "/sdcard...."
Click to expand...
Click to collapse
When I include the space there is no action so what is my next step I rebooted into recovery n I'm still on 2512
mightywonton said:
ive tried multiple times..
for terminal emulator after i put in the commands it doesnt do anything. (is that what its supposed to do?) it shows like this
su
flash_image recovery /sdcard/recovery.img (ive renamed file to recovery.img)
then when i goto check Rom manager at the top it says rom manger premium v3.0.0.2
Flash clockwork mod recovery
current recovery:2.5.1.2
latest recovery:2.5.1.2
Click to expand...
Click to collapse
Same thing here man where is Amon_RA recovery lol
That is a CW 3 Recovery for Gingerbread. ROM Manager hasn't been updated so even if you have the correct recovery, ROM manager will still say 2.5.x.x
Reboot into recovery to see if it actually worked. The text will be yellow in 3.x.x.x or blue in 2.5.x.x
If you use terminal emulator it will give you a blank line after you flash_image.
Sent from my HTC Glacier using XDA App
joeyklatzko said:
That is a CW 3 Recovery for Gingerbread. ROM Manager hasn't been updated so even if you have the correct recovery, ROM manager will still say 2.5.x.x
Reboot into recovery to see if it actually worked. The text will be yellow in 3.x.x.x or blue in 2.5.x.x
If you use terminal emulator it will give you a blank line after you flash_image.
Sent from my HTC Glacier using XDA App
Click to expand...
Click to collapse
In terminal after I typed the command the next line is blank rebooted into recovery n it said recovery 2512 so what should I do next actually its blue in 2512 so do that mean it worked?
Has anyone here having trouble update their SDK yet? You need to update to GB 2.3
I finally got it working thanks everyone for the help
does flashing cw3 through terminal emulator work?
flash_image not found???
I'm getting this message when attempting to flash the new clockwork recovery image.
Flash_image: not found
Can any of you guys tell me what's going wrong here. I'm using terminal commands and not getting anywhere.
Thanks.
JPongco said:
I'm getting this message when attempting to flash the new clockwork recovery image.
Flash_image: not found
Can any of you guys tell me what's going wrong here. I'm using terminal commands and not getting anywhere.
Thanks.
Click to expand...
Click to collapse
nulights said:
does flashing cw3 through terminal emulator work?
Click to expand...
Click to collapse
Flashing through terminal works
Dwnld file from op it should already say recovery.img
move it to the root of your SD I use Linda file. Next open emulator
type :su then hit enter
type : flash_image recovery /sdcard/recovery.img
Type: enter
you will see absolutely nothing
that's ok just type
reboot recovery if you see cwm in yellow or gold honeycomb color
you're done if not keep trying
That's what I did
JPongco said:
I'm getting this message when attempting to flash the new clockwork recovery image.
Flash_image: not found
Can any of you guys tell me what's going wrong here. I'm using terminal commands and not getting anywhere.
Thanks.
Click to expand...
Click to collapse
Sounds like the file isn't where you're telling it. Make sure the recovery you downloaded is named exactly recovery.img if you are writing:
flash_image recovery /sdcard/recovery.img
Sent from my HTC Glacier using XDA App
flash_image not found.
what is wrong??
flash_image: not found
I'm really not sure what's going on with the emulator but it seems like this command is not part of the script for some reason...
I tried the same commands through adb shell and got the same response "flash_image: not found"
the adb method isn't exactly working out for me although I am persistent. I'm typing the command line EXACTLY and getting this response in the emulator, that's for sure.
finlly flashed cwm3 but everytime try to flash a rom says intallation aborted?
please help:

[GUIDE] Flash any recovery easily on the phone using flash_image

Background
To update (flash) a recovery image onto your phone allows you to update or replace your recovery environment on your phone. There are a number of ways to flash a new recovery image, some of the more commonly used methods are using a tool such as ROM Manager or using development tools such as Fastboot. There is also a third method using a standalone utility "flash_image" which allows the flashing of recovery using the terminal emulator on the phone.
flash_image is not a new tool, it has been used on Android since the beginning, many custom ROMs include the utility as part of the ROM itself though not all stock ROMs (including the stock ROM on the G2) include it.
Requirements
1. A permanently rooted (with S-OFF) phone
2. The flash_image binary
3, A recovery image that is compatible with your phone and ROM
3. A terminal emulator application on the phone or use of an ADB shell
Overview:
1. Get the flash_image binary and recovery image onto your phone
2. Copy or move the flash image binary to your system and make executable
3. Use flash_image to update your recovery environment
Stage 1: Get flash_image and recovery image on your phone
1. Download the flash_image binary (not needed if you are running a custom ROM that includes this binary)
2. Download the recovery image you wish to use
You can either directly download the files onto your phone or onto your PC and transfer to your phone. Probably the easiest way to do this is to connect your phone to your computer via USB and mount USB storage, then copy the files to your SD Card. Alternatively you can use ADB Push, bluetooth file transfer or several other methods.
Stage 2: Copy or move the flash image binary to your system and make executable
In terminal emulator:
su
mount -o remount, rw /system
cd /sdcard (or wherever you downloaded/copied the file)
cp flash_image /system/bin
cd /system/bin
chmod 777 flash_image
Click to expand...
Click to collapse
Stage 3: use flash_image to update your recovery environment
In terminal emulator:
su (not needed if using the same terminal session used in the steps above)
cd /sdcard (or wherever you downloaded/copied the recovery image)
flash_image recovery recovery.img (use the appropriate file name for the image file you are flashing)
Click to expand...
Click to collapse
Reboot into recovery and verify that the correct recovery environment is installed
Notes
Any of the commands that call for using a terminal emulator on the phone should work fine using an ADB shell if you prefer.
This was tested on G2 but I can't think of why it would not work on Desire Z or any other phone for which this version of flash_image works. Obviously different phones have different compatible recovery images.
I've attached a zip file containing the flash_image binary that I extracted from the CM 6.1 update zip. I suspect most custom ROMs already have flash_image.
If you are wondering "Why should I use this method over using ROM Manager?" you could be using a recovery image that ROM manager doesn't support, for example ClockWorkMod Recovery 3.x which is required for some experimental ROMs.
If you are wondering "Why should I use this method over using fastboot?" The two main reasons are you can't use fastboot if you are not with a computer with working ADB and using fastboot requires that you have previously flashed the engineering HBOOT.
This is my first guide so I'm open to suggestions or feedback.
Nice one
Though I would suggest that
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
could be simplified to :
Code:
mount -o remount,rw /system
Edit - actually /system isn't even on /dev/block/mtdblock3, and it's not a yaffs2 file system, I suspect that's come from another phone model ?
"dd" will do exactly the same, but no need to install extra stuff since its already there.
dhkr123 said:
"dd" will do exactly the same, but no need to install extra stuff since its already there.
Click to expand...
Click to collapse
I wouldn't have a problem using dd myself. But I would have thought it was much more risky, since instead of typing something relatively user-friendly like "recovery", you're typing in /dev/xyz/abc or similar, which if you get it slightly wrong could be disastrous ?
Excellent, worked for me, flashed CW 3.0 without fastboot
steviewevie said:
Nice one
Though I would suggest that
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
could be simplified to :
Code:
mount -o remount,rw /system
Edit - actually /system isn't even on /dev/block/mtdblock3, and it's not a yaffs2 file system, I suspect that's come from another phone model ?
Click to expand...
Click to collapse
Interesting, I've been using that command since forever (since I first rooted my G1 in early 2009) and it definitely does work on my G2 as well as my wife's MT4G.
I just tried "mount -o remount,rw /system" on my phone and it does not work, mount gives me the "Usage:" messages which seems to mean it wants more parameters.
steviewevie said:
I wouldn't have a problem using dd myself. But I would have thought it was much more risky, since instead of typing something relatively user-friendly like "recovery", you're typing in /dev/xyz/abc or similar, which if you get it slightly wrong could be disastrous ?
Click to expand...
Click to collapse
Unless you run wpthis before dd, you're perfectly safe. The radio partitions are all protected by the power-on write protect feature of the eMMC AS WELL as the linux kernel write protect on low addresses. Worst you can do is blow away your system, data, cache, misc, boot, or recovery partitions, and these are trivial to recover from.
raitchison said:
Interesting, I've been using that command since forever (since I first rooted my G1 in early 2009) and it definitely does work on my G2 as well as my wife's MT4G.
I just tried "mount -o remount,rw /system" on my phone and it does not work, mount gives me the "Usage:" messages which seems to mean it wants more parameters.
Click to expand...
Click to collapse
Depends on whether or not the mount command can tell the associations between the devices and mount points, which is determined by either system configuration, or what mount command you are using (i.e. android's mount or busybox mount).
raitchison said:
Interesting, I've been using that command since forever (since I first rooted my G1 in early 2009) and it definitely does work on my G2 as well as my wife's MT4G.
I just tried "mount -o remount,rw /system" on my phone and it does not work, mount gives me the "Usage:" messages which seems to mean it wants more parameters.
Click to expand...
Click to collapse
Sorry, there should have been an extra space, this works on my phone :
Code:
mount -o remount, rw /system
I don't have a "/dev/block/mtdblock3" on my system. My system partition is mounted on /dev/block/mmcblk0p25, and it is ext3 not yaffs2.
What ROM are you running ? I am running the stock DZ 1.34 ROM. I wonder if you are running Gingerbread ?
steviewevie said:
Sorry, there should have been an extra space, this works on my phone :
Code:
mount -o remount, rw /system
I don't have a "/dev/block/mtdblock3" on my system. My system partition is mounted on /dev/block/mmcblk0p25, and it is ext3 not yaffs2.
What ROM are you running ? I am running the stock DZ 1.34 ROM. I wonder if you are running Gingerbread ?
Click to expand...
Click to collapse
I'm running the Stock G2 T-Mobile post-OTA ROM, definitely not Gingerbread.
Edit: I just tried your method and it works, I will update the guide because your way is simpler and sounds like a safer choice.
you could just rename the CW 3.x.x recovery to the exact named recovery slap it in the cloclwork download folder after you delete the old one and flash it with CW just a quicker trick for GB roms
Not sure that's actually quicker, at least I don't think it would be for me, especially if you are changing recoveries with any frequency (like if tying out Gingerbread ROMs then going back to a 2.2 ROM) because you'd need to constantly rename your recovery images. With my method you would only need to leave the two files named as they are, or for expediency you could rename to recovery.img and recovery3.img then when you wanted to switch you could just execute:
flash_image recovery recovery.img
Click to expand...
Click to collapse
or
flash_image recovery recovery3.img
Click to expand...
Click to collapse
Depending on which recovery you wanted at that point & time.
As I said in the guide, there are already a number of options available, using ROM Manager and fastboot are the most commonly seen in guides but your method and mine are other options for people for whom they work better.
Works!!!
Hi my friends!
It worked for me flawlessly. I was using virtuos 0.9 on my desireZ
Great description, but file did not work for me
It's a very good description that a novice like me can follow. And, I am sure the provided file works for many of you, since many of you reported it to work. After following this guide, and not getting it to work (Stopping Signal error), I decided to find another binary file for flash_image, and the other flash_image file worked for me on my Sprint CDMA Hero. My phone currently has aospMod v0.9.9.2 | AOSP 2.2.1(12/10/2010), if it matters.
One can download a flash_image from here http://cyanogen-files.carneeki.net/flash_image.zip
Then unzip and place on sdcard - follow all the steps in the original post of this thread.
It is my understanding that this file is not unique for different android phones, but if I am incorrect, someone please reply to this thread to correct me.
Again, great job in summarizing the steps.
Regards,
Sanjiv
so darn easy! thank you!
Also usable for splash screen ??
Just curious,
Anybody tried to use flash_image to flash a custom splash screen ?
Something like :
flash_image splash1 customsplash.img
very good post for a newbie like me, just want to make sure, do i need to do the stage 2 every time I flash the recovery?
jaoyina said:
very good post for a newbie like me, just want to make sure, do i need to do the stage 2 every time I flash the recovery?
Click to expand...
Click to collapse
No, you only need to do stage 2 once, whenever you update/change recoveries from that point forward just use stage 3.
Is there a way I can reflash a recovery without access to the ROM?
I'm stuck at the HTC splash screen, so I'm basically stuck in my current (broken) recovery.
sanjivp2000 said:
One can download a flash_image from here (..)[/URL]
Click to expand...
Click to collapse
The flash_image in the start post did not work for me, the one above did.
Also, my HTC Hero was missing the cp command.
Instead, I used: cat /sdcard/flash_image > /system/bin/flash_image
Successfully flashed recovery again

Categories

Resources