v2.2.1 更新说明: - 新增 xposed-module(Telegram/微信/SQLite Hook),双 APK + LSPosed 作用域 - HookMessageReceiver 后台直接 DebugForwarder + goAsync,修复 notiMessage 退后台丢消息 - MessageLogStore 日志持久化;AppConfig 调试/上传开关;PC 调试台 debug-server - 健康检查去掉联网限制;通知/Hook 通道增加诊断日志 - 安装脚本 install-full/configure-lsposed/start-debug-server;文档 CHANGELOG + HOOK_GUIDE
32 lines
780 B
Python
32 lines
780 B
Python
import shutil
|
|
import sqlite3
|
|
import sys
|
|
|
|
db_path = sys.argv[1]
|
|
apk_path = sys.argv[2]
|
|
hook_pkg = "com.miraclegarden.smsmessage.xposed"
|
|
scopes = [
|
|
"org.telegram.messenger.web",
|
|
"org.telegram.messenger",
|
|
"com.miraclegarden.smsmessage",
|
|
]
|
|
|
|
shutil.copy2(db_path, db_path + ".bak")
|
|
conn = sqlite3.connect(db_path)
|
|
c = conn.cursor()
|
|
|
|
c.execute(
|
|
"INSERT OR REPLACE INTO modules (mid, module_pkg_name, apk_path, enabled, auto_include) "
|
|
"VALUES (?, ?, ?, ?, ?)",
|
|
(2, hook_pkg, apk_path, 1, 0),
|
|
)
|
|
c.execute("DELETE FROM scope WHERE mid = 2")
|
|
for pkg in scopes:
|
|
c.execute(
|
|
"INSERT OR REPLACE INTO scope (mid, app_pkg_name, user_id) VALUES (?, ?, ?)",
|
|
(2, pkg, 0),
|
|
)
|
|
conn.commit()
|
|
conn.close()
|
|
print("configured", hook_pkg, "scopes=", scopes)
|