Capturing a video of what’s happening on your Android device is easy with the built‑in screenrecord tool, but most users quickly discover that the output contains only microphone audio. When you need the device’s own sound – game effects, video playback, or a live‑stream – the default approach falls short. This tutorial shows you how to record both the screen and the internal audio without rooting, using only ADB (Android Debug Bridge).
Android isolates app audio from other processes for privacy and DRM reasons. Until Android 10 the screenrecord command could not access the device’s output stream, so the only option was external microphones. Starting with Android 10 Google added an --audio flag, but the feature is still optional for OEMs and may be disabled on some devices. The tutorial below works on any device that officially supports the flag, which includes most stock Android builds from 10 onward.
adb.adb version. You should see something like Android Debug Bridge version 1.0.41. If not, ensure the Platform‑Tools folder is in your PATH.adb devices. The device’s serial number should appear under the List of devices attached heading with the word device next to it.unauthorized, unlock the phone and accept the RSA fingerprint prompt.--audio flag is supportedNot every Android build enables internal‑audio capture. To test, run the following command (replace test.mp4 with any filename you like):
adb shell screenrecord --help | grep "--audio"
If the output includes --audio, the flag is available. If nothing is returned, your device does not support it and you’ll need to fall back to a microphone or use a third‑party app that employs the MediaProjection API (outside the scope of this guide).
Screen resolution, bitrate, and duration affect file size and quality. Below is a balanced set of defaults for most modern phones:
--size 1080x1920 (adjust to your device’s native size or a lower value to save space).--bit-rate 8M (8 Mbps gives clear video without excessive size).--time-limit 180 (the built‑in screenrecord caps at 180 seconds per session).--audio to capture internal sound.If you need longer recordings, you’ll have to start a new session after each 3‑minute block or use a wrapper script (see “Extended recordings” later).
adb shell screenrecord --size 1080x1920 --bit-rate 8M --time-limit 180 --audio /sdcard/record.mp4
Ctrl+C. The command stops, and the file is finalized on the device.After stopping, you should see a message like Video saved to: /sdcard/record.mp4 in the terminal.
adb pull /sdcard/record.mp4 ./record.mp4
The 180‑second limit is hard‑coded into screenrecord. A common workaround is to chain multiple recordings automatically. Here’s a simple Bash loop (Linux/macOS) that creates back‑to‑back 3‑minute files and names them sequentially:
#!/bin/bash
COUNT=1
while true; do
FILENAME="/sdcard/record_${COUNT}.mp4"
echo "Starting segment $COUNT..."
adb shell screenrecord --size 1080x1920 --bit-rate 8M --time-limit 180 --audio $FILENAME &
PID=$!
wait $PID
((COUNT++))
# Press Ctrl+C in the terminal to break the loop when finished.
done
After you stop the loop, pull all segments with a single command:
adb pull /sdcard/record_*.mp4 ./
You can then concatenate the files with ffmpeg if you need a single video.
scrcpy for live preview and recordingIf you prefer to see the screen on your PC while recording, scrcpy supports both video capture and internal audio (as of version 2.0). Install scrcpy, then run:
scrcpy --record=record.mp4 --audio
The tool mirrors the device, records everything you see, and captures internal audio when the device permits it. This method also bypasses the 180‑second limit because scrcpy writes to a file continuously.
--help check. If missing, you cannot capture internal audio with ADB on that device.adb shell pm grant com.android.shell android.permission.CAPTURE_AUDIO_OUTPUT
Then restart the recording.
--bit-rate 4M) if the device runs out of encoder buffers./sdcard/record.mp4 vs. /sdcard/Movies/record.mp4).adb shell ls /sdcard/ to list files and confirm the name.CAPTURE_AUDIO_OUTPUT permission is powerful. Only grant it on devices you trust.If you dislike the cable, you can switch to Wi‑Fi after the initial USB setup:
adb devices lists it.adb tcpip 5555 – this restarts the ADB daemon in TCP mode.adb connect DEVICE_IP:5555. You should see connected to DEVICE_IP:5555.From now on, all the commands in this guide work exactly the same, just over the network.
With the steps above you can capture high‑quality video of any Android screen activity together with the device’s own audio – all without rooting or installing extra apps. The method works on the majority of Android 10+ devices, and the optional scrcpy approach gives you a live preview and removes the 3‑minute ceiling. Keep the troubleshooting checklist handy, and you’ll be ready to produce clean recordings for tutorials, bug reports, or personal archiving.









