Android Debug Bridge (adb) is a versatile command-line tool that lets you communicate with a device. The adb command facilitates a variety of device actions, such as installing and debugging apps, and it provides access to a Unix shell that you can use to run a variety of commands on a device, e.g. installing TWRP Recovery.
TWRP (Team Win Recovery Project) is an open-source custom recovery that allows Android users to install third-party firmware like custom ROMs, kernels, or mods and root their devices. Further, it also facilitates taking full system backups, formatting/erasing device partitions, and so much more.
Install TWRP Recovery via ADB by following these steps properly (Remember, DWYOR. I'm not responsible for anything happens to your device):
1. Open the folder where your TWRP Recovery .img file is saved.
2. Then open a CMD window inside that folder. To do that, Shift + Right click on any empty white space inside the folder and then select Open command window here.
3. Connect your Android device to the PC. Type the following into the command window to boot your device into bootloader/fastboot mode:
adb reboot bootloader
└ If your asks for permission to “Allow USB debugging”, tap OK.
4. Once your device boots into bootloader mode, type this into the command line.
fastboot flash recovery twrp-2.8.x.x-xxx.img
└ Here modify twrp.img with the name of your TWRP recovery .img file.
5. Once TWRP is successfully flashed on your device, type this final command to reboot your device.
fastboot reboot