I'm getting Android Build Failures and would like to locate adb
to do some queries like adb devices
but where is adb
installed? I've already installed the Android SDK for Unity.

- 23,311
- 18
- 141
- 164
4 Answers
From @Programmer's answer, this line is no longer true:
You are responsible for downloading, installing and setting up Android SDK and then manually setting the paths in Unity.
Unity now allows and encourages you to install the Android SDK via their Unity Hub:
Use the Unity Hub to install Android Build Support and the required Android SDK & NDK tools:
From the same page, I found adb.exe
is located at: /c/Program Files/Unity/Hub/Editor/2019.2.1f1/Editor/Data/PlaybackEngines/AndroidPlayer/SDK/platform-tools/adb.exe

- 26,547
- 23
- 88
- 127
-
Please leave a comment if you're going to down vote. We can't improve it if you don't say why it's wrong and also it's correct so why are you down voting? – AJP Sep 09 '19 at 17:54
-
Does this SDK belong to Unity, or Unity just uses an external SDK. I am asking because I wonder is it possible to use this SDK for my own purpose? – unlut Feb 19 '20 at 13:55
-
I'm not a lawyer @unlut but I would guess it belongs to Unity. However if you fall with in their free category, i.e. you're not making "enough" money then you might be able to use this anyway for free if it is allowed in their terms and conditions. – AJP Feb 20 '20 at 21:04
Updated answer for 2023:
C:\Program Files\Unity Editors\YOURVERSION\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools

- 320
- 2
- 16
For OSX users:
/Applications/Unity/Hub/Editor/2022.1.0b16/PlaybackEngines/AndroidPlayer/SDK/platform-tools/adb

- 111
- 1
- 6
Where is adb installed when it comes with unity?
adb is never installed when you install Unity. You are responsible for downloading, installing and setting up Android SDK and then manually setting the paths in Unity.
You download Android SDK, then JDK and setup the paths in Unity. That's it. If you want to build for Android with IL2CPP then you must also download the Android NDK and also set the link up in the Editor.
See this post if you have problems setting it up.
If you want to see the SDK path go here:
EDIT:
Go to Edit ---> Preferences --->External Tools then scroll down to SDK under Android, you will see the SDK path there.
Once you find the SDK path, "adb.exe" will be located at <SDK_PATH>/platform-tools
.

- 121,791
- 22
- 236
- 328
-
1I've installed Unity and when I wanted to deploy for Android it asked me to install another package `Android SDK` after that i was able to deploy apps, i didn't have to add any path in any configuration. So i am guessing, that this package was responsible of taking care of installing ADB – user1767754 Jul 02 '17 at 20:33
-
When Unity installs, the Android SDK is **not** installed automatically. It may ask you if it should be installed when you want to build for Android but that's not installed automatically. Even [this](https://docs.unity3d.com/540/Documentation/Manual/android-sdksetup.html) Unity doc explains how to set it up. Maybe this has changed. *See my edit for how to find the path.* – Programmer Jul 02 '17 at 20:40
-
2Ok, I am not saying it is shipped with Unity, but there is an executable for it, that is being suggested by Unity to be downloaded. – user1767754 Jul 02 '17 at 20:48
-
Hi, you just changed the most important part of your question rendering my answer useless. It will be better to add **EDIT** in your question then add those new details to it then I will modify my answer to update it. That's the proper way to do that. – Programmer Jul 02 '17 at 20:59
-
Now, if I modify my answer to say that the path is at `/Users/chavez/Library/Android/sdk/platform-tools`, that would be wrong because that is different on every machine. If it is setup by another person, that used a different path it would be wrong. Like I mentioned in my answer, the path can be found at *Edit* ---> *Preferences* ---> *External Tools* then scroll down to *SDK* under *Android*. This is the proper way to find the path and will work on all supported platforms. – Programmer Jul 02 '17 at 21:01
-
1We install ours to the ~/Documents directory along with other various tools since it's easy to duplicate on all of our build machines. Where you install it is a personal preference. – Retired Ninja Jul 02 '17 at 21:05
-
That's what I am trying to tell OP. Putting `/Users/chavez/Library/Android/sdk/platform-tools` as answer is wrong since people use different paths. Checking the Editor settings will be appropriate. – Programmer Jul 02 '17 at 21:06
-
Sorry, I've answered to quick and exposed as well my username...darn, Can you at least Just keep your Edit part and point out that the `adb` is located in `platform-tools` – user1767754 Jul 02 '17 at 21:35
-
-
2-1 -- Dude. There's a checkbox when you install Unity that says "Install Android SDK". And in that dialog box, those paths are grayed out and there's a checkbox for using the "Android SDK Tools Installed with Unity (recommended)"; it definitely comes with Unity. So where did it get installed to? I don't care where it is on Joe Blow's machine, I just want to know where Unity puts those files by default. – BrainSlugs83 Sep 08 '19 at 08:36