{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/pt/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Guia de conexão do Appium"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"guia-de-conexão-do-appium","__idx":0},"children":["Guia de conexão do Appium"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use o Appium Inspector no macOS ou Windows com qualquer telefone na nuvem da MoreLogin que ofereça ADB e atenda aos requisitos do driver UiAutomator2. A conexão completa foi validada com Android 15 no Windows e Android 15A no macOS. Execute ADB, Appium Server e Inspector no mesmo computador."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"obtenha-os-dados-de-adb","__idx":1},"children":["Obtenha os dados de ADB"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["No MoreLogin Desktop, acesse ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Perfis → Telefone na nuvem"]}," e inicie o dispositivo. Abra o menu ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["⋯"]}," e selecione ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Ativar ADB"]},". Se necessário, role a tabela horizontalmente até a coluna ADB e passe o mouse sobre ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Ativado"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/ml-enable.f15fca406b0642892c6d64f82f8293ff2ea998b2247fd5f57ae4c359796fc524.f59a5fd3.png","alt":"Menu para ativar ADB"},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Se houver endereço e código de conexão, use ADB direto, como no Android 15. Se houver comando e senha SSH, abra um túnel primeiro, como no Android 15A. Use as informações atuais do painel."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/ml-popup15.59c6a444c67e1d0293f95d90a2b9076847bc6d300dd700dba298dba5ccc639df.f59a5fd3.png","alt":"Dados de ADB direto com valores ocultos"},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/ml-popup15a.d5026fe728e2d59573d8d7fe1a88187425b447cf3ff9047fbf2b85311195f787.f59a5fd3.png","alt":"Dados SSH com valores ocultos"},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"configure-o-android-sdk-o-java-e-o-nodejs","__idx":2},"children":["Configure o Android SDK, o Java e o Node.js"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["No SDK Manager do Android Studio, instale a plataforma para a versão Android de destino e o ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Android SDK Platform-Tools"]},". Instale o JDK 17 e o Node.js 24 LTS com npm 10 ou posterior. No macOS, ajuste os caminhos do exemplo. No Windows, configure as variáveis de usuário ou use os comandos abaixo na mesma janela do PowerShell em que iniciará o Appium."]},{"$$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":["Se ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["adb version"]}," funcionar, mas o Doctor não localizar o SDK, use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["(Get-Command adb).Source"]}," no Windows. A raiz do SDK contém ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["platform-tools"]},". Coloque a pasta ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bin"]}," do JDK 17 antes das versões antigas do Java no Path. Reabra o PowerShell após alterar as variáveis de usuário."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"conecte-o-adb","__idx":5},"children":["Conecte o ADB"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Para ADB direto, substitua ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DEVICE_ADDRESS"]}," e ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CONNECTION_CODE"]}," pelos dados da MoreLogin. Respeite maiúsculas e minúsculas do código. O status ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["device"]}," confirma o transporte. Se aparecer ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Access denied! Invalid password."]},", autentique com o código vigente. O retorno pode ser ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["OK! Login successful."]},". Se abrir um shell remoto, digite ",{"$$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":["Para ADB via SSH, verifique ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ssh -V"]},". Se faltar no Windows, instale o ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["OpenSSH Client"]}," em Recursos opcionais. Execute o comando SSH completo em um terminal e informe a senha do painel. Se o cliente SSH do Windows rejeitar ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["-Nf"]},", use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["-N"]}," e deixe esse terminal aberto. Em outro terminal, conecte o endereço exibido pela MoreLogin. A porta 9897 é um exemplo."]},{"$$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":["Execute ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["adb devices -l"]}," e verifique se o status é ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["device"]},". Use o valor exato da primeira coluna em ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["adb -s DEVICE_IDENTIFIER shell getprop ro.build.version.release"]},". Se o comando retornar a versão do Android, prossiga. Guarde o identificador para ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appium:udid"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/pt/api-reference/cloud-phone/adb"},"children":["Guia de conexão ADB"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"instale-o-appium-e-o-uiautomator2-e-inicie-o-servidor","__idx":6},"children":["Instale o Appium e o UiAutomator2 e inicie o servidor"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Se já tiver Appium 3 ou UiAutomator2, pule a instalação correspondente. Pare o servidor antes de instalar o driver. Confirme que ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["uiautomator2"]}," aparece na lista e corrija erros de ADB ou Java do Doctor. Se ambos forem encontrados e faltar apenas ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["emulator"]},", prossiga com o telefone na nuvem que já aparece conectado no 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":["Mantenha o terminal do servidor aberto. Em outro terminal, verifique o status. Continue quando ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["value.ready"]}," for ",{"$$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":["Instalação do UiAutomator2"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"instale-e-configure-o-appium-inspector","__idx":9},"children":["Instale e configure o Appium Inspector"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["No macOS, baixe o DMG arm64 para Apple Silicon ou x64 para Intel e arraste o aplicativo para ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Aplicativos"]},". No Windows, execute o EXE oficial, escolha a instalação para o usuário atual, selecione a pasta e clique em ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Instalar"]}," e ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Concluir"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/appium/appium-inspector/releases"},"children":["Downloads oficiais do Appium Inspector"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["Texto da interface traduzido para o inglês"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/win-setup-steps.1d5d82f64c8166a167cba488022ac777eaafafbce700516aed6ec330180376dd.f59a5fd3.png","alt":"Escopo e pasta de instalação no Windows (texto da interface traduzido para o inglês)"},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/win-finish.cd7d1848bbff51814fc0a58112d0a52be56099e1e63272c0f1f420bcef51e69b.f59a5fd3.png","alt":"Instalação concluída no Windows (texto da interface traduzido para o inglês)"},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Na aba ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Appium Server"]},", configure ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Remote Host"]}," como ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["127.0.0.1"]},", ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Remote Port"]}," como ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["4723"]}," e ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Remote Path"]}," como ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/"]},". Desmarque ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["SSL"]}," e ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Use Proxy"]},". Em ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Capability Builder"]},", edite ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["JSON Representation"]}," e substitua ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["localhost:9897"]}," pelo identificador exato do 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":"Configuração do Inspector no Windows"},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Salve e clique em ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Start Session"]},". A conexão está pronta quando aparecem a tela e o ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["App Source"]},". Se o servidor não responder, verifique ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/status"]},". Se o dispositivo não aparecer, confira o identificador, a autenticação ou o túnel. Resolva o estado ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["offline"]}," ou ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["unauthorized"]}," antes de tentar novamente."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/win-android15-session.c59074d8c5ae9c482ba5ae6a7b0e274bfb54fdbbdc8da8221fe1b6c2aad33564.f59a5fd3.png","alt":"Sessão Android 15 no Windows"},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/ins-live-session.5ddc67ab553c8e01fff640fcadcaf3101e727d67d6a1218b8c6a5f2f37fb5d07.f59a5fd3.png","alt":"Sessão Android 15A no macOS"},"children":[]}]}]},"headings":[{"value":"Guia de conexão do Appium","id":"guia-de-conexão-do-appium","depth":1},{"value":"Obtenha os dados de ADB","id":"obtenha-os-dados-de-adb","depth":2},{"value":"Configure o Android SDK, o Java e o Node.js","id":"configure-o-android-sdk-o-java-e-o-nodejs","depth":2},{"value":"macOS","id":"macos","depth":3},{"value":"Windows PowerShell","id":"windows-powershell","depth":3},{"value":"Conecte o ADB","id":"conecte-o-adb","depth":2},{"value":"Instale o Appium e o UiAutomator2 e inicie o servidor","id":"instale-o-appium-e-o-uiautomator2-e-inicie-o-servidor","depth":2},{"value":"macOS","id":"macos-1","depth":3},{"value":"Windows PowerShell","id":"windows-powershell-1","depth":3},{"value":"Instale e configure o Appium Inspector","id":"instale-e-configure-o-appium-inspector","depth":2}],"frontmatter":{"seo":{"title":"Guia de conexão do Appium"}},"lastModified":"2026-11-16T05:36:16.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/pt/api-reference/cloud-phone/appium-inspector","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}