[Nexus S Q&A, Help & Troubleshooting] interfect:
I am working from the official Google "factory" images here.

I have a Sprint Nexus S 4G, running stock rooted ICS, with unloacked bootloader and custom recovery. I attempted to update it to Jelly Bean using the Google factory images linked above. Unfortunately, when I thought I had downloaded "sojus-jro03r", for the Nexus S 4g, I had actually downloaded "sojua-jro03e", for the Nexus S 850 mhz version. Installing the update (with flash-all.sh) got as far as flashing the bootloader. After the first fastboot reboot-bootloader, the phone failed to connect to the computer, so nothing else got changed.

Surprisingly, the incorrect bootloader can booth the phone just fine. I can get into Android proper and onto the Internet over wifi. I can load my custom recovery and flash zips. What I can't do is connect to the phone over USB, or use the cell radio. I have the no-bars-with-an-X "no signal" icon, and when I connect the phone to my computer, whether Android is booted or the bootloader is open, it doesn't show up in the output of lsusb and fastboot can't see it.

Bootloader reports "BOOTLOADER VERSION - I9020XXLC2" and "BASEBAND VERSION - I9020XXXXX". Android reports its own version as 4.0.4 and the baseband version as "Unknown".

I had originally thought that the problem was the radio/baseband, so I tried flashing both the ICS and Jellybean baseband zips available here. Neither changed anything. I suspect that they may not be installing because they check the bootloader version and find that it does not match what is expected, but I can't extract the files to check whether that might be the case (7zip complains that they use an unknown compression format).

Since fastboot can't see the phone when it's booted into the bootloader, I cannot flash the correct bootloader image via fastboot. Is it possible to replace the bootloader from within the recovery, by flashing a zip? If so, where can I find such a bootloader zip for the Sprint Nexus S 4G, and/or how can I construct one from a bootloader .img file (NOT a boot.img, those are kernels).

EDIT: What I want to do looks to be possible. This code I found for generating update zip Edify scripts for "samsung-crespo4g" (which I think is the Nexus S 4g) seems to imply that an update script can write to the bootloader by using the wirte_raw_image Edify function on the "/bootloader" path. Does anyone with more Edify experience want to tell me if I'm on the right track, or what the syntax I want is?

EDIT 2: I'm posting a first shot at an update zip I think might correct the problem. I have no update-binary, and my update-script is as follows:

ui_print("Interfect's Amazing Bootloader Restorer v0.1");

# This was in the radio-flashing zip update script from http://xdaforums.com/showthread.php?t=1077168
mount("ext4", "EMMC", "/dev/block/platform/s3c-sdhci.0/by-name/system", "/system");

# Make a progress bar
show_progress(0.1, 0);

# Extract new bootloader from zip
assert(package_extract_file("bootloader-crespo4g-d720sprke1.img", "/tmp/bootloader-crespo4g-d720sprke1.img"));

# Write bootloader to "bootloader" partition
assert(write_raw_image("/tmp/bootloader-crespo4g-d720sprke1.img", "bootloader"));

# Show the progress bar to say we're done
show_progress(1.0, 10);

# This was in the radio-flashing zip update script from http://xdaforums.com/showthread.php?t=1077168
unmount("/system");

# Print a done message
ui_print("Bootloader installed!");

I'm using "bootloader" instead of "/bootloader" as the target of write_raw_image, because I saw another update script that did that. Are the two interchangeable? Could someone double-check my syntax and semantics on the script, and assert that this really is the bootloader I want to be installing? If I do this wrong, I will probably brick my phone more than it has already been bricked.

EDIT 3: I was mixing tutorials. Edify requires an update-binary (which I copied from the radio flashing zips linked above) and an updater-script, which I have made the name of the above script file. I am replacing the old attachment with a version that fixes these issues.