3

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

2 Answers 2

5

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

0

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.

3
  • I was able to use mount on my Galaxy S with a stock ROM ... Commented Jan 25, 2011 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. Commented Jan 25, 2011 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
    Commented Dec 6, 2015 at 10:29

You must log in to answer this question.

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