fix: extract APKs into per-apk subfolder so decompiler finds the bundle

This commit is contained in:
lvwmwm 2026-09-18 15:07:38 -03:00
parent 1fda845547
commit a4dab1a32d

View file

@ -68,9 +68,9 @@ async function downloadApks(channel: ChannelContext) {
throw new Error(`truncated download: expected ${expected} bytes, got ${data.byteLength}`);
await Bun.write(dest, data);
const out = await Bun.$`unzip -o ${dest} ${{ raw: pattern }} -d ${channel.apksFolder}`
.quiet()
.nothrow();
const out = await Bun.$`unzip -o ${dest} ${{ raw: pattern }} -d ${join(channel.apksFolder, apk)}`
.quiet()
.nothrow();
if (out.exitCode !== 0 && out.exitCode !== 11)
throw new Error(out.stderr.toString().trim() || `unzip failed (exit code ${out.exitCode})`);
return;