I recently ran into some issues after an update to my Galaxy S3 and after seeing a related post, I decided to write this quick tutorial. I didn't see information on this elsewhere in the forum.
Prior to Android 4.2 it was pretty easy to find and enable USB debugging under Developer Options, but this changed in 4.2.
Enabling Developer Options in Android 4.2 or newer:
Starting in 4.2.2, Android introduced an ADB security feature called ADB Authentication. What this does is forces you to allow or deny a PC to access your Android device using ADB. When allowed, a key is stored on the device which automatically authorizes that PC in the future. If you have been developing for Android for a while as I have, it's easy to neglect updating your Android SDK installation. In order to connect to an Android 4.2.2 / 4.3 device using ADB over USB you must have SDK Platform-tools release 16.0.1 or higher installed. If you have an older version of Platform-tools installed, you simply will not be able to connect using ADB over your USB connection. To install the latest Platform-tools version, run your Android SDK Manager. If you are running a particularly old version of Platform-tools as I was on that computer, you may need to update it several times in a row in order to bring it up to 16.0.1 or newer.
I hope this helps someone. This happened to me on a computer I rarely use for Android development and it literally took me hours of going nuts trying to figure out why it suddenly stopped working. This was my first time working on my app after my phone had updated and I was unaware of the security changes to ADB.
Prior to Android 4.2 it was pretty easy to find and enable USB debugging under Developer Options, but this changed in 4.2.
Enabling Developer Options in Android 4.2 or newer:
- Go to Settings menu on your device.
- Scroll down to 'About' or 'About Device' and press on it. In some devices the 'About' menu will be under the More or General tab. Some other devices you will have to go to Settings > About > Software Information > More)
- Scroll to 'Build Number' and tap it 7 times.
- After tapping 7 times you will see an alert saying 'You are now a developer / Developer mode has been enabled'.
- Now if you go to your Settings menu, you will see the developer options menu over there.
- Tap on the Developer options and then turn on USB Debugging.
Starting in 4.2.2, Android introduced an ADB security feature called ADB Authentication. What this does is forces you to allow or deny a PC to access your Android device using ADB. When allowed, a key is stored on the device which automatically authorizes that PC in the future. If you have been developing for Android for a while as I have, it's easy to neglect updating your Android SDK installation. In order to connect to an Android 4.2.2 / 4.3 device using ADB over USB you must have SDK Platform-tools release 16.0.1 or higher installed. If you have an older version of Platform-tools installed, you simply will not be able to connect using ADB over your USB connection. To install the latest Platform-tools version, run your Android SDK Manager. If you are running a particularly old version of Platform-tools as I was on that computer, you may need to update it several times in a row in order to bring it up to 16.0.1 or newer.
I hope this helps someone. This happened to me on a computer I rarely use for Android development and it literally took me hours of going nuts trying to figure out why it suddenly stopped working. This was my first time working on my app after my phone had updated and I was unaware of the security changes to ADB.