A partir de 27 de março de 2025, recomendamos usar android-latest-release em vez de aosp-main para criar e contribuir com o AOSP. Para mais informações, consulte Mudanças no AOSP.
Um navegador com suporte a WebUSB (link em inglês),
como o Chrome ou o Edge 79+
Ativar a conexão USB
Antes de executar o Android em um dispositivo, ative a conexão USB:
Ative o desbloqueio de OEM e a depuração USB nas opções do desenvolvedor:
No app Configurações, toque em Sobre o telefone.
Toque em Número da versão sete vezes.
Quando aparecer a mensagem Você agora é um desenvolvedor!, toque em <-.
Toque em Sistema e em Opções do desenvolvedor.
Ative as opções Desbloqueio de OEM e Depuração USB. Se a opção
Desbloqueio de OEM não aparecer, conecte-se à Internet para que o dispositivo possa
fazer a confirmação. Se isso ainda não funcionar, force a
confirmação. No app Telefone, digite *#*#CHECKIN#*#* (*#*#2432546#*#*).
Não é necessário ter um chip. Depois de inserir o número (não precisa apertar o botão para ligar) o texto
vai desaparecer, e uma notificação de êxito será mostrada.
Se o desbloqueio de OEM continuar indisponível, o dispositivo pode ter um bloqueio de chip da
operadora e o carregador de inicialização não poderá ser desbloqueado.
Conecte o dispositivo a uma porta USB na estação de trabalho.
Atualizar o dispositivo
Se você tiver o
Android Debug Bridge (adb)
instalado no computador, interrompa o serviço adb antes de prosseguir para que
ele não interfira no processo de atualização. Para interromper o adb, execute:
adbkill-server
Em um navegador na estação de trabalho de desenvolvimento, abra
flash.android.com. A Página de recepção vai aparecer.
Clique em Permitir acesso ao adb para que a ferramenta possa se comunicar com o
dispositivo de teste pelo adb.
Clique em Adicionar novo dispositivo.
Selecione seu dispositivo na lista e clique em Conectar. A lista pode
não conter o nome completo do dispositivo.
Na tela do dispositivo, selecione Sempre permitir neste computador
e clique em OK para aceitar a conexão da depuração USB.
Selecione o dispositivo conectado no navegador.
Pesquise e selecione o build na lista. Você também pode selecionar
outras opções, como excluir permanentemente os dados do dispositivo ou forçar a atualização em todas as partições.
Para iniciar a atualização, clique em Instalar. O dispositivo será reinicializado e vai entrar no modo
fastboot (Fastboot mode).
Quando a mensagem Atualização concluída aparecer, desconecte o dispositivo do cabo USB.
Os dispositivos de atualização não conseguem inicializar
Se o dispositivo não consegue inicializar normalmente, é possível que você não consiga fazer a atualização
dele usando as instruções anteriores. Em vez disso, tente atualizar com o
fastboot.
Para isso, inicialize o dispositivo no modo fastboot usando uma
combinação de teclas:
Devido à alta capacidade de dados, os dispositivos Android podem sofrer problemas ao se comunicar por determinados hubs ou portas USB. Para resolver erros de transferência:
Não use hubs USB. Isso inclui conexões por monitores.
Se possível, não use adaptadores ou cabos de extensão USB.
Tente usar uma porta USB diferente. As portas traseiras costumam ser mais confiáveis do que as portas frontais.
Se você estiver usando uma porta USB-C, tente mudar para uma porta USB-A.
O conteúdo e os exemplos de código nesta página estão sujeitos às licenças descritas na Licença de conteúdo. Java e OpenJDK são marcas registradas da Oracle e/ou suas afiliadas.
Última atualização 2025-04-04 UTC.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Não contém as informações de que eu preciso","missingTheInformationINeed","thumb-down"],["Muito complicado / etapas demais","tooComplicatedTooManySteps","thumb-down"],["Desatualizado","outOfDate","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Problema com as amostras / o código","samplesCodeIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-04-04 UTC."],[],[],null,["# Flash with Android Flash Tool\n\n[Android Flash Tool](https://flash.android.com/)\nis a web-based tool that lets you flash a pre built Android build to your\ndevice for development and testing.\n| **Note:** If you need to flash and test your own AOSP changes, refer to [Flash your device with Fastboot](/docs/setup/test/running).\n\nAndroid Flash Tool supports these devices:\n\n- Pixel 2 and newer\n- [DragonBoard RB3 (also known as db845c)](https://wiki.linaro.org/AOSP/db845c)\n- [HiKey 960](https://www.96boards.org/product/hikey960/)\n- [HiKey](https://www.96boards.org/product/hikey/)\n\nMeet requirements\n-----------------\n\nTo run the Android Flash Tool, you must meet these requirements:\n\n- [Hardware requirements](/docs/setup/start/requirements#hardware-requirements)\n- A browser supporting [WebUSB](https://caniuse.com/#search=Webusb), such as [Chrome](https://www.google.com/chrome/) or Edge 79+\n\nEnable your USB connection\n--------------------------\n\nBefore running Android on a device, you must enable your USB connection:\n\n1. Enable OEM unlocking and USB debugging in the developer options:\n\n 1. In the Settings app, tap **About phone**.\n 2. Tap **Build number** seven times.\n 3. When you see the message **You are now a developer!** , tap **\\\u003c-**.\n 4. Tap **System** , then tap **Developer options**.\n 5. Enable **OEM unlocking** and **USB debugging** . If OEM unlocking is unavailable, connect to the internet so the device can check in. If that still doesn't work, you can force a check in: In the Dialer app, enter **\\*#\\*#CHECKIN#\\*#\\*** (\\*#\\*#2432546#\\*#\\*) (no SIM required). After entering the number (no need to press call), the text disappears and a success notification appears.\n\n If OEM unlocking remains unavailable, your device might be SIM locked by\n your carrier and the bootloader can't be unlocked.\n2. Connect your device to a USB port on your workstation.\n\nFlash your device\n-----------------\n\n1. If you have\n [Android Debug Bridge (adb)](https://developer.android.com/studio/command-line/adb)\n running on your machine, stop the adb service before proceeding so that\n it doesn't interfere with the flashing process. To stop adb, run:\n\n adb kill-server\n\n2. In a browser on your development workstation, open\n [flash.android.com](https://flash.android.com/). The Welcome page appears.\n\n3. Click **Allow ADB access** to allow the tool to communicate with your test\n device through adb.\n\n4. Click **Add new device**.\n\n5. Select your device from the list and click **Connect**. This list might\n not contain the full device name.\n\n6. On your device's screen, select **Always allow from this computer**\n and click **OK** to accept the USB debugging connection.\n\n7. Select the connected device in your browser.\n\n8. Search for and select your build from the list. You can also select\n options, such as wiping the device or force flashing all partitions.\n\n9. To start flashing, click **Install**. The device reboots and enters fastboot\n mode.\n\n10. After **Flash Complete** appears, disconnect the device from the USB cable.\n\n| **Note:** If this is the first time flashing this device from this development workstation, the workstation loses the connection to the device and asks you to find it again. The next time you flash the same device on this workstation, you won't see the request to find the device. After reconnecting, the flashing resumes by downloading the images and performing all the required steps.\n\n### Flash devices unable to boot\n\nIf your device is unable to boot normally, you might not be able to flash your\ndevice using the previous instructions. Instead, you can try flashing with\nFastboot.\n\nTo do this, you need to first boot your device into Fastboot mode by using a\nkey combination:\n\n1. Determine the key combination for your device. For a table of Fastboot key combinations, see [Fastboot key combinations](/docs/setup/reference/fastboot-keys).\n2. Turn the device off.\n3. Turn the device on and immediately hold down the key combination for your device (determined in step 1).\n\nOnce your device is in Fastboot mode, open\n[flash.android.com](https://flash.android.com/) and follow the earlier\n[flashing instructions](#flashing-your-device), ignoring the steps related to\nADB.\n\n### Resolve USB transfer errors\n\nSometimes Android devices have trouble communicating through certain USB ports\nor hubs due to the high throughput of data. To resolve transfer errors:\n\n- Don't use USB hubs. This includes connections through monitors.\n- Don't use USB extension cables or adapters if possible.\n- Try a different USB port. Rear ports are often more reliable than front ones.\n- If you're using a USB C port, try a USB A port instead.\n\nReturn Pixel to public build\n----------------------------\n\nIf you want to return your Pixel device to a public build, use the\n[Android Flash Tool back-to-public option](https://flash.android.com/back-to-public)."]]