Wear OS 앱 디버그
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
실제 시계에서 Wear OS 앱을 디버그하려면 Wi-Fi 또는 블루투스를 사용하여 개발 머신을 시계에 연결합니다. 또는 시계에 USB 포트가 있는 경우 USB를 통해 연결합니다.
앱에 이 지원이 필요한 경우 시계, 휴대전화와 같이 여러 기기에 걸쳐 있는 워크플로를 테스트할 수도 있습니다. 테스트를 위해 연결을 설정하는 방법을 자세히 알아보려면 휴대전화에 시계 연결을 참고하세요.
참고: 실제 시계가 없다면 Android 스튜디오의 에뮬레이터에서 앱을 실행하고 테스트할 수도 있습니다.
최신 버전의 Wear OS로 업그레이드
앱이 최신 소프트웨어에서 예상대로 작동하는지 확인하려면 테스트 기기에서 기기가 지원하는 최신 버전의 Wear OS를 실행 중인지 확인합니다.
테스트 기기에서 시스템 업데이트를 확인하려면 다음 단계를 완료하세요.
- 기기를 Wi-Fi 네트워크에 연결합니다.
- 기기 충전을 시작합니다.
- 기기의 배터리가 50% 이상 충전될 때까지 기다립니다.
-
테스트 기기에서 설정 > 시스템 > 시스템 업데이트로 이동합니다.
사용할 수 있는 시스템 업데이트가 있으면 테스트 기기에 다운로드되어 설치됩니다.
특정 버전의 Wear OS 설치(선택사항)
앱의 테스트 사례가 특정 버전의 Wear OS에 종속된 경우 USB 데이터 연결을 지원하는 시계에 소프트웨어 이미지를 플래시할 수 있습니다. 예를 들어 Google Pixel Watch 3 또는 Google Pixel Watch 2 기기에 공장 출고 시 이미지 또는 전체 OTA 이미지를 플래시할 수 있습니다.
시계에서 개발자 옵션 사용
시계에서 디버그하려면 먼저 개발자 옵션을 사용 설정하세요.
이 작업은 한 번만 실행하면 됩니다. 개발자 옵션은 중지할 때까지 사용 설정된 상태로 유지됩니다. 개발자 옵션을 사용 설정하려면 다음 단계를 따르세요.
- 시계의 설정을 엽니다.
- 시스템 > 정보 > 버전을 탭합니다.
- 빌드 번호 항목을 일곱 번 탭합니다.
- 이제 개발자임을 확인하는 메시지가 표시됩니다.
Wi-Fi를 사용하여 디버그
시작하기 전에 앞서 설명한 대로 시계에서 개발자 옵션을 사용 설정합니다.
시계를 Wi-Fi 네트워크에 연결
- 시계의 설정을 엽니다.
- 연결 > Wi-Fi를 탭합니다.
- 네트워크를 선택하고, 필요한 경우 비밀번호를 입력합니다.
참고: 시계와 개발 머신을 동일한 네트워크에 연결해야 합니다. 모든 액세스 포인트가 적합한 것은 아닙니다. adb
를 지원하도록 방화벽이 올바르게 구성된 액세스 포인트를 사용해야 할 수도 있습니다.
Wi-Fi 디버깅 사용
- 시계의 설정을 엽니다.
- 개발자 옵션 > Wi-Fi를 사용하여 디버그를 탭합니다.
- 잠시 후 화면에 시계의 IP 주소(예:
192.168.1.100
)가 표시됩니다.
다음 단계에서 이 주소가 필요하므로 적어 둡니다.
디버거를 시계와 페어링
- Wear OS 기기의 시스템 설정에서 무선 디버깅 옵션을 찾습니다. 새 기기와 페어링을 선택합니다.
- Wi-Fi 페어링 코드와 IP 주소 및 포트를 확인합니다.
-
개발 머신의 터미널 창에 다음 명령어를 입력합니다.
adb pair IP_ADDRESS:PORT
-
메시지가 표시되면 2단계에서 확인한 Wi-Fi 페어링 코드를 입력합니다. 터미널에 페어링 성공 여부가 출력됩니다. 예를 들면 다음과 같습니다.
Enter pairing code: 123456
Successfully paired to 192.168.1.100:5555
페어링이 완료되면 Wear OS 기기의
무선 디버깅 화면의
페어링된 기기 목록에 호스트 컴퓨터가 표시됩니다.
디버거를 시계에 연결
- 시계와 개발 머신을 동일한 네트워크에 연결합니다.
시계의 IP 주소와 포트 번호를 사용하여 디버거를 시계에 연결합니다. 예를 들어 IP 주소가 192.168.1.100
이고 포트 번호가 5555
이면 adb connect
명령어와 그 응답은 다음과 같습니다.
adb connect 192.168.1.100:5555
connected to 192.168.1.100:5555
이제 시계가 디버거에 연결되었으며 디버깅을 시작할 수 있습니다.
-s
플래그를 사용하여 시계에 adb
명령어를 전송해 시계의 IP 주소와 포트 번호를 지정합니다.
adb -s 192.168.1.100:5555 <command>
에뮬레이터를 사용하지 않으며, 디버그할 기기가 하나만 연결된 경우에는 주소를 지정할 필요가 없습니다.
adb <command>
블루투스를 통해 디버그
참고: 블루투스 디버깅은 Wear OS 2를 실행하는 Android와 페어링된 시계에서만 작동합니다.
시작하기 전에 시계와 휴대전화를 페어링하고 앞서 설명한 대로 시계에서 개발자 옵션을 사용 설정합니다. 휴대전화의 설정 메뉴를 열고 개발자 옵션을 찾아 휴대전화에서 개발자 옵션이 사용 설정되어 있는지 확인합니다.
필요하다면 휴대전화에서 개발자 옵션을 사용 설정하세요.
휴대전화에서 USB 디버깅 사용
- 휴대전화의 설정 메뉴를 엽니다.
- 개발자 옵션을 선택하고 USB 디버깅을 사용 설정합니다.
시계에서 ADB 또는 블루투스 디버깅 사용
- 시계의 설정 메뉴를 엽니다.
- 개발자 옵션으로 스크롤합니다.
- ADB 디버깅이 사용 설정되었는지 확인합니다.
- 블루투스를 통해 디버깅을 사용 설정합니다.
휴대전화에서 블루투스 디버깅 사용
- 휴대전화에서 Wear OS 호환 앱을 엽니다.
- 고급 설정까지 스크롤한 후 탭하여 고급 설정 옵션을 확인합니다.
- 블루투스를 통해 디버깅을 사용 설정합니다. 다음 상태 메시지가 옵션 아래에 표시됩니다.
Host: disconnected
Target: connected
이 시점에서는 개발 머신(호스트)이 시계(타겟)와 통신하지 않습니다. 연결을 완료해야 합니다.
참고: 한 번에 하나의 기기에서만 디버그할 수 있습니다.
여러 개의 시계가 페어링되어 있는 경우, 기본 화면에서 선택한 기기에서만 블루투스 디버깅이 사용됩니다.
디버거를 시계에 연결
이 마지막 단계에서는 디버거, 휴대전화, 시계를 모두 사용합니다.
- USB 케이블을 사용해 휴대전화를 개발 머신에 연결합니다.
- 디버거에서 다음 두 명령어를 실행합니다.
adb forward tcp:4444 localabstract:/adb-hub
adb connect 127.0.0.1:4444
참고: IP 주소 127.0.0.1을 사용해야 합니다. 개발 머신에서 사용 가능한 포트를 사용하고 두 명령어에 모두 동일한 포트를 사용합니다. 이 예에서 포트는 4444입니다.
- connect 명령어를 입력하면 시계에서는 ADB 디버깅을 허용하는지 확인하라는 메시지를 표시합니다.
- 휴대전화에서 Wear OS 호환 앱의 상태 표시가 다음과 같은지 확인합니다.
Host: connected
Target: connected
이제 시계가 디버거에 연결되었으며 디버깅을 시작할 수 있습니다.
블루투스를 사용하여 시계를 디버그하는 경우 adb
는 항상 IP 주소 127.0.0.1
과 할당된 포트를 사용합니다. 이 예에서 포트는 4444
입니다. 모든 adb
명령어는 다음 형식을 사용합니다.
adb -s 127.0.0.1:4444 <command>
에뮬레이터를 사용하지 않으며, 디버그할 기기가 하나만 연결된 경우에는 주소를 지정할 필요가 없습니다.
adb <command>
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-09-03(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-03(UTC)"],[],[],null,["To debug your Wear OS app on a physical watch, connect your development machine to the watch using\nWi-Fi or Bluetooth. Alternatively, if your watch has a USB port,\n[connect using USB](/training/wearables/apps/creating#connect-watch-wired).\n\n\nYou can also test workflows that span multiple devices, such as a watch and a\nphone, if your app requires this support. To learn more about how to set up\na connection for testing, visit\n[connect a watch to a\nphone](/training/wearables/get-started/connect-phone).\n\n**Note:** If you don't have a physical watch, you can also\ntest and [run\nyour app on an emulator](/training/wearables/get-started/creating#run-emulator) in Android Studio.\n\nUpdate to the latest version of Wear OS\n\nTo help verify that your app behaves as expected on the latest software,\ncheck that your test device is running the most up-to-date version of Wear OS\nthat your device supports.\n\nTo check for a system update on your test device, complete these steps:\n\n1. Connect the device to a Wi-Fi network.\n2. Start charging the device.\n3. Wait for the device's battery to charge to 50% or higher.\n4. On your test device, navigate to\n **Settings \\\u003e System \\\u003e System updates**.\n\n If a system update is available, it'll be downloaded and installed onto\n your test device.\n\nInstall a specific version of Wear OS (optional)\n\nIf your app's test case depends on a specific version of Wear OS, you can\nflash a software image onto watches that support a USB data connection. For\nexample, you can flash a\n[factory image](https://developers.google.com/android/images-watch)\nor a\n[full OTA image](https://developers.google.com/android/ota-watch)\nonto a Google Pixel Watch 3 or Google Pixel Watch 2 device.\n\nEnable developer options on your watch\n\nBefore you can debug on your watch, enable developer options.\nYou only need to do this one time. Developer options remain enabled until\nyou disable them. To enable developer options, do the following:\n\n1. Open the watch's **Settings**.\n2. Tap **System \\\u003e About \\\u003e Versions**.\n3. Tap the **Build number** item seven times.\n4. A message appears confirming that you are now a developer.\n\nDebug over Wi-Fi\n\nBefore you begin, enable developer options on the watch as described previously.\n\nConnect the watch to a Wi-Fi network\n\n1. Open the watch's **Settings**.\n2. Tap **Connectivity \\\u003e Wi-Fi**.\n3. Choose a network and enter its password if necessary. **Note:**\n The watch and your development machine must be connected to the same network. Not all\n access points are suitable. You may need to use an access point whose firewall is configured\n properly to support `adb`.\n\nEnable Wi-Fi debugging\n\n1. Open the watch's **Settings**.\n2. Tap **Developer options \\\u003e Debug over Wi-Fi**.\n3. After a moment, the screen displays the watch's IP address, such as `192.168.1.100`. You need this for the next step, so make a note of it.\n\nPair the debugger to the watch\n\n1. On your Wear OS device, find the wireless debugging options in system settings. Select **Pair new device**.\n2. Note the **Wi-Fi pairing code** and the **IP address \\& port.**\n3. In a terminal window on your development machine, type the following command: \n\n ```bash\n adb pair IP_ADDRESS:PORT\n ```\n4. When prompted, enter the Wi-Fi pairing code from step 2. The terminal will output whether pairing was successful. As an example: \n\n ```\n Enter pairing code: 123456\n Successfully paired to 192.168.1.100:5555\n ```\n\nAfter pairing, the host computer appears in the list of **Paired devices** on your Wear OS device's **Wireless Debugging** screen.\n\nConnect the debugger to the watch\n\n1. Connect your watch and development machine to the same network.\n2. Connect the debugger to the watch using the watch's IP address and a port\n number. For example, if the IP address is\n `192.168.1.100` and the port number is `5555`, the\n `adb connect` command and its response look like this:\n\n ```\n adb connect 192.168.1.100:5555\n connected to 192.168.1.100:5555\n ```\n\nThe watch is now connected to the debugger and you are ready to start debugging.\nSend `adb` commands\nto the watch using the `-s` flag, specifying the watch's IP address and\nthe port number: \n\n```\nadb -s 192.168.1.100:5555 \u003ccommand\u003e\n```\n\nIf you are not using the emulator and have only one device connected for debugging, you don't\nneed to specify the address: \n\n```\nadb \u003ccommand\u003e\n```\n\nDebug over Bluetooth\n\n**Note**: Bluetooth debugging works only for Android-paired\nwatches running Wear OS 2.\n\nBefore you\nbegin, pair the watch and phone and enable [developer options](#enable-dev-options) on\nthe watch as described previously. Check that developer options are enabled on the\nphone by opening the phone's\n**Settings** menu and looking for **Developer Options** .\nIf necessary, [enable developer\noptions](/studio/debug/dev-options#enable) on the phone.\n\nEnable USB debugging on the phone\n\n1. Open the phone's **Settings** menu.\n2. Select **Developer Options** and enable **USB debugging**.\n\nEnable ADB or Bluetooth debugging on the watch\n\n1. Open the watch's **Settings** menu.\n2. Scroll to **Developer Options**.\n3. Confirm that **ADB debugging** is enabled.\n4. Enable **Debug over Bluetooth**.\n\nEnable Bluetooth debugging on the phone\n\n1. On the phone, open the Wear OS companion app.\n2. Scroll to **Advanced Settings** and tap to view the **Advanced Settings** options.\n3. Enable **Debugging over Bluetooth** . The following status message appears under the option: \n\n ```\n Host: disconnected\n Target: connected\n ```\n\nAt this point the development machine---the host---is not communicating with\nthe watch---the target. You need to complete the link.\n\n**Note**: You can only debug with one device at a time.\nIf you have multiple watches paired, Bluetooth debugging is only enabled\nwith the device selected on the main screen.\n\nConnect the debugger to the watch\n\nIn this final step, you use everything: the debugger, the phone, and the watch.\n\n1. Connect the phone to your development machine with a USB cable.\n2. Run these two commands in the debugger: \n\n ```\n adb forward tcp:4444 localabstract:/adb-hub\n adb connect 127.0.0.1:4444\n ```\n\n **Note**: You must use the IP address 127.0.0.1. Use any available port\n on your development machine, and use the same port in both commands. In this example, the\n port is 4444.\n3. After you enter the connect command, the watch asks you to confirm that you are allowing **ADB Debugging**.\n4. On the phone, check the status display in the Wear OS companion app for the following: \n\n ```\n Host: connected\n Target: connected\n ```\n5. The watch is now connected to the debugger, and you're ready to start debugging.\n\nWhen you debug a watch using Bluetooth, `adb` always uses the IP address `127.0.0.1`\nplus the port that you assign. In this example, the port is `4444`. All `adb` commands use the\nfollowing format: \n\n```\nadb -s 127.0.0.1:4444 \u003ccommand\u003e \n```\n\nIf you are not using the emulator and have only one device connected for debugging, you don't\nneed to specify the address: \n\n```\nadb \u003ccommand\u003e\n``` \n\nRefer to the following related resources:\n\n- [Android Debug Bridge (adb)](/studio/command-line/adb)\n- [Debug your app](/studio/debug)\n- [Design principles](/training/wearables/design/design-principles)\n- [Capture Wear UI screens](/training/wearables/get-started/screenshots)"]]