Update STM32 firmware via Android
In my personal experience, there are 3 methods to program the flash of STM32 series.


Using JTAG. This require you have a JTAG emulator and your Android device has a USB host interface.
Using STM32's built-in "bootloader", STM32 have a built-in bootloader, which supports various interfaces, such as USART, SPI, CAN, USB, I2C. These don't need emulator, you only need to implement these hardware interfaces. On your Android side, i think the USB (host) is a "must-have" one? Right? For these methods, you may refer to their relevant protocol manual at "http://www.st.com/stonline/stappl/resourceSelector/app?page=fullResourceSelector&amp;doctype=application_note&amp;SubClassID=1169", you can search docs with these word "XXX protocol used in the STM32 bootloader". 
You need first burn a small "bootloader" (your own, not the built-in one), then this "bootloader" receive the new main firmware from a master, then you have even many interface choices, such as Ethernet,.... This is just like Android system's update method. But this maybe a little complicated. 


Whichever method you select, you do need relevant hardware interface on your Android side, and read STM32's datasheet, reference manual, and learn the related protocol.