[Verizon HTC Droid Incredible 4G LTE] mdmower:
Obligatory reading before you begin: So You Want to Root and Mod Your HTC Phone

Introduction

Credit goes to Bin4ry for developing the loop-restore trick that applies to many phones, and of course CaptainRewind and jose51197 for being the first to demonstrate its applicability to the HTC Droid Incredible 4G LTE. Since that time, I have put quite a bit of work into writing these automated scripts. I am splitting them out of the original thread so that I can give them a proper home and continue to maintain them. With the start of this thread, I'm also introducing a Linux variant of the script.

​

Usage - typical procedures

All of the below procedures assume you're still using a phone with a locked bootloader and S-ON.

Prerequisites:

Windows users: uninstall any HTC software you currently have installed (e.g. HTC Sync) and install the HTC drivers from this post. Only unlimited.io's S-OFF requires a certain driver version. Other procedures can use the latest version.

All users: Only use a USB 2.0 port on your computer. Do not use a USB 3.0 port. When you connect your phone to the USB cable, ensure it is in Charge Only mode.

HTCDev Unlock: unlock the bootloader, install a custom recovery, and install superuser (for root access):

Flash RUU 2.17.605.2 or run factory reset if you are already on this software version.

... then set these options:

Settings > Developer options > USB debugging = True

Settings > Power > Fast boot = False

Use task 1 of the script to unlock the bootloader

... then set these options (yes, again):

Settings > Developer options > USB debugging = True

Settings > Power > Fast boot = False

Use task 5 of the script to install either TWRP or CWM recovery

Occasionally, this step needs to be run twice in order for the recovery to boot. It's a quirk of the phone.

Flash a super-user app with the su binary through recovery: Superuser, SuperSU, or ClockworkMod Superuser

If you opt for Superuser, you want Superuser-3.1.3-arm-signed.zip

Use task 3 of the script to revert the CID to stock (this will not affect unlock)

Unlimited.io S-OFF (DirtyRacun):

Follow the instructions for DirtyRacun: Fireball at unlimited.io very carefully

When you get to Temproot your phone via any method available, use task 6 of the script to put your phone in temp-root mode.

Continue the instructions for DirtyRacun

Facepalm S-OFF:

Flash RUU 2.17.605.2 or run factory reset if you are already on this software version.

... then set these options:

Settings > Developer options > USB debugging = True

Settings > Power > Fast boot = False

Use task 1 of the script to unlock the bootloader

... then set these options (yes, again):

Settings > Developer options > USB debugging = True

Settings > Power > Fast boot = False

Use task 5 of the script to install either TWRP or CWM recovery

Occasionally, this step needs to be run twice in order for the recovery to boot. It's a quirk of the phone.

Flash a super-user app with the su binary through recovery: Superuser, SuperSU, or ClockworkMod Superuser

If you opt for Superuser, you want Superuser-3.1.3-arm-signed.zip

Follow the directions for Facepalm S-OFF

Use task 3 of the script to revert the CID to stock (this will not affect unlock or S-OFF)

Flash the DirtyRacun HBOOT from unlimited.io - follow the instructions on the right sidebar

Notice: Windows users can run these commands by removing sudo ./ from each line.

Cautionary Notes about OTAs

When (if) fireball gets an official jellybean release from HTC/Verizon:

It is crucial that users have their CID as VZW__001 (and not SuperCID). It seems OTAs (over-the-air updates) for other HTC devices have caused bricks for users who are S-ON and SuperCID. I strongly recommend users revert their CID after unlocking or doing facepalm S-OFF.

New touch firmware may cause compatibility issues when switching between ROMs. If possible, delay updating while devs work on testing ROMs with the new firmware.

With this said, I really have NO clue whether we will ever get an official jellybean release.

Linux script notes

The linux script will only execute properly in a bash terminal!

After extracting, make runme.sh executable:

chmod +x runme.sh

Then, run the script:

./runme.sh

Manual procedures for reference

Windows

Before you begin

Uninstall HTC Sync and any other applications/drivers that come up with a search for "htc" in the uninstall programs list in Windows. Download and install the latest HTC Drivers from this post.

Only use a USB 2.0 port on your computer. Do not use a USB 3.0 port. When you connect your phone to the USB cable, ensure it is in Charge Only mode.

Verify your phone is on the correct software version: Settings > About > Software information: Software number = 2.17.605.2 710RD

If you need to update your phone (from 4.0.3) the RUU is here.

Factory reset your phone: Settings > Storage > Factory data reset

Turn off Fast boot: Settings > Power > Fast boot = Off

Turn on USB debugging: Settings > Developer options > USB debugging = On

Part 1: Obtain temp-root

Open a command prompt in the directory where you extracted Inc4GUnlockV6-Windows.zip. Ensure USB debugging is enabled on your device and verify the connection with:

adb devices

You should see something like:

Start the restore process with

adb restore fakebackup.ab
adb shell "while ! ln -s /data/local.prop /data/data/com.android.settings/a/file99; do :; done" > NUL

The command prompt will appear to be hung. At this point you can accept the restore prompt on your phone. When the command prompt returns, type:

adb reboot

Wait at least 60 seconds (seriously, time it) and you phone should be in temp-root mode. There will be only a status bar on the phone, but no unlock-ring.

Part 2: Apply SuperCID

Apply the SuperCID modification:

adb shell "dd if=/dev/block/mmcblk0p4 of=/sdcard/cid"
adb pull /sdcard/cid
copy cid mmcblk0p4.original
hexalter cid 0x214=0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31
adb push cid /sdcard/
adb shell "dd if=/sdcard/cid of=/dev/block/mmcblk0p4"
adb shell "rm /data/local.prop /sdcard/cid"
del cid

If all went well, reboot your phone to the bootloader and check your cid:

adb reboot-bootloader
fastboot oem readcid

Verify that your cid is 11111111.

Part 3: Unlock the bootloader

You can now proceed to unlock your bootloader. Start by retrieving your unlock token:

fastboot oem get_identifier_token

Sign up for an account using a valid e-mail address at htcdev.com. After you have logged in, jump to page 3. Submit your device token. When you receive Unlock_code.bin in your e-mail (check your junk mail folder!), copy it to the directory where you extracted Inc4GUnlockV6-Windows.zip, then type:

fastboot flash unlocktoken Unlock_code.bin

Follow the on-screen instructions to unlock your bootloader.

Part 4: Flash a custom recovery

Download your preferred recovery, TWRP or CWM, and flash it through fastboot (phone is at the bootloader) using:

fastboot flash recovery recovery_file_name.img
fastboot reboot-bootloader

If this is the first time flashing a custom recovery, you may have to perform this step twice. It's a quirk of the phone.

Part 5: Root the phone

Flash a super-user app with the su binary through recovery: Superuser, SuperSU, or ClockworkMod Superuser

Part 6: Revert your CID to stock

You may want to revert your cid to stock after installing a new ROM. Keeping SuperCID can cause issues with making/receiving phone calls in stock-based ROMs. Make sure you have Superuser installed. Then, with the phone fully booted up, type:

adb shell "su -c 'dd if=/dev/block/mmcblk0p4 of=/sdcard/cid'"
adb pull /sdcard/cid
hexalter cid 0x214=0x56,0x5A,0x57,0x5F,0x5F,0x30,0x30,0x31
adb push cid /sdcard/
adb shell "su -c 'dd if=/sdcard/cid of=/dev/block/mmcblk0p4'"
adb shell "rm /sdcard/cid"
del cid

Linux

Before you begin

Only use a USB 2.0 port on your computer. Do not use a USB 3.0 port. When you connect your phone to the USB cable, ensure it is in Charge Only mode.

Verify your phone is on the correct software version: Settings > About > Software information: Software number = 2.17.605.2 710RD

If you need to update your phone (from 4.0.3) the RUU is here.

Factory reset your phone: Settings > Storage > Factory data reset

Turn off Fast boot: Settings > Power > Fast boot = Off

Turn on USB debugging: Settings > Developer options > USB debugging = On

Part 1: Obtain temp-root

Open a terminal in the directory where you extracted Inc4GUnlockV6-Linux.zip. Ensure USB debugging is enabled on your device and verify the connection with:

./adb devices

You should see something like:

Start the restore process with

./adb restore fakebackup.ab
./adb shell "while ! ln -s /data/local.prop /data/data/com.android.settings/a/file99; do :; done" > /dev/null

The terminal will appear to be hung. At this point you can accept the restore prompt on your phone. When the terminal prompt returns, type:

./adb reboot

Wait at least 60 seconds (seriously, time it) and you phone should be in temp-root mode. There will be only a status bar on the phone, but no unlock-ring.

Part 2: Apply SuperCID

Apply the SuperCID modification:

./adb shell "dd if=/dev/block/mmcblk0p4 of=/sdcard/cid"
./adb pull /sdcard/cid
cp cid mmcblk0p4.original
printf '\x31\x31\x31\x31\x31\x31\x31\x31' | dd of=cid bs=1 seek=532 conv=notrunc
./adb push cid /sdcard/
./adb shell "dd if=/sdcard/cid of=/dev/block/mmcblk0p4"
./adb shell "rm /data/local.prop /sdcard/cid"
rm cid

If all went well, reboot your phone to the bootloader and check your cid:

./adb reboot-bootloader
./fastboot oem readcid

Verify that your cid is 11111111.

Part 3: Unlock the bootloader

You can now proceed to unlock your bootloader. Start by retrieving your unlock token:

./fastboot oem get_identifier_token

Sign up for an account using a valid e-mail address at htcdev.com. After you have logged in, jump to page 3. Submit your device token. When you receive Unlock_code.bin in your e-mail (check your junk mail folder!), copy it to the directory where you extracted Inc4GUnlockV6-Linux.zip, then type:

./fastboot flash unlocktoken Unlock_code.bin

Follow the on-screen instructions to unlock your bootloader.

Part 4: Flash a custom recovery

Download your preferred recovery, TWRP or CWM, and flash it through fastboot (phone is at the bootloader) using:

./fastboot flash recovery recovery_file_name.img
./fastboot reboot-bootloader

If this is the first time flashing a custom recovery, you may have to perform this step twice. It's a quirk of the phone.

Part 5: Root the phone

Flash a super-user app with the su binary through recovery: Superuser, SuperSU, or ClockworkMod Superuser

Part 6: Revert your CID to stock

You may want to revert your cid to stock after installing a new ROM. Keeping SuperCID can cause issues with making/receiving phone calls in stock-based ROMs. Make sure you have Superuser installed. Then, with the phone fully booted up, type:

./adb shell "su -c 'dd if=/dev/block/mmcblk0p4 of=/sdcard/cid'"
./adb pull /sdcard/cid
printf '\x56\x5A\x57\x5F\x5F\x30\x30\x31' | dd of=cid bs=1 seek=532 conv=notrunc
./adb push cid /sdcard/
./adb shell "su -c 'dd if=/sdcard/cid of=/dev/block/mmcblk0p4'"
./adb shell "rm /sdcard/cid"
rm cid

Changelog

Version 6.2

Linux: Fix incorrect use of grep when busybox is not available; update adb and fastboot executables

Version 6.1

Windows: (Hopefully) fixed hanging procedures due to std redirects

Linux: Allow more diverse device codes returned by adb devices

Version 6.0 - Initial Release (in this thread)