Unable to capture android_x86 screenshot

862 views
Skip to first unread message

ketan bhardwaj

unread,
Jun 11, 2015, 3:21:20 PM6/11/15
to Android-x86
Hi Guys,

I am running android-x86 4.4.0 on VMWare fusion but when I am trying to take snapshots.
I connect adb over IP successfully.

But I am unable to get a screenshot : 

1. First I tried to take snapshots from command line using adb 

$ adb shell screencap -p sshot.png
-- blank image  attached (sshot.png)

2. I used ddms to take the snapshot 
I get an image but that shows the command line and single cursor. (ddms.png)

Then, I followed advice to disable HWACCEL=0 in kernel command line. After doing this the android_x86 refuses to boot.

I see screen shots all over the place as also on andorid-x86.org. I think I am missing something completely obvious. How can I capture snapshots from android-x86

regards
Ketan Bhardwaj
ddms.png
sshot.png

Chih-Wei Huang

unread,
Jun 15, 2015, 3:54:51 AM6/15/15
to Android-x86
It's a known issue that the screen capture
won't work when Mesa is enabled.
But vmwgfx is only enabled in the latest git code.

Do you use a build from the latest git repo?
I suggest you use the 4.4-r2 release (no vmwgfx support)
unless you need OpenGL support.


--
Chih-Wei
Android-x86 project
http://www.android-x86.org

ketan bhardwaj

unread,
Jun 15, 2015, 10:13:14 AM6/15/15
to Android-x86
Thanks for your response Chin-Wei.

I am using 4.4.4-r2.+ branch. 
During android_x86 boot, I see messages saying [drm] Initialized vmwgfx 2.6.xxxfor 0000:00:0f.0 on minor 0
 
I think that this means that vmwgfx is enabled ... right ? OR Is there anything specific i need to try (command line options or something) to disable Mesa or enable vmgfx ?
So, it should work with this branch ?

--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86...@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
Visit this group at http://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.



--
Ketan Bhardwaj
http://www.cc.gatech.edu/~kbhardwa/
And in the end when you look,
Matters only the road you took.

ketan bhardwaj

unread,
Jun 15, 2015, 10:13:51 AM6/15/15
to Android-x86
Sorry for spelling you name incorrectly -- Chih-Wei.

Chih-Wei Huang

unread,
Jun 16, 2015, 2:26:53 AM6/16/15
to Android-x86
2015-06-15 22:12 GMT+08:00 ketan bhardwaj <ket...@gmail.com>:
> Thanks for your response Chin-Wei.
>
> I am using 4.4.4-r2.+ branch.
> During android_x86 boot, I see messages saying [drm] Initialized vmwgfx
> 2.6.xxxfor 0000:00:0f.0 on minor 0
>
> I think that this means that vmwgfx is enabled ... right ? OR Is there
> anything specific i need to try (command line options or something) to
> disable Mesa or enable vmgfx ?
> So, it should work with this branch ?

You may try the command line option 'nomodeset'.

If you build from source, you could just disable the
vmwgfx module.

ketan bhardwaj

unread,
Jun 16, 2015, 1:57:37 PM6/16/15
to Android-x86
Thanks. I will try that.

However, I was wondering that this limitation was due to screencap trying to capture framebuffer which isn't directly updated by mesa library ... right ?

I just looked at screencap code and it seems that it now (4.4+) uses ScreenshotClient -- a class implemented in android native framework -- to capture screenshots. The screenshot client basically creates a BufferQueue (android's graphic buffer queue) and passes the producer side to surface flinger which now treats it as a mirror display. 

Does it mean that screencap should work with hardware acceleration now ?

--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86...@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
Visit this group at http://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.

Chih-Wei Huang

unread,
Jun 16, 2015, 10:36:55 PM6/16/15
to Android-x86


2015年6月17日 上午1:57於 "ketan bhardwaj" <ket...@gmail.com>寫道:
>
> Thanks. I will try that.
>
> However, I was wondering that this limitation was due to screencap trying to capture framebuffer which isn't directly updated by mesa library ... right ?
>
> I just looked at screencap code and it seems that it now (4.4+) uses ScreenshotClient -- a class implemented in android native framework -- to capture screenshots. The screenshot client basically creates a BufferQueue (android's graphic buffer queue) and passes the producer side to surface flinger which now treats it as a mirror display. 
>
> Does it mean that screencap should work with hardware acceleration now ?

Hmm, nice finding.
(I didn't study that code)

Then you can help to debug why it doesn't work.

ketan bhardwaj

unread,
Jun 19, 2015, 11:27:15 AM6/19/15
to Android-x86
Sure. I will report back if I find something interesting and can help in getting it to work.

--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86...@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
Visit this group at http://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.

ketan bhardwaj

unread,
Jun 29, 2015, 12:22:34 PM6/29/15
to Android-x86
From logcat, it seems that gralloc-drm is able to open pipe to vmgfx but egl-gallium fails because of unsupported buffer format. (adb logcat snippet below)

I found that a similar issue https://groups.google.com/forum/#!topic/android-x86/B903ihn37Ao and this patch is already present in the source.

Do I need to add extra support for vmware screen or something to make screen capture work ? Any pointers ?

V/BufferQueue( 2735): [unnamed-2735-0] BufferQueue

V/BufferQueue( 2735): [unnamed-2735-0] consumerConnect controlledByApp=false

V/BufferQueue( 2735): [ScreenshotClient] connect: api=1 producerControlledByApp=false

V/BufferQueue( 2735): [ScreenshotClient] dequeueBuffer: w=1280 h=768 fmt=0x1 usage=0x333

I/GRALLOC-DRM( 2735): create pipe for driver vmwgfx

V/BufferQueue( 2735): [ScreenshotClient] dequeueBuffer: returning slot=0/18446744073709551615 buf=0x4105f970 flags=0x1

V/BufferQueue( 2735): [ScreenshotClient] requestBuffer: slot=0

W/EGL-GALLIUM( 1750): importing unsupported buffer as sampler view

E/EGL-GALLIUM( 1750): failed to import buffer 0x4410a3d8

V/BufferQueue( 2735): [ScreenshotClient] queueBuffer: slot=0/1 time=0x3982cda118 crop=[0,0,0,0] tr=0 scale=SCALE_TO_WINDOW

ketan bhardwaj

unread,
Jun 29, 2015, 3:17:02 PM6/29/15
to Android-x86
I confirm that I can get screen shots by disabling vmgfx but no effect with nomodeset command line parameter.

Christian

unread,
Jul 21, 2018, 9:44:34 AM7/21/18
to Android-x86
Screenshot_2018-07-21_174331.jpg
Reply all
Reply to author
Forward
0 new messages