A-Majeed
A-Majeed

Reputation: 1500

Android ADB not detecting device in Mac OS X although device is detected by Android File Transfer

After installing android studio, I installed ADB as well. However, for some reason ADB doesn't detect my device. To make a note I think I have done all the basic stuff I found online, i.e.:

I'm using Android Studio 2.2 and running Mac OS X Sierra on my Laptop, and the android phone is running Android 5.0.1 (on an LG Phone)

NB: I have tried the other solutions on stack overflow but thats not the problem.

ADB (is installed) and works from the command line, but when I run :

I believe this is a specific issue and the general solutions to install ADB or restart doesn't work here as I have tried all that.

Just in case, I have rooted my device, could that be the problem or that doesn't matter?

Upvotes: 48

Views: 90547

Answers (16)

huey77
huey77

Reputation: 683

Posting my odd solution here since I wasted some time on this and tried almost everything and then this worked! lol. So maybe it helps someone.

So I literally just switched over the connection of my cable from the right side of the Mac over to the left hand side and then it worked! Android Studio recognized my device.

Details of my situation:

2019 Macbook on Ventura 13.4.1 Android Device running 8.1 Regular USB to USB C cable, along with an adapter for the regular USB The regular USB with the adapter was plugged into my laptop on left hand side, top port (if it makes any difference here). The USB C part of my cable was plugged into my device.

Hopefully this helps out people!

Upvotes: 0

Julian K
Julian K

Reputation: 2001

This happened to me on initial setup. I noticed that Gradle sync was taking a long time, so I waited for it to fully sync, then my device magically became available!

Upvotes: 0

1GR3
1GR3

Reputation: 348

Yeah, this one's tricky! Enabling Developer Options on your device is just a half of the procedure. Now you need to go to:

Settings > System > Advanced > Developer Options > Revoke USB Debugging Authorizations

Also check the cable - some are just for charging, no data can pass trough.

Upvotes: 3

sandeep Kumar
sandeep Kumar

Reputation: 1

I face the same problem with my One+ device and after trying everything mentioned above , still was not able to conenct . But finally after enabling "OTG storage" option in System , it works.

it might be different for different custom devices . so ultimately you have to look for an option which gives a notification in device when you conenct and disconenct your device with system.

Upvotes: 0

Codistan
Codistan

Reputation: 1519

Please use the correct USB-C cable that came with the phone/device. Also, this can happen if incompatible converter is used, but this is less likely.

Upvotes: 1

SagaRock101
SagaRock101

Reputation: 159

I tried all of the above and the only thing that helped me was

to change the USB port and also change the data cable.

I was actually using a converter from USB type to C type at the connecting end to mac port

I think the converter corrupted the mac port. This was for Macbook Pro

update

I also tried doing a soft reset of the SMC and worked like a charm after that.

Upvotes: 0

sainithin
sainithin

Reputation: 73

Add “platform-tools” to your PATH variable by invoking the following in the Terminal (make sure to change the file path to reflect where you placed the folder “platform-tools” on your system):

echo 'export PATH=$PATH:~/SDKs/android-sdk-macosx/platform-tools/' >> ~/.bash_profile

Execute the following command to reload your bash profile (this applies the change to the PATH variable):

source ~/.bash_profile

Note: The PATH variable is the search path for commands. It is a list of directories, each separated by a colon, in which the shell looks for commands. To see what values are currently in your PATH variable, use the following:

echo $PATH


adb devices

It should return something like this (if you have one Android device attached):

List of devices attached
212304114c28b9e device

Upvotes: 0

ishandutta2007
ishandutta2007

Reputation: 18194

I was already in USB debugging enabled state and also had switched USB configuration to PTP. It was still in always charging mode no matter what I do. I had even reinstalled all Android related stuff, tried on multiple devices to find a fix. Finally what worked for me was getting a new cable.

I had posted a question here (now marked as duplicate) since these answers didn't suffice my situation.

Upvotes: 19

David Mariner
David Mariner

Reputation: 316

I just clean installed my MBP and encountered the same issue. I tried the things suggested here but nothing worked.

What I had to do to fix it was "Revoke USB debugging authorizations" from the Developer options.

Once I did that, it offered up the usual "did you want to allow debugging on this device" option, and everything was back to normal.

Upvotes: 29

A-Majeed
A-Majeed

Reputation: 1500

You basically need to set the USB mode to PTP mode instead of Media Transfer Protocol (MTP) mode.

When I connected the device via USB the USB icon and Debugging Mode Icon appeared on the status bar on the device.

If you open control center by swiping down from the top, you should see a "Media device MTP" - Tap for more USB options. Tap it and switch the mode to "Send Images (PTP)" mode and it should ask you if you want to enable USB debugging. Enable it and the device should be recognized by ADB and Android Studio now.

Upvotes: 72

user3471194
user3471194

Reputation: 62

ADB was detecting the device but AS wasn't, I went to Preferences > Build, Execut

Upvotes: -2

Rohit P Soman
Rohit P Soman

Reputation: 1161

Make sure no other services are trying to access the device via adb. For me, I was using chrome inspect for checking the network requests. When I closed that window studio automatically detected the device.

Upvotes: 3

Zhiyun Li
Zhiyun Li

Reputation: 71

I tried everything on my MBP but failed to fix the issue. Finally, with the least expectation, I reset my MBP's SMC, and everything is back to normal!!! https://support.apple.com/en-us/HT201295

Upvotes: 4

pzulw
pzulw

Reputation: 1746

In my case, the problem was that developer mode went away after doing an Android system update. Double-check developer mode and USB debugging settings.

Upvotes: 5

TechnoTim
TechnoTim

Reputation: 3205

Go to developer options and enable USB Debugging:

Settings > More > Developer Options > Debugging > USB Debugging.

Note:

You have to enable developer mode on your phone first

Upvotes: 15

drkvogel
drkvogel

Reputation: 2581

If anyone is still having problems, consider the cable you are using. Not all USB cables are created equal! Some will charge but not allow data transfer. See this post.

Upvotes: 6

Related Questions