can you flash recovery in terminal emulator? - Kindle Fire Q&A, Help & Troubleshooting

I seem to remember doing this with either my evo shift or my nexus s but I cannot remember the commands to flash recovery in terminal emulator. Can it be done on the fire?

Evo_Shift said:
I seem to remember doing this with either my evo shift or my nexus s but I cannot remember the commands to flash recovery in terminal emulator. Can it be done on the fire?
Click to expand...
Click to collapse
Assuming you have the recovery image named "recovery.img" and placed it at the root of the /sdcard partition....
Code:
su
dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p5
Needless to say... be careful when using dd.
EDIT: If you want to install TWRP, you might want to look into smirkit. It has an install script that will do an md5 check on the image prior to flashing.

kinfauns said:
Assuming you have the recovery image named "recovery.img" and placed it at the root of the /sdcard partition....
Code:
su
dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p5
Needless to say... be careful when using dd.
EDIT: If you want to install TWRP, you might want to look into smirkit. It has an install script that will do an md5 check on the image prior to flashing.
Click to expand...
Click to collapse
@kinfauns, thanx a lot for the instructions. Was searching real hard & stumbled into other how to stuff that didn't seem to work for me. Kept on getting errors.
I now successfully flashed TWRP 2.3.3.1 (FIXED). Do the same codes go for any flash via terminal on kindle fire?
___________
Cm10.1 jb4.2.1 fff1.4.1

Hi all. Have bricked Kindle Fire HD and have recovery.img. Explain me please if I will connect tablet in terminal mode what I need to do that to flash the recovery file.

toly084 said:
Hi all. Have bricked Kindle Fire HD and have recovery.img. Explain me please if I will connect tablet in terminal mode what I need to do that to flash the recovery file.
Click to expand...
Click to collapse
Wrong section, ask in kindle fire HD Q&A
Sent from my XT907 using Tapatalk

Related

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:

cm9 terminal emulator adb issue

I run the following commands
su
adb shell
daemon not running, starting it now on port 5038
daemon started successfully
error: device not found.
any suggestions?
Replug usb cable after adb daemon start on PC or try to get adb when phone in CWM...
scott0 said:
I run the following commands
su
adb shell
daemon not running, starting it now on port 5038
daemon started successfully
error: device not found.
any suggestions?
Click to expand...
Click to collapse
Er... you're running adb _inside_ the phone?
aremcee said:
Er... you're running adb _inside_ the phone?
Click to expand...
Click to collapse
i'm guessing that's the issue.
scott0 said:
i'm guessing that's the issue.
Click to expand...
Click to collapse
ADB is used to connect to android devices. So unless you have another android plugged to your P930, running adb on the phone is pointless
hey thanks.
i guess i am way off track, i want to restore the phone's original recovery image (at some point in the future) and am tired of dealing with adb/windows on my PCs.
i was under the impression this could be done via terminal emulator/adb.
scott0 said:
hey thanks.
i guess i am way off track, i want to restore the phone's original recovery image (at some point in the future) and am tired of dealing with adb/windows on my PCs.
i was under the impression this could be done via terminal emulator/adb.
Click to expand...
Click to collapse
Well... yes, you need adb to connect to the phone, but terminal emulator is already running on the phone.
i see, well, i was hoping to be able to temporarily go back to the stock recovery to do OTA updates and such, it appears it won't be as cut&dry as i was hoping. i assumed that since adb is installed and running on the device via terminal emulator that it could be used to push/pull the stock recovery image onto the phone.
scott0 said:
i see, well, i was hoping to be able to temporarily go back to the stock recovery to do OTA updates and such, it appears it won't be as cut&dry as i was hoping. i assumed that since adb is installed and running on the device via terminal emulator that it could be used to push/pull the stock recovery image onto the phone.
Click to expand...
Click to collapse
You're still not getting it: The only purpose of "adb shell" is to connect you to the phone; terminal emulator is a direct shell already on the phone.
i simply want to flash the original recovery image to the phone without using a PC.
it was my understanding that this is possible via terminal emulator, does anyone know if this is possible and if so, could you point me in the right direction to learn how to do that?
thanks!
scott0 said:
i simply want to flash the original recovery image to the phone without using a PC.
it was my understanding that this is possible via terminal emulator, does anyone know if this is possible and if so, could you point me in the right direction to learn how to do that?
thanks!
Click to expand...
Click to collapse
Just use Terminal emulator in your phone and add manually the following commands to flash original images (put them on sd-card before):
Code:
su
dd if=/sdcard/boot.img of=/dev/block/mmcblk0p8
dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p13
dd if=/sdcard/firmware.img of=/dev/block/mmcblk0p1
dd if=/sdcard/baseband.img of=/dev/block/mmcblk0p14
dd if=/sdcard/system.img of=/dev/block/mmcblk0p27
super, thank you Machzelet!
i will give that a whirl this weekend.
here's how i think it will go
images to sd card
restore backed up original rom va rom manager
open up terminal emulator, run the commands above
reboot
update with OTA update
easy breezy?
Why would you even bother updating? The changes in the OTA update will eventually appear in custom ROMs anyway.
do i rly need to provide a reason for wanting to fiddle around with my phone? on a dev board? lolz

[Q] Bricked need help....

So I was loading a new cm9 rom last night and everything seemed fine until reboot now its stuck at the roms boot screen...
So I attempted to get it to reboot to recovery or fast reboot no dice...
went through all the forums and couldnt get anythign to work...
adb devices sees my kindle fine...
i can adb shell and do a ls and it see directorys and i can cd to a different directory...
and time i try too do the commands to push fbmode or any of that i always get
failed to copy 'fbmode' to '/data/local/temp': No such file or directory
if i try to put it in a different directory or mkdir through shell i get an error for read-only file system
someone please help me out here...
First of all, what recovery are you using?
Bornxero said:
So I was loading a new cm9 rom last night and everything seemed fine until reboot now its stuck at the roms boot screen...
So I attempted to get it to reboot to recovery or fast reboot no dice...
went through all the forums and couldnt get anythign to work...
adb devices sees my kindle fine...
i can adb shell and do a ls and it see directorys and i can cd to a different directory...
and time i try too do the commands to push fbmode or any of that i always get
failed to copy 'fbmode' to '/data/local/temp': No such file or directory
if i try to put it in a different directory or mkdir through shell i get an error for read-only file system
someone please help me out here...
Click to expand...
Click to collapse
/data/local/tmp not /data/local/temp
soupmagnet said:
First of all, what recovery are you using?
Click to expand...
Click to collapse
think i was using cwm cant remember for sure but i cant get it to boot into anything but the cm9 bootscreen...
and tmp vs temp doesnt matter...all directories show either no such directory or read only system
Bornxero said:
think i was using cwm cant remember for sure but i cant get it to boot into anything but the cm9 bootscreen...
and tmp vs temp doesnt matter...all directories show either no such directory or read only system
Click to expand...
Click to collapse
It is important to know because the newer ICS roms won't work with CWM, only TWRP.
from the screenshots ive seen of twrp looks like it was cwm...I just want to be able to restore to stock first then I'll do another rom via twrp...
I previously loaded the hellfire ICS without issue as well...
Hey is it a 3.0 kernel from like energy's, I ,may have your answer then. I just need to know if thats the issue you are having.
Sent from my Amazon Kindle Fire using Tapatalk 2
Bornxero said:
I previously loaded the hellfire ICS without issue as well...
Click to expand...
Click to collapse
How recently? Trust me, from what I've seen here, you need TWRP. None of the 3.0 kernel based ICS roms work well or at all with CWM these days, including Hellfire.
Bornxero said:
So I was loading a new cm9 rom last night and everything seemed fine until reboot now its stuck at the roms boot screen...
So I attempted to get it to reboot to recovery or fast reboot no dice...
went through all the forums and couldnt get anythign to work...
adb devices sees my kindle fine...
i can adb shell and do a ls and it see directorys and i can cd to a different directory...
and time i try too do the commands to push fbmode or any of that i always get
failed to copy 'fbmode' to '/data/local/temp': No such file or directory
if i try to put it in a different directory or mkdir through shell i get an error for read-only file system
someone please help me out here...
Click to expand...
Click to collapse
I would try to use KF utility which is very useful for all kinds of issues with KF and very easy to use. It has helped me a great deal.
Yea its was a 3.0 kernel...gedeROM..
forest1971 said:
I would try to use KF utility which is very useful for all kinds of issues with KF and very easy to use. It has helped me a great deal.
Click to expand...
Click to collapse
I deff. tried everything in the kindle unbrick utility if thats what your talking about...
Bornxero said:
I deff. tried everything in the kindle unbrick utility if thats what your talking about...
Click to expand...
Click to collapse
I'm guessing you still have the stock bootloader ("kindle fire" bootlogo when the device first powers up) or you would have gotten yourself to recovery already. You'll want to try and get the bootmode changed to recovery and reboot like this...
Code:
adb shell idme bootmode 5001
adb reboot
If you can get back to CWMR, the first thing you should do is flash a new bootloader... probably FFF 1.4a that you can find in the dev section. Then use that to get into fastboot mode and flash TWRP.
If you cannot change bootmodes through adb. You'll have to push fbmode or rcmode in some writeable directory. I'm guessing /data/local/tmp doesn't exist in CM9, so try pushing it to /data instead.
If none of that works and my guess about your bootloader is right, you're going to need a factory cable.
kinfauns said:
I'm guessing you still have the stock bootloader ("kindle fire" bootlogo when the device first powers up) or you would have gotten yourself to recovery already. You'll want to try and get the bootmode changed to recovery and reboot like this...
Code:
adb shell idme bootmode 5001
adb reboot
If you can get back to CWMR, the first thing you should do is flash a new bootloader... probably FFF 1.4a that you can find in the dev section. Then use that to get into fastboot mode and flash TWRP.
If you cannot change bootmodes through adb. You'll have to push fbmode or rcmode in some writeable directory. I'm guessing /data/local/tmp doesn't exist in CM9, so try pushing it to /data instead.
If none of that works and my guess about your bootloader is right, you're going to need a factory cable.
Click to expand...
Click to collapse
w00t solved thanx....i was crying over here lol...
used this to put back the old rom I was using then used KFU to install twrp and installed the new rom without issue....
thanx again....

can't get into settings after root

Hi, I rooted with KFF and now i can't swip from the top of the screen and i have no back arrow or home button. i was trying to remove root with KFF and bin4ry but no luck. Can somebody give me some instructions? Thanks
Rooting alone will not cause the type of problems you are describing. Have you installed a custom ROM, custom launcher, or any other alterations to /system that would require root privileges?
No 2nd bootloader. just root and i can't enable adb
Adb was required for root, it should still be enabled if you never were able to get into settings after root. Weird... If worst comes to worst u might have to reflash the system image, which on the bright side is prerooted. But I just don't see how rooting it could cause such a weird error, sounds like something got messed up with the systemui apk, and root doesn't modify that.
Sent from my Amazon Kindle Fire HD running CM10.1 Tablet UI using xda-developers app
cubiche said:
No 2nd bootloader. just root and i can't enable adb
Click to expand...
Click to collapse
To remove "root", simply enter the following commands in a terminal emulator:
Code:
su
mount -o remount,rw /system
rm /system/app/Superuser.apk
rm /system/xbin/su
mount -o remount,ro /system
exit
But, be warned. If having "root" is not the source of your problem, as I suspect, and you have some additional changes to your /system directory that you've failed to mention, you will not only be stuck with the problem you had to begin with, but you will also not have root permissions or the adb connection you would need to fix your device.
He should be able to get it in fastboot though with the fastboot getvar product command if he plugs in his kindle when off after running it since a 8.9" model right? That would be useful even if adb is disabled.
Sent from my Amazon Kindle Fire HD running CM10.1 Tablet UI using xda-developers app
I can get into fastboot with kff, but I don't know where go from there.
You can restore a saved system.img, but it will still be rooted when it's finished.
I have a saved image from another kindle HD 8.9. I think it was 8.3.0. Will that work? Can someone will me through the process?
cubiche said:
I have a saved image from another kindle HD 8.9. I think it was 8.3.0. Will that work? Can someone will me through the process?
Click to expand...
Click to collapse
Code:
fastboot -i 0x1949 flash system system.img
Hey soupmagnet, thanks for the help. Is there a risk of bricking the tablet?
The risk is considerably lower than installing the 2nd bootloader.
How do I enter that line. From adb?
ok, i'm done but i'm stuck on the kindle fire screen.
Where did you get your system.img?
[Edit:] Nevermind. I forgot you already told us. Is it safe to assume you have a boot.img as well?
it was saved on my computer from a different hd 8.9. i saved it before frashing 2nd bootloader and twrp. should i also flash the recovery and boot?
yes i have boot and recovery.img
fastboot -i 0x1949 flash boot boot.img
That should fix it.
i flashed recovery, boot and system and still don't have the navigation buttons. system is still rooted, i assume because i flash a rooted system.img. i also have the stock-system, recovery and boot. do you think that will fix it?
I guess I assumed that's what you meant when you said you had saved images.
Unless you unpack, unroot and repack your system.img, it's going to be rooted either way because you have to have root permissions to save your system.img. But it seems beyond all logic and reasoning to think that having "root", which consists of two files that are completely independent of the systemui.apk and framework-res.apk, would have any effect on the navbar at all.
By all means, restore your stock images. I'm very interested to see if it has any effect.

Can't flash any 4.3 rom

I'm on twrp 2.3.6.1 and can't flash any 4.3 ROM. Any fix? And twrp says no open recovery script for your device. I'm on a rooted stock 4.0.4
Sent from my SGH-M919 using xda premium
U need a newer twrp 2.6.1.0 would a be a good version to use. 2.6.3.0 has a few bugs
Sent from my SGH-T989 using Tapatalk
Ahh thank you
Sent from my SGH-M919 using xda premium
Is there a way to update via goo manager app? I tried to update by doing menu>install open recovery script. But it doesn't recognize my device. Anything I could do? I don't have an Android to USB cable handy.
Sent from my SGH-M919 using xda premium
'Murica said:
Is there a way to update via goo manager app? I tried to update by doing menu>install open recovery script. But it doesn't recognize my device. Anything I could do? I don't have an Android to USB cable handy.
Sent from my SGH-M919 using xda premium
Click to expand...
Click to collapse
You can update by grabbing the recovery IMG file from their site and use android terminal emulator to install it!
su
dd if=/sdcard/openrecovery-twrp-hercules-2.1.8.img of=/dev/block/mmcblk0p22 <- (this is for Hercules obviously)
And the "openrecovery..." Is the one you downloaded and place it in the root of sdcard make sure it's word for word and you should be good to go!
PhlexPlexico said:
You can update by grabbing the recovery IMG file from their site and use android terminal emulator to install it!
su
dd if=/sdcard/openrecovery-twrp-hercules-2.1.8.img of=/dev/block/mmcblk0p22 <- (this is for Hercules obviously)
And the "openrecovery..." Is the one you downloaded and place it in the root of sdcard make sure it's word for word and you should be good to go!
Click to expand...
Click to collapse
So I type 'SU' and hit enter. Than I copy and paste ' dd if=/sdcard/openrecovery-twrp-hercules-2.1.8.img of=/dev/block/mmcblk0p22' replacing ' openrecovery-twrp-hercules-2.1.8.img' with the name of my recovery and then replacing ' mmcblk0p22' with 'Hercules' and hitting enter?
Sent from my SGH-M919 using xda premium
'Murica said:
So I type 'SU' and hit enter. Than I copy and paste ' dd if=/sdcard/openrecovery-twrp-hercules-2.1.8.img of=/dev/block/mmcblk0p22' replacing 'openrecovery-twrp-hercules-2.1.8.img' with the name of my recovery and then replacing ' mmcblk0p22' with 'Hercules' and hitting enter?
Sent from my SGH-M919 using xda premium
Click to expand...
Click to collapse
No not quite, if you're using the phone that's appropriate for the forum you just copy and paste
Code:
su
dd if=/sdcard/openrecovery-twrp-hercules-2.1.8.img of=/dev/block/mmcblk0p22
And openrecovery-twrp-hercules-2.1.8.IMG with whatever your name of the IMG file is, so if it's openrecovery-twrp-hercules-2.6.1.0.img then that would replace it. The block mmcblk0p22 does not get changed or else your device will brick!
So to clarify:
The
Code:
dd if=/sdcard/openrecovery-twrp-hercules-2.1.8.img
is the path to where the img file for TWRP is. If you're downloading 2.6.1.0, and move the img file to the root of your SDcard, then it might be something like
Code:
dd if=/sdcard/openrecovery-twrp-2.6.1.img
Now the
Code:
of=/dev/block/mmcblk0p22
is where the img is going to be written to. From what I see, the last bit
Code:
mmcblk0p22
varies on the device and where the recovery installs. It's a different location for the Galaxy S4 compared to the T989 (also known as hercules).
Say if you were to rename the download to something easy to type out, like just recovery.img and placed in the root of the sdcard, then it would look like
Code:
su
dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p22
Then you should be able to boot into recovery and it should be updated!
If something goes wrong, your device will brick, so make sure you download the right file. I flashed the .tar by accident on a friends phone, but Odin can easily fix it by flashing it with that.
Sorry for the short responses, I was on my phone when I was replying!

Categories

Resources