How to record Android phone and tablet screens

Until recently -- Android version 4.4 -- recording the screen of an Android phone or tablet usually meant a user was running as root, and doing so on a device flashed with a customized Android ROM like CyanagenMod.

But these days, screen recording for developers is a little easier. That is, providing your phone or tab has debug mode enabled, and it's connected to a computer running the Android Debug Bridge (ADB) tool. But before you can use ADB, you first need to download and install Oracle's Java Development Kit (JDK).

I prefer running Java and Android development tools on a Linux box, others may prefer to install Oracle's Java package customized for Mac OS X or Windows. Linux users however, will need to grab the gzipped tarball named jdk-8u5-linux-i586.tar.gz from Oracle's JDK page.

This file needs unpacked, you can use the terminal commands listed below. (Note: I saved the tarball to my ~/downloads folder, so be sure to replace "downloads" with the name of your download folder.)  

With the JDK installed, a few config changes are in order. Open /etc/profile with your favorite text editor, and insert the following line:

Then append this variable to the PATH and export lines:

Save these changes and run source:

Now that Java is installed and configured, you're ready to proceed to the next step: Downloading and installing the Android Studio IDE and SDKs.

Not long ago, Google replaced the Eclipse IDE with its own tool named Android Studio. Linux users will need to download, unzip, and install the file from the official download page, then install the SDKs using the procedures outlined on Google's Adding SDK Packages page.

Finally, after all of the install and config dust has settled, your Linux box should have everything it needs to run ADB's screenrecord command. If you want to learn more about ADB's other useful features, Google's provided additional documentation and examples here.


Stephen Glasskeys

Zur Startseite