How can I auto-end the media process on Android?
Seems like it would be far more useful to find out why the media scanner is using so much of your phone's battery.

I had a similar situation once, and it turned out to be caused by some filesystem corruption on the SD card. I took out the SD card and used fsck on my PC to check the filesystem for errors, and repair it. I then put the SD card back in my phone: media scanner ran once and finished normally. It no longer ran all the time, running down my battery.

You might like to try something similar before you attempt something that might stop apps on your phone (such as Gallery) working properly.