Difference between su vs root SSH login for mounting? I have a bash script luks that I use in Android for mounting/umounting encrypted devices, that can be called in a terminal emulator with

 su -c "luks ..."


The script works ok for the first part, except at the mounting time, that in the script I do with:

 busybox mount /dev/mapper/${vol_arg} ${mount_path}


Despite the fact that I get exitcode 0 from this command, the device is not mounted. The command line 

 su -c "mount /dev/mapper/${vol_arg} ${mount_path}"


does not work either in the terminal emulator yet it shows no error (df does not shows the device). When I try to execute it agan, I get mounting failed: device or resource busy. If I then try 

 su -c "umount ${mount_path}"


I also get cant't umount...: device or resource busy. What's happening?

However, the REALLY strange point here is that, if I SSH to the tablet as root with the same terminal emulator, the command

 mount /dev/mapper/${vol_arg} ${mount_path}


mounts the device normally (??!!). In addition, if I execute the command 

 'luks ...'


as SSHd root, it also works perfectly, even mounting the device. 

Why does mounting is working if run as SSH root, and not through su -c?

Even more strange is the fact that the su -c thing works fine in Samsung Android 4.1.2, but not in Cyanogenmod 11 (4.4.2)... 

Maybe the cyanogenmod people introduced some ugly bug? 

Clues?

Thanks!!

L.
I upgraded to CYM 11 M10, and now su works fine. No doubt it was a bug. So now I can mount/umount encrypted stuff as I was always able to do.

It seems the problem is solved in the M10 build.