How To Enable ADB Over USB TWRP?

Did you ever want to know How To Enable ADB Over USB TWRP? Of course, you did. Isn’t that why you’re here? Well, the OnXshadow team is here for your rescue and will provide the answer to your question. But, along with that, we also have so many other queries and questions we will answer so that you never face any other issue with ADB again.

If you are new, don’t worry. We will begin from the beginning. For example, what is ADB, and what does ADB stand for? How can you use it? What issues are you facing with ADB and why might that be happening?

ADB (adb) stands for Andriod Debug Bridge. As the name suggests, it is a handy tool that helps you communicate with the device to a great extent. The tool is also helpful in actions like installing or debugging any app.

Well, this should be all for the beginning, let’s move on to the in-depth article and explanations. Shall we?

What Is ADB Sideload?

As we spoke about what is ADB, we must also talk about ADB Sideload. So, what is ADB Sideload?

ADB sideload is a new feature that was added to AOSP recovery in Jelly Bean. As of version 2.3, TWRP now supports ADB sideload mode. ADB sideload is a different ADB mode that you can use to push and install a zip using one command from your computer. Most likely ADB sideload won’t be very useful for your average recovery user, but ADB sideload can be a huge time-saver for a ROM developer.


How Can I Use ADB Sideload?

Having an idea of what ADB Sideload is if you are now wondering how can you use ADB sideload, here is a guide for you.

  1. First, install a recovery in your device that supports the sideload like TWRP versions 2.3 or higher.
  2. Have the latest ADB Binaries installed on your computer. You can get the latest ADB Binary from Platform-tools from the Android SDK.
  3. Version 1.0.29 or higher is required.
  4. Once you’re done with this, turn the device’s settings into “ADB Sideload” mode.
  5. If you’re using TWRP, you can do this from “Advanced > ADB Sideload.”
  6. Now, from the Command line, type adb sideload /path/to/

And, you’re good to go!


For TWRP Versions Lower Than

Regardless of the existing storage location you have chosen on your device on the mount page, the file will be copied there. Also, remember that the file will be placed in the root storage and named ‘’.

The file will also overwrite or delete any other files by the same name.

After the file is copied to your device, it will immediately begin to install itself. When the installation is complete, a button to reboot the system will be displayed, allowing you to do so and test your package.

For TWRP Versions Higher Than

TWRP Versions higher than those mentioned above will stream the zip file from your PC without downloading it to your device.

Definitely avoid using sideload if you wish to download the file to your device.

How To Enable ADB Over USB TWRP?

We are pretty sure that you will be aware but, here it is: TWRP stands for TeamWin Recovery Project.

It is also a Canadian rock band that was formed in 2007 known as the Tupper Ware Remix Party (but we don’t need to talk about that here.)

Now, let’s talk about how to enable ADB Over USB TWRP.

While trying to enable ADB over USB TWRP, make sure you have the following conditions met:

  1. You have stock recovery and a rooted phone
  2. you have custom recovery.

The Changed Files will be:

  1. /system/build.prop
  2. /data/property/persist.sys.usb.config
  3. /data/misc/adb/adb_keys

The process is essentially 2 steps. But, the catch is that there are little steps in between you have to follow and keep in mind.

The first step is to enable USB debugging. You can do that by: Settings > Developer Options >USB Debugging ON.

  1. Now, connect your android device to your PC.
  2. Open cmd on the computer and go to program-tools/
  3. Type and enter: adb devices. This checks if your device has been connected successfully in recovery mode.
  4. Type this command: adb shell mount data and adb shell mount system
  5. Now use the adb pull/data/property/persists.sys.usb.config/your directory to get the persist.sys.usb.config file.
  6. Now open the text editor that you use/have been using and edit it to mtp,adb.
  7. Save it.
  8. Now it’s time to push the file back to the device again. Use this command to do so: adb push/your-directory/persist.sys.usb.config/data/property
  9. Next, go to the build.prop file: adb pull/system/build.prop/your-directory.
  10. Add these commands:
    1. persist.service.adb.enable=1
    2. persist.service.debuggable=1
    3. persist.sys.usb.config=mtp,adb
  11. It’s time now to push back the build.propback to the device. You can do that by using the command: adb push/your-dir/build.prop/system

The second step is to get RSA Verification.

Phewwww finally we’re done!

Why Does ADB not Recognize My Device In Recovery Mode?

If ADB cannot recognize your device in recovery mode, there can be a number of reasons for that to happen.

One reason could be that your device might not have been found in the first place. 

But if it is and your adb is still not recognizing your device, you should install “Google USB Driver”. This should help you in this case.

Below is the step description:

Google USB Driver > Device Manager > Device (right click) > Update Drive’s Software > Browse My Computer > Let me Pick > Android Device > Android ADB Interface

How To Fix or Enable ADB and MTP in TWRP Recovery?

If you are not able to enable ADB and MTP I’m TWRP recovery, OnXshadow is here to help. Below is a quick guide to let you know how to fix/enable ADB and MTP in TWRP Recovery.

Make sure you have the following requirements met:

  1. TWRP Recovery
  2. Notepad++
  3. Android Image Kitchen

How to Fix/Enable ADB and MTP in TWRP Recovery:

  • Use the AIK Tool and extract your TWRP recovery.img (you can use the AIK tool by dragging and dropping onto the unpacking.bat)
  • If this doesn’t work out, open \ramdisk and edit the file using the text editor (notepad++)
    • If you have android 8 and above, edit prop.default
    • If you have android 7 and below, edit default.prop
  • Search for the following values given in the table. If you find them, change them. to the values in front of them. If you don’t, then add the values in the Code 2 section.
Code 1 Code 2
ro.debuggable ro.debuggable=1
persist.sys.usb.config persist.sys.usb.config+adb,mtp
sys.usb.config sys.usb.congif=adb,mtp
  • Run the repackimg.bat script to repack the TWRP.
  • Next, verify that both ADB and MTP function after flashing and booting into TWRP.

How To Enable USB Debugging Using a Computer?

Enabling USB Debugging using a Computer might not be the easiest task ever especially when you are not well-versed or new to coding.

But you can debug your android app or device using USB. Follow the steps and voíla!

  1. The first step is to enable USB Debugging on your phone (android).
    1. if you have Android version 4.1 or lower, you will see the developer options screen by default.
    2. However, if you have an android version 4.2 or higher, follow Settings app > System > About Phone > Tap Built Number (7 times) > Previous screen > Developer options > Enable USB Debugging
  2. Next, install Java SE SDK 8 Update 152
  3. Configure Android SDK
  4. Now, lastly,  configure Google Chrome for debugging

You can find an in-depth article about it here.

How Do I Enable USB Debugging Using ADB?

Here is an intrinsic guide on how to enable USB Debugging Using ADB:

  1. Enable the device’s recovery mode.
  2. Download the SDK platform tools.
  3. Extract the .zip file into the PC.
  4. Inside the extracted folder, find the “Platform Tools” folder.
  5. To open a new command window, click the File option in the top left corner and choose “Open Windows PowerShell”.
  6. Type “adb devices” and press enter. If you see the Device ID in alphanumeric numbers, then ADB will be able to recognize the device in recovery mode.
  7. To mount the necessary directories, execute the following commands and hit Enter after each one.
    1. adb shell
    2. $ mount data
    3. $ mount system
  8. From the phone to the computer, transfer the “persist.sys.usb.config” file. You can do this by using the command: adb pull /data/property/persist.sys.usb.config C:\Users\[]\Desktop\
  9. You can also edit the “persist.sys.usb.config” file. Here’s how: Right click  > Select the text editor > add “mtp,adb” options you have > push it back using the command: adb push “C:\Users\[]\Desktop/persist.sys.usb.config” /data/property
  10. Open the “build.prop” file using the exact editor as before.
  11. Add the following to the file:
    1. persist.service.adb.enable=1
    2. persist.service.debuggable=1
    3. persist.sys.usb.config=mtp,adb
  12. Save it. Use the command given to push it back: adb push “C:\Users\[]\Desktop/build.prop” /system/
  13. Reboot the device using the command “adb reboot”.

This is how you enable USB Debugging Using ADB.

How To Enable USB Debugging in Download Mode?

Unfortunately, there isn’t much hope if you forgot to enable USB Debugging before the device got into download mode.

But, if you know, or have found a solution to do that, please mention it in the comments below or mail it to us.

Frequently Asked Questions | How To Enable ADB Over USB TWRP?

Now let’s move towards the frequently asked questions by our readers:

1. How To Use ADB to Install TWRP?

Here is a quick guide to installing TWRP using ADB:

  • Download the latest TWRP recovery.img
  • rename recovery filename to twrp.img
  • copy recovery.img to C:\Program Files\Minimal ADB 
  • Connect the android device to the PC using a USB.
  • Go to the above location and press the shift key + right mouse to click on the empty space.
  • Click on Open command window here to launch the command prompt window (cmd) on your PC.
  • To check whether your device has been successfully connected to the PC, type the command: adb devices and press enter. You will see a list of devices that have been connected to your PC.
  • Now boot the android device using the command in the cmd window: adb reboot bootloader.
  • You will get a permission pop-up on your device. Tap OK.
  • Type the command “fastboot devices” to confirm if the fastboot is functioning or not.
  • You will see the list of attached devices and hence confirm that the fastboot was a success.
  • Now, to install TWRP recovery, type in the following command and press enter:fastboot flash recovery twrp.img
  • It will just take a few seconds. To finally wind up the whole process,  type in the following command: fastboot reboot

And here you go. You have successfully installed TWRP using ADB!

2. How Do I Enable USB Debugging in Recovery Mode?

Well, if you forgot to enable USB Debugging from the settings and went directly to recovery mode, let’s see now how you can enable USB Debugging in Recovery mode.


  1. Stock ROM
  2. SuperSU
  3. Notepad++
  4. WinRAR


  1. Unzip the stock ROM. There, find system.img and extract it as well.
  2. Extract file.
  3. Go to the folder where  system.img is extracted.
  4. Take any file with .apk extension and change it to .zip.
  5. Copy the RSA Certificate and copy it to Update-SuperSU.v1.65 folder.
  6. Now, copy builder.prop file after you add this at the bottom: persist.service.adb.enable=1

Yay! you did it!!

Conclusion | How To Enable ADB Over USB TWRP?

Well, it might be a little tiresome, but the end result is totally worth it! We hope this article was helpful in one way or the other to you. Do let us know if you want to know something more about this topic from us. We will keep a look at what you want to know and serve it.

Also check out the other posts linked below:

  1. Causes Why Spectrum Remote Not Working | Fixing Techniques 2023
  2. Demystifying the World of Artificial Intelligence (AI) and Machine Learning (ML): Understanding the Technologies and Their Impact on Our Lives

Leave a Comment