[Miscellaneous Android Development] sandnap:
Bootloader

Reverting to the Unlocked (ICS) Bootloader from the JB Bootloader

WARNING: Please review the Warning/Disclaimer in the original post before following this procedure!

Click "CLICK TO SHOW CONTENT" to proceed.

Context: The Jelly Bean update for the Pantech Discover flashes a locked bootloader over the unlocked Ice Cream Sandwich bootloader. The result is that you can no longer use fastboot to flash images or boot to external bootloaders. If you are on ICS this tutorial does not apply.

You can test to see if you have the locked bootloader by booting into fastboot (power off device, power on devices holding both volume keys, select fastboot), connect the device to your PC, and run the following command from a command terminal.

fastboot boot recovery-magnus.img

NOTE: If you don't already have the magnus recovery image download it from here.

If your output looks like the message below you have the locked bootloader and this guide applies to you.

downloading 'boot.img'...
OKAY [ 0.538s]
booting...
FAILED (remote: Not Support !!)
finished. total time: 0.543s

Procedure: If you have the locked bootloader, you would prefer not be locked, and you are willing to take the risk you can follow the procedure below.

Prerequisites

Phone must be rooted

ADB access

Download the ICS bootloader image (aboot.img) from here.

Connect your phone to your PC and from a command window in the download directory type:

adb push aboot.img /sdcard/
adb shell

If you are connected to your device at this point type:

su
cd /sdcard
md5sum aboot.img

The output should be:

7f55c5ab321cf20e595b841371f45cda aboot.img

The MD5 checksum should be the hex number above (beginning in 7f and ending in cda). If it does match download it again and make sure the checksum matches before proceeding. If no matter what you do you can't get a match then don't proceed.

If you are here then you have the ICS bootloader and it's ready to be flashed, before we do this you should check the checksum for the bootloader partition with the command:

md5sum /dev/block/mmcblk0p5

output:

8b6fa6881c7f155858243e94490d0a29 /dev/block/mmcblk0p5

If you are on JB the checksum should match mine.

Now you are ready to flash the ICS image. If you are feeling confident and risk adverse run the command below:

dd if=aboot.img of=/dev/block/mmcblk0p5

You should get the output:

5120+0 records in
5120+0 records out
2621440 bytes transferred in 0.458 secs (5723668 bytes/sec)

Don't be concerned if the transfer time is not precise.

Now confirm that our checksum is updated to the new image:

md5sum /dev/block/mmcblk0p5

7f55c5ab321cf20e595b841371f45cda /dev/block/mmcblk0p5

If not follow the bail out procedure outlined after this procedure, otherwise get back to your PC command window with:

exit
exit

Reboot into the ICS bootloader with:

adb reboot bootloader

Once you are in fastboot verify it worked with:

fastboot boot recovery-magnus.img

You should be rewarded with the following output:

downloading 'boot.img'...
OKAY [ 0.544s]
booting...
OKAY [ 0.020s]
finished. total time: 0.565s

You are done!!!!!

Invalid checksum: If the checksum you show does not match the checksum above you can reflash the JB bootloader and if all goes well you will be back where you started.

Download the JB bootloader (jb-aboot.img) from here.

Follow the procedure above to push the bootloader to the device and validate that the checksum matches the original JB checksum you copied on step above.

Flash the JB bootloader as per the guide above replacing aboot.img with jb-aboot.img.

If you have problems I strongly suggest you refrain from rebooting your phone and ask for help.