ADB is not working after android studio update - android

I have updated android studio to Android Studio v2.3.3 (June 2017) and adb stopped showing logs when I launch app on android studio emulator
The log shows:
07/11 13:08:17: Launching app
$ adb push C:\Users\1\AndroidStudioProjects\Don'tWakeMeApp4\app\build\outputs\apk\app-debug.apk /data/local/tmp/oleksandr.ivanets.dontwakemeapp
$ adb shell pm install -r "/data/local/tmp/oleksandr.ivanets.dontwakemeapp"
Success
$ adb shell am start -n "oleksandr.ivanets.dontwakemeapp/oleksandr.ivanets.dontwakemeapp.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Client not ready yet..Waiting for process to come online
Connected to process 4429 on device Nexus_5X_API_26 [emulator-5554]

Click on below link
http://adbshell.com/downloads
and download the first link with name ADB Kits ( contains adb.exe and necessary .dll files).
After downloading replace these files with the ones in the path
Android/Sdk/platform-tools/
Now click on adb.exe and it will open cmd and will start the adb server.
Now it will detect the device and no problem. OOOOOllllaaaaa.....
If the Problem persists again then do the same... save the folder
somewhere.... just replace files... it will detect the device
automatically then

Preface: Although my answer focuses on Android Studio's perspective of ADB errors, I'm sure it is helpful for Windows ADB debugging in general!
#sHaRkBoY 's answer helped me look in the right direction. I used to get "Unable to detect adb version, adb output:" on Android Studio while trying to "run" the app onto the phone... and no devices showed up when phone was connected to PC.
I had tried all these (from different SO answers) but none of them worked!!!:
"Invalidate cache and restart" from File toolbar.
Turn off and turn on USB debugging on phone multiple times
Experimented with "MTP", "PTP", "Midi" and "Charging" modes to see if ADB detects something...
Checked my anti-virus software to see if adding exceptions to the adb directory works...
Installed various unnecessary C++ re-distributables
Tried a different USB cable (and USB port)
Restarted Android Studio and PC
and even uninstalled and re-installed Android studio!
The problem finally was that the platform_tools\adb.exe file downloaded by the official SDK tool manager was corrupted! So I used to get windows error code 0xc0000142 on launching adb.exe from command prompt! :(
SOLUTION:
For future readers (and victims xD) of the above ADB problem, please do the following:
Firstly, add the platform_tools\ directory into the system path environment variable.
Go ahead and replace the following 3 files in your platform_tools (C:\Users\{YourAccount}\AppData\Local\Android\Sdk\platform-tools) directory. (Please backup the same folder before, just in case.)
ADB kit (internal version number: 32)
Note: Please prefer this ADB kit (exe and dll files), compared to #sHaRkBoY 's ADB kit (2.0.0.0), since it has an updated version of AdbWinUsbApi.dll (2.0.0.1), where a race condition issue has been fixed!
I hope my answer saves your from the traumatic experience I went through while troubleshooting magical ADB for an entire day! :)

Related

Android Studio - Unable to open debugger port: java.io.IOException

I am stuck in a problem here.
I cannot attach debug using Android Studio 3.5.1.
Its keeping showing me the message "Error running 'Android Debugger (8600)': Unable to open debugger port (localhost:8600): java.io.IOException"
I tried a lot of things like:
adb reset
invalidate
restart windows
reinstall android studio
and none of them works.
And I cannot find Enable ADB Integration on this version.
Anyone knows how to fix it?
EDIT
Debugging with emulator is working with all versions.
Debugging with devices is working only with devices with Android 9.0+
Kill and start adb didn't work.
I dont think its a local problem because its happen with a lot of people here. Its seems to be a project problem
You might check this 3 things:
1.
Youre not running a not debuggable version.
android:debuggable="false" in Android Manifest
2.
In Android studio you re not building a release version
Check in Build variants in bottom left corner.
3.
If nothing works use Troubleshoot device connections
Tools -> Connection Assistant
or older version
Tools -> Troubleshoot device connections
And try out the helper page from google (seems for older versions)
https://developer.android.com/studio/run/device#assistant
Try this:
adb kill-server
adb start-server
adb usb
For linux, e.g., ubuntu: start all commands with sudo like this:
sudo adb kill-server.
its your connection issue, cant find your device DNS.
what is your OS ?
In windows:
you must go to network and find duplicate dns and clear it (Search for
it)
In mac:
you must kill adb or delete that and run a new version
last hit is Update emulator in sdk
.First you need to check your build.gradle(app) file , and ensure that your build is debuggable.
.If debuggable then you need to check adb is working or not in your system, you can
check by just press 'adb' .
if its working then check devices by 'adb devices', it will show all connected devices.
add kill-server then enter and adb start-server
Try this. I have had luck with this approach when I run into problems with adb.
You can check if the device is recognised or not using
adb devices
If it is indeed recognised you may try to kill adb and start it again
add kill-server
adb start-server

adb error in android studio

I've tried every proposed solution on the internet and nothing is working. Android studio was working fine then one day out of nowhere it kept giving me this error on every project
unable to locate adb
I tried navigating to my adb.exe and kill-sever and restart it but the adb.exe directory is not in my platform-tools folder under sdk.
I've tried uninstalling android studio and reinstalling it. A post suggested that it could be my AVG security but that was not the issue. I've tried updating the platform-tools and it freezes here
Close android studio.
open a command window.
type adb devices
no devices?
trouble shoot connection and drivers and device developer option
see a device?
type adb shell
type ls -l
type su
su not found? download or activate your superuser app
no problems with any step?
open android studio and try again with it's terminal emulator

Android Studio pm install aborted

Im trying to run an application on my GS5 from android studio and Im getting this:
Waiting for device.
Target device: samsung-sm_g900v-f3af9744
Uploading file
local path: D:\Android\Projects\TestProject\build\outputs\apk\TestProject-debug.apk
remote path: /data/local/tmp/com.brian.testproject
Installing com.datascan.mobilescripts
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.brian.testproject"
Aborted
It seems to be copying the file to the device, I can see it in the /data/local/tmp directory. Its just failing at the "pm install" stage.
On the phone I turned on USB Debugging and authorized the computer. Here is what I get when I run ADB devices:
D:\Android\sdk\platform-tools>adb devices
List of devices attached
f3af9744 device
So that seems to be correct. Im not really sure what the problem is. Google search on the problem didnt give me any relevant results.
Does anyone know how to get more information beyond "Aborted"? Any help is appreciated, Thanks!
EDIT:
As suggested by #AlexP. I ran "adb logcat -d -s PackageManager:*", this was the result:
D:\Android\sdk\platform-tools>adb logcat -d -s PackageManager:*
--------- beginning of main
--------- beginning of system
Not much help, but I did decide to watch the logcat as the pm install was being run and I found this error entry:
Tag=appproc | Text= ERROR: Could not find class 'com.android.commands.pm.Pm'
Tag=art | Text= art.runtime/thread.cc:1105] No pending exeption expected: java.lang.ClassNotFoundException: Didn't find class "com.android.commands.pm.Pm" on path: DexPathList[[zip file "/system/framework/pm.jar"],nativeLibraryDirectories=]/vendor/lib, /system/lib]]
Followed by a whole slew of art error entries.
So it seems as though my phone is missing something, maybe?
The reason that Android Studio fails on Galaxy S5 is because the adbd (ADB service on the phone not your PC), on rooted version of this phone does not run as root, which is a security measure. You can verify this by manually trying to execute the Android Studio apk and execute commands on the device and finding out that they are failing to execute, but retrying them using "su ..." and see that the app installs and starts on the device. There are three options to resolve this and unblock Android Studio:
Options:
Flash a ROM that includes the modification - not desired as from my understanding you would like to stay on the stock image; also a good security measure not to have adbd running as root all the time. Older roms fall in this category as well, but then you are missing Stock Rom updates and security patches.
Create a custom boot.img and flash it to your phone - this is basically a custom kernel and not desired for a similar reasons than above option 1.
Restart adbd on your device with root privileges when doing app development - preferred and achievable fairly easy thru various methods including:
Preferred Solution:
a. Restart adbd with root privileges (insecure mode) by killing the service on the phone and using a terminal app or so to restart it using "su". After you are done with your app development, restart your phone and adbd will be back in secure mode, restoring the security measures.
b. Use Chainfire's ADB insecure app, which is free on XDA (download/link below) or pay for it on Google Play to support his work. You can toggle the mode in the app. In the app, you also have an option to auto re-enable the insecure mode on reboots.
References:
https://android.stackexchange.com/questions/5884/is-there-a-way-for-me-to-run-adb-shell-as-root-without-typing-in-su
http://forum.xda-developers.com/showthread.php?t=1687590 (includes free download link)
https://play.google.com/store/apps/details?id=eu.chainfire.adbd (for supporting Chainfire's work)
Possible Solutions :
1. Check if your app had left any datas :
First if the app is already installed, then clean cache data and uninstall it
Under "System Settings" then "Application Manager"
http://i.stack.imgur.com/b3oys.jpg
Then
Force uninstall by running & adb shell pm uninstall com.brian.testproject
Check "/data/data/com.brian.testproject/" and delete it
Remove any entries of your package on /data/system/packages.xml
Remove any entries of your package on /data/system/packages.list
Also you could install SDMaiD and clean your device, especially with "CorpseFinder" and "AppCleaner"
2. Try to install the app manually and debug the result :
In your case you have an issue with pm over android studio... install it manually to have a more detailed message over command line
$ adb push D:\Android\..\TestProject-debug.apk /sdcard/myapp.apk
$ adb shell pm install /sdcard/myapp.apk
3. Check Android Studio and your app sources
Change the targeted api level :
Right click on your app dir + Open Module Settings + app + check sdk version + change target and minimum under "Flavor"
Sync gradle button
Rebuild project
https://www.youtube.com/watch?v=v4b7C6Q-9dI
Update your android studio if you don't have the last release
If your app use libraries, you have to recompile them.
4. Check System Settings :
Check BOOTCLASSPATH of your init.rc. BOOTCLASSPATH must include /system/framework/ext.jar and /system/framework/framework.jar and so on.
Check DEXPREOPT_BOOT_JARS of build/core/dex_preopt.mk. DEXPREOPT_BOOT_JARS must include ext and framework and so on.
The order of all items on BOOTCLASSPATH must be equal to the order of all items on DEXPREOPT_BOOT_JARS.
5. Try pm command directly on the device :
if pm command does not work try that command with a terminal directly on the phone to see if it's a connection issue between pc and phone
pm install /sdcard/myapp.apk
6. Reinstall your rom once again (just reinstall it) no need to erase.
For anyone having this same issue, unfortunately the only solution that I could find was to downgrade my ROM version (to OA8). Once I did that, adb works perfectly. If anyone finds a better solution I'd be definitely like to know.
Android Studio
step 1: Go to file--> invalidate and restart.
step 2: Clean and rebuild project.
step 3: go to project folder run
gradle clean
step 4: restart phone/Emulator.
Done !!!

ADB not responding. You can wait more,or kill "adb.exe" process manually and click 'Restart'

I have installed Android Studio.
Then I have updated the Android SDK.
Now when I start Android Studio, this message pops up:
ADB not responding. You can wait more,or kill "adb.exe" process manually and click 'Restart'
The dialog has 3 options: Wait more, Restart and Cancel.
But all of them
gives me the same result, i.e. a message Waiting for ADB appears and I can't do anything with Android Studio.
I have to kill the program using windows task manager! I'm using windows 7.
Can anyone help me on this?
Go to
Tools > Android > (Uncheck) Enable ADB Integration
(if studio hangs/gets stuck end adb process manually)
then,
Tools > Android > (Check) Enable ADB Integration
On my macbook pro, i was occasionally getting this in Android Studio. The following resolved it for me:
Open up a Terminal and, instead of using 'adb kill-server', use this:
$ killall adb
wait a minute and it looks like Android Studio automatically restarts adb on it's own.
From the command prompt run the command adb kill-server. This will shutdown ADB and android studio or Eclipse if you were to use that, would show Waiting for ADB as you said.
Once ADB has shutdown down run adb start-server or run adb devices which will automatically start the adb service and show that your android emulator or development devices has successfully connected.
If you are suffering from "ADB not responding. If you’d like to retry, then please manually kill ‘adb’ and click ‘Restart’ or terminal appear Syntax error: “)” unexpected"
then perhaps you are using 32bit OS and platform-tools has updated up 23.1.
The solution is to go back to the platform-tools 23.0.1.
You can download the platform-tools 23.0.1 for Linux here , for windowns here and Mac here
After the download, go to your sdk location > platform-tools folder to delete old platform-tools in sdk and paste down into the downloaded one.
Woohooo ... it should work.
This is a bug with latest ADT.
For me, on Windows 7, killing the ADB server and restarting it via command line did not help. It would not start up successfully.
>adb kill-server
>adb start-server
* daemon not running. starting it now on port 5037 *
ADB server didn't ACK
* failed to start daemon *
So killing the adb.exe process via Task Manager was actually the easiest solution that case.
Check if any service is listening on port 5037, and kill it. You can use lsof for this:
$ lsof -i :5037
$ kill <PID Process>
Then try
$ adb start-server
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
This solved my problem.
I ran into this problem and tried a number of solutions on my Mac without any success. I finally got to work with the commands below:
$ rm -rf ~/.android
$ killall adb
$ adb devices
Note that rm -rf ~/.android will remove any AVDs that you have configured, so don't take this step lightly. Personally I had to though and I'm not sure why. Hopefully this helps someone.
This issue could be because adb incompatibility with the newest version of the platform SDK.
Try the following:
If you are using Genymotion, manually set the Android SDK within Genymotion settings to your sdk path. Go to Genymotion -> settings -> ADB -> Use custom SDK Tools -> Browse and ender your local SDK path.
If you haverecently updated your platform-tools plugin version, revert back to 23.0.1.
Its a bug within ADB, one of the above must most likely be your solution.
I run netstat -nao | findstr 5037 in cmd.
As you see there is a process with id 3888. I kill it with taskkill /f /pid 3888
if you have more than one, kill all.
after that run adb with adb start-server, my adb run sucessfully.
1.if your phone system is over 4.2.2 , there will be
2.disconnect the USB and try again or restart your phone
3.After after all try , it didn't work. It may be a shortage power supply so try other usb interface on your computer.
I solved the problem doing the first step . anyway have try.
If you need to kill all adb processes on windows with one command, you can do it as follows:
taskkill /F /IM adb*
I had this problem and solved it by this way...
I had a app in my pc that used adb...
I tried to disable it but still my android studio's adb had problem
after unistall that application and problem solved.
I had the same problem. I have restarted ADB in any possible way, I have killed the process and restarted the PC with no results.
Then I found this plugin. Just download and install it in your Android Studio IDE. Under Tools -> Android you have a menu ADB Idea. Here you can kill, start, restart, clean ADB.
None of the above helped me completely. Although Oventoaster made me think. I had a couple of adb on my system. Removed them almost all.
I am running android studio on ubuntu 14.04 64 bit.
So I checked manually /home/xxxxx/Android/Sdk/platform-tools/adb
where xxxxx was my linux username
this gave
/home/xxxxx/Android/Sdk/platform-tools/adb: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
https://stackoverflow.com/a/27415749/4453157
solved it for me.
If the above CMD command option is not working and you cannot make it work in any other way then follow this below.
Click on below link
http://adbshell.com/downloads
and download the first link with name ADB Kits ( contains adb.exe and necessary .dll files).
After downloading replace these files with the ones in the path
Android/Sdk/platform-tools/
Now click on adb.exe and it will open cmd and will start the adb server.
Now it will detect the device and no problem. OOOOOllllaaaaa.....
If the Problem persists again then do the same... save the folder
somewhere.... just replace files... it will detect the device
automatically then
I had this problem on Windows 8, but I solved the problem by updating all of Android Studio's plugins with the SDK Manager, then restarting the computer.
An another one: you might want to avoid running Eclipse and Android Studio together, it helped me.
I had this problem on Windows 7. My situation is this through SDK Manager. I only download API 19 but I had not downloaded related Android SDK build-tools. So it occur this problem.
I went through SDK Manager download build-tools 19 to fix it. Hope to give you help.
Faced this issue on Mac:
I have tried different solution, But below works for me -
Uninstall "Vysor" plugin if you have installed for Chrome
Under Home folder > find .Android folder and move to trash
Goto, Android sdk > delete/move to trash platform-tools folder
Again install/download from Android SDK Manager
Open terminal -
adb kill-server
adb start-server
Check adb devices, It will work and display you all connected devices.
Hope it helps !
there seems to be about a million reasons this bug happens, but for me (running on ubuntu), it was openvpn running in the background that caused it.
I killed the openvpn service and no more issues.

Error "The connection to adb is down, and a severe error has occurred."

I've spent days trying to launch any Android program. Even "Hello World" gives me the same error:
"The connection to adb is down, and a severe error has occurred".
I'm running Eclipse v3.5 (Galileo), Google APIs 2.2.8, on a Windows XP machine.
I've used all the tricks I can find on the web: the command line "adb kill-server", the DDMS "reset ADB", I started the emulator both before and after Eclipse, and searched for ports being used by other programs.
What is going on here? Is there a magic combination of versions of Eclipse, Java, ADB, emulator, and whatever else that works?
Try the below steps:
Close Eclipse if running
Go to the Android SDK platform-tools directory in the command prompt
Type adb kill-server (Eclipse should be closed before issuing these commands)
Then type adb start-server
No error message is thrown while starting the ADB server, then ADB is started successfully.
Now you can start Eclipse again.
It worked for me this way.
Restart your phone as well!
Use:
Open Task Manager → Processes → adb.exe → End Process → restart Eclipse
This worked for me.
And:
Open Task Manager → Processes → eclipse.exe → End Process → restart Eclipse
Open up the Windows task manager, kill the process named adb.exe, and re-launch your program.
[2012-07-04 11:24:25 - The connection to adb is down, and a severe error has occurred.
[2012-07-04 11:24:25 - You must restart adb and Eclipse.
[2012-07-04 11:24:25 - Please ensure that adb is correctly located at '/home/ASDK/platform-tools/adb' and can be executed
I realized the folder of the project in Eclipse was closed. I expanded the directory and the project launched. I know this may sound like a "no-brainer". I had the .java files open on the workspace, and that was enough to make me think the project was open.
I tried this using Eclipse Juno and it worked fine:
From the dropdown of the Run icon, select option Run Configuration.
Make sure your project is selected
Go to tab Android
Under section Launch Action, select Launch Select the package name
and voila! try running your application.
UPDATE: It also helps to kill the process adb.exe from the task manager and restart it. adb.exe can be found here: Android\android-sdk\platform-tools.
Good luck
Update your Eclipse Android development tools. It worked for me.
Make sure it's not running in the task-manager processes. If so, end the process and then start it from a command prompt as in a previous answer. This worked for me.
In my situation: I have the same warning:
The connection to adb is down, and a severe error has occured
I have found the solution:
The adb.exe was moved from: android-sdk-windows\tools\adb.exe to
android-sdk-windows\platform-tool\adb.exe.
Only thing. Move file adb.exe to \tools. And restart Eclipse.
I know this question has already been answered, but thought I might add that I found the problem to be folder permissions on my android-sdk directory.
I tested it out by granting Full Control to Everyone (dodgy, I know...), and the problem went away. I am not sure yet what the specific mix of permissions might be that it was looking for, but I assume some or other service in Eclipse didn't have execute permissions on adb.exe. That said, I'm a complete noob to this - just wanted to put it out there in case someone else had some insights into this.
I am running Windows 7, 64-bit, 4.2.0 Eclipse, and 20.0.0v201206242043 ADT.
Go to the folder platform-tools in cmd folder platform tools available in the Android folder where you have Android backup files.
Type the following
adb kill-server
and
adb start-server
then type
adb devices
adb kill-server
You can now see your device.
This problem has been plaguing me for days until I finally figured out what was causing it. It got so bad I couldn't even update my apps even after trying all the above suggestions.
HTC Sync also runs a process called adb.exe. HTC Sync is an optional program available when installing the HTC USB driver. I had recently updated my installation of the HTC bundle and apparently hadn't installed HTC Sync before. Checking properties on adb.exe in the Task Manager showed it to belong to HTC Sync, not Android.
As soon as I uninstalled HTC Sync from the control panel the problem disappeared! (It's listed separately from the USB driver so that can stay.) I never saw more than one instance of adb.exe running. I'm curious to know if people having to kill the process from Task Manager, check to see if it's actually the Android process you are killing?
Please read user comments (I too have a HTC Thunderbolt):
http://www.file.net/process/adb.exe.html
Simply go in Task Manager (windows users) and kill the abd.exe (it is remaining active somehow).
After that start Eclipse.
The error
"The connection to adb is down, and a severe error has occured"
happened after installing plugin for Android of Netbeans. After closing Netbeans the process abd.exe remained active. When you want to start again Eclipse ... you will get the error.
You have to manually kill the adb.exe and then start Eclipse.
It worked for me.
I had the same problems, and it turned out that my antivirus program (Comodo) sandboxed the adb.exe, and that is why it didn't work. I closed the antivirus, and it worked just fine. Consider that.
My problem was that my firewall was preventing ADB from binding to the port it wanted to.
I had the same problem
I entered Task manager -> find adb.exe -> end process
Go to the Android SDK tools directory in Command Prompt double click adb.exe
That's all
I am running Eclipse Neon2. on Mac OS 10.12.4 and I experienced this issue after recently upgrading my Android SDK to the latest "SDK Tools" (v 25.2.5), "Platform tools" (v 26) and "Build Tools" (v 26) and moving one of my development projects to Android Studio.
Unfortunately none of the many answers here worked for me.
What did work was to create a separate copy of the Android SDK in a different folder and then point Eclipse to it via "Preferences --> Android". You will have to use an older version of the SDK as indicated in this SO answer.
Once you've downloaded the separate version of the SDK and put it in a different folder than your main Android SDK, launch the SDK Manager (via <separate-sdk>/tools/android) and install the required "Platform tools", "Build-tools" and Android versions. There are two important things to observe here though:
Make sure that you do not upgrade your "SDK Tools" beyond the version that's already installed!
Make sure that you install a version of the "Build tools" that is less than 26!
Otherwise you may run into this issue.
Go to the tools folder of your Android SDK
Run emulator.exe -avd <your avd>. It will take some time for the emulator to run.
Once you see the homescreen on your emulator, open Eclipse and run your program again...
I had a similar problem. I found out that there was another adb.exe running which was started from BirdieSync (Sync Tool for Thunderbird). I found out with Process Explorer from Sysinternals, that Windows was running another incompatible adb.exe. Just put the mouse cursor above the process (in Process Explorer), and you'll see which adb.exe is started.
I had to kill the BirdieSync process as well, because it started the wrong adb.exe again.
Then I could start the right adb.exe, and it worked fine.
The killing of the mysteriously running abd.exe worked. This sudden roadblock stopped me for a long time. I was doing all sorts of command line stuff and removed the lock icon from my user folder, but nothing worked until your simple suggestion of looking for the abd in the running processes of the task manager and killing it.
Another newbie roadblock I discovered an answer to: don't run Eclipse when any file other than the main .java file is active. If you run it when, for example, the main.xml file is active, you will get unhelpful error messages, an odd file created like main.xml.out, and it wont run.
I found the path of the SDK (Preferences* → Android → SDK Location) was the cause. My SDK path was the following:
C:\Program Files (x86)\Android\android-sdk
The spaces in the path is the problem. To get it to work, you must change Program Files (x86) to Progra~2
The complete right path is C:\Progra~2\Android\android-sdk.
Now it should work.
The previous solutions will probably work. I solved it downloading the latest ADT (Android Developer Tools) and overwriting all files in the SDK folder.
http://developer.android.com/sdk/index.html
Once you overwrite it, Eclipse may give a warning saying that the path for SDK hasn't been found, go to Preferences and change the path to another folder (C:), click Apply, and then change it again and set the SDK path and click Apply again.
Close Eclipse
Use this in the terminal:
sudo killall -9 adb
Run Eclipse.
If you are using the Genymotion emulator:
Make sure that the SDK path used for Genymotion is also the same path used for the Eclipse.
This error also occurs if those two paths are different.
I've tried the above methods, end the adb process through task manager and all, it didn't work. But when I ran the adb.exe file as admin it worked fine.
Here is a script I run to restart adb (Android Debug Bridge) server:
#!/usr/bin/env bash
## Summary: restart adb (Android Debug Brdige) server.
## adb binary full path
ADB_BIN=./adb
if pgrep adb >/dev/null 2>&1
then
echo "adb is running"
echo "terminating adb ..."
$ADB_BIN kill-server
if pgrep adb >/dev/null 2>&1
then
echo "did not work"
echo "kill adb processes by killall"
killall -9 adb
else
echo "terminated"
fi
else
echo "adb is not running"
fi
echo "starting adb ..."
$ADB_BIN start-server
echo "adb process:"
echo `pgrep adb`
echo "done"
# END
Last time I faced this problem, was solved with adb restart. If you have tried adb kill-server and adb start-server with no luck you might want to try this. When again I faced the same issue I tried all the above answers, with no luck, and this was the last option to try. It did work like a charm.
Goto Android SDK Manager >> Install the essential packages.
maydenec is correct (in my case...). The file was moved.
I even found this file:
C:\Program Files (x86)\Android\android-sdk\tools\adb_has_moved.txt
Which explained this issue.
Suggestions in this file:
Install "Android SDK Platform-tools".
Please also update your PATH environment variable to
include the "platform-tools/" directory.
It worked for me to start my AVD emulator first (from the AVD manager), and then to run my program. The other stuff mentioned here.
(Restarting the ADB server didn't work though.)
Eclipse → preferences → Android → NDK
Check the "NDK Location" path is set correctly, and use the browse button to set it.
AndroidSDK → Platform Tools → Kill did not work.
But after restarting my computer, it worked.

Categories

Resources