Wrong "Add the path to you PC configuration" section in "install-adb" instructions
Summary
In my opinion the "Add the path to you PC configuration" section of https://doc.e.foundation/pages/install-adb is completely wrong.
Description
It says to add the following lines to .bashrc
export PATH=$PATH:$HOME"/platform-tools"
export ANDROID_HOME=/platform-tools
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
I see several problems here
- the first line would take
adb
andfastboot
from the distribution, not the manually installed (and likely more recent) ones which AFAIK would be a problem when flashing a GS290 or FP3- if the
$PATH
variable already contains a folder with a space in its name it will create a syntax error
- if the
- it seems that the second line is missing a
$HOME
before/platform-tools
- the way I understand https://developer.android.com/studio/command-line/variables
$ANDROID_HOME
is meant to point to the full SDK, not just theplatform-tools
subdirectory
- the way I understand https://developer.android.com/studio/command-line/variables
- the third line is plain wrong
What is the improved behavior?
I think this should be the line to add to .bashrc
export PATH="$HOME/platform-tools:$PATH"
That way
- the manually installed tools take precedence over the distribution package's versions
- no syntax error if a path contains a space