I have rooted my android phone and get a shell thr adb. I wanna mount a ROM image in android. But I always fail:

mount -o loop /sdcard/myimage.img /mnt
mount: can't setup loop device: No such file or directory


Try: mount -o loop /sdcard/myimage.img myimage. "myimage" is where you can view the contents afterward.


You would need to compile a custom kernel that is capable of mounting loop devices, or find a custom kernel for that device that already has that feature built-in.

After a bit of digging, I found this guide on my phone's support forum. It's a bit dated, but the information is still relevant. It shows how to boot a Debian .img file. Unfortunately, it doesn't really detail EXACTLY what's needed for loop support, just that loop support is needed. But it is definitely possible, as I've personally run this on my phone for a short amount of time.

  • I was able to use mount on my Galaxy S with a stock ROM ... – Matthew Read Jan 25 '11 at 21:40
  • 1
    Mounting, sure. Mounting on a stock ROM is not a problem. But mounting a loop device? Most of the stock kernels I've seen don't have loop device mounting enabled by default. – c0mp13371331337 Jan 25 '11 at 23:00
  • @c0mp13371331337 the problem I found in my Android 4.2.1 device was with the mount binary that came with stock ROM. It was simply not capable of mounting a loop device but busybox's mount does. – Firelord Dec 6 '15 at 10:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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