{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ja/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Appium 接続ガイド"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"appium-接続ガイド","__idx":0},"children":["Appium 接続ガイド"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["macOS または Windows で、ADB に対応し UiAutomator2 ドライバーの要件を満たす MoreLogin クラウドフォンを Appium Inspector に接続できます。Windows の Android 15 と macOS の Android 15A で一連の接続操作を確認済みです。ADB、Appium Server、Inspector は同じ PC 上で実行してください。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"adb-接続情報を確認する","__idx":1},"children":["ADB 接続情報を確認する"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["MoreLogin デスクトップアプリの ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["プロファイル → クラウドフォン"]}," で対象端末を起動します。行の ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["⋯"]}," メニューから ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["ADB を有効化"]}," を選びます。ADB 列が見えない場合は一覧を横にスクロールし、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["有効"]}," にカーソルを合わせます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/ml-enable.f15fca406b0642892c6d64f82f8293ff2ea998b2247fd5f57ae4c359796fc524.f59a5fd3.png","alt":"ADB を有効にするメニュー"},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["接続アドレスと接続コードが表示されたら、Android 15 の例と同じ直接接続を使います。SSH コマンドとパスワードが表示されたら、Android 15A の例と同じ SSH トンネルを先に作成します。画面に表示されている最新の情報を使用してください。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/ml-popup15.59c6a444c67e1d0293f95d90a2b9076847bc6d300dd700dba298dba5ccc639df.f59a5fd3.png","alt":"直接接続の情報（値は非表示）"},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/ml-popup15a.d5026fe728e2d59573d8d7fe1a88187425b447cf3ff9047fbf2b85311195f787.f59a5fd3.png","alt":"SSH 接続の情報（値は非表示）"},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"android-sdk-と-java-と-nodejs-を設定する","__idx":2},"children":["Android SDK と Java と Node.js を設定する"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Android Studio の SDK Manager で対象の Android バージョンに対応する SDK Platform と ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Android SDK Platform-Tools"]}," をインストールします。JDK 17 と Node.js 24 LTS（npm 10 以降）もインストールします。macOS では例のパスを実際の場所に置き換えます。Windows ではユーザー環境変数を設定するか、Appium を起動する PowerShell で以下のコマンドを実行します。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"macos","__idx":3},"children":["macOS"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"export ANDROID_HOME=\"$HOME/Library/Android/sdk\"\nexport JAVA_HOME=\"$(/usr/libexec/java_home -v 17)\"\nexport PATH=\"$ANDROID_HOME/platform-tools:$JAVA_HOME/bin:$PATH\"\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"windows-powershell","__idx":4},"children":["Windows PowerShell"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"powershell","header":{"controls":{"copy":{}}},"source":"$env:ANDROID_HOME = 'C:\\Android\\Sdk'\n$env:JAVA_HOME = 'C:\\Program Files\\Java\\jdk-17'\n$env:Path = \"$env:JAVA_HOME\\bin;$env:ANDROID_HOME\\platform-tools;$env:Path\"\njava -version\nadb version\n","lang":"powershell"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["adb version"]}," が動くのに Doctor が SDK を見つけられない場合、Windows で ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["(Get-Command adb).Source"]}," を確認します。SDK のルートは ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["platform-tools"]}," を含むフォルダーです。JDK 17 の ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bin"]}," を古い Java より Path の前に置き、ユーザー環境変数を変更した場合は PowerShell を開き直します。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"adb-を接続する","__idx":5},"children":["ADB を接続する"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["直接接続では ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DEVICE_ADDRESS"]}," と ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CONNECTION_CODE"]}," を MoreLogin の値で置き換えます。接続コードの大文字と小文字を区別してください。一覧の ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["device"]}," は ADB の接続状態です。",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Access denied! Invalid password."]}," が出たら、最新の接続コードで認証します。成功時には ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["OK! Login successful."]}," が表示される場合があります。端末のシェルに入ったら ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["exit"]}," で戻ります。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"text","header":{"controls":{"copy":{}}},"source":"adb connect DEVICE_ADDRESS\nadb -s DEVICE_ADDRESS shell CONNECTION_CODE\n","lang":"text"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["SSH を使用する場合は ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ssh -V"]}," でクライアントを確認します。Windows で未インストールなら「オプション機能」で ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["OpenSSH クライアント"]},"を追加します。ターミナルで表示された SSH コマンド全体を実行し、パスワードを入力します。Windows の SSH が ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["-Nf"]}," を受け付けない場合は ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["-N"]}," に変え、ウィンドウを開いたままにします。別のターミナルから MoreLogin が表示するアドレスに接続します。9897 は例のポートです。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"text","header":{"controls":{"copy":{}}},"source":"adb connect localhost:9897\n","lang":"text"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["adb devices -l"]}," で対象の行が ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["device"]}," になっていることを確認します。1 列目をそのまま使って ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["adb -s DEVICE_IDENTIFIER shell getprop ro.build.version.release"]}," を実行します。Android のバージョンが返ったら、同じ識別子を ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appium:udid"]}," に使用します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/api-reference/cloud-phone/adb"},"children":["ADB 接続ガイド"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"appium-と-uiautomator2-をインストールして起動する","__idx":6},"children":["Appium と UiAutomator2 をインストールして起動する"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Appium 3 や UiAutomator2 がインストール済みなら、該当するインストールを省略できます。ドライバーを追加する前にサーバーを停止します。一覧に ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["uiautomator2"]}," が表示されることを確認し、Doctor による ADB と Java のエラーを修正します。両方が検出され、必須項目の残りが ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["emulator"]}," の警告だけなら、ADB に接続済みのクラウドフォンで先へ進めます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"macos-1","__idx":7},"children":["macOS"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"npm install -g appium@3\nappium driver install uiautomator2\nappium driver list --installed\nappium driver doctor uiautomator2\nappium --address 127.0.0.1 --port 4723 --base-path /\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"windows-powershell-1","__idx":8},"children":["Windows PowerShell"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"powershell","header":{"controls":{"copy":{}}},"source":"npm.cmd install -g appium@3\nappium.cmd driver install uiautomator2\nappium.cmd driver list --installed\nappium.cmd driver doctor uiautomator2\nappium.cmd --address 127.0.0.1 --port 4723 --base-path /\n","lang":"powershell"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["サーバーのウィンドウは開いたままにします。別のウィンドウで状態を確認し、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["value.ready"]}," が ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}," になったら次へ進みます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["curl http://127.0.0.1:4723/status"]}," (macOS)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["curl.exe http://127.0.0.1:4723/status"]}," (Windows PowerShell)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://appium.io/docs/en/latest/quickstart/uiauto2-driver/"},"children":["UiAutomator2 のインストール"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"appium-inspector-をインストールして設定する","__idx":9},"children":["Appium Inspector をインストールして設定する"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["macOS では Apple Silicon 用 arm64 または Intel 用 x64 の DMG をダウンロードし、アプリを「アプリケーション」に移動します。Windows では公式 EXE を開き、現在のユーザー向けのインストールを選んで保存先を指定し、インストールを完了します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/appium/appium-inspector/releases"},"children":["Appium Inspector の公式ダウンロード"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["画面の文言は英語に翻訳しています"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/win-setup-steps.1d5d82f64c8166a167cba488022ac777eaafafbce700516aed6ec330180376dd.f59a5fd3.png","alt":"Windows のインストール範囲と保存先 (画面の文言は英語に翻訳しています)"},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/win-finish.cd7d1848bbff51814fc0a58112d0a52be56099e1e63272c0f1f420bcef51e69b.f59a5fd3.png","alt":"Windows でのインストール完了 (画面の文言は英語に翻訳しています)"},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Appium Server"]}," の ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Remote Host"]}," を ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["127.0.0.1"]},"、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Remote Port"]}," を ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["4723"]},"、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Remote Path"]}," を ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/"]}," に設定します。",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["SSL"]}," と ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Use Proxy"]}," はオフにします。",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Capability Builder"]}," の ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["JSON Representation"]}," を編集し、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["localhost:9897"]}," を ADB 一覧の識別子に置き換えます。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"platformName\": \"Android\",\n  \"appium:automationName\": \"UiAutomator2\",\n  \"appium:udid\": \"localhost:9897\",\n  \"appium:noReset\": true\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/win-config.2d5344fa51514e241c2ec951a9df46ae0e952fbc67d78b74f68840f653f211c8.f59a5fd3.png","alt":"Windows の Inspector 設定"},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["保存して ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Start Session"]}," を押します。端末画面と ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["App Source"]}," が表示されたら接続完了です。サーバーに接続できない場合は ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/status"]}," を確認します。端末が見つからない場合は識別子、ADB 認証、SSH トンネルを確認し、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["offline"]}," や ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["unauthorized"]}," を解消してから再試行します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/win-android15-session.c59074d8c5ae9c482ba5ae6a7b0e274bfb54fdbbdc8da8221fe1b6c2aad33564.f59a5fd3.png","alt":"Windows の Android 15 セッション"},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/ins-live-session.5ddc67ab553c8e01fff640fcadcaf3101e727d67d6a1218b8c6a5f2f37fb5d07.f59a5fd3.png","alt":"macOS の Android 15A セッション"},"children":[]}]}]},"headings":[{"value":"Appium 接続ガイド","id":"appium-接続ガイド","depth":1},{"value":"ADB 接続情報を確認する","id":"adb-接続情報を確認する","depth":2},{"value":"Android SDK と Java と Node.js を設定する","id":"android-sdk-と-java-と-nodejs-を設定する","depth":2},{"value":"macOS","id":"macos","depth":3},{"value":"Windows PowerShell","id":"windows-powershell","depth":3},{"value":"ADB を接続する","id":"adb-を接続する","depth":2},{"value":"Appium と UiAutomator2 をインストールして起動する","id":"appium-と-uiautomator2-をインストールして起動する","depth":2},{"value":"macOS","id":"macos-1","depth":3},{"value":"Windows PowerShell","id":"windows-powershell-1","depth":3},{"value":"Appium Inspector をインストールして設定する","id":"appium-inspector-をインストールして設定する","depth":2}],"frontmatter":{"seo":{"title":"Appium 接続ガイド"}},"lastModified":"2026-11-16T05:36:16.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ja/api-reference/cloud-phone/appium-inspector","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}