~/.android/adbkey{,.pub} are respectively present and missing on a setup #43

Open
opened 2025-07-25 03:24:00 +02:00 by Benjamin_Loison · 6 comments

On my Linux Mint 22.1 Cinnamon Framework 13 Virtual Machine Manager Linux Mint (trust) virtual machine.

file ~/.android/adbkey
/home/benjamin/.android/adbkey: OpenSSH private key (no password)

The Server Fault answer 52287:

ssh-keygen -f ~/.android/adbkey -y > ~/.android/adbkey.pub
file ~/.android/adbkey.pub 
/home/benjamin/.android/adbkey.pub: OpenSSH RSA public key

It is about 381 characters.

Related to Benjamin-Loison/android/issues/91#issuecomment-2906728633.

On my Linux Mint 22.1 Cinnamon Framework 13 Virtual Machine Manager *Linux Mint (trust)* virtual machine. ``` file ~/.android/adbkey ``` ``` /home/benjamin/.android/adbkey: OpenSSH private key (no password) ``` [The Server Fault answer 52287](https://serverfault.com/a/52287): ``` ssh-keygen -f ~/.android/adbkey -y > ~/.android/adbkey.pub ``` ``` file ~/.android/adbkey.pub ``` ``` /home/benjamin/.android/adbkey.pub: OpenSSH RSA public key ``` It is about 381 characters. Related to [Benjamin-Loison/android/issues/91#issuecomment-2906728633](https://github.com/Benjamin-Loison/android/issues/91#issuecomment-2906728633).
Benjamin_Loison changed title from `~/.android/adbkey{,.pub}` are respectively present and missing to `~/.android/adbkey{,.pub}` are respectively present and missing on a setup 2025-07-25 03:24:20 +02:00
Author
Owner

On my host:

file ~/.android/adbkey.pub
/home/benjamin_loison/.android/adbkey.pub: ASCII text, with very long lines (700)

it seems to be a base 64 encoded binary, according to base64 -d.

On my host: ```bash file ~/.android/adbkey.pub ``` ``` /home/benjamin_loison/.android/adbkey.pub: ASCII text, with very long lines (700) ``` it seems to be a base 64 encoded binary, according to `base64 -d`.
Author
Owner

Removing ssh-rsa prefix to just keep base 64 does not result in the correct hash.

Removing `ssh-rsa ` prefix to just keep base 64 does not result in the correct hash.
Author
Owner

image.png

Allow results in successful adb connection.

![image.png](/attachments/80de0568-76e0-4899-a3e5-c589e8b05ddd) *Allow* results in successful adb connection.
124 KiB
Author
Owner

The Android Stack Exchange answer 260388 works fine when delete both adbkey{,.pub}, but not just the latter. When deleted both the phone prompts the new laptop identity.

[The Android Stack Exchange answer 260388](https://android.stackexchange.com/a/260388) works fine when delete both `adbkey{,.pub}`, but not just the latter. When deleted both the phone prompts the new laptop identity.
Author
Owner

DuckDuckGo and Google search Generate "adbkey.pub" from adbkey does not seem to help.

DuckDuckGo and Google search `Generate "adbkey.pub" from adbkey` does not seem to help.
Author
Owner

Revoke USB debugging authorizations helps.

*Revoke USB debugging authorizations* helps.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Benjamin_Loison/adb#43
No description provided.