From d386008aca4d10250519680f9d9c4f3ded83223f Mon Sep 17 00:00:00 2001 From: FoxRefire <155989196+FoxRefire@users.noreply.github.com> Date: Sun, 19 May 2024 22:41:42 +0900 Subject: [PATCH 1/2] Fix subprocess --- extractor/cdm.py | 4 ++-- keydive.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extractor/cdm.py b/extractor/cdm.py index 54feb99..61dca10 100644 --- a/extractor/cdm.py +++ b/extractor/cdm.py @@ -64,7 +64,7 @@ class Cdm: """ # https://source.android.com/docs/core/architecture/configuration/add-system-properties?#shell-commands properties = {} - sp = subprocess.run(f'adb -s "{self.device.id}" shell getprop', capture_output=True) + sp = subprocess.run(['adb', '-s', self.device.id, 'shell', 'getprop'], capture_output=True) for line in sp.stdout.decode('utf-8').splitlines(): match = re.match(r'\[(.*?)\]: \[(.*?)\]', line) if match: @@ -137,7 +137,7 @@ class Cdm: # https://github.com/frida/frida/issues/1225#issuecomment-604181822 # Iterate through lines starting from the second line (skipping header) processes = {} - sp = subprocess.run(f'adb -s "{self.device.id}" shell ps', capture_output=True) + sp = subprocess.run(['adb', '-s', self.device.id, 'shell', 'ps'], capture_output=True) for line in sp.stdout.decode('utf-8').splitlines()[1:]: try: line = line.split() # USER,PID,PPID,VSZ,RSS,WCHAN,ADDR,S,NAME diff --git a/keydive.py b/keydive.py index 92f38a9..92591de 100644 --- a/keydive.py +++ b/keydive.py @@ -29,7 +29,7 @@ if __name__ == '__main__': logger.info('Version: %s', extractor.__version__) # Ensure the ADB server is running - sp = subprocess.run('adb start-server', capture_output=True) + sp = subprocess.run(['adb', 'start-server'], capture_output=True) if sp.returncode != 0: raise EnvironmentError('ADB is not recognized as an environment variable, see https://github.com/hyugogirubato/KeyDive/blob/main/docs/PACKAGE.md#adb-android-debug-bridge') From df6831dadc4c363d02a0922ceed1c762ec5af822 Mon Sep 17 00:00:00 2001 From: FoxRefire <155989196+FoxRefire@users.noreply.github.com> Date: Sun, 19 May 2024 23:22:20 +0900 Subject: [PATCH 2/2] Update liboemcrypto disabler module link for latest Magisk and KernelSU --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b154584..d9deee7 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ For advanced users looking to use custom functions with KeyDive, a comprehensive ## Temporary Disabling L1 for L3 Extraction -Some manufacturers (e.g., Xiaomi) allow the use of L1 keyboxes even after unlocking the bootloader. In such cases, it's necessary to install a Magisk module called [liboemcrypto-disabler](https://github.com/Magisk-Modules-Repo/liboemcryptodisabler) to temporarily disable L1, thereby facilitating L3 key extraction. +Some manufacturers (e.g., Xiaomi) allow the use of L1 keyboxes even after unlocking the bootloader. In such cases, it's necessary to install a Magisk module called [liboemcrypto-disabler](https://github.com/hzy132/liboemcryptodisabler) to temporarily disable L1, thereby facilitating L3 key extraction. ## Credits @@ -89,4 +89,4 @@ KeyDive is intended for educational and research purposes only. The use of this --- -By using KeyDive, you acknowledge and agree to the terms of use and disclaimer stated above. \ No newline at end of file +By using KeyDive, you acknowledge and agree to the terms of use and disclaimer stated above.