How do I erase all the data on Galaxy S4 if the screen is broken? I have Samsung Galaxy S4, but the screen broke. I wanted to erase all the data on it before I send it back to the factory for replacement. Is there any way to do this?
Assuming you ever registered a gmail address on your google play account(which you have to, to download apps), your phone will be registered in Google's Device Manager on play.google.com.  If your phone was connected to WiFi or Data when the screen broke the below method can work(I've tested it myself multiple times).  


Head to play.google.com(From your PC)
Log in to your google account.
Click the 'gear' symbol in the top right hand corner of the screen.
Go To 'Android Device Manager'
Select your GS4 from the menu of your registered devices.
Select 'Erase' from the list.


That should erase the phone.