Mobile ADB

How to capture your screen video using only mobile ADB

Such a simple thing as record a video screenshot or screencast, sometimes it is not. It is customary to use as good as applications AZ Screen Recorder, but in general or have Root or need Lollipop or higher. According to the latest data from Google, that leaves out almost 60% of Android users.

Not hearing the application to record screencast of your phone seems to work, add watermarks or just do not convince you? The truth is that you do not need to install anything else on your phone, you can record directly from the command line, via ADB, if you have Android 4.4 or higher.

Mobile ADB
Image Source: Google Image

1. Prepare the system

To record the screen we will use ADB from the PC. The commands are the same, but how to install ADB on Windows, Mac and Linux is different. The good news is that if you already have installed Android Studio, you probably already have (or can easily add from the installer package).

If this is not your case, install the heavy Android Studio just to access your mobile via ADB is quite exaggerated. I recommend Windows 15 Seconds ADB Installer. Download it, run it as Administrator and follow the instructions on the screen basically, press Y three times to install ADB and drivers.

The installation will create the folder C: \ ADB on your PC with adb.exe inside.

2. Prepare your mobile

Connect the mobile to PC with a USB cable and go to System Settings – Developer Options. If you do not have this section, see About device and repeatedly tap the Build number to enable this menu. Enables USB debugging.

3. Connect via ADB

In Windows, open a command prompt (Start – Run – cmd) and go to the folder C: \ ADB if you’ve used 15 seconds ADB Install, or any other folder where you have installed ADB, otherwise. Run the following command “adb devices”.

The first time you run it, the ADB server will start, then show the devices that are connected. If the device is authorized, the word “device” next to your name appears. Otherwise, says “unauthorized”.

At some point the mobile should ask permission to grant permission to the PC to connect to the mobile via ADB, but if not you can always disable and enable USB debugging again to force the question. In this case, rewrites adb devices to display “device”.

You’re all ready. Then type the following command to enter ADB mode and start talking to your mobile: adb shell

You may also like to read another article on FreshLookApp: How to install the new Android Emoji N Preview 2 in (almost) any Android?

4. A record

From the ADB Shell mode you can execute a number of commands, but what interests us at this particular time is screenrecord (requires Android 4.4). To start recording a video, just write screenrecord and a file name, including path. For example: screenrecord sdcard / mivideo.mp4

When you want to stop recording, press Control + C to finish. Then, go to the folder you specified and there you should find your video capture in a format very easy to share and with good compression.

If you wish, you have some additional options that you can add before the name of the file. Are the following commands:

  • Size: You can specify a different size for video in WIDTHxHEIGHT format. For example, –size 1280×720
  • Bit-rate: You can change the bit rate of the resulting video. The default is 4Mbps, which should be enough, but you can increase (or decrease) if you want more quality or smaller size video. For example –bit-rate 8000000
  • Time-limit: You can limit the maximum size of the latter recording you want, in any case always be a maximum of three minutes. For example –time-limit 60
  • Rotate: Rotates the screen 90 degrees
  • Verbose: Displays information on the screen while the video is recorded.

Although it may seem more complex than using an application designed to record screenshots, once everything is set up it takes very little to record more video clips and has the advantage that initiate recording remotely from the PC.

On the other hand, note that when recording these screenshots not the audio is included and the image is saved at a rate in frames per second unstable, converting audio synchronization crazy. In any case, as a curiosity or video clips that need not be true to the millisecond, it serves.