android: build.sh installs and syncs the game files when a phone is attached
After building the APK, android/build.sh now picks the attached device (ANDROID_SERIAL for several), installs the APK (reinstalling on a signature mismatch), syncs the zh client into files/Client and, with --launch, wakes the phone and starts the app. Without a device it only builds. push-client.sh is now incremental (android/sync_client.py): the device keeps files/Client/.mt_sync (size, mtime, path of what the last sync wrote), so later syncs send only new and changed files as one tar streamed through `adb shell -T run-as` (no copy in /data/local/tmp) and delete the ones gone locally. Only game resources are synced; settings and logs the app writes there are kept. --locale zh rebuilds build/zh-locale/Client first when its inputs changed. android/adb_env.sh picks adb and falls back to server port 5038 when :5037 cannot bind. Verified against a fake adb device: first sync (1.4 GB, byte-identical), no-op resync, changed files, deletions, locale switch, --full, the install/launch path and the no-device path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
f9cd63713f
commit
cd9e5b259d
+2
-2
@@ -204,8 +204,8 @@ PORT 扩展(40250 没有对应物,只为移动端/平台而加;不能改 4
|
||||
- macOS:`brew install cmake sdl3 vulkan-headers vulkan-loader molten-vk shaderc`;构建见根目录 README
|
||||
(`-DMT_BUILD_NATIVE_RENDER=ON`,目标 `mt_native_render`)。
|
||||
- Android:NDK 27.2(`ANDROID_NDK_HOME` 指向它)、openjdk@21、Android SDK;`adb` 用 `/opt/homebrew/bin/adb`。
|
||||
`./android/build.sh Release --install` 构建安装 APK,`./android/push-client.sh [--locale zh] <Client>` 推送资源
|
||||
(APK 只含代码,资源在应用数据目录)。启动前先唤醒手机。
|
||||
`./android/build.sh [--launch]` 构建 APK,连着手机时自动安装并增量同步中文资源(`android/push-client.sh`;
|
||||
APK 只含代码,资源在应用数据目录)。启动前先唤醒手机。
|
||||
- Python 3:用于 `port_map.py` 和其他审计脚本。Python 2.7.18 只在复核 `py_embed_spike.py` 时需要。
|
||||
- 真服账号、密码不写进仓库或 audit 账本。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user