Earthquake (TM26) can be obtained by the following means:
-Seafloor cavern ( http://bulbapedia.bulbagarden.net/wiki/Seafloor_Cavern )
-Pickup (have a pokemon with the ability pickup, and they can find the Tm, the main problem is that getting Earthquake is rare and unlikely.
Earthquake is a good TM, which is why it's hard to get in game, most pokemon games have only one per game. As far as I know, you can't get it from the battle frontier.