Skip to content

Instantly share code, notes, and snippets.

@theapache64
Created October 3, 2020 11:01
Show Gist options
  • Save theapache64/884132acd97b0a9e1130ef50ba194d50 to your computer and use it in GitHub Desktop.
Save theapache64/884132acd97b0a9e1130ef50ba194d50 to your computer and use it in GitHub Desktop.
Search and Pull File via ADB
function pull_file(){
filePath=$(adb shell find /storage/emulated/0 -iname "*$1*" | tr -d '\r' | xargs -n1)
x=$(echo "$filePath" | tr '\n' ' ' | xargs)
adb pull "$x"
}
@theapache64
Copy link
Author

You may want to update the root path (/storage/emulated/0) according to your device manufacturer. I've only tested this function with OnePlus6.

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