Monday, February 2, 2015

Solving Android Adb error "device unauthorized"

Spent several hours investigating why Android Studio doesn't want to upload my android application to mobile phone. It displayed error message "device unauthorized. Please check the confirmation dialog on your device.". But there was no such confirmation on the phone screen.

Adb commands "adb kill-server", "adb start-server" didn't help.

And solution was found. It is applied to my phone, but maybe will be appropriate for other android phones.

Mobile phone: Samsung Galaxy S2
Android OS: Cyanogenmod 10.1.3
Android OS version: Cyanogenmod 10.1.3-i9100
Android version: 4.2.2

Steps:
1) On your android phone open application File Manager
2) Switch it to Root mode (Settings - General settings - Access mode - Root Access mode)
























3) Using File Manager navigate to folder with file /data/misc/adb/adb_key and delete this file.

























4) Go to phone System Setting and open Developer options, uncheck option Android debugging

























5) Select option Android debugging again, and if the phone is connected by usb to computer you will see the message about allowing usb debugging.

























Now it is possible to upload android applications through Android Studio!

Saturday, January 31, 2015

In this blog I will write about my DIY projects, for now mainly related to Arduino and electronics.