adb devices command shows nothing - android

At the moment I'm busy with the Android SDK. I got it working, but when I entered $sudo adb shell. It gave sudo: adb: command not found. For this problem I checked this link: adb devices command not working But if I enter $sudo adb devices now. Noting happens.
Not even *daemon not running. starting it now op port 5037 * and the rest. But it looks like this:
michiel#ubuntu: ~$ sudo adb devices
michiel#ubuntu: ~$
So I can enter the next command. Someone knows how to fix that? It's the same with $sudo adb shell. Nothings comes up.
When I enter adb devices without the sudo. I get the error:
-bash: /usr/local/sbin/adb: No such file or directory.
But it's there!
echo $PATH = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/michiel/jdk1.6.0_29/bin:home/michiel/android-sdk-linux/tools:/home/michiel/android-sdk-linux/platform-tools
Edit
When I start Eclipse now, I get the next error: Failed to get the adb version: Cannot run program"/home/michiel/android-sdk-linux/platform-tools/adb":java.io.IOException:error=2, No such file or directory.
SOLVED
Last weekend I installed a clean install of Ubuntu. I downloaded the ia32.lib and openjdk instead of java jdk and install is manually. After some struggling I managed to connect the device and now I can see it. Thx for the help :)

I also had this problem two days ago and I searched and searched so I found that my ubuntu is 64-bit and adb is not match to ubuntu 64-bit so I used the below command in terminal:
sudo apt-get update
sudo apt-get install ia32-libs
and my problem was solved
don't forget, you should export your java-version-sdk.

Try adding the following at the end of your .bashrc file (can found in your home directory):
export PATH=:/home/michiel/android-sdk-linux/platform-tools:$PATH
Now use the adb command without sudo. This solved the problem for me.
HTH!

try to kill & start the adb server
cmd
adb kill-server
adb start-server

I think you are running on the linux platform so for that running binary will be followed by .
try with sudo .adb devices
or try with sudo .adb shell

Check adb is available in your android sdk --> platform-tools. If it
available Follow these steps:
Set android vars
Initially go to your home and press Ctrl + H it will show you hidden
files now look for .bashrc file, open it with any text editor then
place the lines below at the end of file:
export ANDROID_HOME=/myPathSdk/android-sdk-linux export
PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
Now Reboot the system
It Works!

Related

Conflict of path variables in Ubuntu (Android_home)

when I type whereis adb, it says this
/usr/bin/adb /usr/share/man/man1/adb.1.gz
but when i type echo $ANDROID_HOME, it says this
usr/lib/android-sdk/
... how to resolve this conflict? I believe it started after I installed MonoDevelop
because I have to type sudo adb kill-server and sudo adb start-server to get it to recognize certain devices, and it sometimes says adb server is out of date starting a new one and none of these are good signs. Thanks.

How to restart android adb using terminal on macOS?

I keep having an issue with the Android Studio ADB not recognizing my devices. So far, the only solution I've found is to do a complete reboot of my entire computer, which isn't practical. I'd like to be able to restart the ADB from terminal, because I have seen other posts on here that claim it will fix the issue. However, I can't figure out where to use the commands "adb kill-server", because doing it at the base directory returns a "command not recognized". Can somebody help me figure out how to navigate into Android from terminal and use the command? Or, does anybody have another solution to the original problem of Android Studio not recognizing my devices?
Thanks in advance! Sorry for the wordiness.
blackbelt:~ blackbelt$ adb kill-server
blackbelt:~ blackbelt$ adb start-server
works on Linux as well as on Mac. In my machine, adb is in PATH
"command not recognized". Can somebody help me figure out how to
navigate into Android from terminal and use the command? Or, does
anybody have another solution to the original problem of Android
Studio not recognizing my devices?
In your case adb is not declared in PATH. You can either export the PATH, or specify the full qualified path to adb in the command line. E.g.
blackbelt:~ blackbelt$ /path/to/platform-tools/adb kill-server
blackbelt:~ blackbelt$ /path/to/platform-tools/adb start-server
or
blackbelt:~ blackbelt$ ./adb kill-server
blackbelt:~ blackbelt$ ./adb start-server
if you are inside platform-tools
Well instead of doing it through command line, if you find that hard you can also do the same from android studio.
Go to tools -> Android -> Android device monitor . Then it will open the separate window where you can see all the devices or emulator attached to the process. On the left hand side below the Devices tab there will be and menu bar, you need to click on the drop down arrow which will give you the option to reset the adb. Here is the image for reference
If you are using windows try to update the device driver for your device make sure the adb is correctly installed. When you connect your device to system see if it is allowed to be used at the system.
if adb kill-server not responding. Find the process id (PID) by typing top in terminal and finding PID next to adb. Then type kill <PID>
For example, for me PID for adb was 70163. Then i typed kill 70163
Simply stop adb:
adb kill-server
Then you can start it again any time:
adb start-server

ADB will not run

I just installed the android SDK with eclipse, straight from google's webpage, but for some reason it won't run, even when I am in the correct directory. When I use 'ls' (crunchbang linux) it show's that the file is there, but when I try to run it, it returns no such file or directory. Any ideas?
type script in your command if you adb configured.
adb stop-server
adb start-server
adb devices

Must do adb kill-server and start-server everytime to recognize android device in Ubuntu

I'm developing android apps in eclipse and I upgraded recently from Ubuntu 12.10 (Quantal Quetzal) to Ubuntu 13.04 (Raring Ringtail).
In the previous Ubuntu version I had zero problems in recognizing my android device.In this new Ubuntu version I must do:
sudo adb kill-server
and
sudo adb start-server
in order to Ubuntu recognize my android device.
Everytime I restart my computer it appears question marks in eclipse when I try to debug an app, and I have to run these command lines everytime to make it work.
Anyone knows if there is a way to recognize my phone permantelly?
adb "flakiness" is a common problem, you have the right idea to start adb with root permissions.
If you have eclipse running and run it as two separate commands, there is a chance that eclipse will have tried to startup adb as a non-root user before you have run your start-server, so I recommend running in a single command line:
sudo adb kill-server && sudo adb start-server
Also you want to make sure you have only one copy of the sdk installed and that eclipse is using the same copy as is on your path at the command line.
Possibly could throw the run-as-root logic into an init script so that when you restart the computer it comes up as root - I haven't tried this though, always just "control-r, start-ser" from the command line =)
I had the same problem and solved it by
just change the owner of adb to root and restart then in future the problem won't happen again.
use this:
sudo chown root:root -R /opt/..../sdk/platform-tools/*
sudo /opt/..../sdk/platform-tools/adb kill-server
sudo /opt/..../sdk/platform-tools/adb start-server

Setting up android phone with eclipse

I have been developing a project app to learn about android, I can upload my app to my htc desire on my desktop using linux ubuntu and eclipse, I have the same setup on my laptop but I cannot upload apps to my phone. When I try to install the app to the phone it shows up in avd manager as ??????? ????? Unknown, I've googled this and the general advice is to setup a script which I have tried but I get an error message saying path does not exist, when I try to kill the adb server it says no such command even though I am in root and can see the adb file in the sdk folder, I am completely lost here anyone help with this.....
Thanks in advance
Looks like you are running Linux on your laptop. Try these steps as your normal user:
If you haven't already set up the udev rules for your device, follow these steps:
1. sudo gedit /etc/udev/rules.d/51-android.rules
2. copy/paste this line into that rules file: SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
3. sudo service udev restart
Then, restart the adb server:
cd </path/to/your>/android-sdk/tools directory
sudo ./adb kill-server
sudo ./adb start-server
If it's not there already, you can add the /path/to/your/android-sdk/tools to your $PATH variable so you don't need to cd to the directory and also won't have to use the ./ to use the adb command.
You may need to unplug/replug the USB cable to your phone after you do all this.

Categories

Resources