Android 2.x does not play mp4 with H.264 baseband from scratch.
However, some apps are able to manage this when playing the video files in-app.
How to append the encoder/decoder to the videoplayer within the app to make sure, that this format is supported without external dependencies.
Thanks
These apps integrate some media library (as example FFmpeg)
However, explaining how to compile, integrate and use such library is well beyond stack overflow scope.
If you are interested how to do this. Read following questions/articles:
FFmpeg on Android
ffmpeg for a android (using tutorial: "ffmpeg and Android.mk")
http://sourceforge.net/projects/ffmpeg4android/
http://www.roman10.net/how-to-build-ffmpeg-for-android/