After upgrading my Galaxy Nexus (GSM) to Jelly Bean last night (I know, I know, I'm a few days late), I unlocked its bootloader (the usual fastboot oem unlock) and commenced rooting, which I thought would only take a minute or two. However, after almost 2 hours of pushing, flashing, rebooting, and trying no less than 5 different root methods, I still didn't have root. Something must have changed under the hood, and no root method I was trying was working (even PaulOBrien's SuperBoot).

Finally, I managed to find a solution that worked, and the familiar root permission prompt finally popped up. If you're having similar trouble, here's what you do (tested on a GSM Galaxy Nexus i9250, but should work on other variants as well):

  1. Download your favorite recovery, say ClockworkMod Touch.
  2. Download JB-SuperSU.zip from one of the mirrors:
  3. While booted into Android, push JB-SuperSU.zip to your Galaxy Nexus' /sdcard/ with your favorite file browser, download it straight from the device, or just do
    adb push JB-SuperSU.zip /sdcard/
  4. Reboot into the bootloader by issuing this command via adb:
    adb reboot bootloader
    or
    power down, hold both volume buttons and then hold Power until the bootloader comes up.
  5. Flash the custom recovery by issuing this command from your computer:
    fastboot flash recovery recovery-clockwork-touch-5.8.0.2-maguro.img (or whatever the recovery name is that you downloaded in step 1)
  6. sending 'recovery' (5684 KB)...
    OKAY [  0.602s]writing 'recovery'...
    OKAY [  1.123s]finished. total time: 1.728s

    Note: For some reason I can't get the recovery to stick anymore - upon reboot, the Nexus reverts back to its stock recovery. If someone knows how to fix this, please leave a comment in this post.
    Update: Renaming /system/recovery-from-boot.p after obtaining root did the trick - you have to remount /system as rw first, of course (thanks, Derek).

  7. Now that you have the custom recovery installed, scroll down to Recovery mode in the bootloader menu using the volume down button and press the Power button to enter it.
    IMAG0004
  8. Select Install zip from sdcard, choose zip from sdcard, select JB-SuperSU.zip that you pushed in step 3.
  9. Reboot - you should now be rooted and have SuperSU installed.
  10. Run an app that requires root or simply Root Checker and observe a root permission popup.
  11. Do a victory dance.

Screenshot_2012-07-01-11-33-59 Screenshot_2012-07-01-11-15-51 Screenshot_2012-07-01-11-33-37 

Note: If you are on Windows and get "waiting for device" from any commands above, make sure you have the Samsung USB drivers for the Galaxy Nexus (Google around) and this in the Device Manager:

image

Credit for the zip to mutelight of Rootz