Capture screenshot in GenyMotion
If you are using Android Studio or Eclipse, you can just click the button "Screen Capture" in the Android DDMS:
You can use adb to get the screenshot from command line:
adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > screen.png
This article has the details: http://blog.shvetsov.com/2013/02/grab-android-screenshot-to-computer-via.html
To make my life easier, I made an alias in .bash_profile:
alias screenshot="adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > ~/Downloads/android_screenshot.png"
Now I can type screenshot
in Terminal and get a screenshot of currently running emulator in my Downloads directory.
Disclaimer : I'm part of the same company as the Genymotion team.
This feature is included in the product. It is one of the paid feature of the screencast widget. Look at the pricing page here.
Two ways to access it:
- pay for the pro or indie licence
- use the trial version, it offers you the indie features. Be careful, there is only one trial day left :-/
Once your VM is started, open the screencast widget
Then take a picture with the dedicated button
UPDATE: You have bellow another ways to take a screenshot using Android Device Monitor or the command line
Use this commands:
-
Windows:
C:\"Program Files"\Genymobile\Genymotion\tools\adb shell screencap -p "/mnt/sdcard/output.png" && C:\"Program Files"\Genymobile\Genymotion\tools\adb pull "/mnt/sdcard/output.png" "C:\output.png" && C:\"Program Files"\Genymobile\Genymotion\tools\adb shell rm "/mnt/sdcard/output.png"
- Note: Make sure you have permission to write to
C:\output.png
; otherwise, change it to whatever path you like.
- Note: Make sure you have permission to write to
-
OS X:
/Applications/Genymotion.app/Contents/MacOS/tools/adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > ~/Desktop/Android_Screenshot_$(date +%Y-%m-%d-%H-%M-%S).png