How can I open binary Android ROM image files? (.img)
Solution 1:
Update: See stackoverflow.com - Mount Android emulator images
Short Answer is, there are 3 types:
- Regular filesystem images, that can be mounted with
-o loop
option - YAFFS2 filesystem images, which currently cannot be mounted in Ubuntu and have to be unpacked
- EXT4 filesystem images that have been further processed by the Android toolchain and need to be converted to regular images with
simg2img
from the Android toolchain.
So, you have a binary image extracted from an Android device, is that correct?
What does the file command say about the file? Something like this?
$ file system.img
system.img: VMS Alpha executable
That system image is extracted via nandroid from a Samsung Galaxy i7500. Most of those old Android devices used yaffs as a file system. Knowing what you are dealing with greatly helps. (i.e. Which device are we talking about? Where is that image from?)
Converting images into other file systems will only produce garbage at best if you do not have installed support for the file system in question. Unfortunately there is no package for Ubuntu. But that question has already been asked and answered: Create yaffs2 file system on Ubuntu Server 11.10
There is also the possibility that this image is encrypted. But why would someone give you an encrypted image?
Since this is mostly about Android and you call yourself an Android Developer, please read the Android documentation, again. It's supposed to be all in there. If not ask your question at android.stackexchange.com, XDA-Developers, RootzWiki and the like. And please do not put a ROM on the net for hundreds of people to use unless you REALLY know what you are doing and you read the documentation. Doing it for fame is dangerous and bad for the users!
Solution 2:
for windows just mount the image through any virtual device program( like daemon tools) and for linux, mount the .img file like you mount other iso files:
# mkdir -p /mnt/disk
# mount -o loop disk.img /mnt/disk
# cd /mnt/disk
# ls -l
does that help you?