While implementing the BluetoothChat application .apk inside G1 device, it always pops up a message:
$adb install -r /home/parveen/workspace/BluetoothChat/bin/BluetoothChat.apk
-bash: adb: command not found
I am not getting clearly why this error is popping up every time. Please help me.
Thanks in advance. Praween
I found the solution to my problem. In my
~/.bashrc
:export PATH=${PATH}:/path/to/android-sdk/tools
However
adb
is not located in theandroid-sdk/tools/
, rather inandroid-sdk/platform-tools/
. So I added the followingexport PATH=${PATH}:/path/to/android-sdk/tools:/path/to/android-sdk/platform-tools
And that solved the problem for me.
creating a symbolic link was the solution for me either. However before working I had to grant access and execute rights to the created symbolic links.
I am not sure if it was @eaykin's answer or @crazymacleod's that worked for me, as I did both before finding the above mentioned solution.
Thanks!
I had this problem when I was trying to connect my phone and trying to use adb. I did the following
export PATH=$PATH{}:/path/to/android-sdk/tools:/path/to/android/platform-tools
apt-get install ia32-libs
Connected my phone in USB debug mode and In the terminal type lsusb to get a list of all usb devices. Noted the 9 character (xxxx:xxxx) ID to the left of my phone.
sudo gedit /etc/udev/rules.d/99-android.rules
Add [ SUBSYSTEM=="usb", ATTRS{idVendor}=="####:####", SYMLINK+="android_adb", MODE="0666" GROUP="plugdev" TEST=="/var/run/ConsoleKit/database", \ RUN+="udev-acl --action=$env{action} --device=$env{DEVNAME}" ] (whatever is in [...] )to the file and replace "####:####" with the number from step 3cop
sudo service udev restart
Restarted my System
open terminal browse to adb directory and run
./adb devices
And it shows my phone hence adb starts working without error.
I hope it helps others
Updating the path as listed above in ~/.bashrc makes other bash commands stop working all together. the easiest way I found is to use what eaykin did but link it your /bin.
No restart is required just type following command -
To make sure it's working.
NOTE: while using adb on Linux you'll need to type ./adb to execute adb commands unless you create a path in ~/.bashrc. In a terminal write:
sudo gedit ~/.bashrc
Add the following line at the end of the file. Once you're done, save and exit.
Android tools
export PATH=~/Development/adt-bundle-linux/sdk/platform-tools:~/Development/adt-bundle-linux/sdk/tools:$PATH
Then in a Terminal run this command to reload your .bashrc: Code:
source ~/.bashrc
Now you can just run adb without put ./ before every command.