All Products
Search
Document Center

Cloud Phone:Manage an ADB key pair

Last Updated:Feb 28, 2026

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

  1. Log on to the Cloud Phone console.

  2. In the left-side navigation pane, choose Network & Security > Key.

  3. In the upper-left corner of the Key page, click Create Key Pair.

  4. In the Create Key Pair dialog box, enter a key pair name and click OK.

    Note

    A 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 (:).

    Important

    After 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

  1. 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

    1. Download the ADB toolkit for Windows and extract the contents of the package.

    2. Open the Command Prompt and run the following command to navigate to the directory where the ADB toolkit is stored:

      Note

      Update the command by replacing the directory path with the one you are using.

      cd C:\Users\Administrator\Downloads\platform-tools
    3. Run the following command to generate a key pair:

      adb devices
      Note

      If you have deleted the key pair from the download directory and need to regenerate it, first run adb kill-server and then run adb devices.

      By default, the ADB-generated key pair is stored in the %USERPROFILE%\.android directory, consisting of two files: adbkey (the private key) and adbkey.pub (the public key).

    4. Open the adbkey.pub file and copy its public key content.

    macOS

    1. Download the ADB toolkit for macOS and extract the contents of the package.

    2. Open Terminal and run the following command to navigate to the directory where the ADB toolkit is stored:

      Note

      Update the command by replacing the directory path with the one you are using.

      cd downloads/platform-tools
    3. Run the following command to generate a key pair:

      ./adb devices
      Note

      If you have deleted the key pair from the download directory and need to regenerate it, first run ./adb kill-server and then run ./adb devices.

      By default, the ADB-generated key pair is stored in the ~/.android directory, consisting of two files: adbkey (the private key) and adbkey.pub (the public key).

    4. Open the adbkey.pub file and copy its public key content.

    Linux

    1. Remotely log on to your Linux server.

    2. Run the following command to install the ADB toolkit:

      sudo apt-get install adb
    3. Run the following command to check whether the ADB toolkit is installed:

      adb version

      A command output like the one below indicates that the ADB toolkit is installed:

      [root@iZbp1dtvts0j8lbejlz**** ~]# adb version
      Android Debug Bridge version 1.0.39
    4. Run the following command to generate a key pair:

      adb devices
      Note

      If you have deleted the key pair from the download directory and need to regenerate it, first run adb kill-server and then run adb devices.

      By default, the ADB-generated key pair is stored in the ~/.android directory, consisting of two files: adbkey (the private key) and adbkey.pub (the public key).

    5. Run the following command to open the adbkey.pub file and copy its public key content:

      cat ~/.android/adbkey.pub
  2. Import the ADB key pair.

    1. Log on to the Cloud Phone console.

    2. In the left-side navigation pane, choose Network & Security > Key.

    3. In the upper-left corner of the Key page, click Import Key Pair.

    4. 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.

      Note

      A 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

  1. Log on to the Cloud Phone console.

  2. In the left-side navigation pane, choose Network & Security > Key.

  3. On the Key page, find the ADB key pair that you want to attach and click Attach Key Pair in the Actions column.

  4. 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.

    image

  5. 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 systemPrivate key directory
    Windows%USERPROFILE%\.android
    macOS~/.android
    Linux~/.android

    To restart the ADB process on your on-premises device, run the following command based on your operating system:

    Operating systemCommand
    Windowsadb kill-server
    macOS./adb kill-server
    Linuxadb 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

  1. Log on to the Cloud Phone console.

  2. In the left-side navigation pane, choose Network & Security > Key.

  3. On the Key page, find the ADB key pair that you want to unbind and click Unbind Key Pair in the Actions column.

  4. 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.

  5. Note

    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

  1. Log on to the Cloud Phone console.

  2. In the left-side navigation pane, choose Network & Security > Key.

  3. On the Key page, find the ADB key pair that you want to delete and click Delete in the Actions column.

  4. In the message that appears, click OK.

    Warning

    Once the key pair is deleted, it cannot be restored. Proceed with caution when performing this action.

What to do next

Connect to cloud phone instances by using ADB