Installing a custom recovery

Samsung devices come with a unique boot mode called “Download mode”, which is very similar to “Fastboot mode” on some devices with unlocked bootloaders. Heimdall is a cross-platform, open-source tool for interfacing with Download mode on Samsung devices. The preferred method of installing a custom recovery is through this boot mode – rooting the stock firmware is neither necessary nor required.

  1. Download and install the Heimdall suite
    • Windows: Extract the Heimdall suite and take note of the directory holding heimdall.exe. You can verify Heimdall is working by opening a command prompt in that directory and typing heimdall version. If you receive an error, make sure you have the Microsoft Visual C++ 2012 Redistributable Package (x86) installed on your computer.
    • Linux: Pick the appropriate package to install for your distribution. The -frontend packages aren’t needed for this guide. After installation, verify Heimdall is installed by running heimdall version in the terminal.
    • macOS: Install the dmg package. After installation, Heimdall should be available from the terminal - type heimdall version to double-check.
  2. Download a custom recovery - you can download TWRP, simply search for your device on that page and download the corresponding recovery file, named something like twrp-3.0.0-espresso3g.img.
  3. Power off the Galaxy Tab 2 7.0 / Tab 2 10.1 (GSM) and connect the USB adapter to the computer (but not to the Galaxy Tab 2 7.0 / Tab 2 10.1 (GSM), yet).
  4. Boot the Galaxy Tab 2 7.0 / Tab 2 10.1 (GSM) into download mode: Hold Volume Down and Power buttons.. Accept the disclaimer, then insert the USB cable into the device.
  5. Windows Only: install the drivers. A more complete set of instructions can be found in the ZAdiag user guide
    1. Run zadiag.exe from the Drivers folder of the Heimdall suite.
    2. Choose Options » List all devices from the menu.
    3. Select Samsung USB Composite Device or MSM8x60 or Gadget Serial or Device Name from the drop down menu. (If nothing relevant appears, try uninstalling any Samsung related Windows software, like Samsung Windows drivers and/or Kies).
    4. Click Replace Driver (having to select “Install Driver” from the drop down list built into the button)
    5. If you are prompted with a warning that the installer is unable to verify the publisher of the driver, select Install this driver anyway. You may receive two more prompts about security. Select the options that allow you to carry on.
  6. On the computer, open a terminal (or Command Prompt on Windows) in the directory the recovery image is located, and type heimdall flash --RECOVERY recovery.img --no-reboot.
  7. A blue transfer bar will appear on the device showing the recovery being transferred.
  8. Unplug the USB cable from your device.
  9. Manually reboot into recovery: Hold Volume Up and Power buttons.
  10. Congratulations! Your Galaxy Tab 2 7.0 / Tab 2 10.1 (GSM) now has a custom recovery installed. Continue on to the next section.

Installing LineageOS from recovery

  1. Make sure your computer has working adb. Setup instructions can be found here.

  2. Download the LineageOS install package that you’d like to install or build the package yourself.

    • Optionally, download 3rd party application packages like Google Apps
  3. Place the LineageOS .zip package, as well as any other .zip packages on the root of /sdcard:
    • Using adb: adb push /sdcard/
    • You can use any method you are comfortable with. adb is universal across all devices, and works both in Android and recovery mode, providing USB debugging is enabled.
  4. If you aren’t already in recovery, boot into recovery:
    • Hold Volume Up and Power buttons.
  5. (Optional, but recommended): Select the Backup button to create a backup.
  6. Select Wipe and then Advanced Wipe.
  7. Select Cache, System and Data partitions to be wiped and then Swipe to Wipe.
  8. Go back to return to main menu, then select Install.
  9. Navigate to /sdcard, and select the LineageOS .zip package.
  10. Follow the on-screen prompts to install the package.
  11. (Optional): Install any additional packages using the same method.
  12. (Optional): Root the device by installing the LineageOS su add-on (use the arm package) or using any other method you prefer.
  13. Once installation has finished, return to the main menu, select Reboot, and then System.

Get assistance

If you have any questions, or get stuck on any of the steps, feel free to ask on our subreddit, or in #LineageOS on freenode.