Merge pull request #176 from JeffLIrion/patch-1

Fix `_adb_check_keys` method
This commit is contained in:
Nex
2021-08-28 12:25:52 +02:00
committed by GitHub

View File

@@ -37,11 +37,14 @@ class AndroidExtraction(MVTModule):
self.device = None
self.serial = None
def _adb_check_keys(self):
@staticmethod
def _adb_check_keys():
"""Make sure Android adb keys exist.
"""
if not os.path.is_dir(os.path.dirname(ADB_KEY_PATH)):
os.path.makedirs(os.path.dirname(ADB_KEY_PATH))
if not os.path.exists(ADB_KEY_PATH):
os.mkdir(ADB_KEY_PATH)
keygen(ADB_KEY_PATH)
if not os.path.exists(ADB_PUB_KEY_PATH):