3

I tried to mount an iso on android, using busybox mount. It always gives me No such device.

strace -- busybox mount -t iso9660 /sdcard/some_iso.iso /sdcard/a:

execve("/system/xbin/busybox", ["busybox", "mount", "-t", "iso9660", "/sdcard/Fedora/Fedora-Live-KDE-x"..., "/sdcard/a"], [/* 26 vars */]) = 0
brk(0)                                  = 0x9bae000
brk(0x9bae480)                          = 0x9bae480
set_thread_area({entry_number:-1 -> 12, base_addr:0x9bae010, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, 0xffa9657c) = -1 ENOSYS (Function not implemented)
getuid32()                              = 0
brk(0x9baf480)                          = 0x9baf480
brk(0x9bb0000)                          = 0x9bb0000
getuid32()                              = 0
geteuid32()                             = 0
stat64("/sdcard/Fedora/Fedora-Live-KDE-x86_64-23-10.iso", {st_mode=S_IFREG|0660, st_size=1291845632, ...}) = 0
open("/sdcard/Fedora/Fedora-Live-KDE-x86_64-23-10.iso", O_RDWR|O_LARGEFILE) = 4
stat64("/dev/loop0", {st_mode=S_IFBLK|0600, st_rdev=makedev(7, 0), ...}) = 0
open("/dev/loop0", O_RDWR|O_LARGEFILE)  = 5
ioctl(5, 0x4c05, 0xffa962b8)            = -1 ENXIO (No such device or address)
ioctl(5, 0x4c00, 0x4)                   = 0
ioctl(5, 0x4c04, 0xffa962b8)            = 0
close(5)                                = 0
close(4)                                = 0
mount("/dev/loop0", "/sdcard/a", "iso9660", MS_SILENT, NULL) = -1 ENODEV (No such device)
brk(0x9bb1000)                          = 0x9bb1000
vfork()                                 = 2704
waitpid(2704, NULL, 0)                  = 2704
--- {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=2704, si_status=111, si_utime=0, si_stime=0} (Child exited) ---
open("/dev/loop0", O_RDONLY|O_LARGEFILE) = 4
ioctl(4, 0x4c01, 0)                     = 0
close(4)                                = 0
write(2, "mount: mounting /dev/loop0 on /s"..., 63mount: mounting /dev/loop0 on /sdcard/a failed: No such device
) = 63
exit_group(-1)                          = ?

Also using losetup /dev/loop0 /sdcard/some_iso.iso doesn't give out errors, strace:

execve("/system/xbin/losetup", ["losetup", "/dev/loop0", "/sdcard/Fedora/Fedora-Live-KDE-x"...], [/* 26 vars */]) = 0
brk(0)                                  = 0x941d000
brk(0x941d480)                          = 0x941d480
set_thread_area({entry_number:-1 -> 12, base_addr:0x941d010, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, 0xffe5547c) = -1 ENOSYS (Function not implemented)
getuid32()                              = 0
open("/sdcard/Fedora/Fedora-Live-KDE-x86_64-23-10.iso", O_RDWR|O_LARGEFILE) = 4
stat64("/dev/loop0", {st_mode=S_IFBLK|0600, st_rdev=makedev(7, 0), ...}) = 0
open("/dev/loop0", O_RDWR|O_LARGEFILE)  = 5
ioctl(5, 0x4c05, 0xffe55318)            = -1 ENXIO (No such device or address)
ioctl(5, 0x4c00, 0x4)                   = 0
ioctl(5, 0x4c04, 0xffe55318)            = 0
close(5)                                = 0
close(4)                                = 0
exit_group(0)                           = ?

With android's mount linked to /system/bin/toolbox:

execve("/system/bin/mount", ["mount", "-t", "iso9660", "-o", "loop", "/sdcard/Download/Fedora-Live-Wor"..., "/sdcard/a"], [/* 26 vars */]) = 0
mprotect(0xf7798000, 188416, PROT_READ|PROT_WRITE|PROT_EXEC) = 0
mprotect(0xf7798000, 188416, PROT_READ|PROT_EXEC) = 0
mprotect(0xf77c6000, 4096, PROT_READ)   = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
gettid()                                = 8755
set_thread_area({entry_number:-1 -> 12, base_addr:0xf77c8280, limit:4096, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0xf7795000
madvise(0xf7795000, 8192, 0xc /* MADV_??? */) = 0
sigaltstack({ss_sp=0xf7795000, ss_flags=0, ss_size=8192}, NULL) = 0
sigaction(SIGABRT, {0xf779b420, [], SA_RESTART|SA_SIGINFO|SA_ONSTACK}, NULL, 0xf7739348) = 0
sigaction(SIGBUS, {0xf779b420, [], SA_RESTART|SA_SIGINFO|SA_ONSTACK}, NULL, 0xf7739348) = 0
sigaction(SIGFPE, {0xf779b420, [], SA_RESTART|SA_SIGINFO|SA_ONSTACK}, NULL, 0xf7739348) = 0
sigaction(SIGILL, {0xf779b420, [], SA_RESTART|SA_SIGINFO|SA_ONSTACK}, NULL, 0xf7739348) = 0
sigaction(SIGPIPE, {0xf779b420, [], SA_RESTART|SA_SIGINFO|SA_ONSTACK}, NULL, 0xf7739348) = 0
sigaction(SIGSEGV, {0xf779b420, [], SA_RESTART|SA_SIGINFO|SA_ONSTACK}, NULL, 0xf7739348) = 0
sigaction(SIGSTKFLT, {0xf779b420, [], SA_RESTART|SA_SIGINFO|SA_ONSTACK}, NULL, 0xf7739348) = 0
sigaction(SIGTRAP, {0xf779b420, [], SA_RESTART|SA_SIGINFO|SA_ONSTACK}, NULL, 0xf7739348) = 0
mmap2(NULL, 3980, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0xf7794000
madvise(0xf7794000, 3980, 0xc /* MADV_??? */) = 0
open("/vendor/lib/libcutils.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/system/lib/libcutils.so", O_RDONLY|O_LARGEFILE) = 4
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0\0\0\0004\0\0\0"..., 52) = 52
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 4, 0) = 0xf7793000
madvise(0xf7793000, 4096, 0xc /* MADV_??? */) = 0
mmap2(NULL, 98304, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xf777b000
madvise(0xf777b000, 98304, 0xc /* MADV_??? */) = 0
mmap2(0xf777b000, 86264, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 4, 0) = 0xf777b000
madvise(0xf777b000, 86264, 0xc /* MADV_??? */) = 0
mmap2(0xf7791000, 4192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0x15) = 0xf7791000
madvise(0xf7791000, 4192, 0xc /* MADV_??? */) = 0
close(4)                                = 0
munmap(0xf7793000, 4096)                = 0
open("/vendor/lib/liblog.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/system/lib/liblog.so", O_RDONLY|O_LARGEFILE) = 4
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0\0\0\0004\0\0\0"..., 52) = 52
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 4, 0) = 0xf7793000
madvise(0xf7793000, 4096, 0xc /* MADV_??? */) = 0
mmap2(NULL, 32768, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xf7773000
madvise(0xf7773000, 32768, 0xc /* MADV_??? */) = 0
mmap2(0xf7773000, 22216, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 4, 0) = 0xf7773000
madvise(0xf7773000, 22216, 0xc /* MADV_??? */) = 0
mmap2(0xf7779000, 4120, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0x5) = 0xf7779000
madvise(0xf7779000, 4120, 0xc /* MADV_??? */) = 0
close(4)                                = 0
munmap(0xf7793000, 4096)                = 0
open("/vendor/lib/libc.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/system/lib/libc.so", O_RDONLY|O_LARGEFILE) = 4
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0\0\0\0004\0\0\0"..., 52) = 52
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 4, 0) = 0xf7793000
madvise(0xf7793000, 4096, 0xc /* MADV_??? */) = 0
mmap2(NULL, 868352, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xf769f000
madvise(0xf769f000, 868352, 0xc /* MADV_??? */) = 0
mmap2(0xf769f000, 788240, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 4, 0) = 0xf769f000
madvise(0xf769f000, 788240, 0xc /* MADV_??? */) = 0
mmap2(0xf7760000, 13056, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0xc0) = 0xf7760000
madvise(0xf7760000, 13056, 0xc /* MADV_??? */) = 0
mmap2(0xf7764000, 61440, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xf7764000
madvise(0xf7764000, 61440, 0xc /* MADV_??? */) = 0
close(4)                                = 0
munmap(0xf7793000, 4096)                = 0
mprotect(0xf769f000, 790528, PROT_READ|PROT_WRITE|PROT_EXEC) = 0
mprotect(0xf769f000, 790528, PROT_READ|PROT_EXEC) = 0
mprotect(0xf7760000, 4096, PROT_READ)   = 0
open("/vendor/lib/libstdc++.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/system/lib/libstdc++.so", O_RDONLY|O_LARGEFILE) = 4
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0\0\0\0004\0\0\0"..., 52) = 52
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 4, 0) = 0xf7793000
madvise(0xf7793000, 4096, 0xc /* MADV_??? */) = 0
mmap2(NULL, 16384, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xf769b000
madvise(0xf769b000, 16384, 0xc /* MADV_??? */) = 0
mmap2(0xf769b000, 4332, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 4, 0) = 0xf769b000
madvise(0xf769b000, 4332, 0xc /* MADV_??? */) = 0
mmap2(0xf769d000, 4100, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0x1) = 0xf769d000
madvise(0xf769d000, 4100, 0xc /* MADV_??? */) = 0
close(4)                                = 0
munmap(0xf7793000, 4096)                = 0
mprotect(0xf769d000, 4096, PROT_READ)   = 0
open("/vendor/lib/libm.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/system/lib/libm.so", O_RDONLY|O_LARGEFILE) = 4
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0\0\0\0004\0\0\0"..., 52) = 52
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 4, 0) = 0xf7793000
madvise(0xf7793000, 4096, 0xc /* MADV_??? */) = 0
mmap2(NULL, 204800, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xf7669000
madvise(0xf7669000, 204800, 0xc /* MADV_??? */) = 0
mmap2(0xf7669000, 195144, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 4, 0) = 0xf7669000
madvise(0xf7669000, 195144, 0xc /* MADV_??? */) = 0
mmap2(0xf7699000, 4156, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0x2f) = 0xf7699000
madvise(0xf7699000, 4156, 0xc /* MADV_??? */) = 0
close(4)                                = 0
munmap(0xf7793000, 4096)                = 0
mprotect(0xf7699000, 4096, PROT_READ)   = 0
mprotect(0xf7779000, 4096, PROT_READ)   = 0
mprotect(0xf777b000, 90112, PROT_READ|PROT_WRITE|PROT_EXEC) = 0
mprotect(0xf777b000, 90112, PROT_READ|PROT_EXEC) = 0
mprotect(0xf7791000, 4096, PROT_READ)   = 0
open("/vendor/lib/libusbhost.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/system/lib/libusbhost.so", O_RDONLY|O_LARGEFILE) = 4
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0\0\0\0004\0\0\0"..., 52) = 52
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 4, 0) = 0xf7793000
madvise(0xf7793000, 4096, 0xc /* MADV_??? */) = 0
mmap2(NULL, 24576, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xf7663000
madvise(0xf7663000, 24576, 0xc /* MADV_??? */) = 0
mmap2(0xf7663000, 12664, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 4, 0) = 0xf7663000
madvise(0xf7663000, 12664, 0xc /* MADV_??? */) = 0
mmap2(0xf7667000, 4100, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0x3) = 0xf7667000
madvise(0xf7667000, 4100, 0xc /* MADV_??? */) = 0
close(4)                                = 0
munmap(0xf7793000, 4096)                = 0
mprotect(0xf7667000, 4096, PROT_READ)   = 0
open("/vendor/lib/libselinux.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/system/lib/libselinux.so", O_RDONLY|O_LARGEFILE) = 4
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0\0\0\0004\0\0\0"..., 52) = 52
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 4, 0) = 0xf7793000
madvise(0xf7793000, 4096, 0xc /* MADV_??? */) = 0
mmap2(NULL, 98304, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xf764b000
madvise(0xf764b000, 98304, 0xc /* MADV_??? */) = 0
mmap2(0xf764b000, 86844, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 4, 0) = 0xf764b000
madvise(0xf764b000, 86844, 0xc /* MADV_??? */) = 0
mmap2(0xf7661000, 4144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0x15) = 0xf7661000
madvise(0xf7661000, 4144, 0xc /* MADV_??? */) = 0
close(4)                                = 0
munmap(0xf7793000, 4096)                = 0
mprotect(0xf7661000, 4096, PROT_READ)   = 0
mprotect(0xf77fe000, 4096, PROT_READ)   = 0
open("/dev/__properties__", O_RDONLY|O_LARGEFILE) = 4
fcntl64(4, F_SETFD, FD_CLOEXEC)         = 0
fstat64(4, {st_mode=S_IFREG|0444, st_size=131072, ...}) = 0
mmap2(NULL, 131072, PROT_READ, MAP_SHARED, 4, 0) = 0xf762b000
close(4)                                = 0
futex(0xf7764dec, FUTEX_WAKE_PRIVATE, 2147483647) = 0
mprotect(0xf7794000, 3980, PROT_READ|PROT_WRITE) = 0
mprotect(0xf7794000, 3980, PROT_READ|PROT_WRITE) = 0
mprotect(0xf7794000, 3980, PROT_READ|PROT_WRITE) = 0
mprotect(0xf7794000, 3980, PROT_READ|PROT_WRITE) = 0
mprotect(0xf7794000, 3980, PROT_READ|PROT_WRITE) = 0
clock_gettime(CLOCK_MONOTONIC, {4072, 477037831}) = 0
mprotect(0xf7794000, 3980, PROT_READ|PROT_WRITE) = 0
statfs64("/sys/fs/selinux", 84, {f_type=0xf97cff8c, f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0}, f_namelen=255}) = 0
gettimeofday({1446683072, 836523}, NULL) = 0
brk(0)                                  = 0xf7d84000
brk(0xf7d84000)                         = 0xf7d84000
brk(0xf7d85000)                         = 0xf7d85000
mprotect(0xf7794000, 3980, PROT_READ|PROT_WRITE) = 0
mprotect(0xf7794000, 3980, PROT_READ)   = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xf7793000
madvise(0xf7793000, 4096, 0xc /* MADV_??? */) = 0
mprotect(0xf7793000, 4096, PROT_READ)   = 0
open("/sdcard/Download/Fedora-Live-Workstation-x86_64-23-10.iso", O_RDWR|O_LARGEFILE) = 4
open("/dev/block/loop0", O_RDWR|O_LARGEFILE) = 5
ioctl(5, 0x4c00, 0x4)                   = 0
close(4)                                = 0
close(5)                                = 0
open("/dev/block/loop0", O_RDONLY|O_LARGEFILE) = 4
ioctl(4, BLKROSET, 0)                   = 0
close(4)                                = 0
mount("/dev/block/loop0", "/sdcard/a", "iso9660", MS_SILENT, NULL) = -1 ENODEV (No such device)
write(2, "mount", 5mount)                    = 5
write(2, ": ", 2: )                       = 2
write(2, "No such device", 14No such device)          = 14
write(2, "\n", 1
)                       = 1
mprotect(0xf7793000, 4096, PROT_READ|PROT_WRITE) = 0
mprotect(0xf7793000, 4096, PROT_READ)   = 0
close(0)                                = 0
close(1)                                = 0
close(2)                                = 0
futex(0xf7764de8, FUTEX_WAKE_PRIVATE, 2147483647) = 0
munmap(0xf7793000, 4096)                = 0
exit_group(255)                         = ?

Not sure if my kernel supports loop device (don't know how to tell).

  • I've never used busybox mount, but does mount -t iso9660 -o loop /sdcard/some_iso.iso /sdcard/a work? – terdon Nov 5 '15 at 0:12
  • @terdon the default mount shipped with android is linked to /system/bin/toolbox and have poor loop support. – Johnson Steward Nov 5 '15 at 0:22
  • @terdon posted original mount's strace. – Johnson Steward Nov 5 '15 at 0:51
  • 1
    My main point was trying with the -o loop option. I doubt it will make much of a difference but it's worth a try. That said, this question really seems like a better fit for Android Enthusiasts. It sounds like an Android-specific issue and you're more likely to find answers there. I suggest you flag for mod attention and ask them to migrate it for you. – terdon Nov 5 '15 at 11:22
  • busybox mount says that -o loop is ignored as it automatically detects for loop device. – Johnson Steward Nov 5 '15 at 12:00
0

Stumbled across a similar problem few days ago. A difference in your three attempts is /dev/loop0 and /dev/block/loop0 Besides manually testing/looking for either exports, mounts or kernel configs there is an app called "loop device tester" - but a least for one of my 3 devices it is unreliable ;)

Your Answer

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