The Jelly Bean 4.1.1 images for selected Nexus models have been released by Google. This will allow you to roll back to a safe, factory state no matter how bad the condition of your Nexus is.
The particular models, in this case, are Nexus S (i9020t, i9023, i9020a), Galaxy Nexus (yakju, takju) and Nexus 7 (all).
According to an Android Central report, this is good news for those of us who like to hack and modify our Nexus devices. Now we have an easy and safe way to return to a booting device (which is the first rule of Android hacking).
“In order to use these files, you need to have the fastboot tool in your PATH. That tool is compiled as part of every configuration of the Android Open-Source Project and is the tool used to flash custom builds on your device. On GNU/Linux systems, this also implies that you have configured USB access,” the official Google Developers page states.
Moving further, note that you will need to un-compress each download before use. This will create a new directory for that exact download. That directory also contains a ./flash-all.sh script, which handles the various operations, installs the necessary bootloader, baseband firmware(s), and operating system. Also remember that this operation deletes all user data by default.
Stay tuned for more on this.