Last active
December 12, 2016 12:14
-
-
Save alphacat2018/8d23586a4cfec5e0f0b19b6570025b4e to your computer and use it in GitHub Desktop.
Pull files and/or folders from an unrooted android device.There are two parameters when executing this batch:keyword of App's package name and keyword of filename for searching.
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
@echo off | |
adb shell "package=$(pm list package %1);packageName=${package#*package:};echo packageName: $packageName;filePath=$(run-as $packageName find /data/data/$packageName -name *%2*);echo filePath: $filePath;mkdir /sdcard/myPull;run-as $packageName cp -r $filePath /sdcard/myPull/;cd /sdcard/myPull;ls;" | |
adb pull /sdcard/myPull | |
adb shell "rm -r /sdcard/myPull" | |
pause | |
rem this line is an commented example: pullFiles MyApp .db.By this you can pull all db files. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment