I want to take automated screenshots of a running emulator, e.g. every 10 seconds and then save them into a directory.
I found out that I can do screen capturing with DDMS, but only over the UI. Is there any console based scripting API?
If you want to do it on System side then take a look at Android-DDMLIB. And Droid#Screen Also look at this tutorial Android: How to take screenshots from command line.
Or if you want to do all this at android device side then you have to root permission and read the device framebuffer for it.
Related
Using an Android Emulator (Nexus5 # droid 7.1.1) to run my Appium tests against and I've noticed that from time to time the emulator storage becomes full so I have to manually go to Settings>Storage>Internal Shared Storage>Apps>Show System and clear the so-called "Shell" part (see the screenshot). Any tips on how to clear this via ADB? I really want to automate this part and never do this manually again.
Screenshot:
Today Google just released the GDK Sneak Peak for Google Glass. I have tried to run the samples they have hosted in GitHub with no success:
gdk-stopwatch-sample
gdk-compass-sample
gdk-timer-sample
I am targetting against Android 4.0.3 Glass Development Kit Sneaky Preview and trying to run it in an AVD that also targets it with the following other specs:
640x360 hdpi
For the CPU I tried both ARM & Intel Atom
When I run the app and the dialog to choose the device is shown I do see the virtual device as non compatible.
If I skip it and try to run it I see the following error output:
Installing com.google.android.glass.sample.compass
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.google.android.glass.sample.compass"
pkg: /data/local/tmp/com.google.android.glass.sample.compass
Failure [INSTALL_FAILED_MISSING_SHARED_LIBRARY]
I have tried to force not to require the glass library (setting the requirement to false) in the AndroidManifest.xml:
<uses-library
android:name="com.google.android.glass"
android:required="false" />
... but obviously doesn't run properly, it's being shown in kind of an overlay:
I have also tried using Genymotion, but it doesn't run either.
Is there any way to run successfully glassware in an emulator?
EDIT:
Adding the gdk.jar as a library doesn't work.
Only a small percentage of the sample code seems to be using the GDK libraries. For example, the Compass example has a CompassService that is in charge of attaching the CompassRenderer into the Glass Live Card. It also has a CompassMenuActivity, that basically has calls to standard Android menu rendering. Those could be called a "glue" that wrap the compass-functionality into the Glass experience. Major parts of the compass code are just standard Android libraries.
Assuming that the emulator currently does not have a way to run glass libraries (and no-one has hacked them into it yet), and if you want to run the Compass example without actual Glass hardware, you need to implement the Service & MenuActivity in your own "standard Android" way. Basically, create an activity that implements the CompassRenderer in a surfaceview.
Have a look at these commits for an example (tested on Galaxy S4, views are being rendered and menu items are functional):
https://github.com/blaind/gdk-stopwatch-sample/commit/26e9801af983b9fc931d6dfe5ce1fcb80766fd10
https://github.com/blaind/gdk-compass-sample/commit/0d89e922a167c0fac6890684c514b9028e7bfea8
I need to take screenshots from my application running on my android device. Its connected via USB to my computer and thus it is simple to take a single screenshot of the device by refreshing and saving the captured image via the DDMS tool in eclipse. fine.
But I need to take screenshots continously e.g. every second during several minutes. I can't take these screenshots manually, since I have to manage the application while I want to take the screenshots. Is there a possibility e.g. any computer programe to capture and save the screenshots from my computer continously? The DDMS tool doesn't seem to support such a request.
Recording a video of the device would also satisfy me.
Please without rooting my device!
But I need to take screenshots continously e.g. every second during several minutes
You are unlikely to achieve every-second frame rates.
Is there a possibility e.g. any computer programe to capture and save the screenshots from my computer continously? The DDMS tool doesn't seem to support such a request.
Use Droid#Screen.
Recording a video of the device would also satisfy me.
Buy a device with HDMI-out support and use an HDMI recorder.
I am trying to port an simple operating system for teaching to android virtual device. The final goal is to boot the OS and make some basic hardware, including the character output and touch screen, work. In order to do that I need some details information about the "hardware" of the AVD, like where the bootloader will be load in RAM and how to use the character output. I have search over the Internet for a while and find little useful information. Can you tell where I can find the needed info or what site I should check? Thx :D
emulator - android = qemu
If you are not using android you don't need AVDs.
Check qemu home page to ontain more info.
Here is the downloadable detailed link for
android kernel
and
also source code
Try to go through the source code in that you can find where the whole operation starts and works.
I want to check my program code for time consuming operations. I thought DDMS is the best tool to achieve that.
However, I cant see Threads, Heaps and so on. It tells my to select a client. But I dont know where other than the Devices Tab, which doesnt take effect.
What do I have to do? Is there maybe smth wrong with my ADB setup (But LogCat works fine)?
Thanks!
Looking at the screen shot, you have the device ("emulator-5554") selected. You need to click on your application from the list of processes.
For example, if you click on "com.android.music", you will see information about the Music app.
Note that, on a real device, you must mark your application as "debuggable" or it won't appear in the list at all (on an emulator, all apps are debuggable). See the Developing on a Device page for details.