It's outlined here in detail: http://www.droidforums.net/forum/droid-4-tech-support/206972-how-restore-your-motorola-droid-4-xt894-stock-windows-only.html