My friend’s gmail id got hacked.
Is there any way to get the hackers identity or atleast the hackers IP Address?
You may also want to tell your friend to check his Sent Mail in case the hacker spammed or sent false emails to your friends' contacts. Your friend may want to send an email to those contacts telling them to ignore any emails sent at the time of the attack.
Also... if your friend can still access his account... check if the hacker has created a filter or check the forwarding and pop/imap tab under settings and see if he's enabled forwarding to another mail address
Well, it depends. If it was really "hacked" then the hacker would probably use several tools to mask his IP. If it was just a friend goofing around, then you could get an IP to work with.
Try this: Check if Your Gmail Account is Hacked with Activity Monitor
Then use this to see where the IP originated.