proxy qualifier: IG+Google gate, transparent-leak detection, qualify loop service

This commit is contained in:
drjones
2026-08-14 19:43:22 -07:00
parent c69cb783cc
commit 2764eda270
4 changed files with 204 additions and 4 deletions

11
app.py
View File

@@ -982,10 +982,13 @@ def api_text(mac):
serial = _serial_for(mac)
if not serial:
return jsonify({"error": "offline"}), 404
txt = (data.get("text") or "").replace(" ", "%s").replace("'", "\\'")
r = subprocess.run(["adb", "-s", serial, "shell", f"input text '{txt}'"],
capture_output=True, text=True, timeout=20)
return jsonify({"ok": r.returncode == 0, "err": r.stderr[:100]})
txt = (data.get("text") or "").replace(" ", "%s")
try:
r = subprocess.run(["adb", "-s", serial, "shell", "input", "text", txt],
capture_output=True, text=True, timeout=30)
return jsonify({"ok": r.returncode == 0, "err": r.stderr[:100]})
except Exception as e:
return jsonify({"ok": False, "err": f"text err: {type(e).__name__}"}), 500
@app.route("/api/device/<mac>/launch", methods=["POST"])
def api_launch(mac):