adb command not found in linux environment

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


Solution 1:

Updating the path as listed above in ~/.bashrc makes other bash commands stop working altogether.

the easiest way I found is to use what eaykin did but link it your /bin.

sudo ln -s /android/platform-tools/adb /bin/adb

No restart is required just type following command :

adb devices

To make sure it's working.

Solution 2:

I found the solution to my problem. In my ~/.bashrc:

export PATH=${PATH}:/path/to/android-sdk/tools

However adb is not located in the android-sdk/tools/, rather in android-sdk/platform-tools/. So I added the following

export PATH=${PATH}:/path/to/android-sdk/tools:/path/to/android-sdk/platform-tools

And that solved the problem for me.