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.