On Linux Mint 22.3 Cinnamon:

```bash
adb --version
```
```
Android Debug Bridge version 1.0.41
Version 34.0.4-debian
Installed as /usr/lib/android-sdk/platform-tools/adb
Running on Linux 6.8.0-110-generic (x86_64)
```

On LineageOS 23.2 `adb root`, `adb pull /data/data/` hangs without any output and without any local `data/` being created, how can I see the progress?
3/3
Apr 26, 8:08pm

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:


1. Use pv (Pipe Viewer) for Progress

If you have pv installed, you can use it to show progress. Since adb pull doesn’t natively support piping, you can use a workaround:

bash
adb 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:

bash
adb 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.


2. Check ADB Logs

Run ADB in verbose mode to see what’s happening:

bash
adb -d pull /data/data/ -v

This will output debug information, which may reveal where the process is stuck.


3. Monitor Network Traffic

Use iftop or nethogs to check if data is being transferred over the network:

bash
sudo apt install iftop nethogs
sudo iftop -i any

or

bash
sudo nethogs

Look for ADB-related traffic.


4. Check Device Logs

On the Android device, check logcat for errors:

bash
adb logcat | grep -i "adb\|pull\|data"

5. Alternative: Use rsync over ADB

If you have busybox installed on your device, you can use rsync for progress:

bash
adb shell busybox rsync -avz --progress /data/data/ /sdcard/tmp_data/
adb pull /sdcard/tmp_data/ ./local_data/

6. Check for Permission Issues

  • Ensure adb root actually granted root access:
    bash
    adb root
    adb shell id
    The output should show uid=0(root).
  • If SELinux is enforcing, try temporarily setting it to permissive:
    bash
    adb shell setenforce 0
    Then retry the pull.

7. Try a Different ADB Version

Your ADB version (1.0.41) is quite old. Newer versions (e.g., from Google’s platform-tools) may handle progress better. Try updating:

bash
wget https://dl.google.com/android/repository/platform-tools-latest-linux.zip
unzip platform-tools-latest-linux.zip
./platform-tools/adb pull /data/data/

8. Pull Individual Files

If pulling the entire /data/data/ directory is problematic, try pulling subdirectories or files one by one:

bash
adb pull /data/data/com.example.app/

9. Check for Hanging Processes

If the command is truly hanging, check if the process is stuck:

bash
ps 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?

Apr 26, 8:08pm

This is a shared conversation and may include unverified content that doesn't reflect Mistral AI's views. Login to resume chatting.