Wear OS provides several ways to capture the Wear OS UI:
- Android Studio: use Logcat to take screenshots.
- Companion app: on Google Pixel Watch devices, use the Take wearable screenshot option to take screenshots.
- Screen record for Wear OS: record a video of the screen.
Capture screenshots and screen recordings in Android Studio
Capture screenshots and record videos of your wearable app's UI directly from Android Studio. The process is the same as for other form factors and can be done from several places within the IDE.
- Open your app in Android Studio.
- Run your app on a device or an emulator.
- Navigate to the screen you want to capture.
-
Initiate the screen capture from one of the following tool windows:
-
The Logcat window: In the toolbar, click the Take Screenshot icon to take a screenshot, or the Record Screen icon to record a video. These icons might be located under the overflow menu.
Figure 1. The Logcat tool window provides controls for taking a screenshot and recording the screen. -
The Running Devices window: The toolbar for your device also provides Take Screenshot and Record Screen icons. Note: These controls are only available if you are using device mirroring to stream the device's display into this window.
Figure 2. The Running Devices tool window provides controls for taking a screenshot and recording the screen.
-
The Logcat window: In the toolbar, click the Take Screenshot icon to take a screenshot, or the Record Screen icon to record a video. These icons might be located under the overflow menu.
-
Finalize the capture:
- For screenshots: An editor window appears after the capture. You can make adjustments, such as adding a device frame, before you click Save.
- For screen recordings: After clicking the record button, select video options and click Start Recording. Interact with your app, and then click Stop Recording when you're finished. A dialog appears, allowing you to save the resulting file.
Capture screenshots with the companion app
To take screenshots of a Google Pixel Watch device, you can use the Google Pixel Watch companion app. Follow these steps:
- On your UI, find the screen that you want to capture.
- On the Android phone, enable Developer options, if you haven't already, by going to Settings > About phone, and tapping Build number seven times.
- Open the Wear companion app on your phone.
- Tap the three dot overflow button in the upper-righthand corner to open the menu.
- Tap Take wearable screenshot. The following message appears: Screenshot request sent. Then you receive the following notifications: Ready to send watch screenshot and tap to send.
- Tap the notification to receive options for sending or sharing the screenshot using Bluetooth, Gmail, or other options.
Use screen record for Wear OS
If you develop on macOS, you can use the GitHub project Android tool for Mac to record a video from your Wear OS device.
Alternatively, record a video from your Wear OS device using the following steps:
- Record raw frames on the watch, as shown in the following:
adb shell screenrecord --time-limit 30 --output-format raw-frames --verbose /sdcard/video.raw
- Copy the raw file to your development machine, as shown in the following:
adb pull /sdcard/video.raw video.raw
- Use
ffmpeg
to convert the raw file to MP4, as shown in the following:ffmpeg -f rawvideo -vcodec rawvideo -s 400x400 -pix_fmt rgb24 -r 10 -i video.raw -an -c:v libx264 -pix_fmt yuv420p video.mp4
Note: Refer to the FFmpeg website for download and installation instructions.