Feature: Install Android APK updates pushed from the master
The master now sends COMMAND_UPDATE to Android hosts: it picks a "Build Client -> Android" APK, checks the ZIP magic and that the package carries this master's fingerprint, then sends [cmd][size][APK][xxh64]. The client verifies length and hash, writes filesDir/update.apk and commits a PackageInstaller session, so the system installer still asks the user to confirm - an app cannot replace itself silently. Write and hash failures come back over TOKEN_CLIENT_MSG, so the master sees why nothing happened instead of a silently dropped packet. Sending the wrong file is what the fingerprint check guards against: a template without the master id installs fine and then cannot connect back. "Send anyway" is offered only after spelling that out, and the client advertises CLIENT_CAP_APK_UPDATE (0x0400) so an old APK gets "install a new build once by hand" instead of a packet it would discard. Also report the real versionName/versionCode at login instead of the hardcoded v1.0.0, add android/tools/verify_update_apk.py (pre-send check of size, ZIP_STORED libs, ABI, package, versionCode and the decrypted CONNECT_ADDRESS, which it still locates after BuildDlg rewrote szFlag), and translate the nine new strings in en_US, zh_TW and de_DE. Verified on the emulator and against the live release server: generate, sign, send, install, and the device reconnects and re-grants screen capture. Language packs are GBK and were appended as bytes. Co-Authored-By: deepseek-flash
This commit is contained in:
1 parent
cdd9c56b3d
commit
36618b0ad0
17 files changed
+955
-8
No files matched your search
@@ -2255,3 +2255,12 @@ MCP:
|
||||
延迟高=high latency
|
||||
带宽不足=low bandwidth
|
||||
链路改善=link improved
|
||||
该安卓客户端版本过旧,不认识在线升级命令(收到也会丢弃)。\n\n请先手动在同一台设备上安装一次新版 APK,之后即可在线升级。=This Android client is too old and does not understand the online upgrade command (it will be discarded).\n\nInstall a new APK on the same device manually once, then online upgrades will work.
|
||||
无法打开文件:\n%s=Cannot open file:\n%s
|
||||
APK 是空文件或超过 %llu 字节上限,不能下发。\n\n文件:\n%s=The APK is empty or larger than the %llu byte limit and cannot be sent.\n\nFile:\n%s
|
||||
读取文件失败:\n%s=Failed to read file:\n%s
|
||||
无法下发该 APK:\n%s\n\n%s=Cannot send this APK:\n%s\n\n%s
|
||||
不是 APK(ZIP)文件=Not an APK (ZIP) file
|
||||
这个 APK 里没有找到本主控的标识,装上去很可能连不回本服务器。\n\n请确认它是「生成客户端 → 安卓」导出的包,并且已经用 android/sign_apk.bat 重新签名(未重签的包签名对不上,系统会拒绝覆盖安装)。\n\n文件:\n%s\n\n仍然下发吗?=This APK does not contain the identifier of this master, so once installed it very likely cannot connect back to this server.\n\nMake sure it was exported by "Build Client -> Android" and re-signed with android/sign_apk.bat (a package that was not re-signed keeps the old signature and the system will refuse to overwrite the installed app).\n\nFile:\n%s\n\nSend anyway?
|
||||
APK 已下发。\n\n接下来的操作需要在设备上完成:\n1. 若没弹出安装框,可能是系统未授权「安装未知应用」——在设备的应用设置里给 YAMA 打开;\n2. 点「安装」确认覆盖安装;\n3. 安装完成后打开 YAMA,重新授权录屏(升级后授权一定会失效)。=The APK has been sent.\n\nThe remaining steps must be done on the device:\n1. If no installer dialog appears, the system may not allow "install unknown apps" - enable it for YAMA in the device's app settings;\n2. Tap "Install" to confirm the overwrite install;\n3. After installing, open YAMA and grant screen capture again (the grant is always lost after an upgrade).
|
||||
确认=Confirm
|
||||
Reference in new issue
Block a user