On Linux, when adb pull hangs without showing progress, it’s often because ADB’s default output doesn’t display transfer progress. Here are a few ways to monitor or troubleshoot the transfer:
pv (Pipe Viewer) for ProgressIf you have pv installed, you can use it to show progress. Since adb pull doesn’t natively support piping, you can use a workaround:
bashadb pull /data/data/ & sleep 1; tail -f /proc/$(pgrep -f "adb pull")/fd/1 | pv -s $(adb shell stat -c %s /data/data/)
This is a hacky approach and may not work reliably.
Better approach:
Use adb exec-out with pv:
bashadb shell "cat /data/data/your_file_or_dir" | pv -s $(adb shell stat -c %s /data/data/your_file_or_dir) > local_file
Replace your_file_or_dir with the actual file or directory path.
Run ADB in verbose mode to see what’s happening:
bashadb -d pull /data/data/ -v
This will output debug information, which may reveal where the process is stuck.
Use iftop or nethogs to check if data is being transferred over the network:
bashsudo apt install iftop nethogs sudo iftop -i any
or
bashsudo nethogs
Look for ADB-related traffic.
On the Android device, check logcat for errors:
bashadb logcat | grep -i "adb\|pull\|data"
rsync over ADBIf you have busybox installed on your device, you can use rsync for progress:
bashadb shell busybox rsync -avz --progress /data/data/ /sdcard/tmp_data/ adb pull /sdcard/tmp_data/ ./local_data/
adb root actually granted root access:
The output should showbashadb root adb shell id
uid=0(root).Then retry the pull.bashadb shell setenforce 0
Your ADB version (1.0.41) is quite old. Newer versions (e.g., from Google’s platform-tools) may handle progress better. Try updating:
bashwget https://dl.google.com/android/repository/platform-tools-latest-linux.zip unzip platform-tools-latest-linux.zip ./platform-tools/adb pull /data/data/
If pulling the entire /data/data/ directory is problematic, try pulling subdirectories or files one by one:
bashadb pull /data/data/com.example.app/
If the command is truly hanging, check if the process is stuck:
bashps aux | grep adb
Kill it with kill -9 <PID> if needed.
Question:
Have you tried pulling a smaller file or directory first to see if the issue is size-related? If so, what was the result?