Android studio is unable to initialize ADB - android

First I was having an issue of Error running app no default activity found, I somehow fixed that via reinstalling the android studio. my current android version is 3.3.2, now I can not connect any device via USB, it is just showing initializing ADB for like 1 second and then vanishes without recognizing the deployment device. It might be a primitive issue or maybe bug, I don't know, but one thing is for sure, it is an immense irritative process that is why I'm here finally, anyone? I'll appreciate your effort.

If the problem isn't in your USB cable.
Just open Android Studio terminal and type this
adb.exe start-server
Restart AS and it should work.
If that didn't work, maybe there is an ADB instance that is running, you should kill it with this command
Kill -9 adb

Related

Cant run adb process

I'm creating an application in android studio but I am um able test it on the virtual emulator because the adb process won't start. It's giving this error.
I tried manually starting adb and all other things but this happens.
I tried reinstalling android studio and platform tools. I downloaded a separate adb and ran "adb start-server"/"kill server".
It just doesn't seem to work. So i constantly have to build the entire thing and generate apk to run it. Please help me guys!!!
Also regarding the virtual emulator i have intel haxm installed if that information was necessary.
It's may be because your emulator adb not allow the android studio to run on it and android studio try to stop and re-run but this process fail.
Me also the same problem. So i always follows this step and it's work for me.
1. Open android studio.
2. Try to run your app without opening your emulator(It will start your adb).
3. Then open your emulator and run your app.
It's working for me. May solve your problem.
adb server didnt ack. This issue will resolve ussually when you kill all instances of adb.exe and restart server again.
Open Task manager and kill all adb instances and start server again.
Try the following:
Close Studio.
End adb.exe process in taskmanager.
Issue kill and
Run adb kill-server
Run adb devices
Then start the emulator and try adb devices again. This should list your emulator-device.
Run you apk in studio.
If your are using Genymotion,try to link your Android Studio 's SDK to Genymotion Android SDK Path.Then try to type with adb devices, I hope this will help for you.

ADB not responding. You can wait more, or kill "adb.exe" ... windows 8

When I try to test my Android application with an android emulator as always I now suddenly get an error message. I'm working with Windows 8. So far I tried the following things which unfortunately could not solve the problem:
reinstalling eclipse with android adt
reinstalling java
installing "android studios" first solved the problem but after one day mysteriously also here adb, stopped working with the error message given in the title " ADB not responding ...
furthermore I unsuccessfully tried out some advice from Mr. Google:
Stopping adb.exe via task-manager and restarting eclipse / android studios
"adb kill-server" then "start-server" via command prompt
setting the path to adb.exe as an environment variable
switching off any antivirus or firewall
starting the IDEs as an administrator
updating the IDEs
The only thing I can remember doing which may have destroyed adb on my computer for all times: I connected my motorola smartphone to my laptop and installed the motorola usb drivers but as I said the adb also won't work with the emulator.
Any help would be kindly appreciated. The issue bothers me for more than an entire day now. Maybe someone had similar problems on Windows 8 ?
On OSX helped:
Close Android Studio
Kill all processess using 5037 port
sudo lsof -i |grep 5037
sudo kill PID_NUMBER
Run adb devices from console
adb devices
Meanwhile the emulator is working again. I cannot definetly say what solved the problem. What It could be a combination of two things:
Deleting the hidden ".android" folder under C:\Users...
(Probably there was some malfunctioning automatically created code)
Deleting and recreating the Path variable to the folder with adb.exe ( ...\sdk\platform-tools\;)
Finally it could be a Windows 8 issue which I don't understand.
Try this,
Open a command prompt with administration permission and type
netsh interface tcp set global autotuninglevel=disabled
This worked for me
Edit: Windows only
Kill the adb.exe with a command prompt. Open a command prompt were your adb.exe is located and type
adb kill-server
Maybe HTTP Proxy blocked the localhost 127.0.0.1:5037
If you have config the HTTP Proxy, make sure to exclude the localhost like picture below
Also, port can also be blocked by the firewall and anti-virus firewall, please notice as well.
Try this,
at the prompt try adb kill-server
Start one of your AVDs
at the prompt try adb root
The prompt should say adbd is already running as root.
That should fix it.
In case it helps anyone else, for me the problem was related with the USB hub that the tablet was plugged into on the computer (unplugging the webcam which was in use fixed it).
I got the same error. Don't worry. I have an solution. Go to Task Manager. Kill the process called adb.exe. You will find 2 or 3 processes. Kill all of them. You are done. It will work.
I have the same problems. Verify port 5037 is free and ports 5555 to 5585 are available and never used by another process.
"ADB server sets up connections to all running emulator/device instances. It locates emulator/device instances by scanning odd-numbered ports in the range 5555 to 5585"
FROM: http://developer.android.com/tools/help/adb.html
To find out which process is listening on a port on Windows yo can use:
C:> netstat -an -o
FROM: How can you find out which process is listening on a port on Windows?
I had the same problem, here is my simple fix:
-Go to task manager in windows, look for adb.exe, and kill it
-Go to command prompt, and tap adb devices ==> it will automaticaly start adb daemon
I finally just restarted the computer, and that solved the issue for me.
Uninstall HTC Sync. Or disable it somehow.
Try to open adb from command prompt from directory location as <sdk>\platform-tools,
If adb file is missing try to re-install Android SDK with latest version,
And try to run again..
I think issues will solved, by this procedure.
I saw this on a Mac OS X.
I shut down Android Studio and ran adb get-state in the terminal. When I started Android Studio back up, the warning had gone away.
BTW, I did just try restarting Android Studio without any luck. I am sure a restart of OS would have fixed it too.
The same thing with the Asus Sync utility (with the both our Transformer's 700 and 701).
I think there is a USB-port conflict between ABD driver and Sync utility.
Exit from Sync utility resolve the problem.
Looks like this could be caused by a bunch of different issues. This just happened to me because I had my android phone device plugged in for USB debugging, then after a few hours (and multiple android studio/phpstorm restarts) I had to do unplug the device manually. Things started working again after unplugging.
I have faced this problem few days ago. When I opened my task manager it showing me two adb runnig. It may be because of I am using mobogenie for connecting my android phone for debugging application. This problem is because of moboginie and adt port conflict. then I have followed following procedure to sort out this issue.
!) close eclipse
2) Go to task manager and kill all adb processes.
3) Now go to platform-tools in android sdk
4)press shift+right click mouse and select "open command window here" option
5) type
adb kill-server
adb start-server
6)if server sucessfully started then start eclipse and then connect your phone
(Remember dont connect your phone before starting eclipse)
Following works for me every time:
go to File->Invalidate Caches/Restart
select Invalidate and Restart
And, You are good to go.

Android adb stop working

Until yesterday everything was working perfect until today that I connected my phone (just updated to Jelly Bean) and adb.exe stop working. If I execute adb.exe I can see the help but when I want to use any command it just run forever and no message is shown.
I tried with "kill-server" and "devices" and it runs forever, no message at all is displayed and I must terminate the process to close it.
I just connect the same phone to other PC that was fully functional and also adb.exe stop working. The strange thing is that adb.exe will not work any more even If I disconnect the phone and/or I connect my tablet. Adb.exe just got useless.
I was using the same phone yesterday (android 4.0), with my tablet (android 4.2) and adb.exe was working.
Adb.exe is not corrupted as I checked it MD5 and it is the same as in working pc (5787e5df1a68e7afea82d58e5f0d6549 *adb.exe).
I have Android Debug Bridge version 1.0.31 and Android SDK tools 22. I uninstalled android sdk tools and Installed again but when is near to finish it hangs because it launches adb.exe and again it will run forever.
Please any suggestion or help?
Try rebooting. Sometimes the USB drivers lock up. I work HEAVILY with ADB in my project at http://android-casual.googlecode.com and I find it to be one of three things when ADB locks up.. 1. USB drivers, or 2. adb_usb.ini needs an update, or 3. on new devices you have to "pair" them so that ADB can perform any action.
To pair, you can disconnect, reconnect and run "adb devies" to display the pairing on the device.
Not sure if you're still facing this issue, but for what it's worth I had the same kind of issue with adb.exe, and came across this post while trying to troubleshoot it. In my case, I wasn't using any physical Android devices, only the Emulator. Everything had been working fine and then suddenly adb.exe would no longer respond (couldn't get any output from any adb command - it just appeared to hang).
In the end, my issue turned out to be another application I had installed on my development machine. It was starting as a service, and was listening on the exact same port that the adb server runs on (5037), which appeared to be confusing it. Once I changed the application to use a different port, adb started working again and everything was fine.
Run command
where adb
I had such kind of situation.
In my case
where adb
gave output
C:\Windows\adb.exe
D:\AndroidSDK\adt-bundle-windows-x86_64-20131030\sdk\platform-tools\adb.exe
I tried to run adb from disk C, when Eclipse used second adb from AndroidSDK (from disk D).
I removed adb from strange path C:\Windows\adb.exe, and this solved this problem.
I got the same problem,my solution is going to cmd and paste adb.exe path,and then click enter button.For example
D:\Android\Android\platform-tools\adb.exe

'adb devices' showing dummy device

I have been facing this problem for quite sometime now. Running 'adb devices' shows me an additional dummy device although its named as emulator-5554. FYI, I don't have any emulator running as well.
adb devices
List of devices attached:
xxxxxxx device (Actual device)
emulator-5554 device (Dummy thingy shown as device).
How do I clean up this mess?
Same problem for me but I don't see any Bluestacks service in my services list. after
adb devices shows emulators I didn't have, I usually just type the command
adb kill-server
and running the
adb devices
once more shows only the devices that are connected.
I had the same issue. I did this and now everything is ok
click Windows+R
type services.msc
stop BlueStacks Android Service
I have figured out the issue. I had installed Bluestacks for Mac for trying out Android apps on Mac. This was running an emulator with a different name.
Figured it out by taking a screenshot of the emulator and it showed the launch screen of Bluestacks. Uninstalled Bluestacks and all is well now.
the adb server is scanning for emulators on all even local ports from 5555 to 5555+128 (5683). If you have a custom service which use one of these ports... You are stuck with the "adb -d command" requirement
pls check in task manager whether emulator-arm.exe is running. If so, try stopping both adb.exe and emulator-arm.exe
I had the same problem and non of these answers helped. So I figured out that my system didn't shut down properly and that's the reason I have a dummy emulator-5554. The solution was to create a new emulator with a name then launch it? While it's launching kill the server using cmd until when the emulator powers on and you can see its name under Devices in DDMS. After this shut the emulator...emulator-5554 is gone, Now you can start Bluestacks and connect
I was facing the same issue, and that due to BlueStacks too. In case you have Windows and you don't want to remove it, then you can stop its service "BlueStacks Android Service."
To do that click Windows+R, type services.msc then stop "BlueStacks Android Service"
Reference:
http://forum.xda-developers.com/showthread.php?t=2612389
Eclipse emulator NOT BlueStacks:
In the case of the eclipse emulator running in the background and you don't know how to close it, just go to devices tab and choose the dropdown menu on the right, then Reset adb. OR, just reset the adb using adb console.
Just open task manager and end task bluestacks
I also meet the same problem.Here is my answer to solve this problem.
in Windows system.
1.in cmd terminal,usr cmd netstat -aon|findstr "5555"
2.use cmd tasklist|find "PID",the PID para should be a process number which is the result of the first step .
3.changed the Port No. to other ,which should not be "5555"
That's done.
After trying:
adb kill-server
stopping adb.exe in task manager
adb usb
and a few other stuff I can't even remember. . .
I restarted my computer and the dummy-device was gone!

Android adb.exe crashes - Only when called from Eclipse (win7 32)

ADB when run stand-alone works fine. I can connect to my device (HTC Desire) and perform .apk installs etc, so I know the USB drivers are working correctly. A common reason for this question, I know, but that can be ruled out.
Occasionally I can connect to the phone, very occasionally. 99% of the time I just get the standard windows popup "adb.exe has stopped working".
I've updated Eclipse to the latest version.
I'm sure the USB drivers are working correctly
I can connect via adb in command line mode with no issues.
I've searched for a solution until google begged me to stop :)
Seems like a DDMS Eclipse issue.
Any ideas ?
Actually, just before I sent this I had a brainwave.
Without Eclipse running I ran adb.exe from command line and performed an install -r of my .apk package.
All worked fine.
I then started Eclipse - the connection to my phone worked fine...
Nope, Eclipse now failing again. BUT with eclipse trying to connect (and failing) I can simultaneously run adb from command line and install the package. It's got to be Eclipse
If you have an alternate "launcher" or "home-screen" installed, that might be forcing the connection to close. If you have one installed, either force stop it or uninstall it.
I've found that some apps running in your phone can cause ADB to crash for some reason. Try to close unnessecary apps running on your phone when developing in eclipse
In my case, I had an instance of adb.exe from another package (Android-Sync) running. Processes with this file name are common in packages that sync devices. You can find more information about programs that use an adb.exe process here: What is adb.exe ? adb.exe info
To determine if you have an adb.exe process already running, look in your Task Manager on the Processes tab to find the running adb.exe. You can right-click and select Properties from the menu to find out the full path of the adb.exe.
To solve the problem and allow Eclipse access to the correct adb.exe, I shut down Eclipse and the emulator. Then I went into the Task Manager and shut down the running adb.exe. There may be more than one. Then I restarted Eclipse and the emulator. Fortunately, when I started my Android Virtual Device, that program was smart enough to start up the correct adb.exe.
In my case was kinda problem with USB driver. Just plug your phone always to the same USB port.

Categories

Resources