Android 4.2.2 and the Mystery of Device Offline

April 16th, 2013 Leave a Comment

Here’s another installment in the never-ending documentation of stuff for posterity.

This chapter concerns a change made to Android 4.2.2 that could cause you some headaches if you’re an Android developer, modder or hobbyist. Google added a whitelist for USB debugging in 4.2.2 which adds another layer of security to your phone, so now you must allow the connected computer access to tinker with the attached device, from the actual device.

Screenshot_2013-04-16-08-56-52

Makes sense as a feature, but in practice, it’s a bit of a hassle.

Why? Because you must have the latest version of adb (the Android development bridge, used by the SDK to communicate with the device), which currently is 1.031, in order to force the device to ask for approval.

Run adb version to check.

If you have an older version of adb, like I did, your connected device will report itself as offline, and no amount of toggling developer options, connecting/disconnecting and restarting will change that.

offline

Believe me, I tried a fair amount of that because I’ve recently rebuilt my Mac and don’t want to clutter it up unnecessarily. I don’t need the full Android SDK so I searched long and hard for other options.

There aren’t any, but you can escape without bringing down everything the SDK requires. Setting up to build for Android requires two parts, first download the SDK and decompress it; next, you’d typically run android and pull down all the files for your version of choice, which takes a while.

If you just need adb and fastboot to do some tinkering, you can skip the second part and save yourself some time and disk space.

First, download and decompress the SDK. Then, navigate to the directory where you decompressed and find the /sdk/platform-tools directory, and from your CLI of choice, run adb.

Now that you have the latest version, your device should pop up the “Allow USB Debugging?” message. Easy peasy.

Getting back to why this feature is a bit of a hassle, given how large the SDK is, not everyone continuously keeps it updated, or at least not the Android tools. Plus, there’s no official documentation on this that I could find, and I couldn’t readily find a way to revoke a computer’s access on the device.

Anyway, hope this helps you and my future self who will likely forget all this.

Find the comments.


Possibly Related Posts

Leave a Reply