Created
October 3, 2020 11:01
-
-
Save theapache64/884132acd97b0a9e1130ef50ba194d50 to your computer and use it in GitHub Desktop.
Search and Pull File via ADB
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You may want to update the root path (
/storage/emulated/0
) according to your device manufacturer. I've only tested this function with OnePlus6.