使用 ADB 截屏 | Zebra

使用 ADB 截屏

文章编号:59878200

Issue / Question

How to screenshot an Android device via ADB

Applicable To

TC2X, MC33, TC5X, TC7X, MC9300

Resolution / Answer

Prerequisite:
- ADB environment setup on PC
- Connected Android device has Developer options and USB debugging enabled

Steps:
1. On your PC, launch the command prompt via CMD
2. Connect your Android device to the PC (Allow USB debugging)
3. Enable Stay awake at Developer options on your Android device 
3. On your device, go to screen UI that you want capture
4. Type adb shell screencap /sdcard/screen.png at your PC command prompt and then enter
5. Type adb pull /sdcard/screen.png at your PC command prompt and then enter
     *please note that screen.png is just an example, you can use any filename that you like
6. The screenshot will be saved to your PC. (for instance, screen.png)

Alternatively, you can create a DOS batch file with the following content and save it to a .BAT file:
@echo off
adb shell screencap /sdcard/%1
adb pull /sdcard/%1


The usage of the batch file as below (for this case, the batch file was saved as screencap.bat):

 

+ Applicable Products

  • MC3300
  • MC3330R
  • MC3390R
  • MC9300 移动数据终端
  • TC20
  • TC25
  • TC51
  • TC51-HC 移动数据终端
  • TC52 触摸式数据终端
  • TC52-HC
  • TC55 触摸式数据终端
  • TC56
  • TC57 触摸式数据终端
  • TC70
  • TC70x
  • TC72 触摸式数据终端
  • TC75
  • TC75x
  • TC77 触摸式数据终端