Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save farhan4648gul/47590a02e03922c13d840a3cd40b4755 to your computer and use it in GitHub Desktop.

Select an option

Save farhan4648gul/47590a02e03922c13d840a3cd40b4755 to your computer and use it in GitHub Desktop.
adb pull /storage/sdcard0/IMG_20251009_151156_141.jpg /home/gc/androidToUbuntuADBPull
adb pull /storage/sdcard0/IMG_20251009_151156_141.jpg /home/gc/androidToUbuntuADBPull
adb pull /storage/sdcard0/IMG_20251009_151156_141.jpg /media/gc/3D70FF98597A25D3/camon17_data_6.3.2026_Space99me
adb pull /storage/sdcard0/IMG_20251009_151156_141.jpg /media/gc/3D70FF98597A25D3/camon17_data_6.3.2026_Space99me
adb pull /storage/sdcard0/Android/media/com.whatsapp/WhatsApp/Media/WhatsApp\ Images/ /media/gc/3D70FF98597A25D3/camon17_data_6.3.2026_Space99me/copy
adb pull /storage/sdcard0/Android/media/com.whatsapp/WhatsApp/Media/WhatsApp\ Images/ /media/gc/3D70FF98597A25D3/camon17_data_6.3.2026_Space99me/copy
@farhan4648gul
Copy link
Author

Screenshot from 2026-03-07 05-53-04

@farhan4648gul
Copy link
Author

adb devices
adb devices

@farhan4648gul
Copy link
Author

adb shell
adb shell

@farhan4648gul
Copy link
Author

sudo apt install android-tools-adb
sudo apt install android-tools-adb

|

@farhan4648gul
Copy link
Author

lsblk
lsblk

lsusb
lsusb

echo $UID
echo $UID

cd /run/user/$(id -u)/gvfs/
cd /run/user/$(id -u)/gvfs/
OR
cd /run/user/1000
cd /run/user/1000

cd 'mtp:host=TECNO_MOBILE_LIMITED_TECNO_CAMON_17_067542517D104374'
cd 'mtp:host=TECNO_MOBILE_LIMITED_TECNO_CAMON_17_067542517D104374'

cd 'Internal shared storage'/
cd 'Internal shared storage'/

ls -> cd 'folder_name' to go to the required folder using shell

@farhan4648gul
Copy link
Author

The copy command was run from adb and not from within the shell...

@farhan4648gul
Copy link
Author

after the copy is successful, simply rm -rf ./* the required folders using adb shell...

@farhan4648gul
Copy link
Author

adb shell rm -rf /path/to/directory/*
adb shell rm -rf /path/to/directory/*

@farhan4648gul
Copy link
Author

within adb shell, use du -sh for folder sizes...

@farhan4648gul
Copy link
Author

Developer mode should be ON

@farhan4648gul
Copy link
Author

MTP should be selected...

@farhan4648gul
Copy link
Author

adb toybox --help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment