Fix _adb_check_keys method

This commit is contained in:
Jeff Irion 2021-08-27 23:26:50 -07:00 committed by GitHub
parent ea4da71277
commit 34c64af815
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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):