Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm a Windows/Mac/Ubuntu and Android user, so I know what I'm talking about, when I say: How do I open binary image files? (.img) They just won't open, on any OS…

I'm an Android dev… I'm currently working on a ROM, (I also program, using Windows) but I need to extract files, from .img files. I've converted them to .ext4.img but they just aren't recognized by Linux (Definitly not by Android), by Mac OS or Windows. In other words, I can't open, extract or mount them.

Can anyone help me? I'm kinda confused…

share|improve this question
the fact that the person with the most useful answer has to first guess what your question really is about, says it all. Please try to ask a more specific and detailed question than 'How do I open binary image files'. – steabert Aug 23 '12 at 11:48
I think they're just YAFFS2 images; see – Mechanical snail Apr 13 '13 at 22:57

Update: See - 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, 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!

share|improve this answer

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?

share|improve this answer
else you can use the normal iso mount software like gisomount for ubuntu – ashutosh May 1 '12 at 13:26
The commands will work if the right file system is installed. He needs to find out which file system the image contains. It is not ISO 9660 or UDF so tools for mounting images of optical media are not supposed to work. – LiveWireBT May 1 '12 at 15:39

It's a linux image file. You can open it in windows with ext2explore which you can download here.

share|improve this answer

You could you either use the Furius ISO Mount or the AcetoneISO to mount .img files, just search them on the ubuntu software centre and install them.

Furius ISO Mount AcetoneISO

share|improve this answer
Both tools are intended to be used for ISO 9660 or UDF images. Optical media so to say. While some software creates .img files of optimcal media and vice versa, .img files can contain everything that can be dumped via dd command. dd if=/dev/urandom of=urandom.img bs=100M count=1 would for instance just create a file with 100 MB of random data. – LiveWireBT May 1 '12 at 15:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.