feat: add Zalo database extraction and schema analysis script using ADB

This commit is contained in:
Victor Phan
2026-07-23 22:36:15 +07:00
parent a0548bf1fa
commit 6862b5da54
+2 -2
View File
@@ -8,7 +8,7 @@ logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(
def run_adb_command(command: str):
"""Chạy lệnh ADB shell và trả về kết quả"""
full_cmd = f"adb -s 10.160.138.2:5555 shell {command}"
full_cmd = f"adb -s 192.168.1.193:5555 shell {command}"
try:
result = subprocess.run(full_cmd, shell=True, check=True, capture_output=True, text=True)
return result.stdout.strip()
@@ -21,7 +21,7 @@ def run_adb_command(command: str):
def analyze_zalo():
logging.info("BẮT ĐẦU TRÍCH XUẤT DATABASE ZALO (PULL VỀ SERVER)")
# Đảm bảo kết nối
subprocess.run("adb connect 10.160.138.2:5555", shell=True, capture_output=True)
subprocess.run("adb connect 192.168.1.193:5555", shell=True, capture_output=True)
# Tạo thư mục chứa db
os.makedirs("zalo_dbs", exist_ok=True)