Skip to content

Improve macOS support and GitHub release updates#2

Draft
backspace135 wants to merge 20 commits into
mainfrom
codex/macos-github-updates
Draft

Improve macOS support and GitHub release updates#2
backspace135 wants to merge 20 commits into
mainfrom
codex/macos-github-updates

Conversation

@backspace135

Copy link
Copy Markdown
Owner

Summary

Improve AndroidTreeView's macOS support and move application updates to GitHub Releases.

macOS

  • Launch CLI workflows through Terminal.app instead of the Windows-only cmd.exe path.
  • Generate a complete .app bundle with an ICNS icon, consistent macOS safe-area sizing, executable permissions, and preserved ad-hoc signatures.
  • Package macOS archives with ditto so code-signing metadata survives ZIP extraction.

Updates and versioning

  • Replace the internal NekoIndex endpoint with the public GitHub Releases API.
  • Resolve App and Mini release assets, checksums, release notes, and release-page links from GitHub.
  • Read the running version from assembly metadata so workflow-provided release versions are reflected immediately in the UI and update comparison.
  • Keep non-Windows automatic installation disabled while still linking macOS users to the GitHub release.

Release and documentation

  • Synchronize product version 1.0.6 across application metadata, packaging, manifests, and documentation.
  • Document Windows and macOS usage and add the semi-automatic Root workflow design and implementation plan.

Root cause

The previous macOS CLI path was Windows-specific, the app icon filled the full ICNS canvas, and regular ZIP creation discarded extended-attribute signatures. Update checks also depended on a private LAN endpoint, while the displayed version came from a separately maintained constant that could drift from release metadata.

Verification

  • dotnet test AndroidTreeView.sln -p:EnableWindowsTargeting=true: 270/270 tests passed.
  • Release solution build completed with 0 warnings and 0 errors.
  • macOS arm64 App ZIP built successfully.
  • ZIP checksum, bundle structure, executable permissions, release.json, ICNS safe-area bounds, and post-extraction code signature verified.

backspace135 and others added 20 commits July 9, 2026 15:43
- CliLauncher: branch by platform. macOS now writes an equivalent .command
  shell script with the same numbered menu and opens it in Terminal.app;
  previously it hardcoded cmd.exe + .bat and failed silently on macOS.
- Surface launch failures via Notifier (toast) instead of only logging.
- Add cli.unsupported / cli.launchFailed strings to both ResX files.
- Packaging: generate AppIcon.icns from atv-icon.png (sips + iconutil) and
  set CFBundleIconFile so the macOS .app shows an icon in Dock/Finder.
Sync version across AppInfo, App/Mini/Mini.Mac project metadata,
app.manifest, packaging scripts, wix, docs, and README.
- Platform badge Windows -> Windows + macOS
- Describe as cross-platform (Windows + macOS Apple Silicon), not Windows-only
- Generalize the usage section and add a macOS subsection (Terminal.app CLI,
  drag to /Applications, Gatekeeper). English README already covered this.
分步向导:上传刷机包→提取 boot.img→手机端官方 Magisk 修补→进 bootloader→flash boot,写操作前强制确认+自动备份原始 boot。双平台(Windows/macOS)。
Fix macOS CLI terminal launch, add macOS app bundle icon generation, update release metadata/docs to 1.0.6, and remove unrelated changes from the PR.
- 构建时打包固定版 Magisk APK(SHA-256 校验),运行时 adb install
- 修补改用已装 App 自带的 boot_patch.sh + native 组件,不再桌面侧拆各 ABI 二进制
- 同步 §1.1/§2/§3/§4/§5.1/§6.2/§7/§8/§10/§11/§13
- 保留第 4 步实机验证警告(已装 App 脚本能否被 adb shell 直接调到仍待验证)
…con' into fix/macos-cli-terminal-and-app-icon

# Conflicts:
#	CLAUDE.md
Adds the semi-automatic Root wizard: extract boot/init_boot from a
user-supplied firmware package, patch it with components taken from the
pinned official Magisk APK, and flash it after backup, ADB-to-fastboot
identity verification, unlock/layout checks and explicit confirmation.

This is a deliberate exception to the read-only stance: the wizard writes
only an evidence-backed boot / init_boot image. It never unlocks the
bootloader and never touches system, vendor, vbmeta, recovery or super.

Patch flags are probed on the device with official Magisk's own app_init
(app_functions.sh) and passed to boot_patch.sh as environment variables.
This is not optional: boot_patch.sh silently defaults a missing flag to
false and ends in a bare `true`, so its exit code proves nothing. On a
system-as-root device KEEPVERITY=false strips `logical` and
`first_stage_mount` off the /system fstab entry, leaving first-stage init
unable to mount the root filesystem — a guaranteed bootloop. Verified on
a real Redmi Note 9 5G (cannon, MT6853, Android 12/MIUI 14): with the
probed flags the patcher reproduces the official Magisk app's output
byte-for-byte; without them it does not.

As defence in depth, the patched image's own config is read back out of
the ramdisk and compared against the probed flags before the image is
allowed anywhere near the flash step. Neither the exit code nor a header
check can catch a wrongly-flagged image — it is structurally valid.

Bumps every aligned version field to 1.0.7 and points the README device
screenshot at the image that actually exists (v1.0.5); it had referenced
a v1.0.6 file that was never added.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
`tools/verify-scrcpy-latest.ps1` asserts the pin equals the latest upstream
release, so the Publish workflow started failing the moment scrcpy 4.1 shipped
on 2026-07-12. Unrelated to anything else in this branch.

Verified by running the packaged binary, not by trusting the pin: the rebuilt
osx-arm64 bundle reports `scrcpy 4.1`.

Worth knowing for the next bump: `Get-ScrcpyRoot` in build-update-zip.ps1 caches
at artifacts/tools/scrcpy/<rid> and keys the cache on whether the executable
exists, not on its version. A local rebuild after a version bump therefore keeps
the old binary and silently produces a stale package — CI is unaffected because
it always starts from a clean tree. Delete artifacts/tools/scrcpy to force it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The macOS packaging job died with "/usr/bin/test is not recognized". `test`
lives at /bin/test on macOS; /usr/bin/test is a Linux path. Only the App
osx-arm64 job reached this branch, so it was the only one to fail.

Uses System.IO.File.GetUnixFileMode instead of shelling out, which needs no
external binary and no assumption about its path.

Reproduced the failure and verified the fix locally under pwsh on macOS,
including stripping the exec bit to confirm the check still rejects a
non-executable payload-dumper-go.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants