From d99d1d6a6652d809063910ae438573054aeeaf63 Mon Sep 17 00:00:00 2001 From: JohnE Date: Sun, 25 Oct 2015 22:57:04 -0700 Subject: [PATCH] MOD: changed pull feature to pull to "data" folder, fingerprints will go to "fingerprints" folder --- dbfp.py | 5 ++++- libs/android.py | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/dbfp.py b/dbfp.py index f235a48..6c0beb5 100644 --- a/dbfp.py +++ b/dbfp.py @@ -7,6 +7,7 @@ import logging from libs import fingerprint from libs import toolbox from libs import android +from subprocess import Popen, PIPE, check_call BASE_DIR = "data" @@ -55,7 +56,8 @@ def fingerprintDir(): logging.info("isRoot == {}".format(isRoot)) - mkdir(BASE_DIR) + if (not mkdir(BASE_DIR)): + return dir_names = ap.getAppsDir() for dir_name in dir_names: @@ -69,6 +71,7 @@ def mkdir(fdir): check_call(["mkdir", fdir]) retval = True except: + logging.error('ERROR: problem creating directory "{}"'.format(fdir)) return retval # diff --git a/libs/android.py b/libs/android.py index 290c63c..2675cb9 100644 --- a/libs/android.py +++ b/libs/android.py @@ -38,9 +38,9 @@ class AndroidAppPull: logging.info("[{}]".format(fdir)) cdir = bdir + os.path.sep + fdir try: - check_call(["mkdir", fdir]) + check_call(["mkdir", cdir]) except: - logging.error("ERROR: problem creating directory {}".format(fdir)) + logging.error("ERROR: problem creating directory {}".format(cdir)) return logging.info("Pulling data from directory {}".format("/data/data/"+cdir)) process = Popen(["adb", "pull", "/data/data/"+fdir], stdout=PIPE, stderr=PIPE, cwd=cdir)