From Android's terminal, I tried to mount a nandroid img:

losetup -f

gives "/dev/loop0".

However, when I try losetup /dev/loop0 /sdcard/nandroid/... data.img it says no such directory. Same thing when I try to mount the file.

According to this it should be doable, but it seems there must be some trick to mounting it in Android? https://en.wikipedia.org/wiki/Loop_device

2 Answers 2


I don't think you should need to use losetup, however, if you are using Android 4.2, the path to your sdcard may be the issue. In Android 4.2, that has been changed due to support for multiusers on tablets. You would likely need the full path rather than the "shortcut" that has been set up for simplicity by Android. That path would be /storage/emulated/0/nandroid/...data.img.

But, I believe Android will support mounting it directly with the mount command (it is what I have used a few times in Linux, although, I've never tried in Android).

mount -o loop /storage/emulated/0/nandroid/...data.img /mnt/wherever

Keep in mind, you will need to be root and the directory you want to mount it to needs to exist before you run the command. And when you do mount it, if you mount it over a directory that has content in it, it will prevent access to that content (it isn't gone, but unaccessible until it is unmounted).

  • 1
    Won't be that easy, probably, unless something changed. See: Does Cyanogendmod Kernel support loop devices?. Other source of interest: SO: How to mount the android img file under linux?. I would be interested to know whether anybody tried it on Android and succeeded -- and if so, what pre-requisites are needed, whether it works on every ROM, and with every Nandroid backup (regardless of the CWM/whatever version used).
    – Izzy
    Commented May 2, 2013 at 21:25
  • Maybe you want to verify your theory and catch the bounty? :)
    – Izzy
    Commented May 5, 2013 at 23:11
  • I'll have to do some digging once I get home. I know there is unyaffs for windows which can unpack a yaffs image (it might be yaffs2, I'll have to double check). And once I get an image, I'll try various methods of getting it mounted on my N4 (I should be able to grab a yaffs image from my N1 and probably an old ext3/4 image from my backup of my dead HOX). But I don't have a Mac to test any theories on that, although, I would expect most Linux solutions would work on Mac with some alterations... Commented May 6, 2013 at 17:07
  • That would be great! No prob if you cannot cover everything - any additional insight will be helpful/useful! And yes: unyaffs is there (I have used that on Linux), but that unpacks the entire tree, which is why I didn't mention it (we want to mount the image, right? ;) I'm also curious if the fstype is detected automatically, or if the user has to know (and provide) it... Looking forward to your update then - and thanks in advance!
    – Izzy
    Commented May 6, 2013 at 17:11
  • 12h left for the bounty. Any chance for new details on your experiment? :)
    – Izzy
    Commented May 11, 2013 at 12:29

If you don't insist to mount them directly into the local file system, but just to access their contents, you might want to take a look at Nandroid Browser:

Nandroid Browser has a really simple purpose: Extract and use single files from your nandroid backups.

  • Browse your nandroid backups
  • Save files anywhere
  • Send files
  • Open Files

Currently supports nandroid backups stored as yaffs2 images (.img) as wells as ext4 images (.ext4.tar).

A second candidate turned up after I found the first: Nandroid Manager:

  • View basic info about your nandroid backups.
  • Explore contents of nandroid backup.
  • Extract files from nandroid backups.

(more features listed).

Needless to say that those apps of course need root. But if you have a Nandroid backup, you surely will have root as well, right? :)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .