ADB (Android Debug Bridge) is a versatile command-line tool that lets you communicate with a device. It's often used by developers for debugging applications, but it can also be used for various device management functions, including screen recording. Here's a guide on how to use the ADB command to record your Android device's screen:
Prerequisites:
-
Install ADB on your computer:
- Download the Android SDK Platform Tools for your operating system from the official website.
- Extract the downloaded files to a convenient location on your computer.
-
Enable USB Debugging on your Android device:
- Go to Settings > About Phone.
- Tap on Build Number seven times to enable Developer Options.
- Navigate back to Settings > Developer Options.
- Enable USB Debugging.
-
Connect your Android device to your computer:
- Use a USB cable to connect your device to your computer.
- Ensure that you have allowed permissions for your computer to communicate with your device.
ADB Screen Recording Command:
-
Open Command Prompt/Terminal:
- Navigate to the folder where you extracted the platform tools.
- Open a Command Prompt or Terminal window in that folder.
-
Record Screen using ADB:
-
Use the following command to start recording your device's screen:
adb shell screenrecord /sdcard/screenrecord.mp4 -
This command will start recording the screen and save the file as
screenrecord.mp4in the root of your device's storage.
-
-
Stop the Recording:
- To stop the recording, press
Ctrl + Cin the Command Prompt/Terminal where the recording command is running.
- To stop the recording, press
-
Retrieve the Recorded Video:
-
Use the following command to pull the recorded video file to your computer:
adb pull /sdcard/screenrecord.mp4
-
-
Optionally, Use Additional Parameters:
-
You can add parameters to specify size, bit rate, or time limit. For example:
adb shell screenrecord --time-limit 180 --bit-rate 8000000 /sdcard/screenrecord.mp4 -
--time-limit: Duration of the recording in seconds (default is 180 seconds). -
--bit-rate: Set video bit rate (e.g., 8000000 for 8Mbps). -
--size: Set video resolution (e.g., 1280x720).
-
This advanced tip enables you to create videos directly from your device’s screen, which is useful for creating tutorials, app demo videos, and more.


