deepak191z commited on
Commit
4f0f2d1
·
verified ·
1 Parent(s): fff54ab

Create apk_debug.py

Browse files
Files changed (1) hide show
  1. utils/apk_debug.py +14 -0
utils/apk_debug.py ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import subprocess
2
+ import streamlit as st
3
+
4
+ def debug_apk(input_path, output_dir):
5
+ command = f"apk-mitm {input_path} -o {output_dir}"
6
+ result = subprocess.run(command, shell=True, capture_output=True, text=True)
7
+
8
+ if result.returncode == 0:
9
+ output_file_name = result.stdout.split("Patched file: ")[-1].strip()
10
+ output_path = os.path.join(output_dir, output_file_name)
11
+ return output_path
12
+ else:
13
+ st.error(f"Error debugging APK: {result.stderr}")
14
+ return None