you get it from the first gym in rustboro city. The gym leader is roxxane who uses rock type pokemon
at the gym
The seventh gym badge in Emerald is located in Mossdeep City.
I get my 8th badge in Sootopolis gym.
mossdeep
In the heat gym
it's in the woods between the first gym badge and 5th gym badge
the ground gym
The only way to get a gym badge is to challenge the corresponding gym leader and win.
Beat the 8th Gym leader.
Pokemon league
Beat the gym leader
Destroys picachew