LoginSignup
43
33

More than 5 years have passed since last update.

ADBコマンド導入の方法

Last updated at Posted at 2017-06-03

Windowsの場合

Android Studio が入っている方

Windowsのシステム情報 > システムの詳細設計 > 環境変数 で PATH に以下のものを追加します。

C:¥Users¥{ユーザーネーム}¥AppData¥Local¥Android¥sdk¥platform-tools

Android Studio が入ってない方

https://developer.android.com/studio/releases/platform-tools.html

上部リンクから SDK Platform-Tools for Windows をダウンロードします。

任意のフォルダにzipファイルを展開します。

展開したフォルダを開きます。

adb.exeが見える状態でフォルダの PATH を Explorer の上部のバーから取得します。

Windowsのシステム情報 > システムの詳細設計 > 環境変数 で PATH に Explorer で取得した PATHを入力します。

トラブルシューティング

  • 正しく PATH を設定しても adb コマンドが叩けない
    • コマンドプロンプトや叩いているshellを再起動してください。

Macの場合

Android Studio が入っている方

ターミナルを開いて以下を入力します。

echo 'export PATH="$PATH:/Users/{ユーザーネーム}/Library/Android/sdk/platform-tools"' >> ~/.bash_profile

デフォルトの bash 以外を使ってる認識がある方は適宜 .bash_profile をご自分の shell の設定ファイルを変更してください。

Homebrew が入っている方

ターミナルを開いて以下を入力します。

brew install android-platform-tools

それ以外の方

https://developer.android.com/studio/releases/platform-tools.html

上部リンクから SDK Platform-Tools for Mac をダウンロードします。

任意のフォルダに展開します。

展開したフォルダにある adb を右クリックして、情報を見るで場所:以降をコピーします。

ターミナルを開いて以下を入力します。

echo 'export PATH="$PATH:{コピーした場所:以降の値}"' >> ~/.bash_profile

デフォルトの bash 以外を使ってる認識がある方は適宜 .bash_profile をご自分の shell の設定ファイルを変更してください。

トラブルシューティング

  • 正しく PATH を設定しても adb コマンドが叩けない
    • ターミナルや叩いているshellを再起動してください。

Windows / Mac 以外の場合

ggrks

ドラブル情報や編集リクエストお待ちしています。

43
33
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
43
33