Android Debug Bridge (ADB) key pairs provide secure, authenticated access to your cloud phone instances. An ADB key pair consists of a private key, which you store on your on-premises device, and a public key, which is stored on the cloud phone instance. When you connect with ADB, the instance verifies your identity by checking the private key against its stored public key.
This topic describes how to create or import an ADB key pair, attach it to a cloud phone instance, and manage the key pair lifecycle. Once these steps are complete, you can securely connect to the cloud phone instance by using the ADB toolkit.
Prepare an ADB key pair
You can prepare an ADB key pair in either of the following ways:
-
Create in the console: Generate a new ADB key pair directly in the Cloud Phone console. The browser automatically downloads the private key file.
-
Import a locally generated key pair: Generate an ADB key pair on your on-premises device by using the ADB toolkit, then import the public key into the Cloud Phone console.
Create an ADB key pair
Log on to the Cloud Phone console.
In the left-side navigation pane, choose .
-
In the upper-left corner of the Key page, click Create Key Pair.
-
In the Create Key Pair dialog box, enter a key pair name and click OK.
NoteA key pair name must be between 2 and 128 characters long and cannot begin with a special character or digit. It can only include periods (.), underscores (_), hyphens (-), and colons (:).
ImportantAfter you create the key pair, the browser will automatically download the adbkey file. Make sure to save this file securely. If the file is lost, the key pair will need to be recreated.
Import an ADB key pair
-
To import a key pair, you first generate an ADB key pair on your on-premises device by using the ADB toolkit, and then import the public key into the Cloud Phone console.
Windows
-
Download the ADB toolkit for Windows and extract the contents of the package.
-
Open the Command Prompt and run the following command to navigate to the directory where the ADB toolkit is stored:
NoteUpdate the command by replacing the directory path with the one you are using.
cd C:\Users\Administrator\Downloads\platform-tools -
Run the following command to generate a key pair:
adb devicesNoteIf you have deleted the key pair from the download directory and need to regenerate it, first run
adb kill-serverand then runadb devices.By default, the ADB-generated key pair is stored in the
%USERPROFILE%\.androiddirectory, consisting of two files: adbkey (the private key) and adbkey.pub (the public key). -
Open the adbkey.pub file and copy its public key content.
macOS
-
Download the ADB toolkit for macOS and extract the contents of the package.
-
Open Terminal and run the following command to navigate to the directory where the ADB toolkit is stored:
NoteUpdate the command by replacing the directory path with the one you are using.
cd downloads/platform-tools -
Run the following command to generate a key pair:
./adb devicesNoteIf you have deleted the key pair from the download directory and need to regenerate it, first run
./adb kill-serverand then run./adb devices.By default, the ADB-generated key pair is stored in the
~/.androiddirectory, consisting of two files: adbkey (the private key) and adbkey.pub (the public key). -
Open the adbkey.pub file and copy its public key content.
Linux
-
Remotely log on to your Linux server.
-
Run the following command to install the ADB toolkit:
sudo apt-get install adb -
Run the following command to check whether the ADB toolkit is installed:
adb versionA command output like the one below indicates that the ADB toolkit is installed:
[root@iZbp1dtvts0j8lbejlz**** ~]# adb version Android Debug Bridge version 1.0.39 -
Run the following command to generate a key pair:
adb devicesNoteIf you have deleted the key pair from the download directory and need to regenerate it, first run
adb kill-serverand then runadb devices.By default, the ADB-generated key pair is stored in the
~/.androiddirectory, consisting of two files: adbkey (the private key) and adbkey.pub (the public key). -
Run the following command to open the adbkey.pub file and copy its public key content:
cat ~/.android/adbkey.pub
-
-
Import the ADB key pair.
Log on to the Cloud Phone console.
In the left-side navigation pane, choose .
-
In the upper-left corner of the Key page, click Import Key Pair.
-
In the Import Key Pair dialog box, enter a key pair name, paste the public key that you copied in the previous step, and then click OK.
NoteA key pair name must be between 2 and 128 characters long and cannot begin with a special character or digit. It can only include periods (.), underscores (_), hyphens (-), and colons (:).
Attach an ADB key pair
Prerequisites
The cloud phone instance to which you want to attach an ADB key pair is in the Available state.
Procedure
Log on to the Cloud Phone console.
In the left-side navigation pane, choose .
-
On the Key page, find the ADB key pair that you want to attach and click Attach Key Pair in the Actions column.
-
In the Attach Key Pair dialog box, select a cloud phone instance from the Instances section on the left, click the arrow icon to the right of the instance, and then click Bind.

-
After you attach the key pair to the cloud phone instance, save the adbkey (the private key) file in the appropriate directory based on your operating system. This enables ADB-based access from your on-premises device to the cloud phone instance.
Operating system Private key directory Windows %USERPROFILE%\.androidmacOS ~/.androidLinux ~/.androidTo restart the ADB process on your on-premises device, run the following command based on your operating system:
Operating system Command Windows adb kill-servermacOS ./adb kill-serverLinux adb kill-server
Unbind an ADB key pair
Prerequisites
The cloud phone instance from which you want to unbind an ADB key pair is in the Available state.
Procedure
Log on to the Cloud Phone console.
In the left-side navigation pane, choose .
-
On the Key page, find the ADB key pair that you want to unbind and click Unbind Key Pair in the Actions column.
-
In the Unbind Key Pair dialog box, select the target cloud phone instance from the Instances section on the left, click the arrow icon to the right of the instance, and then click Disassociate.
After you unbind the key pair from the cloud phone instance, the current ADB-based session will not end immediately. However, any attempts to establish a new ADB-based session will fail due to authentication issues.
Delete an ADB key pair
Prerequisites
The key pair you want to delete has been removed from all cloud phone instances.
Procedure
Log on to the Cloud Phone console.
In the left-side navigation pane, choose .
-
On the Key page, find the ADB key pair that you want to delete and click Delete in the Actions column.
-
In the message that appears, click OK.
WarningOnce the key pair is deleted, it cannot be restored. Proceed with caution when performing this action.