's'
This commit is contained in:
@@ -431,8 +431,17 @@ async def android_action(action: str, serial: str, payload: Optional[dict] = Non
|
||||
return {"message": f"Swiped {direction}"}
|
||||
|
||||
if action == "wake":
|
||||
# AOSP 常亮但 Web 端 scrcpy 仍黑屏时:唤醒 + 轻扫 + Home,促使 Surface 刷新
|
||||
await _shell(serial, "input keyevent KEYCODE_WAKEUP")
|
||||
return {"message": "Wake command sent"}
|
||||
await _shell(serial, "input keyevent 224")
|
||||
try:
|
||||
w, h = await _get_display_size(serial)
|
||||
mx, y0, y1 = max(w // 2, 1), max(int(h * 0.72), 1), max(int(h * 0.28), 1)
|
||||
await _shell(serial, f"input swipe {mx} {y0} {mx} {y1} 280")
|
||||
except (OSError, ValueError, RuntimeError):
|
||||
await _shell(serial, "input swipe 360 1200 360 400 280")
|
||||
await _shell(serial, "input keyevent KEYCODE_HOME")
|
||||
return {"message": "Wake + swipe + home sent (for web mirror refresh)"}
|
||||
|
||||
if action == "rotate":
|
||||
target = str(payload.get("rotation", "0")).strip()
|
||||
|
||||
@@ -673,7 +673,11 @@ def stack_summary() -> dict:
|
||||
"user_password": env.get("NEKO_USER_PASS", "12345678"),
|
||||
"admin_login": "admin",
|
||||
"admin_password": env.get("NEKO_ADMIN_PASS", "12345678"),
|
||||
"note_zh": "与 WebTTY、File Browser 等一致:用户名为 live / admin,口令均为 NEKO_* 环境变量(默认 12345678)。Firefox 若卡在加载:请确认 NEKO_WEBRTC_NAT1TO1 为本机局域网 IP 且 UDP 端口放行。",
|
||||
"note_zh": (
|
||||
"Neko 为 multiuser 模式:「显示昵称」可任意填写(如 live);「密码」必须与 NEKO_USER_PASS / NEKO_ADMIN_PASS "
|
||||
"完全一致(默认 12345678)。不要把 live/12345678 填进同一格。密码错误时会一直卡在连接中。"
|
||||
" WebRTC 需 NEKO_WEBRTC_NAT1TO1 为板子局域网 IP,并放行 UDP 端口段。"
|
||||
),
|
||||
},
|
||||
"neko_firefox_enabled": neko_ff_on,
|
||||
"quick_links": ql,
|
||||
|
||||
Reference in New Issue
Block a user