Home » Screen Recording

Tag: Screen Recording

Android Screen Recording using ADB

Android Screenrecord - Adventures in QAThanks to Richard Bradshaw, also known as the @FriendlyTester, who reminded me in a tweet about the Android screen recording feature using an ADB (Android Debug Bridge) command. In one of my last posts, I already wrote about the new QuickTime recording feature for iOS devices running iOS8 in combination with a Mac OS X device running Yosemite.

A couple of posts ago I wrote about an app called ilos that is able to record Android screens as well. However, I totally forgot to mention in that post that Android is already able to record the current screen using an ADB command.

The screenrecord command is able to record the display of devices running Android 4.4 (API level 19) and higher. The tool is recording the app interaction to an MPEG-4 file, which can be downloaded from the device using the command adb pull. This video can then be used as part of your bug report as well.

The following sample will start a recording session of the connected device.

$ adb shell screenrecord /sdcard/NotAbleToLogin.mp4

To stop the screen recording press Ctrl-C, otherwise the recording will stop automatically after three minutes. However, you can also define a time limit with the paramter --time-limit.

The tool is recording the video in the native display resolution and orientation by default. However, there are some limitations of the screenrecord command that you should know when using it:

  • Some Android devices are not able to record the session with their native screen resolution. If you see any kind of problems during the recording session, try to use a lower resolution.
  • The tool is not able to record screen orientation during the recording session. When you rotate the device during the session, some parts of the screen will be cut off.
  • There is no audio recording support.

The following table is showing the options of the screenrecord command. Note: This table is copied from the developer.android.com page.

OptionsDescription
--helpDisplays a usage summary.
--size <WIDTHxHEIGHT>Sets the video size, for example: 1280x720. The default value is the device’s main display resolution (if supported), 1280×720 if not. For best results, use a size supported by your device’s Advanced Video Coding (AVC) encoder.
--bit-rate <RATE>Sets the video bit rate for the video, in megabits per second. The default value is 4Mbps. You can increase the bit rate to improve video quality or lower it for smaller movie files. The following example sets the recording bit rate to 6Mbps:

screenrecord --bit-rate 6000000 /sdcard/demo.mp4
--time-limit <TIME>Sets the maximum recording time, in seconds. The default and maximum value is 180 (3 minutes).
--rotateRotates the output 90 degrees. This feature is experimental.
--verboseDisplays log information on command line screen. If you do not set this option, the utility does not display any information while running.

 

Richard Bradshaw send me a link to his GitHub Gists where he provided a shell script that is able to start, download and delete a recorded video from the Android device. Maybe this can be useful for you guys as well.

BASH script to record Android display and download/delete the video.

Happy recording and testing!

 

ilos Mobile Screen Recorder to Record Mobile Bugs

ilos_logo1A couple of posts ago, I blogged about “How to File Mobile Bugs“. One part of this post was a screen recorder video that can be attached to a bug report in order to provide more useful feedback to the developers.  If you search the app stores for screen recorder apps you will find lots of them offering recording features. However, nearly all apps require a rooted device in order to use the screen recording function but using a rooted device for mobile testing is not recommended.

With Android 5 (Lollipop) the situation has changed. Android 5 is offering an API for the developers to add screen capture capabilities within an app without rooting the device.

One of the first companies who provide a mobile screen recorder that requires NO device rooting is ilos. ilos is providing an Android and iOS app. However, only the Android app can be used to record the current screen to capture bugs in your app. The iOS app is only able to get access to already taken videos from your account. As soon as Apple provide such a feature in iOS ilos will also offer the screen recording feature for the iOS version.

Read more