Step-By-Step Instructions:
Step 1 - Download Android 4.1.2 XXLPY Jelly Bean for Galaxy S Advance to your computer and extract the RAR file anywhere.
Step 2 - Turn OFF your phone and connect the Galaxy S Advance to your computer using the USB cable.
Step 3 - Now to get in the Recovery Mode. Switch ON the phone while pressing and holding Volume Up + Home + Power buttons together.
Step 4 - In recovery mode, leave the phone as it is. Now on your computer, run deodex_recovery.bat from the files you extracted in Step 1.