ESPFLASH
This article explains how to unlock a more flexible ESP32 flashing workflow directly from your phone.
How to Flash ESP32 from Android via OTG
Espressif provides the Flash Download Tool on desktop for flashing ESP32 series chips. We now provide ESPFlash, which lets you flash ESP32 series chips directly from an Android phone.
With only a USB cable between your phone and the ESP32 board, you can unlock a much lighter flashing workflow.
For people who need to flash firmware in the field, do not have a laptop nearby, or simply want a more portable setup, this can feel much more direct than the traditional desktop process.
What You Need
Before you begin, prepare the following:
- An Android phone or tablet with OTG support
- An OTG cable or the correct data adapter for your phone
- An ESP32 or ESP8266 development board
- A USB cable that supports data transfer
- The firmware files you want to flash
If your board uses native USB, the connection is usually more direct.
If your board includes a USB-to-UART bridge chip, it can also be connected to the phone for flashing.
Supported Connection Paths
Based on the product page, ESPFlash supports two common device paths:
1. Native USB devices
This applies to ESP chips and development boards with native USB, including some newer ESP32 series boards.
These devices usually connect more directly, and once the phone recognizes them, you can move into the flashing process. With STUB enabled, flashing can also be very fast.
2. USB-to-UART devices
Traditional ESP32 and ESP8266 development boards often include a USB-to-UART bridge chip.
Those boards can still be flashed from Android through the same OTG workflow.
Step-by-Step Process
Step 1: Connect the phone and the board
Use an OTG cable to connect your Android phone to the development board.
If you are using a USB-to-UART path, make sure the adapter and the board are wired correctly before connecting the adapter to the phone.
Step 2: Open ESPFlash
After the connection is made, open ESPFlash.
If Android shows a USB permission dialog, allow the app to access the connected device.
Step 3: Select the firmware
Choose the firmware file inside the app. If the firmware is a complete factory image, you can usually flash it at address 0x0.
If your firmware is split into multiple parts, such as bootloader, partition, and the main application image, make sure each file is assigned to the correct address.
This step deserves extra attention because incorrect flash addresses are one of the most common causes of failure.
Step 4: Select the device and start flashing
Once the app has recognized the target device, start the flashing process.
At this stage, keep the USB connection stable. Avoid unplugging the cable, and try not to let the phone interrupt the process with aggressive power-saving behavior.
Step 5: Wait for flashing to complete
After flashing is complete, the board will usually reboot automatically. If it does not, you can press the board's RST button to restart it manually.
If the firmware is complete and the addresses are correct, you can then verify whether the board boots and runs as expected.
When This Workflow Is Useful
Flashing ESP32 from Android over OTG is especially useful when:
- You do not have a computer nearby
- You are installing, testing, or maintaining devices in the field
- You need to quickly validate whether a firmware build can boot
- You want a lighter workflow that does not depend on a full desktop setup
The biggest advantage is not that it replaces every desktop tool. It is that many tasks which previously required going back to a computer can now be done directly from your phone.
Common Issues
The device list is empty
First, check that the board is properly powered and use a better-quality USB cable if possible.
Many "device not found" cases are not caused by the app itself. They are often caused by charge-only cables, unstable power, or weak OTG adapters.
If you are using an OTG adapter, try another one as part of troubleshooting.
Connection times out
Check whether the board is repeatedly rebooting. If it is, you may need to manually enter download mode using the BOOT and RST buttons on the board.
For some boards, entering flash mode does not depend on software alone. It also depends on whether the auto-download circuit is implemented properly in hardware.
If the board does not enter download mode automatically, manual flashing mode is often the quickest fix.
The board does not work after flashing
Make sure the firmware includes the correct bootloader and partition files, and that the flash addresses are correct.
Also confirm the following:
- The firmware matches the chip model
- The partition table is the correct one for that build
- The flashed files are complete
Even if the main application image is correct, the board may still fail to boot if the bootloader or partition addresses are wrong.
Closing Thoughts
If you have always treated ESP32 flashing as something that can only be done on a PC, Android OTG is well worth trying.
ESPFlash is not just a desktop workflow squeezed into a phone. It makes many mobile flashing tasks more direct and more portable.