adb command not found

后端 未结 20 2294
刺人心
刺人心 2020-12-22 15:32

I need to run an adb forward command before I could use the ezkeyboard application which allows user to type on the phone using browser.

When

相关标签:
20条回答
  • 2020-12-22 16:23

    If you don't want to edit PATH variable, go to the platform-tools directory where the SDK is installed, and the command is there.

    You can use it like this:

    1. Go to the directory where you placed the SDK:

      cd /Users/mansour/Library/Developer/Android/sdk/platform-tools

    2. Type the adb command with ./ to use it from the current directory.

      ./adb tcpip 5555

      ./adb devices

      ./adb connect 192.168.XXX.XXX

    0 讨论(0)
  • 2020-12-22 16:24

    In my case with Android Studio 1.1.0 path was this

    /Users/wzbozon/Library/Android/sdk/platform-tools

    Add the following to ~/.bash_profile

    export PATH=~/Library/Android/sdk/tools:$PATH
    export PATH=~/Library/Android/sdk/platform-tools:$PATH
    
    0 讨论(0)
  • 2020-12-22 16:26

    if youd dont have adb in folder android-sdk-macosx/platform-tools/ you should install platform tools first. Run android-sdk-macosx/tools/android and Install platform tools from Android SDK manager.

    0 讨论(0)
  • 2020-12-22 16:28

    Is adb installed? To check, run the following command in Terminal:

    ~/Library/Android/sdk/platform-tools/adb
    

    If that prints output, skip these following install steps and go straight to the final Terminal command I list:

    1. Launch Android Studio
    2. Launch SDK Manager via Tools -> Android -> SDK Manager
    3. Check Android SDK Platform-Tools

    Run the following command on your Mac and restart your Terminal session:

    echo export "PATH=~/Library/Android/sdk/platform-tools:$PATH" >> ~/.bash_profile
    

    Note: If you've switched to zsh, the above command should use .zshenv rather than .bash_profile

    0 讨论(0)
  • 2020-12-22 16:29

    This is the easiest way and will provide automatic updates.

    1. install homebrew

      ruby -e "$(curl -fsSL 
      https://raw.githubusercontent.com/Homebrew/install/master/install)"
      
    2. Install adb

      brew cask install android-platform-tools
      
    3. Start using adb

      adb devices
      
    0 讨论(0)
  • 2020-12-22 16:30

    I am using Mac 10.11.1 and using android studio 1.5, I have my adb "/Users/user-name/Library/Android/sdk/platform-tools"

    Now edit you bash_profile

    emacs ~/.bash_profile
    

    Add this line to your bash_profile, and replace the user-name with your username

    export PATH="$PATH:/Users/user-name/Library/Android/sdk/platform-tools"
    

    save and close. Run this command to reload your bash_profile

    source ~/.bash_profile
    
    0 讨论(0)
提交回复
热议问题