There are several ways to do this. hacking per se is not illegal, it is how you tend to use the information you've gathered. There are: white hats, grey hats and black hats.
Without giving you too much I would first redirect you to the right forum, which is not really here.
Hacking Tutorials by Xeus is an app with legal rights in Google play. What you do with this information is solely up to you but if you do decide to apply any of the techniques provided, please please - don't go for a traffic light!
Cheers! ; )