# Damage-only build V4: refresh the AIR extracted-code cache Follow-up: the user confirmed that V4's damage multiplier works. The focused rule audit in [BATTLE_RULES.md](BATTLE_RULES.md) verifies the final 50000 cap and unchanged check/report methods; this does not establish server-side acceptance or undetectability. 2026-11-07. Only the damage variant is built in this follow-up. ## Evidence and diagnosis Read-only inspection of the installed APK found the V3 stats assets intact: see `device_latest_identity.json`. This establishes installed package content, not which extracted files AIR executed. The user reports no startup overlay. The APK's actual Android AIR runtime was decompiled from `classes.dex` using the existing local JADX library. In `air_runtime/com.adobe.air.ApplicationFileManager.java`: - `readFileName` returns immediately if the extracted asset already exists. It does not compare that file with the new APK's contents or CRC. - `processAndroidDataPath` selects an extraction directory using the launch activity's `uniqueappversionid` metadata. - `RefreshAppCache` leaves an existing directory with that ID untouched; a new ID follows AIR's normal extraction-cache refresh path. The original and all previous modifications retained `978ba13e-4b54-44d5-ae53-24335a039748`. This was an omitted build input and provides a concrete explanation for intact APK patches failing to execute after an in-place update. The private extracted cache was not read, so its actual contents have not been independently confirmed on the device. The few-MB game update could also contain code, but no update payload was captured; its contents are not inferred from its size. ## Change V4 keeps only player-to-enemy damage x10, capped at 50000, and the repaired packaged-main loader. The display marker reads `LOCAL D10 V4`. The compiled Android manifest's AIR cache ID changes to `1c639d6a-e893-598e-8156-2f372d453d3f`. The replacement UUID has the same encoded length; the binary XML layout stays intact. Package ID, app version, permissions and entrypoint remain unchanged. The new ID makes AIR refresh its extracted program assets using its existing runtime code. This is not an uninstall or application-data-clear operation. Besides regenerated signatures, only `AndroidManifest.xml`, `assets/MYRDyd.swf`, and `assets/MYRMain.app` change. ## Validation and device test The serialized SWF passes control-flow/stack checks and all 20 damage-fragment cases. The build additionally validates the compiled manifest with `aapt`, ZIP CRCs, package contents, alignment, and APK signatures. The manifest dump is saved as `v4_manifest_dump.txt`; build identity goes in `battle_v4_manifest.json`. Install the V4 damage package over the current locally signed build and fully relaunch. The expected startup overlay is `LOCAL D10 V4`. In an ordinary adventure battle it should progress from `ENTRY ...` to `HIT ... -> ...`. An enemy with less HP remaining may lose less than the computed damage. Do not clear app data or uninstall to test this cache fix. The build process does not install or launch the app. Actual V4 behavior remains unverified until the on-device test. ```powershell javac -encoding UTF-8 -cp 'tools\ffdec\lib\*;analysis\build' -d analysis\build tools\SurgicalBattlePatch.java java -Xmx1g -cp 'analysis\build;tools\ffdec\lib\*' SurgicalBattlePatch analysis\MYRMain.app analysis\MYRMain_damage_v4.app damage V4 python tools\build_battle_v3.py --mode damage --revision V4 --refresh-air-cache ```