Question

I did set up of Android, Java and Eclipse to start up my project but soon after running my emulator a few times I got error like “The connection to adb is down, and a severe error has occured.”

I referred to this question and got answer but while running adb from command prompt I am getting error as "'adb' is not recognized as an internal or external command,operable program or batch file."

How to run this adb commands without admin rights on machine?

Était-ce utile?

La solution 2

You getting error like "'adb' is not recognized as an internal or external command,operable program or batch file." has nothing to do with your admin rights.

Follow the steps:

  1. Go to folder location where your 'adb.exe' is located.
  2. copy the path and open cmd prompt and paste your folder location Example: C:\Users\298xxx>C:\Android\adt-bundle-windows-x86-20131030\adt-bundle-windows-x8 6-20131030\sdk\platform-tools\adb.exe
  3. Run any adb command you want like C:\Users\298xxx>C:\Android\adt-bundle-windows-x86-20131030\adt-bundle-windows-x86-20131030\sdk\platform-tools \adb.exe devices List of devices attached emulator-5554 device

Problem is that in machine you need to set path of ADB.exe in system properties but you didn't had access as admin which don't allowed you to open/work directly with system related things like install/uninstall/path setting and many more.

Another way to do the same is

  1. press ctrl+alt+del to open task manager
  2. Go to File --> New Task -- > and copy paste the path of you adb.exe (space) devices to check for devices attached to your machine.

Autres conseils

but while running adb from command prompt i am getting error as "'adb' is not recognized as an internal or external command,operable program or batch file."

This is usually a path problem.

Linux

This is usually one of two problems on Linux.

First, adb is simply not on path. Its located in <Android SDK>/platform-tools, so platform-tools needs to be on path. To ensure its on path, you want something like this in your login script (.bashrc, .bash_profile, etc). Below is from Mac OS X and .bash_profile:

export JAVA_HOME=`/usr/libexec/java_home`

export ANDROID_NDK_ROOT=/opt/android-ndk-r9c
export ANDROID_SDK_ROOT=/opt/android-sdk-macosx   

export PATH="$ANDROID_SDK_ROOT/tools/":"$ANDROID_SDK_ROOT/platform-tools/":"$PATH"

Second, the problem can occur on Linux if its x86_64 and you don't have ia32_libs installed. Tools like adb are 32-bit, so you need to install ia32_libs for the entire 32-bit subsystem for 64-bit Linuxes.

Windows

Windows has a PATH variable, and it can be adjusted per-user. Ensure <Android SDK>/platform-tools is on path in Windows. It would not hurt to ensure <Android SDK>/tools is on path also.

enter image description here

If you add a %PATH% variable, you can copy it from the System's %PATH% first. Then modify your copy.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top