You get it in Slateport City, by Capt. Stern. Hope I helped :)
He is in Slateport City.
Go to Mt. Pyre if you haven't already done so. If you have, go to Slateport City and talk to Capt. Stern, and then return to Lilycove City to continue the storyline.
he is in the laboratory in slateport that has many boats and near the bazaar
go to slateport and interrupt capt stern interview and then go to team aquas hideout and beat their leader after he wakes up kyogre and then surf to mossdeep city and defeat the twin gym leaders
You go to Slateport and go to the museem and you can find him on the second floor
Near the SS Tidal in Slateport City.
Capt. Stern is in the Museum where all the the Aqua/Magma members are conjugated around.
TEAM MAGMA GOES TO THEIR HIDEOUT IN THE JAGGED PASS.TEAM AQUA GOES TO SLATEPORT CITY TO STEAL CAPT STERN'S SUBMARINE.
he's not in there! he's in slasport city his worker is in the abandoned ship and he asks you to find the generator or something i forgot then you have to find it and then you go talk to him and he will tell you to go to captain stern and then go to slaport city and then he will trade you for something. hope i helped :)
In Slateport city harbour you will see capt. stern being interviewed with a large crowd talk to capt. stern and you will go into the harbour thing and then go to their hideout in lilycove city.
Give it to capt. Stern in Slateport city. the boat house northeast of the Pokemon center.