i know it works for recoveries, but can we use the "flash_image" file to flash other .img files, such as "boot.img" or "system.img"?
Sounds like you don't have the flash_image binary, also double check you typed everything in correctly and gave the command superuser permissions
Sent from my Nexus 4 using xda premium
Sorry for reviving an old thread but im desperate
My phone is stuck in safe mode and I can't get it out. Therefor I can't use any third apps
I can't get into download mode (when I press the vol + key while turning the phone on, it just shows me the 100% charging animation) and it doesn't go into bootloader
Im trying to flash the recovery to get inot recovery but when I type the last command, flash_recovery recovery /sdcard/recovery.img it gives me "error scanning partitions: no such file or directory"
What should I do?
I own a LG g2
Thanks in advance
Is the flash_image tool part of Android Open Source Project?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.
Is the flash_image tool part of Android Open Source Project?
Should one be careful regarding what version of the tool to use?
I do not have an HTC device. There have been others external to XDA that have posted your excellent method, but not particular to HTC devices.You have an HTC/T-Mobile G2 or HTC Desire Z? That's what this post was originally written for (almost 5 years ago). I don't claim it's applicable to any other device.
That was my thought as well. The various sources that provide the flash_image tool do not mention the version of the tool on necessary compatibility with Android versions, nor where they come from.In general terms I don't know for sure how important the version of flash_image is but I would think you would want to stay in the same general Android family, for example don't try to use an Android 4.4 flash_image on an Android 5.0 ROM.
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
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)