If I were to say that I'm going to flash a new system image to your Nexus phone without attaching a USB cable, you might think I'm a little crazy. Well, I could be a little crazy, but that thing about the cable is definitely coming true in the very near future. Google has added networking support to the fastboot tool. When paired with a phone with a supported bootloader, it will be possible to perform all of the usual fastboot commands wirelessly.
In a recent commit to AOSP, support for the TCP protocol was added to fastboot. The Transmission Control Protocol (TCP) is one of the basic building blocks of communication on the Internet, used for reliable transmission of data from one point to another. In short, this will allow users to direct fastboot to send commands over a network, not just a USB connection.
Fastboot is only half of the equation, a target device will also require a bootloader that can connect to a network and listen for fastboot commands. No such device has been widely released to the public, but as it turns out, a phone with an updated bootloader seems to have leaked into the wild. A tipster sent us this photo of an unreleased bootloader on a 2015 Moto G with a screen that offers a pair of Wi-Fi connection modes.
Based on the updated fastboot protocol instructions (diff with the previous version) and the photo above, working with fastboot over a network should be fairly simple. After a device starts up into bootloader mode, it can be connected to an existing WiFi access point or it can create its own temporary access point (currently referenced as "SoftAP") so other devices can connect to it directly. At this point, the device will show an IP address on-screen and a computer with the new fastboot can be used to issue commands to it. The full array of functions are available, even unlocking the bootloader and flashing firmware images, but they will require an extra parameter to specify the IP address of the target device. It will look like this:
fastboot –s tcp:<hostname>[:port] <command>
ex: fastboot –s tcp:192.168.0.35 flash system system.img
Note: fastboot defaults to port 5554, but it can be told to point to another port if necessary.
So, why do we need fastboot over WiFi? The practical explanation is that it can finally solve the situation of a device that simply doesn't have a traditional port, a problem widely acknowledged with the Moto 360 (both generations). While it was possible to build a custom connector and break part of the water seal on that watch, it would have been considerably easier and less destructive to do everything wirelessly. While there are only a pair of watches that currently have this particular limitation in their design, we can surely expect more watches and some other form factors that either require custom cables or completely lack any form of accessible ports. This can also come in handy with hardware that isn't conveniently accessible with a regular cable, like a car, wall-mounted TVs, or appliances.
When will we actually see bootloaders with Wi-Fi support? Since there are rumors of new Nexus hardware at I/O this year, my guess is that they will be the first devices to ship with official support. On the other hand, Google is due to release new OTAs and factory images any day now for the March security updates, so there might be a surprise waiting for us when they land. Given that there's at least one non-Nexus device with the new functionality (the 2015 Moto G pictured above), there's some hope that it will appear in some current devices, as well.
- r3pwn and our tipster
Alternate Title: Fastboot Gains Networking Capabilities, "Wireless Flashing" Set To Become New Euphemism For Indecent Exposure