there are two useful tools :
read_extcsd
do_ffu (it is only for kernel version >= 4.4 ,
if version < 4.4, refer to : https://patchwork.kernel.org/patch/7681601/ , for details you can contact mmc vendor)
https://kernel.googlesource.com/pub/scm/linux/kernel/git/cjb/mmc-utils/
http://git.kernel.org/cgit/linux/kernel/git/cjb/mmc-utils.git
android code : external/mmc-utils/