How to take a screen capture in AOSP

November 17, 2025

How to take a screen capture in AOSP

Screen capture is possible using the screencap tool in the AOSP environment.
Use screencap
sh
It supports png, jpeg, and jpg formats, and distinguishes them by the filename's extension.
frameworks/base/cmds/screencap/screencap.cpp
c
Using the display ID, you can also capture other display screens. Connected display IDs can be checked with dumpsys.
Use screencap in other display
sh
Jooojub
System S/W engineer
Explore Tags
Series
    Recent Post
    © 2026. jooojub. All right reserved.