adb installation in WSL

Android ADB Setup In WSL Platform

The Android Debug Bridge (ADB) is a very common Interface tool nowadays to do the Android ADB Setup In WSL. Since most of the electronic devices are using Android OS, so it is now sup

[porting in both Windows and Linux also. But when Windows integrated the Linux kernel into Windows OS, problems are happening in the use of it. So let us discuss how to install and make it ready and learn how to use ADB in the WSL. Here we have used the Ubuntu-20.04 for Android ADB Setup In WSL.

ADB Tool Installation on WSL

First, you need to open the WSL shell for the Android ADB SDK Setup In the WSL Platform. Then first update the Linux and then install the ADB Tool. Please the below command to do this job.

sudo apt-get update
sudo apt-get install android-tools-adb

You can get the confirmation after the successful completion of this installation. You can also see the below image for reference.

Installation Of ADB SDK Platform Tool

Before installation of the Platform tool, let me clear you the clarity so that you will not face any problems if you are using both Windows shell and WSL. Basically, there is a problem like if you are using the platform tool version in windows shell and WSL is different then the WSL will not detect the ADB shell. So better to handle it well for not facing these kinds of problems. The WSL Android SDK needs to install as per the below steps to do the Android ADB SDK Setup In the WSL Platform.

  • Download the SDK Platform-Tools for Linux.
  • Unzip the downloaded Platform Tool. It will be named as like platform-tools_r31.0.2-linux.zip
  • Then go to the path “platform-tools_r31.0.2-linux\platform-tools
  • Run the Windows Power Shell in this directory.
  • Then type the command “bash” and Press Enter for the first time.

Then the WSL shell will be available and to open the WSL shell you need to press “Ctrl + Shift” and then right-click on the mouse to get the option of “Open Linux Shell Here” and then select this option to open the WSL shell.

Then Copy the downloaded adb to the Ubuntu Linux available in WSL.

sudo cp adb /usr/bin/adb
sudo cp fastboot /usr/bin/fastboot
sudo chmod + x / usr / bin / adb (If you have execute permission, you can omit this step)
adb version (check if the version is consistent with the adb under windows or not)
adb devices (successfully pulled to the device list)
 //If the error is still reported, execute the following sentence
adb kill-server
adb devices (list of devices successfully identified)

Now your ADB is ready to access via WSL in the Ubuntu platform. So for the first time, you need to start the ADB server with the below command. Before start, you just run the ADB kill-server command if by mistake you have used it in old. If you have done the ADB Setup In WSL successfully, then the below command will run without any error.

adb kill-server
adb start-server

Now you can use your WSL shell for accessing the ADB devices or debugging your mobile or any android devices.

Now you can use the adb command “adb shell” to access the adb target for debugging or any work.


Discover more from PiEmbSysTech

Subscribe to get the latest posts sent to your email.

Leave a Reply

Scroll to Top

Discover more from PiEmbSysTech

Subscribe now to keep reading and get access to the full archive.

Continue reading