Install the stock firmware using Odin3 v1.85 (preferred). Install the latest stock firmware, I777UCMD8, which you can get from the
download repository. It's the next to bottom item. If you need to download Odin, there is a link near the top of the page.
How to use stand-alone Odin3 to flash firmware:
Follow and recheck each of the following steps. Do them in order listed, as some steps are dependent on previous steps. Instructions are for Odin3 v1.85. It should work with any version of Odin, but some details, like color of items, may be different.
1.) Open Odin on the Windows Desktop.
2.) Have the USB cable plugged into USB port on the computer, but *Not* plugged in to the phone.
3.) Shut the phone off.
4.) While holding down the vol+ & vol- keys, plug micro-usb plug into phone.
5.) In Odin, you should get the yellow box under where it says ID:COM with the text 0:[COMx], and in the Message area, <ID:0/00x> Added!! where x is some number, usually 1-8.
6.) In Odin, make sure Auto Reboot and F. Reset Time are checked and all other items are not checked.
7.) Click on the PDA button. Browse to the tar file you want to install and select it so its path appears in the text edit box next to the button.
8.) Make sure the check box next to the PDA button is checked.
9.) Click the Start button.
10.) You should see the green progress bar advancing.
11.) When complete, you will get a PASS code (or an error code if unsuccessful).