Taking device screenshot using ddms tool fails

Bug #873283 reported by Abhishek Paliwal
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
IglooCommunity
New
Low
Unassigned
Linaro Android
Won't Fix
Medium
Unassigned

Bug Description

Description:
==========
Connect device to host machine. Start ddms tool on host machine.
Select correct connected device on ddms tool and try to take screenshot.
Screenshot never shows device UI screen - it always shows "X" symbol and message - "Screen not available"

Reproducible:
===========
Yes, 5/5

IMPACT:
========
Unable to use Android tool functionality, bad user experience.

Steps:
==========
Precondition: Android sdk platform tools should be pre-installed on host machine for ddms tool to work.
1. Bootup device
2. Connect USB cable(Mini-B cable) between Host machine and Device OTG port(near power supply).
3. On Host machine - type "ddms" command
4. Once ddms tool comes up - select correct device and select option: "Device->Screen capture"
   - Message shown is "Screen not available"

5. Serial port logs shows:
[ 319.439453] EXT4-fs (mmcblk0p5): initial error at 946710022: ext4_journal_start_sb:296
[ 319.447448] EXT4-fs (mmcblk0p5): last error at 946710794: ext4_journal_start_sb:296
[ 403.796630] packet_sz=512, mode=1, dma_addr=0x269c3000, len=2524 is_tx=1
[ 403.803344] dma40 dma40.0: src/dst width/maxburst mismatch: -1067801096*-424863468 != 16*4
[ 403.811676] dma40 dma40.0: [d40_handle_interrupt] IRQ chan: 205 offset 64 idx 13

Hardware:
==========
Snowball: V5
Other setup:
USB cable (mini B type) connected to Host machine
USB-serial port logging
HDMI-HDMI connection to Acer Monitor.

Software:
==========
https://android-build.linaro.org/builds/~linaro-android/staging-snowball-11.10-release/
build 1

Logs:
======
Logcat/dmesg attached.
Screenshot for ddms attached.

Tags: snowball
Revision history for this message
Abhishek Paliwal (abhishek-paliwal) wrote :
Lee Jones (lag)
Changed in linaro-landing-team-ste:
assignee: nobody → Mathieu Poirier (mathieu.poirier)
importance: Undecided → Medium
Revision history for this message
Frans Gifford (fgiff) wrote :

LP#847652 has a similar message about dma, so possibly has the same root cause.

Revision history for this message
Abhishek Paliwal (abhishek-paliwal) wrote :
Anmar Oueja (anmar)
Changed in igloocommunity:
importance: Undecided → Medium
Changed in linaro-landing-team-ste:
assignee: Mathieu Poirier (mathieu.poirier) → nobody
Revision history for this message
Kejun ZHOU (kejun-zhou) wrote :

My snowball works well. DDMS can make a screenshot normally.
Please check the attachment, it is the DDMS on my Ubuntu.

Revision history for this message
Patrik Klinger (patrik-klinger) wrote :

Can this bug be marked as not valid? Is this verified on the latest release candidate? What build did you use to verify it on?

Revision history for this message
Kejun ZHOU (kejun-zhou) wrote :

I test it on V11 Snowball, Linaro_4.0.3 release.

I only added a patch to enable ADB over USB port.
As the bug didn't describe the ADB issue, so my patch should not affect the DDMS working.

Revision history for this message
Thomas Espersson (espersson) wrote :

Can you please put in link to the build/image used? Was it the "official" release set this morning?

About ADB issue, Is there a bug reported on this? I thought that was working on Snowball since the 12.02 release.

Revision history for this message
Kejun ZHOU (kejun-zhou) wrote :

The image http://www.igloocommunity.org/download/android/ics/images/2012.02/ works normally. And the attachment is the DDMS screenshot,

As the Linaro_android_4,0.3, the Kernel doesn't enable the ADB. My patch is just enable the ADB.

diff --git a/arch/arm/configs/u8500_android_defconfig b/arch/arm/configs/u8500_android_defconfig
index f513589..68a8185 100644
--- a/arch/arm/configs/u8500_android_defconfig
+++ b/arch/arm/configs/u8500_android_defconfig
@@ -219,20 +219,15 @@ CONFIG_USB_OTG=y
 CONFIG_USB_MON=y
 CONFIG_USB_MUSB_HDRC=y
 CONFIG_USB_MUSB_UX500=y
+CONFIG_USB_MUSB_OTG=y
+CONFIG_USB_GADGET_MUSB_HDRC=y
 CONFIG_USB_ACM=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_LIBUSUAL=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_VBUS_DRAW=500
-CONFIG_USB_ZERO=m
-CONFIG_USB_ETH=m
-CONFIG_USB_FILE_STORAGE=m
-CONFIG_USB_MASS_STORAGE=m
-CONFIG_USB_G_SERIAL=m
-CONFIG_USB_CDC_COMPOSITE=m
-CONFIG_USB_G_MULTI=m
-# CONFIG_USB_G_MULTI_RNDIS is not set
-CONFIG_USB_G_HID=m
+CONFIG_USB_G_ANDROID=y
+CONFIG_USB_ANDROID_PHONET=y
 CONFIG_AB8500_USB=y
 CONFIG_MMC=y
 CONFIG_MMC_UNSAFE_RESUME=y
@@ -246,6 +241,7 @@ CONFIG_LEDS_LP5521=y
 CONFIG_LEDS_PWM=y
 CONFIG_LEDS_TRIGGERS=y
 CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_SWITCH=y
 CONFIG_RTC_CLASS=y
 CONFIG_RTC_DRV_AB=y
 CONFIG_RTC_DRV_AB8500

Revision history for this message
Abhishek Paliwal (abhishek-paliwal) wrote :

This issue is observed on vexpress with :
https://android-build.linaro.org/builds/~linaro-android/vexpress-ics-gcc46-armlt-stable-open/#build=151

Steps:
1. Bootup vexpress
2. Setup adb over ethernet (Refer to https://wiki.linaro.org/Platform/QA/TestCases/Android#adb-ethernet)
3. Start ddms tool on host pc
4. Take snapshot using this tool ,
Issue: Snapshot does not show current screen, it shows white screen with x mark on center. (screenshot attached)

Revision history for this message
Abhishek Paliwal (abhishek-paliwal) wrote :

Also observed on:
https://android-build.linaro.org/builds/~linaro-android/imx53-ics-gcc46-freescalelt-stable-open/#build=246

when trying screenshot through ddms tool (Adb over ethernet)

Revision history for this message
supriya karanth (supriya-karanth) wrote :

The print "packet_sz=512, mode=1, dma_addr=0x269c3000, len=2524 is_tx=1" seems to be a print in musb driver
DMA is disabled for ADB. Needs further investigation as to how DMA is enabled

Changed in igloocommunity:
importance: Medium → Low
Anmar Oueja (anmar)
no longer affects: linaro-landing-team-ste
Anmar Oueja (anmar)
summary: - Snowball: Taking device screenshot using ddms tool fails
+ Taking device screenshot using ddms tool fails
Changed in linaro-landing-team-arm:
importance: Undecided → Low
Revision history for this message
Tixy (Jon Medhurst) (tixy) wrote :

Attempting screenshot on vexpress produces about a dozen lines like the following in logcat:

E/libEGL ( 1938): called unimplemented OpenGL ES API

it could be the feature relies on functionality not present in the sofwatre onlt OpenGL implementation.

Either way, the screenshot feature is of such a low priority that in practice it will never get worked on, so I'm marking this bug 'Won't Fix' for the ARM Landing Team

Changed in linaro-landing-team-arm:
importance: Low → Wishlist
status: New → Won't Fix
Revision history for this message
Adrian Taylor (ade-hohum) wrote :

The surfaceflinger screenshot functionality relies on the OpenGL ES FBO (frame buffer objects) extension, as it renders all the surfaces into such a virtual framebuffer:
http://androidxref.com/4.1.1/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#2355
That probably accounts for the message tixy is seeing.

The code which DDMS uses for capturing a screenshot will first try the above SurfaceFlinger/OpenGL compositing method, then fall back to reading /dev/graphics/fb0 directly. At least, that certainly was the case until recently.
http://androidxref.com/4.1.1/xref/frameworks/base/cmds/screencap/screencap.cpp#133
This may account for some of the symptoms on different devices.

Revision history for this message
Ryan Harkin (ryanharkin) wrote :

ARMLT marked this as "won't fix" because it is due to Versatile Express not having accelerated video hardware.

Revision history for this message
vishal (vishalbhoj) wrote :

snowball is no more supported.

Changed in linaro-android:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.