• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Help Problems with adb (debian Bookworm)

Davdi

Android Expert
I've installed platform tools, and when I cd into the directory and try to run adb devices, I get a message 'Bash command not found.' I've not had this problem previously (always on Linux PCs). I've not wanted to use adb/fastboot for a few years, am I missing something obvious/not obvious?
 
I've installed platform tools, and when I cd into the directory and try to run adb devices, I get a message 'Bash command not found.' I've not had this problem previously (always on Linux PCs). I've not wanted to use adb/fastboot for a few years, am I missing something obvious/not obvious?
are you sure you are cd in the right folder? what exactly are you trying to do?
 
I'm in the right folder (/home/david/Android/Sdk/platform-tools/) I have an old HTC One M9 that I think has become corrupted. I want to do a factory reset via adb as I can't do anything on the phone - I keep getting the message 'com.android.gapps has stopped'
 
I'm in the right folder (/home/david/Android/Sdk/platform-tools/) I have an old HTC One M9 that I think has become corrupted. I want to do a factory reset via adb as I can't do anything on the phone - I keep getting the message 'com.android.gapps has stopped'
hmmmm well, are you sure you have the right adb files? maybe there was a problem where your computer did unzip the file correctly. i would start over and download and unzip a new sdk-platform tools file.
 
I've installed platform tools, and when I cd into the directory and try to run adb devices, I get a message 'Bash command not found.'
Those commands are not in your $PATH. Since you cd into the directory where they exist, you must precede the commands with the current directory '.', e.g. :
Code:
./adb devices
Instead of having to cd, it's far easier to create a symbolic link (symlink) so that they are in your $PATH (you can copy-n-paste these code blocks to make life easier), e.g. :
Code:
echo $PATH
/home/david/.local/bin:/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/snap/bin
Code:
ln -s /home/david/Android/Sdk/platform-tools/adb /home/david/.local/bin/adb
ln -s /home/david/Android/Sdk/platform-tools/fastboot /home/david/.local/bin/fastboot
Then you can invoke adb and fastboot from whatever directory you're in without cd or the relative||absolute pathname to the commands.
 
Last edited:
Back
Top Bottom