简体   繁体   中英

Getting ADB to work in Ubuntu

After searching around throughout the net, it seems like the issue of the operating system not being to recognize the adb tool, or any other platform tool (for that matter), has been common.

What I'm hoping to understand is that, if one were to modify their ~/.profile so it resembled the following:

 20 if [ -d "$HOME/bin" ] ; then
 21     PATH="$HOME/bin:$HOME/android-sdks/platform-tools:$PATH"
 22 fi

Why is it that the adb is still not recognized, even when (while in the relevant directory of course), I do a ./adb ?

I would check and see if you have a ~/.bash_profile or ~/.bash_login , which would take precedence if you are using Bash.

I personally use this in ~/.bash_profile

# --- add Android platform-tools directory
PATH=~/android-sdks/platform-tools:$PATH
export PATH

Please update the PATH in /etc/profile

PATH=$PATH:/home/user/android-sdk-linux_x86/platform-tools:/home/user/android-sdk-linux_x86/platforms:/home/user/android-sdk-linux_x86/tools
export PATH

I personally use this in /etc/profile this will work for any user.

Hope this will help you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM