-2

Does anyone know how eclipse android DDMS implement "screen capture"?

Update:

Because I want to capture the whole android device screen which running the app using android google map v2. If the app using android google map v1, it's ok to capture the screenshot. But it return a black screen if using android goole map v2.

Uou can see the issue from black screen

But I can capture the screenshot(even android google map v2) from DDMS. That's the reason why I wanna know how DDMS capture screenshot.

Look like DDMS get screenshot via /system/bin/screencap or /system/bin/screenshot, but it seems to need the "root" authority.

Community
  • 1
  • 1
andrewwang1TW
  • 119
  • 3
  • 14

1 Answers1

2

I think you can find your answer in the com.android.ddmuilib.ScreenShotDialog code.

First, get the source code :

git clone https://android.googlesource.com/platform/sdk

DDMS sources in: sdk/ddms

ScreenShotDialog in: sdk/ddms/libs/ddmuilib/ ...

(or directly here)

Goo
  • 1,318
  • 1
  • 13
  • 31