feat: 设备已装应用查看(含应用名/版本号)
- adb_helper.list_installed_apps:pm list + pm dump 取包名/versionCode/versionName/APK路径 - 应用名解析:常见应用映射 + 小APK流式pyaxmlparser解析(并行+缓存)+ 包名兜底 - web 新增 GET /api/devices/<serial>/apps
This commit is contained in:
+11
-1
@@ -29,7 +29,7 @@ from core.task_manager import TaskManager
|
||||
from core.logger import get_logger, _LOG_DIR, _MODULE_FILES
|
||||
from core.models import db, init_db, User, DeviceGroup, TaskJob, CustomAction
|
||||
from core.apk_manager import ApkManager
|
||||
from core.adb_helper import screenshot
|
||||
from core.adb_helper import screenshot, list_installed_apps
|
||||
from core import uiauto_helper
|
||||
from tasks import list_task_types, get_task_class
|
||||
|
||||
@@ -370,6 +370,16 @@ def api_device_screenshot():
|
||||
return jsonify({"ok": False, "error": data}), 500
|
||||
|
||||
|
||||
@app.route("/api/devices/<serial>/apps")
|
||||
@login_required
|
||||
def api_device_apps(serial):
|
||||
"""获取指定设备上已安装的应用列表(包名 + versionCode + versionName + 路径)。"""
|
||||
ok, data = list_installed_apps(serial)
|
||||
if ok:
|
||||
return jsonify({"ok": True, "apps": data})
|
||||
return jsonify({"ok": False, "error": data}), 500
|
||||
|
||||
|
||||
# ================== 自定义动作(步骤打包) ==================
|
||||
@app.route("/api/custom_actions")
|
||||
@login_required
|
||||
|
||||
Reference in New Issue
Block a user