Tuesday, 10 March 2015

Xperia Z2,Z3 Android phones & may be few others, offers a feature of screen recording. But how we developers are supposed to use that feature when we don't own one. Google has added the feature of screen recording in its Android version 4.4 Kitkat. Few Apps are available at Play store which provides a good interface to perform the same function but the fun is different if your are the one writing and pushing the commands to adb to perform your job.

Step1: Open cmd in your windows and navigate to your platform-tools of Android SDK and execute adb.exe. This is just required to check if you have successfully reached the desired path and adb drivers are properly installed.You will see some information populate your terminal, do not panic it confirms everything is fine.

Step2:Type the following command and execute when ready. Note: SD card path may vary from device to device this one is for Nexus 4. For devices with external SD card this (sdcard/demo.mp4) may work but I haven't tested yet.

Command: adb shell screenrecord storage/sdcard0/demo.mp4


Step3: Use Ctrl+c to stop video recording.

Refresh your SD card, locate demo.mp4 file and play the video 