From b5431f7f959abbd50805f5065ff09026fd35bfc3 Mon Sep 17 00:00:00 2001 From: hyugogirubato <65763543+hyugogirubato@users.noreply.github.com> Date: Wed, 22 May 2024 19:09:40 +0200 Subject: [PATCH] Added autostart error message --- keydive.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/keydive.py b/keydive.py index c387fcd..3df3ae6 100644 --- a/keydive.py +++ b/keydive.py @@ -50,7 +50,10 @@ if __name__ == '__main__': logger.info('Successfully hooked. To test, play a DRM-protected video: https://bitmovin.com/demos/drm') if args.auto: - subprocess.run(['adb', '-s', cdm.device.id, 'shell', 'am', 'start', '-a', 'android.intent.action.VIEW', '-d', 'https://bitmovin.com/demos/drm']) + logger.info('Starting DRM player launch process...') + sp = subprocess.run(['adb', '-s', cdm.device.id, 'shell', 'am', 'start', '-a', 'android.intent.action.VIEW', '-d', 'https://bitmovin.com/demos/drm'], capture_output=True) + if sp.returncode != 0: + logger.error('Error launching DRM player: %s' % sp.stdout.decode('utf-8').strip()) # Keep script running while extracting keys while cdm.running: