Skip to content

Instantly share code, notes, and snippets.

@kkestell
Created January 31, 2025 16:12
Show Gist options
  • Save kkestell/dfe8c37ad05f323ca787b90c4f85649a to your computer and use it in GitHub Desktop.
Save kkestell/dfe8c37ad05f323ca787b90c4f85649a to your computer and use it in GitHub Desktop.

Installing OpenWrt on Google Wifi (AC-1304)

Google Wifi (AC-1304) is a 2x2 802.11ac access point with a Qualcomm IPQ4019 SoC, 512 MB RAM, and 4 GB eMMC storage. It runs a ChromeOS-based firmware called Gale and can be configured to boot unsigned firmware like OpenWrt by enabling Developer Mode.

Hardware Requirements

  • Google Wifi AC-1304
  • USB-C hub with power delivery (PD)
  • USB-C power supply
  • USB-C cable
  • Two USB drives (one for the official firmware, one for OpenWrt)
  • Phillips PH0 screwdriver
  • Plastic spudger or flat-head screwdriver

A USB drive with an activity LED is recommended to indicate when the device is reading from it.

Prepare the Official Firmware USB Drive

  1. Install the OnHub Recovery Utility in Chrome.
  2. Select "Google" as the manufacturer and "Google Wifi" as the model.
  3. Write the latest official Google Wifi firmware to a USB drive.

Flash the Official Firmware

  1. Connect the USB-C hub to power but do not plug it into the puck yet.
  2. Insert the firmware USB drive into the hub.
  3. Hold the external reset button on the puck.
  4. Plug in the USB-C hub while continuing to hold the button.
  5. After ~10 seconds, the LED will turn amber.
  6. Release the button and wait ~5 minutes for the process to complete.
  7. When the LED glows solid blue, the firmware has been installed.

Prepare the OpenWrt USB Drive

  1. Download the latest OpenWrt "factory" image for Google Wifi from the OpenWrt website.
  2. Use the OnHub Recovery Utility to write this image to a second USB drive.
    • Open the utility, click the gear icon, select "Use local image," and choose the OpenWrt factory image.

Open the Puck and Locate SW7

  1. Disconnect power from the puck.
  2. Remove the bottom cover by unscrewing the Phillips screw and prying it off.
  3. Locate the internal switch labeled "SW7."

Boot OpenWrt

  1. Insert the OpenWrt USB drive into the powered USB-C hub.
  2. Hold the external reset button while plugging in the USB-C hub.
  3. After ~10 seconds, the LED will turn amber.
  4. Press SW7 inside the device. The LED will blink purple, then reboot.
  5. When the LED blinks purple again, press SW7 once more to trigger USB boot.
  6. If the device successfully boots OpenWrt, you should be able to ping 192.168.1.1 from a computer connected via Ethernet.

If the puck continues blinking purple, try pressing SW7 again or check the USB drive.

Flash OpenWrt to eMMC

  1. Transfer the OpenWrt factory image to /tmp on the puck using SCP:
    scp -O openwrt-23.05.5-ipq40xx-chromium-google_wifi-squashfs-factory.bin [email protected]:/tmp/
  2. SSH into the puck:
  3. Write the firmware to eMMC:
    dd if=/dev/zero bs=512 seek=7634911 of=/dev/mmcblk0 count=33
    dd if=/tmp/openwrt-23.05.5-ipq40xx-chromium-google_wifi-squashfs-factory.bin of=/dev/mmcblk0
  4. Reboot the device:
    reboot
  5. Remove the USB drive. The puck will now boot OpenWrt from eMMC.

Flash the Sysupgrade Image

  1. Download the latest OpenWrt "sysupgrade" image from the OpenWrt website.
  2. Access the puck's web interface at http://192.168.1.1.
  3. Navigate to System > Backup/Flash Firmware > Flash new firmware image.
  4. Upload the sysupgrade image and confirm.
  5. The puck will reboot automatically.

Expand Storage (Optional)

  1. SSH into the puck and install required utilities:
    opkg update && opkg install cfdisk resize2fs
  2. Run cfdisk:
    cfdisk /dev/mmcblk0
  3. Resize the last partition:
    • Select the last partition before the empty space.
    • Choose "Resize."
    • Accept the default size.
    • Write the partition table and exit.
  4. Reboot the device.
  5. Resize the filesystem:
    resize2fs /dev/loop0

Notes

  • If OpenWrt fails to boot from USB, try a different flash drive.
  • If the puck remains in a purple-blink loop, ensure SW7 is pressed at the correct moment.
  • The default OpenWrt user is root with no password. Set a password using passwd or in the web interface.
  • If installation repeatedly fails, consider re-flashing the official firmware before retrying OpenWrt.

Once completed, the puck will boot directly into OpenWrt and function as a standalone router or mesh node.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment