In some specific application on IMX6Q SABRE SD, I need to unmount /data and /system partition of android at shutdown time. I have called function umount("/data") and umount2("/data",MNT_FORCE) at very low level of function android_reboot ( ) function which is called from ShutdownThread.java file.
function umount fails at this point.
can anyone suggest the place where i can call umount function to unmount the file system successfully ?
Also, is remount function first umount the media and then mount?