How would I go about flashing a different boot image? I am running CyanogenMod-4.2.3.1 and I want to put the BFS boot image in it. Thanks to anyone that helps.
I believe the only way to do it is using fastboot, so you will need either 'HardSPL' or '1.33.2005' (AKA Danger). To check, boot in to the SPL using camera and power, if you see a tri-colour screen, then you have the stock SPL. For the love of all that's holy don't flash 1.33.2005 without the .26I radio (which you should have already).
Once you have fastboot set up (instructions here) put the boot .img in the same directory as the fastboot executable. Boot the phone in to the SPL (home + camera) and enable fastboot. Then 'cd' to the fastboot directory in the command prompt or terminal (depending on OS) and type:
Code:
fastboot flash boot boot.img
If you're on a unix based OS, you maybe need to put a './' before that command.
Afterwards reboot your phone using 'fastboot reboot' (again you may need the './'). Hope this helped.
It can also be done in console by typing:
flash_image boot boot.img
replace boot.img with the actual file name.
daveid said:
It can also be done in console by typing:
flash_image boot boot.img
replace boot.img with the actual file name.
Click to expand...
Click to collapse
D'oh! Well that's much easier. Makes sense that it would be the same command as flashing the recovery image, but 'boot' instead of 'recovery'.
Before the flash_image command, don't forget to 'cd /sdcard' or wherever it's located.
I tried doing it from the recovery console, but everytime I tired to flash the boot.img it would say that it couldn't be found. I then tried it from the terminal emulator and it seemed like it worked but I can't tell if it really did or not.
Thanks to both of you for the help.
Related
Hello there. I am not so lucky to have a Dream (well I do have other sorts ) but my colleague wanted to have a go at backups and flashing and did something stupid.
He performed a cat /dev/zero on mtd3 which is the system dir and afterwards ofcourse was not able to flash his system.img back because flash_image was on that same system partition.
NOW. How do we get this puppy back up from that Android blinking cursor screen?
ADB is there. Root is still there. Fastboot is in an waiting forever modus.
you might have better luck if you ask in the right section
please either re-ask in QnA or wait for the mods to move it
just wondering....why the hell did he do that? lol
put a recovery image on the sdcard and do
adb flash_image recovery /sdcard/(filename)
if that works, boot in to recovery and try flash an image
i doubt it will work but its worth a go
ok, my eye skipped over the failed flash thing
search around...there is a way to apply roms via adb...
i think there are even instructions on the adp1 page on the htc website
Thx. Had the exact same question. I will look it up.
If ADB works, why don't you just transfer flash_image back, apply the proper permissions, and go?
The entire MTD3 is gone. Maybe you could give us some pointers on how to do it? Every command you give in the shell points back in the error - exec '/system/bin/sh' failed: No such file or directory (2) - simply because nothing is there.
So how to begin putting flash_image back in a system dir that's not there?
Boot into the recovery image & then use adb flash_image should work. Otherwise you can just fastboot a system image from another Magic (search in the Magic forums & ask for one if you cant find it). Or just flash a ROM from recovery
Ooh I missed a vital detail. Appearantly the keys are none responsive so he isn't able to go into recovery or bootloader mode.
When trying the ol' fastboot boot recovery he gets cannot load 'recovery' while fastboot boot recovery.img spits out
creating boot image...
creating boot image - blahblahblah bytes
< waiting for device >
and well the ol' adb shell reboot bootloader gives him that saucy
- exec '/system/bin/sh' failed: No such file or directory (2) -
any takers?
So you can't get into the spl by holding the camera key while turning the phone on?
If you could, then once it's up, press the back button so it'll go into fastboot mode. Fastboot won't work unless you do this.
If you can't get it that far then you have bigger problems, i'd say.
Once you get that far though, just use "fastboot flash" the same way you would use "flash_image". If you get errors flashing system from a system.img, do a "fastboot flash erase system" first. I did something similar before and that solved it for me.
TemporalShadows said:
So you can't get into the spl by holding the camera key while turning the phone on?
If you could, then once it's up, press the back button so it'll go into fastboot mode. Fastboot won't work unless you do this.
If you can't get it that far then you have bigger problems, i'd say.
Once you get that far though, just use "fastboot flash" the same way you would use "flash_image". If you get errors flashing system from a system.img, do a "fastboot flash erase system" first. I did something similar before and that solved it for me.
Click to expand...
Click to collapse
if this doesnt work, just flash the RC29 recovery image (DREAIMG.nbh) and reroot
links can be found in many root guides
Let
s just give up on this one then. I even tried dnw.exe but that didn't help much either.
well i happened to have some problems with a theme i was using that made the icons appear themed even in cyanogens roms , and i was told that i needed to flash the htc adp image to fix that
the problem comes here i flashed the htc adp image but i forgot to read what cyanogen said that i had to flash his rom before rebooting
so i just found that cyanogen gives us something to follow just in case it happens what happened to me here http://wiki.cyanogenmod.com/index.php/RE-recovery-img
i went to ''if you currently have an engineering or a Hard SPL'' and followed all the procedures until i got to number 4 where it asks me to Change directory to where you have saved your recovery image..i've tried lots of paths but none seems to work...ADB NOOB HERE so please help
when you didnt follow the process, you lost root.
you have to start from scratch.
.............................................................................
i typed
cd C:\recovery-RA-dream-v1.5.2.img
and it tells me the directory name is invalid what am i doing wrong?
recovery image is not a directory, it'a file. What are you trying to do?
borodin1 said:
recovery image is not a directory, it'a file. What are you trying to do?
Click to expand...
Click to collapse
im trying to flash amon ra recovery via fastboot
Easier to do it from adb
Code:
adb remount
adb shell flash_image recovery C:\recovery-RA-dream-v1.5.2.img
reboot
Just a tip: I usually rename files into something easier to type, like ra152.img. Up to you though.
You can also do it from terminal (place file on the root of sdcard)
Code:
su
flash_image recovery /sdcard/filename.img
reboot
If you must do it via fastboot
Start your phone in fastboot mode (camera/power)
Code:
fastboot flash recovery recovery-RA-dream-v1.5.2.img
fastboot reboot
borodin1 said:
Easier to do it from adb
Code:
adb remount
adb shell flash_image recovery C:\recovery-RA-dream-v1.5.2.img
reboot
Just a tip: I usually rename files into something easier to type, like ra152.img. Up to you though.
You can also do it from terminal (place file on the root of sdcard)
Code:
su
flash_image recovery /sdcard/filename.img
reboot
If you must do it via fastboot
Start your phone in fastboot mode (camera/power)
Code:
fastboot flash recovery recovery-RA-dream-v1.5.2.img
fastboot reboot
Click to expand...
Click to collapse
i would do this..but i cant since i messed up when flashing the htc adp image im following cyanogens tutorial http://wiki.cyanogenmod.com/index.php/RE-recovery-img and it says that i have to flash the new recovery through fastboot , and the part im stuck at is step 4 where he says that i need to Change directory to where you have saved your recovery image
if you can get into the main phone operating system via a boot up then use linda file manager to move them
when i type this
fastboot recovery recovery-RA-dream-v1.5.2.img
i get this message "error: cannot load 'recovery-RA-dream-v1.5.2.img
then i changed the directory to where the recovery image was and when i tried to flash i got this message
'fastboot' is not recognized as an internal or external command, operable program or batch file
Not sure, I'm not anywhere near my computer. Try putting your recovery image into different locations (i always put it on desktop) and rename it to something simpler, without any punctuation or special characters (i suggest rec.img). Also... make absolutely sure that you're NOT naming it rec.img.img . Make sure that your PC is not hiding your extensions.
Then, connect your phone to the computer, start your phone in fastboot mode (not Hboot or serial, if you see serial or Hboot on your screen then tap return button)
In command line type
Code:
fastboot devices
to make sure that you're connected
then type
Code:
cd desktop
your directory should change to something like C:\user\desktop (make SURE there are no spaces anywhere in user name, fastboot has problem with that. I had to rename my account to "EugeneAndLiz"a from "Eugene and Liza" because of that)
then type
Code:
fastboot recovery rec.img
fastboot reboot
and let us know how did it go for you. I'l be lurking around here for a while, hopefully we can resolve this.
Good luck
borodin1 said:
Not sure, I'm not anywhere near my computer. Try putting your recovery image into different locations (i always put it on desktop) and rename it to something simpler, without any punctuation or special characters (i suggest rec.img). Also... make absolutely sure that you're NOT naming it rec.img.img . Make sure that your PC is not hiding your extensions.
Then, connect your phone to the computer, start your phone in fastboot mode (not Hboot or serial, if you see serial or Hboot on your screen then tap return button)
In command line type
Code:
fastboot devices
to make sure that you're connected
then type
Code:
cd desktop
your directory should change to something like C:\user\desktop (make SURE there are no spaces anywhere in user name, fastboot has problem with that. I had to rename my account to "EugeneAndLiz"a from "Eugene and Liza" because of that)
then type
Code:
fastboot recovery rec.img
fastboot reboot
and let us know how did it go for you. I'l be lurking around here for a while, hopefully we can resolve this.
Good luck
Click to expand...
Click to collapse
im going to tell you step by step what i do
turn the phone off
hold power and back
i see the androids on skateboards and it says fastboot in red letters
i connect my phone via usb then the name changes to fastboot usb
run the cmd
once there i type where adb is located which is cd C:\android-sdk-windows\tools
then when i type fastboot devices
i see the serial number of my phone
now when i type cd desktop i get this message "the system cannot find the path specified"
and if i ignore that and try to flash
fastboot flash recovery rec.img (yes i did rename the recovery image)
it says that it cant load 'rec.img'
Got it! Put your image file into the "tools' folder and once you see your device in the fastboot just flash it from there
Code:
cmd
cd C:\android-sdk-windows\tools
fastboot devices
fastboot flash recovery rec.img
fastboot reboot
Sorry about all this complication... the main idea is that your recovery needs to be in the same directory as you're when you're flashing. So if earlier you went to tools folder then your file needs to be there as well.
Try it out.
it worked...it said sending 'recovery' <4456 KB>... okay
writting 'recovery'...okay
fastboot reboot
then when i go to the system recovery..its the same htc adp one
i tried to flash amon ra's recovery and cyanogens
oh nevermind..instead of rebooting the phone i just unpluged the device and wnet directly into the system recovery and YES i have cyanogens recovery thank you so much borodin1
hmmmm that's weird because you got confirmation....
1. Did you download right recovery? You had to becaue you tried 2 of them and you can only make the same mistake once lol
2. AmonRA's recovery has the same image in the background as HTCs, are you sure that it's still HTC's recovery?
Other then that... I'm clueless
Can you get su in the adb shell? Try flashing it from adb....
You got me stomped on this.... Anyone else wants to take a shot at this????
i dont know what happened but when i flashed the recovery image on fastboot and then rebooted the phone...then turn off the phone and went to the system recovery and the htc adp recovery appeared...blue letters and the scrolling options..but when i did not reboot the phone after flashing the image and went directly to the system recovery i had the recovery i flashed...then i applyed the updateand everything is good now
weird uh?
will that new recovery stick?... I'm starting to remember something but it's vague... give me few minutes Reboot couple of times into recovery and back for now and see what happens...
it did stick..i just rebooted into recovery and i have the new recovery..haha
Great! Happy modding!
Hi guys,
I have to send me N1 to htc for fix some problem.
I have RA recovery with lock bootloader, and I want to flash the original, but "fastboot" way doesen't work (signature fail ).
How can i flash it in other way?
Ty
(sry for my eng )
Just flash the stock rom with the recovery image like frf92 original.
evilkorn said:
Just flash the stock rom with the recovery image like frf92 original.
Click to expand...
Click to collapse
How? Through recovery? Because "fastboot" hates me, and won't work.
I'd suggest using a passimg for frf85b and then maybe updating to 91 (or just leave it at 85), you can always re-root when you get it back.
________________________
N1 w/ XDA App
got it, thk to cyanogen wiki
Plug the phone into the computer
Reboot into fastboot by holding TrackBall + Power (you should see three Androids on skateboards and the words 'fastboot USB' in red)
On the computer, open a command prompt cd to the sdk/tools directory (we will assume the SDK is located in C:\android-sdk and the recovery file is in the root of the sdk/tools directory for the following steps)
With the phone connect via USB, open up a cmd prompt
Code:
adb reboot recovery"
Code:
adb devices
A device name and 'recovery' should be returned
Code:
adb push recovery.img /sdcard/recovery.img
recovery.img is located on android-sdk/tools dir
Code:
adb shell flash_image recovery /sdcard/recovery.img
This permanently flashes the recovery.img to your phone, you can now boot into it by holding Vol- while powering on the device
Reboot
nrdmtt said:
got it, thk to cyanogen wiki
Click to expand...
Click to collapse
Thanks for searching!
I hope this encourages other users new to ADB, flashing ROMs, etc. to continue to search after asking for help.
Way to go nrdmtt!!
I installed the new zen2.2 rom today and had a working clockwork recovery. Here is where I went stupid, I downloaded the kernel update but rather than running it via update.zip I flashed it using flash_image recovery via adb shell.
Now my phone comes up to fastboot usb and never goes any further, been waiting hours! I have tried booting into fastboot/hboot and it does nothing. I have booted to hboot before successfully but now nothing.
If I run adb devices it shows no devices. If I run fastboot devices it does show my device.
Whats next?
If you cant get into fastboot and you cant get into recovery then you m ight have bricked your phone. Did you try a hard reset?
How do you do a hard reset?
Here is a little more info. I believe it does actually get to fastboot usb as it says so on the top left of the screen and I can run fastboot commands but most commands say error. If I do fastboot devices it shows the device connected.
Little more info - when I try doing a back to basics RUU update it connects, shows the rom version, starts the update and then at about 88% every time, it goes right to a error [171] usb connection error. So its communicating but never finishes. Tried with the sprint RUU stock rom, another that was built by one of the devs in the Hero community and still both do the same.
I'm pretty sure you can flash a custom recovery from fastboot. Using something like fastboot flash xxx dont quote me on this but it sounds like you have a soft brick and you just need to get a recovery back on the phone. From there you can then flash and rom back on the phone. Do some research on flash a recovery from fastboot.
ASimmons said:
I'm pretty sure you can flash a custom recovery from fastboot. Using something like fastboot flash xxx dont quote me on this but it sounds like you have a soft brick and you just need to get a recovery back on the phone. From there you can then flash and rom back on the phone. Do some research on flash a recovery from fastboot.
Click to expand...
Click to collapse
Right, I also believe that if I could get a recovery back on the phone I would be good as gold! Here is the problem though. I have tried running "fastboot flash recovery [recovery.img]" but it gives me the below error. I have tried multiple key combination's to get into hboot but nothing works. If anyone has any other key combination's I could try please let me know!
Code:
D:\android-sdk-windows\tools>fastboot flash recovery recovery.img
sending 'recovery' (3720 KB)... FAILED (remote: not allow)
finished. total time: 0.001s
1st:The ONLY time you use flash_image recovery is when you are installing a recovery console, NOT a kernel
If you notice the kernel is in a signed .zip folder. When you use flash_image command it needs to be .img file
2nd: Put the recovery image on your sdcard
Put it in the tools folder of AndroidSDK and do
Code:
adb push recovery.img /sdcard
Now type in
Code:
$ adb shell
$ su
# flash_image recovery /sdcard/recovery.img
unCoRrUpTeD said:
1st:The ONLY time you use flash_image recovery is when you are installing a recovery console, NOT a kernel
If you notice the kernel is in a signed .zip folder. When you use flash_image command it needs to be .img file
2nd: Put the recovery image on your sdcard
Put it in the tools folder of AndroidSDK and do
Code:
adb push recovery.img /sdcard
Now type in
Code:
$ adb shell
$ su
# flash_image recovery /sdcard/recovery.img
Click to expand...
Click to collapse
Yeah I think he knows now not to flash kernels... atleast I hope so. +1 for your post.
unCoRrUpTeD said:
1st:The ONLY time you use flash_image recovery is when you are installing a recovery console, NOT a kernel
If you notice the kernel is in a signed .zip folder. When you use flash_image command it needs to be .img file
2nd: Put the recovery image on your sdcard
Put it in the tools folder of AndroidSDK and do
Code:
adb push recovery.img /sdcard
Click to expand...
Click to collapse
I am fully aware of how the how-to's and what not to do's. Like I said, it was a mistake, call it a bit of anxiety due to the new 2.2 rom that I was trying to get installed. I did it too quick and without much common sense .
Now type in
Code:
$ adb shell
$ su
# flash_image recovery /sdcard/recovery.img
Click to expand...
Click to collapse
For the second part, I am unable to do anything with adb as my computer does not see the phone. When running adb devices it is not listed. Only command that sees my phone is fastboot devices, but again I am unable to run anything aside from that due to previous error.
casualonejp said:
I am fully aware of how the how-to's and what not to do's. Like I said, it was a mistake, call it a bit of anxiety due to the new 2.2 rom that I was trying to get installed. I did it too quick and without much common sense .
For the second part, I am unable to do anything with adb as my computer does not see the phone. When running adb devices it is not listed. Only command that sees my phone is fastboot devices, but again I am unable to run anything aside from that due to previous error.
Click to expand...
Click to collapse
First do you have the eng spl, does your hoot say s (on)
Have you tried that command but point it to the sdcard? Also do you have any files on your sdcard like say a recovery.img or an update zip. If you don't you might need to manually move the file to it and try some of these commands
fastboot update /sdcard/<imagepackage>.zip [-w] -w will wipe the cache and the user/data
or your previous flash recovery but with the file pointing to the file on the sdcard
edit: sorry i dont think fastboot will see the sdcard but try anyways.
ASimmons said:
First do you have the eng spl, does your hoot say s (on)
Have you tried that command but point it to the sdcard? Also do you have any files on your sdcard like say a recovery.img or an update zip. If you don't you might need to manually move the file to it and try some of these commands
fastboot update /sdcard/<imagepackage>.zip [-w] -w will wipe the cache and the user/data
or your previous flash recovery but with the file pointing to the file on the sdcard
Click to expand...
Click to collapse
I will try the fastboot command right now. I am unable to get to hboot with any of the key combination I have tried, before I was able to. Only thing that always comes up is the HTC white screen with fastboot usb at the top left. Can't see what hboot version or anything else I have due to that limitation.
casualonejp said:
I will try the fastboot command right now. I am unable to get to hboot with any of the key combination I have tried, before I was able to. Only thing that always comes up is the HTC white screen with fastboot usb at the top left. Can't see what hboot version or anything else I have due to that limitation.
Click to expand...
Click to collapse
After reading a bit you should be able to do something like i described
- copy amon_ra image to yor sd
- flash_image recovery /sdcard/name-of-recovery.img
hopefully you have a way to copy the files to your sd card like say a microsd card converter and stick it in your comp. Or I have had to use a freaking camera once for my g1 after being in a similar situation.
edit: ok so maybe you wont be able to if you spl is in s-off mode.
if you can access your card and see if you have nadroids you could also try this
fastboot flash system /path/to/nandroid/system.img
fastboot flash boot /path/to/nandroid/boot.img
fastboot flash userdata /path/to/nandroid/userdata.img
fastboot reboot
hopefully you have these backed up on your puter to.
ASimmons said:
After reading a bit you should be able to do something like i described
- copy amon_ra image to yor sd
- flash_image recovery /sdcard/name-of-recovery.img
hopefully you have a way to copy the files to your sd card like say a microsd card converter and stick it in your comp. Or I have had to use a freaking camera once for my g1 after being in a similar situation.
edit: ok so maybe you wont be able to if you spl is in s-off mode.
if you can access your card and see if you have nadroids you could also try this
fastboot flash system /path/to/nandroid/system.fimg
fastboot flash boot /path/to/nandroid/boot.img
fastboot flash userdata /path/to/nandroid/userdata.img
fastboot reboot
hopefully you have these backed up on your puter to.
Click to expand...
Click to collapse
Negative on the fastboot commands. Also did have a nandroid but on old sdcard which died. I read that I could use anothers nandroid backup but I am currently trying to find one to test.
Tried doing the RUU method with stock/custom roms and it gets as far as seeing the image but when I click on "ok" to start the recovery, it goes to "waiting on bootloader" and then at 88% it errors to a 171 error stating usb connection error.
I would do some research its my understanding that you can't be bricked since you can get into spl. You should be able to put an .img file on your sd card and flash it. Sorry I can give you any more input.
ASimmons said:
I would do some research its my understanding that you can't be bricked since you can get into spl. You should be able to put an .img file on your sd card and flash it. Sorry I can give you any more input.
Click to expand...
Click to collapse
Ya I have been researching non stop all yesterday evening and today so far all day. I just cant get it to do anything. I will keep researching though. Thanks
Did you fix this yet?
Anyone figure this out yet...I have the same issue and haven't been able to resolve it yet. Still with a brick at this point!
Hey guys,if your stuck at fastboot(As I just was tonight), try in your CMD(if running Windows) fastboot reboot-bootloader or fastboot reboot to reboot as normal,I'll try to keep you updated to get through all this. I am at a loss right now but searching for answers first before i go about asking.
Answer to MY problem(maybe not yours): OK,I have come to the conclusion here tonight that I had a soft brick. What I did was remove the battery,put the battery back in,restarted the phone normally,then I ran the HTC Sprint Hero MR 2.27.651.6 on my computer(essentially restoring back to unrooted factory settings). This worked for me. I am totally refreshed and happy that my phone is ok and all. Yes I may have to go back and re-root but this only take me bout 20 minutes most to root and re-flash a CyanMod7 Nightly Rom. Hope my info can help out somebody!
Make sure you unlocked your phone (mi.com/unlock)
Get your phone in fastboot (power + down) and there should be a rabbit on your screen,
Download these files:
https://mega.nz/#!JIgiSbAI!ZEs6ykifn_k5c9MQlcNfkowSwOB3JPmuycDK-28wQiQ
http://www.mediafire.com/file/yz5o5fn7yx9zkgv/file
https://sourceforge.net/projects/an...6-UNOFFICIAL-treble_arm64_bvS.img.xz/download
https://deac-riga.dl.sourceforge.ne...pps-core-arm64-11-20201122-signed.zip?viasf=1
Make sure you have adb fastboot, if you do, write these commands in the command line:
Code:
fastboot devices
fastboot flash recovery recovery.img
fastboot reboot
after executing fastboot reboot, hold the volume up button
now copy the fw+vendor-arm64_pine_11.0.11GLOBAL-v1.2.zip, lineageos zip and the google apps
start by flashing fw+vendor-arm64_pine_11.0.11GLOBAL-v1.2.zip then lineage os then google apps
if it didn't work, or you flashed the wrong file, etc, etc, write stock (https://flashxiaomi.com/download-install-miui-rom-for-xiaomi-redmi-7a-all-miui-firmwares/) (get 10.2.5, it is the best for roms)
and move the fastboot files into the folder you copied your stock image, and click on flash_all.bat
Hope it helped! Cheers!
Sodrus1020 said:
Make sure you unlocked your phone (mi.com/unlock)
Get your phone in fastboot (power + down) and there should be a rabbit on your screen,
Download these files:
https://mega.nz/#!JIgiSbAI!ZEs6ykifn_k5c9MQlcNfkowSwOB3JPmuycDK-28wQiQ
http://www.mediafire.com/file/yz5o5fn7yx9zkgv/file
https://sourceforge.net/projects/an...6-UNOFFICIAL-treble_arm64_bvS.img.xz/download
https://deac-riga.dl.sourceforge.ne...pps-core-arm64-11-20201122-signed.zip?viasf=1
Make sure you have adb fastboot, if you do, write these commands in the command line:
Code:
fastboot devices
fastboot flash recovery recovery.img
fastboot reboot
after executing fastboot reboot, hold the volume up button
now copy the fw+vendor-arm64_pine_11.0.11GLOBAL-v1.2.zip, lineageos zip and the google apps
start by flashing fw+vendor-arm64_pine_11.0.11GLOBAL-v1.2.zip then lineage os then google apps
if it didn't work, or you flashed the wrong file, etc, etc, write stock (https://flashxiaomi.com/download-install-miui-rom-for-xiaomi-redmi-7a-all-miui-firmwares/) (get 10.2.5, it is the best for roms)
and move the fastboot files into the folder you copied your stock image, and click on flash_all.bat
Hope it helped! Cheers!
Click to expand...
Click to collapse
Works great. Is it possible to ROOT?
GnSTM said:
Works great. Is it possible to ROOT?
Click to expand...
Click to collapse
any updates?