티스토리 뷰

Android Debug Bridge (adb) 는 다용도로 쓰이는 명령어 툴이다. 이것은 사용자가 애뮬레이터 인스턴스와 통신하거나, 안드로이드 기기와 연결하도록 한다.

Android Debug Bridge (adb) is a versatile command line tool that lets you communicate with an emulator instance or connected Android-powered device.


글 순서

  • ADB 의 3개 components
  • adb 동작방법 및 특징
  • db 명령어

tool 위치

<sdk>/platform-tools/

참고자료

  • Android Debug Bridge

  • ADB 의 3개 components

    client

    개발 기계에서 돌아간다. adb 명령을 실행하여 shell에서 클라이언트를 호출할 수 있다.
    ADT plugin, DDMS 같은 tool도 adb client를 생성한다.

    server

    development machine 에서 백그라운드 프로세스로 돌아간다.
    에뮬레이터나 기기에서 돌아가는 client와 abd 데몬사이의 통신을 관리한다.

    daemon

    에뮬레이터나 기기의 인스턴스에서 백그라운드 프로세스로 실행된다.


    adb 동작방법 및 특징

    1. adb client 가 시작되면, 클라이언트는 먼저 adb 서버 프로세스가 이미 실행중인지 확인한다. 만약 실행중이 아니라면 서버 프로세스를 실행한다.

      When you start an adb client, the client first checks whether there is an adb server process already running. If there isn't, it starts the server process.

    2. When the server starts, it binds to local TCP port 5037 and listens for commands sent from adb clients

      모든 adb clients는 adb server와 통신하기 위해 5037 포트를 사용한다.

    3. The server then sets up connections to all running emulator/device instances.

      It locates emulator/device instances by scanning odd-numbered ports in the range 5555 to 5585, the range used by emulators/devices


    adb 명령어

    • Emulator/Device Instances 알아내기

    • Emulator/Device Instances 의 Shell 시작하기

      adb [-d|-e|-s {}] shell

    댓글