MOD: changed pull feature to pull to "data" folder, fingerprints will go to "fingerprints" folder

This commit is contained in:
JohnE 2015-10-25 22:57:04 -07:00
parent 9684ea7158
commit d99d1d6a66
2 changed files with 6 additions and 3 deletions

View File

@ -7,6 +7,7 @@ import logging
from libs import fingerprint from libs import fingerprint
from libs import toolbox from libs import toolbox
from libs import android from libs import android
from subprocess import Popen, PIPE, check_call
BASE_DIR = "data" BASE_DIR = "data"
@ -55,7 +56,8 @@ def fingerprintDir():
logging.info("isRoot == {}".format(isRoot)) logging.info("isRoot == {}".format(isRoot))
mkdir(BASE_DIR) if (not mkdir(BASE_DIR)):
return
dir_names = ap.getAppsDir() dir_names = ap.getAppsDir()
for dir_name in dir_names: for dir_name in dir_names:
@ -69,6 +71,7 @@ def mkdir(fdir):
check_call(["mkdir", fdir]) check_call(["mkdir", fdir])
retval = True retval = True
except: except:
logging.error('ERROR: problem creating directory "{}"'.format(fdir))
return retval return retval
# #

View File

@ -38,9 +38,9 @@ class AndroidAppPull:
logging.info("[{}]".format(fdir)) logging.info("[{}]".format(fdir))
cdir = bdir + os.path.sep + fdir cdir = bdir + os.path.sep + fdir
try: try:
check_call(["mkdir", fdir]) check_call(["mkdir", cdir])
except: except:
logging.error("ERROR: problem creating directory {}".format(fdir)) logging.error("ERROR: problem creating directory {}".format(cdir))
return return
logging.info("Pulling data from directory {}".format("/data/data/"+cdir)) logging.info("Pulling data from directory {}".format("/data/data/"+cdir))
process = Popen(["adb", "pull", "/data/data/"+fdir], stdout=PIPE, stderr=PIPE, cwd=cdir) process = Popen(["adb", "pull", "/data/data/"+fdir], stdout=PIPE, stderr=PIPE, cwd=cdir)