Manually Update Google Devices on elementary OS

By the time Google announce Android 7.1, my carrier still hadn’t got around to rolling out Android 7 on my Nexus 6. By the time Google Announced 7.1.1, I was just on 7 (which was a giant, crippling turd on the Nexus 6). By the time Google announced 7.1.2 (which I won’t get), I was getting security patches for 7.0.

I figured the only way to make my device usable again was to update it myself with the OTA images. It’s not a straightforward process for anyone new to Android SKD and Linux, and the platform tools, so for anyone new to elementary OS, I thought I’d jot down the steps.

Prepare Your Phone

  1. Enable developer options.
  2. Enable usb debugging.
  3. Enable MTP Mode.

Prepare Your Computer

  1. Download and install the Android SDK, making sure to follow all of the directions. I extracted my files under /usr/local/share, but ultimately the installer will install an Android folder in your home directory.
  2. In order to use sudo on adb (for reasons I couldn’t overcome any other way), I had to symlink my local adb binary to my sbin folder with:
    sudo ln -s adb to sbin
  3. Next, edit (or create) a udev file to contain the following entry, replacing the vendor id with one that matches your needs. I’m using the code 22b8 because I have a Motorola phone:
    SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666", GROUP="plugdev"
  4. Restart udev:
    sudo /etc/init.d/udev restart
  5. Download the OTA image you want to install.

Install the Update

  1. Connect your device via USB.
  2. On your computer, in the terminal, reboot the device into recovery with:

    sudo adb reboot recovery
  3. On your device, once in recovery mode, press and hold the power button and press the volume up key.

  4. Still on your device, from the options menu, choose “Apply update from ADB”
  5. Back on your computer, in terminal, install the update with:

    sudo adb sideload
  6. Once complete, you can select “Reboot the system now” from the menu on your device. Your phone will reboot and finish the update.