If for some reason you need to return your AT&T Galaxy S2 back to the store for warranty or you just itch to get back to a completely stock phone, you can unroot/unbrick your phone using methods outlined here, which will completely unroot your phone with stock ROM.
Step 1. Plug in your microUSB cable to your AT&T Galaxy S2 to your computer. Then hold down Volume Up, Volume Down, and Power button together.
Step 2. When you see the warning sign, hit the Volume Up button to enter Download Mode.
Step 3. Download unrooting files here and unzip, then run odin3 v1.85.exe.
Step 4. Make sure you can see a yellow highlighted COM box. (the number doesn’t matter)
If you don’t see it, you need to install the correct drivers, simply download and install Samsung Kies software. (Download Samsung Kies)
Step 5. Click on “PDA” then choose ATTGalaxyS2Unroot_SGH-i777.tar file in the unzipped folder then hit “Start”. Your unrooting process should begin.