Last week I dropped my Nexus 5 once again, this time for good. I had cracked and broken the top glass before, but the display and the touchscreen kept on working. This time, the touchscreen no longer registers touches, though luckily the display still works somewhat. On a device with no trackball, touchpad, or keyboard, a broken touchscreen is problematic.
Unfortunately, I had been lazy about keeping my phone properly backed up. There wasn’t that much unique stuff on it, but I always meant to backup apps and app data, and to eventually root and reflash someday — but never got around to it. Consequently I didn’t have USB debugging turned on, or a computer cleared for debugging.
Generally, the way to control and back up Android devices is from your desktop computer, using a USB connection and software called adb (Android Debug Bridge, see adb docs). However, USB debugging must be first turned on in Android settings, and since Android 4.2.2, the phone asks to confirm debugging access from each computer that attempts to connect. Normally the confirmation is done using the phone touchscreen. Oops.
Here are my notes on what I did to eventually gain USB debugging access. I did not require root or fastboot. I needed a computer to act as the adb host and a few accessories: a USB OTG cable, a USB mouse, and a Bluetooth keyboard.
Learning from my trouble, I recommend people running Android 4.4.3 or higher and interested in maintaining access to their device to enable USB debugging ahead of time.