Search code examples
androidlinuxloopsmount

How to mount a loop device in android


I have an linux img file I want to mount it to /data/local/mnt

The issue is when I use

su

losetup /dev/block/loop7 /sdcard/linux.img

mount -t ext4 /data/local/mnt /dev/block/loop7

it gives error !! invalid argument !!


Solution

  • Ok, I found the solution !! I was actually writing in a wrong syntax It should have been mount -t ext4 /dev/block/loop7 /data/local/mnt