Record Video of Your Android Screen on a Mac with ADB

Background

I've been working a lot lately on writing mobile apps using the Ionic Framework. My goal is to be able to release apps for both iPhone and Android at roughly the same time. So far, I've only released apps for Android, simply because I'm too cheap to pay Apple $99/year. But that's neither here nor there.

The Problem

Today I wanted to record a demo video for one of my apps running on my Android test device, an older Samsung Galaxy S4. I had no idea how to do that. Camtasia 2 for the Mac supports iOS devices out of the box, but not Android. What to do?

After a bit of searching, I found instructions on a few different sites. None of them had all of the steps I needed. So rather than trying to remember where I found everything, I figured I'd put all of the instructions in one place on my own blog so I could find it again easily.

Prerequisites

  • Android Debugging Bridge or Android SDK
  • USB to Micro USB cable (preferably the one that came with the device).

Record the Screen

  1. Connect the device to the Mac via USB.
  2. Open a terminal to the folder where you want the video to be saved.
  3. Run the command:
    adb shell screenrecord /mnt/sdcard/Movies/test.mp4 
  4. You may see some warnings, but no errors. I put the video in the standard Movies folder to make it easy to find on the device, in case I want to preview it before copying to the Mac.
  5. Press Ctrl+C to stop recording.

Copy the Video to the Mac

  1. Enter the following command at the terminal:
    adb pull /mnt/sdcard/Movies/test.mp4 . 
  2. Make sure you include the trailing dot at the end of that command.
  3. Use the video any way you wish.


Comments

  1. All of these posts were incredible perfect. It would be great if you’ll post more updates.
    Android App Development

    ReplyDelete

Post a Comment

Popular posts from this blog

How to copy your Frozen Free Fall progress to a new phone

Ionic vs. Bootstrap - for a Web App

How I Finally Got AdMob and Ionic Framework to Play Nice Together