

Make sure your phone is connected to computer and you can access storage Please note that I decline all liability in case of failure as what I did was quite risky but worked in my case:Įnable USB debugging in developer option (not sure if it helped as device was unauthorized but still.) Save all important files you may have on your phone Basically format was the only solution I found and I tried all solutions listed here before: ADB Android Device UnauthorizedĪsk Google to make backup of your apps.

I found one solution with Nexus 5, and TWRP installed.

Was using OS X and Moto X Style that's with the cracked screen. Hurray, it all should be hunky-dory now! Just reboot the phone and you should be able to access adb when the phone is running: And obviously if we can't tap on the phone stay in the recovery mode and do the following (assuming you are not in the adb shell mode, if so first type exit): cd ~/.androidĪdb push adbkey.pub /data/misc/adb/adb_keys Now if you are going to reboot into your phone android will tell you "oh your adb is working but please tap on this OK button, so we can trust your PC". If you type adb devices you should see the device in the list.Įcho "=1" > default.propĮcho "=1" > default.propĮcho "=mtp,adb" > default.propĮcho "=1" > /system/build.propĮcho "=1" > /system/build.propĮcho "=mtp,adb" > /system/build.prop.If you forgot to enable developers mode and your adb isn't running, then do the following: Root your phone (mine was already rooted, so I was blessed at least with that).If anyone has similar issue of having a phone with a cracked screen and has a need to access adb: User-installed keys are stored in /data/misc/adb/adb_keys" On the device, vendors public keys are installed at build time in The ADB_KEYS_PATH env variable may be set to a :-separated ( under $HOME/.android/adb_key(.pub) or in $ANDROID_SDK_HOME on windows. If it does not exist, when the adb daemon starts and is stored in Refer to that link it goes into more details "On the host, the user public/private key pair is automatically generated, If you are having problems reading or writing to ADB KEYS in above steps, try setting environment variable ADB_KEYS_PATH with a temporary path (eg: /data/local/tmp). Try restarting adb daemon on target start adbd or just reboot them. (you may need to stop the adb daemon first with stop adbd) Get the public key from the client phone (adb host)Ĭopy the above public key to the target phone's /data/misc/adb/adb_keys location.
