How to use TWRP’s built-in MD5 file integrity checker to avoid bricking

twrp-md5-hash-check-header
One of the most common ways of running into issues when flashing a new ROM image on the Fire TV, like when you’re rooting it, is to unknowingly use a corrupt ROM image file. Thankfully, TWRP has a built in method to verify the integrity of the image you are flashing before applying it to your Fire TV. Here’s how to use the feature in order to reduce the chance of bricking your Fire TV when flashing an image in TWRP.

Method 1: Download Verification File

  1. Enter the exact image/ROM filename and md5sum value and click “Download File” to download the verification file you need. Be sure your browser doesn’t add .txt to the downloaded file.



  2. For TWRP to find the .md5 file you just downloaded, place it in the same directory as the image/ROM file you will be flashing. For example, if you are placing the image/ROM file on a USB drive or microSD card, then place the .md5 file on the USB drive or microSD card as well.
    twrp-md5-file-location
  3. When you flash the image/ROM within TWRP, it will automatically detect the .md5 file and check that the image/ROM’s md5 hash value matches what is in the .md5 file.
    twrp-md5-results

Method 2: Manually Create Verification File

  1. Create a text file containing only the MD5 hash value of the image/ROM you’re flashing in TWRP.
    twrp-md5-text-file
  2. Save the file and name it the same as your image/ROM, including the image/ROM’s extension portion, and add .md5 as the file extension.
    Example: sloane-5.0.5-rooted_r4.zip.md5
    twrp-md5-save-file
  3. For TWRP to find the .md5 file you just created, place it in the same directory as the image/ROM file you will be flashing. For example, if you are placing the image/ROM file on a USB drive or microSD card, then place the .md5 file on the USB drive or microSD card as well.
    twrp-md5-file-location
  4. When you flash the image/ROM within TWRP, it will automatically detect the .md5 file and check that the image/ROM’s md5 hash value matches what is in the .md5 file.
    twrp-md5-results

ShareTweetShare+1

10 comments
  1. cdlenfert says:

    Cool man. It’s this kind of super technical know how that sets AFTVnews apart from other media device blogs. Especially impressive when it all comes from 1 person.

  2. steve says:

    Thanks for this Elias! I will try to this out on the next pre-rooted image.

  3. Adam says:

    I wish I could get that far. Using Linux (Debian Jessie) I can get to:

    Waiting for preloader…
    Found port = /dev/ttyACM16
    Handshake complete!
    Injecting 2ndinit…
    Mediatek Inject, git version fa8d8f
    Locating the partition…
    Reading 000000200: 0%

    And then that’s it. No further progress. Ever. Haven’t seen anyone else having this specific problem. Tried different USB ports, a different cable, a different computer. I’m stuck.

    • steve says:

      Sorry no help from me, but I had the same problem with Mac. Failed at exactly the same spot. I had to switch to Windows to do the ROOT.

      • Adam says:

        Ok got it. Finally.

        I booted into Debian’s Recovery Mode and tried the steps again. This time it worked like a charm, first time out.

        I can’t tell you exactly why it worked, perhaps GDM somehow interfering… But worked it did, and I was able to install a recovery and disable OTA updates without a hiccup.

        So, WooHoo! I’m pumped.

        Don’t know if anyone will see this in this four day old thread, but I figured I’d get my solution out there in case someone in similar straits comes across this.

      • Mark says:

        The solution is editing the install_firetv2_recovery.sh file. It’s missing two lines where you need to unplug the USB cable, reconnect it and press enter. “Eric” in another article on here told me about this and it works.

        Here’s all the code that belongs in the file:

        #!/bin/bash

        cd $(dirname $0)

        [[ $(uname -s) = “Darwin” ]] && INJECT=mediatek_inject.osx || INJECT=mediatek_inject.linux

        if [ ! -f 2ndinit -o ! -f 2ndinitstub ]; then
        echo “2ndinit and/or 2ndinitstub is missing.”
        echo “Did you extract all the zip files?”
        exit -1
        fi

        ./handshake.py

        echo “Unplug the USB cable, then plug it back in. Press [Enter] to continue”
        read -n 1 -s

        echo “Injecting 2ndinit…”
        ./$INJECT firetv2 $(cat comport.txt) 2ndinit /system/bin/pppd u:object_r:system_file:s0

        echo “Unplug the USB cable, then plug it back in. Press [Enter] to continue”
        read -n 1 -s

        echo “Injecting 2ndinitstub…”
        ./$INJECT firetv2 $(cat comport.txt) 2ndinitstub /system/bin/ext4_resize –

  4. Arahal Bin Razak says:

    Hi my phone is Galaxy s duos 2
    And I download cm11 ROM and miuiv7 .
    And l flash cm11 for twrp but that is Not flashed md5 not found .so you can help me

  5. Ghulam Murtaza says:

    hi
    anyone tell me that how can i install resurrection remix files in lg g2 korean f320k
    plzzzz tell me all steps
    thanks to all

  6. DHEERAJ says:

    Well the first method worked for me

Leave a Reply

Your email address will not be published. Required fields are marked *

*




Get notified of new posts

Enter your email address to receive notifications of new posts by email.