Reverse engineer anything with agents, from app behavior down to native binaries.
TypeScript agent-skillsai-agentsbinary-analysisclaude-codeclicodexcordisdecompilerdeveloper-toolsdshdsh-pluginghidrahopperllmmcpmodel-context-protocolreareverse-engineeringstatic-analysistouhou
test(adb): cover staged APK names and evidence identity (#4354)
ShuaixinHuangffeba6aae097
diff --git a/tests/boundary/cli/adbCli.test.ts b/tests/boundary/cli/adbCli.test.tsindex a1f3dcbd2..69925565f 100644--- a/tests/boundary/cli/adbCli.test.ts+++ b/tests/boundary/cli/adbCli.test.ts@@ -1,5 +1,6 @@import { chmod, lstat, readFile, unlink } from "node:fs/promises";-import { dirname } from "node:path";+import { createHash } from "node:crypto";+import { basename, dirname } from "node:path";import { expect, it, onTestFinished } from "vitest";import { z } from "zod";@@ -101,7 +102,7 @@ it.skipIf(process.platform === "win32")(async () => {const workspace = await createTestWorkspace("rea-adb-install-state-");onTestFinished(() => removeTestWorkspace(workspace.root));- const apk = await workspace.write("app.apk", "apk");+ const apk = await workspace.write("app with spaces.apk", "apk");const adb = await workspace.write("adb",`#!/bin/sh@@ -113,7 +114,7 @@ if [ "$1" = version ]; thenfiif [ "$1" = -s ] && [ "$3" = install ]; thenif [ "$4" = -r ]; then selected="$5"; else selected="$4"; fi- cmp "$selected" "$root/app.apk" || exit 1+ cmp "$selected" "$root/app with spaces.apk" || exit 1printf '%s\\n' "$selected" >> "$root/snapshots"if [ -f "$root/installed" ]; thenif [ "$4" != -r ]; then@@ -195,11 +196,18 @@ exit 1expect(new Set(snapshots).size).toBe(3);for (const snapshot of snapshots) {expect(snapshot).not.toBe(apk);+ expect(basename(snapshot)).toBe(basename(apk));await expect(lstat(dirname(snapshot))).rejects.toMatchObject({code: "ENOENT",});}expect(await readFile(apk, "utf8")).toBe("apk");+ for (const receipt of [freshReplace, existingReplace, freshDefault])+ expect(receipt.data.normalized_result).toMatchObject({+ apk_path: apk,+ bytes: 3,+ sha256: createHash("sha256").update("apk").digest("hex"),+ });const calls = await readFile(workspace.path("calls"), "utf8");expect(calls.split("\n").filter((line) => line !== "")).toEqual(["version",