# Show Java modernization plan Rebuild Show Java as a single, ad-free Kotlin and Jetpack Compose app for Android 10 and newer. Preserve offline decompilation, the source browser and ZIP export, and access to prior results. All features are available to every user. Use `development` at `f2f71dc` to establish legacy behavior. The 2020 `origin/feature/fragments` ref is a reference for storage and coroutine migration. Build the modern app on a local integration branch with independent commits from subagent worktrees. ## Android app - Keep `com.njlabs.showjava`, `minSdk 29`, and `targetSdk 37`. Start with AGP 9.5.3, Gradle 9.6.0, JDK 17, built-in Kotlin with the matching Compose compiler plugin, and Compose BOM 2026.11.01, which requires `compileSdk 37.1`. Validate availability and compatibility from a clean checkout before freezing the version catalog. [AGP compatibility](https://developer.android.com/build/releases/agp-9-5-0-release-notes) · [Compose 2026.11.01](https://developer.android.com/blog/posts/jetpack-compose-november-2026-release) - Use a single-activity Material 3 app with stable Navigation 3, screen ViewModels and lifecycle-aware `StateFlow`. Use DataStore to migrate supported preferences. Persist jobs and result metadata together in the atomic file store shared with the worker, so job status and the published result index share one transaction. Build an adaptive file tree and source viewer. Measure selection, wrapping, scrolling, and memory on large source files before choosing whether highlighting needs a local renderer. [Android architecture](https://developer.android.com/topic/architecture/recommendations) · [Adaptive layouts](https://developer.android.com/develop/ui/compose/layouts/adaptive) - Accept system document picker results and supported `content://` intents. Stage inputs to private disk in bounded buffers. Offer user-selected import of the old `show-java/sources` tree, validating `info.json` and keeping original files intact. Export through the system picker or FileProvider. Scope installed-app discovery to visible launchable apps and offer APK file import for other apps. [Document access](https://developer.android.com/training/data-storage/shared/documents-files) · [Package visibility](https://developer.android.com/training/package-visibility) - Verify the signing lineage and highest published Play `versionCode` before production release. [App signing](https://developer.android.com/studio/publish/app-signing) ## Build the modern app Use JDK 17 and point Gradle to an Android SDK with platform 37.1 and build tools 36.0.0. The active app is in `app/src/main`. The top-level wrapper builds it without production credentials. ```sh sdkmanager 'platforms;android-37.1' 'build-tools;36.0.0' 'platform-tools' 'ndk;28.2.13676358' 'cmake;3.22.1' ./gradlew assembleDebug lintDebug ``` The debug launcher passed on API 29 and API 37. On API 29, importing the v3 test application JAR through the system picker produced a byte-for-byte private copy and the selection reopened after the app process restarted. Command-line Tools 12.0 registered the local API 37 emulator as `target=android-0`. Setting `target=android-37.0` in the disposable AVD's registration `.ini` corrected the SurfaceFlinger failure with the Google Play x86_64 revision 7 image, emulator 37.3.10, and SwiftShader. [Legacy fixture](#legacy-baseline-setup) · [Android Issue Tracker](https://issuetracker.google.com/issues/546200928) Show Java accepts typed APK, JAR, and DEX open and share requests with a content URI read grant. Shared files go through the same private staging limits as the document picker. Installed-app discovery is scoped to launchable apps visible to the current profile. Show Java stages the selected app’s base and installed split APKs under the shared input limit and sends them to the selected engine in one job. For CFR and Vineflower, the worker converts the DEX shards to one temporary JAR with dex2jar. The conversion runs on the same runtime as the decompiler, including HotSpot when available. On-demand features absent from the device are outside the installed set. [ApplicationInfo](https://developer.android.com/reference/android/content/pm/ApplicationInfo#splitSourceDirs) · [Split delivery](https://developer.android.com/guide/app-bundle/app-bundle-format#split_apks) The app keeps the existing launcher artwork. On API 33 and newer, the user can enable job notifications while a job is active. Decompilation starts with either permission setting. A minified API 37 build accepted a cold JAR open and warm share with the grant, used the offered MIME type for an extensionless name, preserved the prior selection after an ungranted request, and staged the test sender's installed APK. Preferences DataStore 1.3.0 migrates the legacy dark-mode and system-app visibility settings. New installs follow the system appearance. Settings offers system, light, and dark themes, reader preferences, a default JAR engine, optional worker heap usage and the system-app picker preference. The API 37 debug smoke test verified preference persistence, source browsing on phone and wide layouts, live heap usage, and byte-for-byte ZIP export. Minified APKs on API 29 and 37 imported a signed app with a base APK, a code-bearing feature split and a resource-only configuration split. The viewer showed calls between the base and feature classes. [DataStore](https://developer.android.com/jetpack/androidx/releases/datastore) Navigation 3 1.2.2 saves typed routes for Home, both history screens, and an open result. The result entry owns its source lease and releases it when the user leaves the viewer. API 29 debug testing verified nested Back navigation, lease release, and rotation with a source open. A follow-up restored the open nested source in the same task after Android killed the stopped app process and launched a new PID. The release build runs R8 and resource shrinking. Build it with `./gradlew assembleRelease bundleRelease lintRelease`. The APK signed with a disposable test key passed all five picker routes, source browsing, a dark mode change, and ZIP export on API 29 and 37. Both crash buffers stayed empty. Production signing and distribution require the existing Play app's signing setup. A clean offline build of the ad-free app produced both APKs and an unsigned release bundle. The packaged manifests and runtime dependency graph passed checks for Internet, billing, and advertising entries. Debug and release lint passed. The release APK passed 16 KiB ZIP alignment and every packaged native library had 16 KiB ELF load alignment. The `db23611` candidate added the offline privacy policy and release notices. The APK and AAB contained the exact packaged texts, and debug and minified release assembly, lint, unit tests, and bundle assembly passed. Its release APK passed 16 KiB ZIP alignment. The test-signed minified candidate on API 37 opened the privacy policy offline and completed a small CFR job with notification permission ungranted. A larger job stayed foreground in the background with permission ungranted. Granting permission during the job posted its existing notification. The job published all 801 files and removed the notification when it finished. Result History reopened the small result and exported its nine Java files with valid ZIP checksums. The crash buffer was empty. The test used one 3 GiB guest in the 6 GiB host scope, left at least 25.97 GiB of host RAM available, and recorded zero scope OOM kills. ## Decompiler pipeline The legacy worker collected class definitions from every DEX before splitting them into chunks, then handed the chunk set to the selected engine. The legacy app requested `largeHeap`. Use the published v3 APK and legacy fixtures to reproduce output and memory baselines. [Legacy input preparation](https://github.com/niranjan94/show-java/blob/f2f71dcd0955f21c8a9538322137a7961d33e792/app/src/main/kotlin/com/njlabs/showjava/decompilers/JarExtractionWorker.kt#L101) · [Legacy engine dispatch](https://github.com/niranjan94/show-java/blob/f2f71dcd0955f21c8a9538322137a7961d33e792/app/src/main/kotlin/com/njlabs/showjava/decompilers/JavaExtractionWorker.kt#L40) · [Legacy manifest](https://github.com/niranjan94/show-java/blob/f2f71dcd0955f21c8a9538322137a7961d33e792/app/src/main/AndroidManifest.xml#L41) 1. Keep engine adapters separate from the Android job runner. Use CFR 0.152 for direct JAR input and JADX 1.5.6 for direct APK/DEX/JAR input. The JADX 1.5.7 release offers desktop bundles, and Maven Central publishes split modules through 1.5.6. Start the Fernflower successor with a reproducible Android compatibility build of Vineflower 1.12.0. Build and run upgraded engines on API 29 and 37 in a minified APK. Every shipped engine must advance the legacy pin. [CFR](https://github.com/leibnitz27/cfr/releases) · [JADX split modules](https://repo.maven.apache.org/maven2/io/github/skylot/jadx-core/) · [JADX 1.5.7](https://github.com/skylot/jadx/releases/tag/v1.5.7) · [Vineflower](https://github.com/Vineflower/vineflower/releases/tag/1.12.0) 2. Treat input staging, analysis, output, and resource extraction as separate memory measurements. Feed classfile engines original JARs where possible. Where DEX conversion is required, convert a DEX or bounded shard, finish or spool its output, and release its state before the next shard. Retain cross-DEX and nested-class context where required for correct output. Write completed source and resources to disk, cap temporary bytes, and verify the behavior of malformed, unsupported, and legacy ODEX inputs explicitly. 3. Run a user-started `dataSync` foreground service in a private worker process with lean initialization. Allow one active job initially. Use stable job IDs to locate staged input, checkpoints, and output. Persist job and batch state at validated boundaries, make cancellation observable, and recover terminal or interrupted state after a worker exit. Publish only validated results and retain the last completed result through retries. Test timeouts and both visible and background execution. Android 17 accounts for the app's processes together when the Memory Limiter applies. [Foreground service types](https://developer.android.com/develop/background-work/services/fgs/service-types) · [Process splitting](https://developer.android.com/topic/performance/memory/guide/process-splitting) 4. Decide on native code from measurements. If input conversion, indexing, or large buffers dominate, first compare bounded disk I/O or read-only file mapping. Prototype a Rust or C++ JNI component when it can own and replace those allocations. Pass file descriptors and small records across JNI. Measure the improvement under the same fixture, memory conditions, and release setup. [Android memory concepts](https://developer.android.com/topic/performance/memory/guide/concepts) 5. If a required engine still repeatedly reaches ART's heap limit after those changes, prototype packaged headless OpenJDK in an ARM64 private worker. Compare the same engine and fixture on ART and OpenJDK. Require repeatable recovery of the failing workloads, equivalent class and method coverage, and acceptable peak total app memory, startup time and download size on constrained API 29 and API 37 devices. Include background execution, license and notice review, and 16 KB ELF and package alignment. Defer broad native engine reimplementation until profiling demonstrates a dominant engine graph cost and a parity prototype proves a viable replacement. [Android OpenJDK precedent](https://github.com/FCL-Team/Android-OpenJDK-Build) · [16 KB Android compatibility](https://developer.android.com/guide/practices/page-sizes) The API 29 debug and minified CFR/JADX probes passed 14 cases with a 512 MiB managed heap after runs with a 16 MiB heap produced OOMs. The same minified probe passed on API 37 with a 576 MiB managed heap. The modern app retains the legacy `largeHeap` request and logs `Runtime.maxMemory()` at the start of each worker job. The same API 29 emulator profile reported different effective heap limits across boots despite an unchanged `largeHeap` flag and `dalvik.vm.heapsize`. Match measured heap ceilings when comparing performance. The integrated CFR JAR worker published the expected sources from the two-class fixture on a fresh API 29 emulator and from the v3 test application JAR on API 37. A reused API 29 profile interrupted the v3 fixture run. The UI recovered an interrupted terminal state and allowed another attempt. On API 37, shortening the Android `dataSync` service allowance to 2.5 seconds triggered the system timeout and stopped the worker. The app restored the job as interrupted and kept the last completed result. [Legacy fixture](#legacy-baseline-setup) The system picker and isolated job flow passed all five supported routes on API 29 and API 37. CFR, JADX, and Vineflower produced nine Java files from the same small JAR. JADX produced nine from raw DEX and ten from the APK. Jobs written before engine selection restore as CFR/JAR. Legacy ODEX remains unsupported. Full APK resource extraction is paused. Vineflower 1.12.0 builds from the checksum-verified source archive with Android stream and runtime adaptations. It writes one rendered class at a time and retains JAR-wide analysis state to resolve dependencies. Its minified probes on API 29 and API 37 produced the same SHA-256 hashes for all 14 Java source files across three fixtures, including a record and module descriptor. The Kotlin click listener reconstruction remains a fidelity gap, and the adapter reads base entries from multi-release JARs. Vineflower now propagates fatal VM errors through its analysis and rendering tasks to the worker, where they abort publication. The JVM and API 29 probes injected OOM and stack overflow in both phases. The fix propagated all four faults and preserved ordinary warning behavior. Three normal fixtures produced 14 byte-identical Java files on the JVM. The Android probes verified error propagation in debug and minified builds. An API 37 probe at a 192 MiB ceiling reproduced an OOM during preprocessing. The app recovered the interrupted job, kept the prior result, and published a byte-identical small retry. The worker records a distinct heap-exhaustion outcome before exiting its private process when it can write the job state. If it exits before the write succeeds, lease-based recovery marks the job interrupted. A JVM fault injection test writes a partial source and throws an OOM. It checks that the partial output is removed and the prior sources stay available. In a capped API 37 debug probe, the profiler's sampling thread initially threw an OOM while Vineflower was preprocessing the large JAR. After the sampler was corrected, the coroutine timer used for cancellation threw under the same pressure. A dedicated polling thread now checks cancellation and handles heap exhaustion through the worker's existing failure path. The same workload at a verified 192 MiB ART ceiling recorded `OUT_OF_MEMORY` with an empty crash buffer. The worker kept the previous result, the small retry produced the same nine source hashes, and cancelling another run from Compose preserved both results. The recovery runs used one 3 GiB guest at a time inside a 6 GiB Linux memory scope with swap disabled in the scope. A host watchdog sampled available RAM and swap every second, with cutoffs of 12 GiB available RAM and 2 GiB free swap. The lowest observed host availability across the three runs was 25.6 GiB. The successful run recorded zero scope OOM kills and removed its emulator and private ADB server. [Benchmark procedure](tools/decompiler-bench/README.md#profile-the-modern-android-worker) The latest published job is accessible from the Compose home screen. The viewer pages through directories and reads bounded UTF-8 source pages from private storage. ZIP export uses the system save picker and checks the published source count. The browser keeps the selected result when a newer job finishes. On API 29 the integrated app opened a source from the small JAR, handled cancellation, and exported all nine files byte-for-byte through the save picker. Result History lists modern results newest first. It keeps the newest result and up to nine older results sharing 256 MiB of source storage. Viewing and export hold a per-result lease that can defer pruning. Users can confirm deletion from history. The atomic job record stores job state and the results index in one transaction under a cross-process lock. The result history implementation kept that shared transaction and storage format. Its API 29 test covered older metadata, interrupted publication, count and byte limits, concurrent readers, restart, confirmed deletion, and byte-for-byte ZIP export. The legacy folder view also passed its separate read-only import test. The adaptive source viewer displays directory and source panes side by side at 840 dp of usable width. Both panes read bounded pages and scroll independently. A disposable API 29 debug test exercised 450 and 960 dp layouts, resizing with a source open, wrapping and selecting text from a 31.9 MiB source, and byte-for-byte export of 103 files. ## Implementation sequence | Wave | Ownership and handoff | Conventional commits | Gate | |---|---|---|---| | 0. Foundation | Build agent owns wrapper, Gradle, launcher shell, and clean debug build. Verification agent owns first-party fixtures and memory sampling. Engine agent starts direct-input CFR and JADX against the shared file-based contract. | `chore(build): bootstrap the modern Android app` · `test(decompiler): add reproducible memory workloads` · `feat(decompiler): add direct-input engine adapters` | Reproducible build and fixture commands, a real decompilation smoke test, and working device transport or a documented verification blocker. | | 1. Engine and Android services | Give each remaining engine its own implementation assignment. Storage and UI agents work against staged-file and job contracts as slots open. Coordinator owns shared build configuration and manifest integration. | `feat(decompiler): upgrade CFR` · `feat(decompiler): upgrade JADX` · `feat(decompiler): migrate Fernflower to Vineflower` · `feat(storage): migrate to scoped storage` · `feat(ui): build the Compose workflow` | Upgraded engine adapters, format/engine coverage, and fixture-backed document, persistence, and navigation tests. | | 2. Offline workflow | Worker agent implements process isolation, job state, progress, cancellation, and retries. Viewer agent completes browsing and export. Coordinator integrates CFR first, then the remaining engines. | `feat(jobs): isolate decompilation and persist progress` · `feat(viewer): browse decompiled results` · `feat(history): add modern result browsing and retention` | A real file can be decompiled, viewed, and exported on API 29 and 37. Worker death, process recreation, and retry preserve prior results. | | 3. Memory and release | Profile one workload at a time with a host memory limit and available-RAM monitoring. Verify the minified build and upgrade path. | `test(decompiler): profile Android engine memory` · `chore(app): remove ads and Pro billing` · `chore(release): prepare the modernized Android bundle` | The release bundle builds from a clean checkout and passes functional and migration checks. Record output coverage and recovery for tested memory workloads. Confirm distribution settings in Play. | Use a maximum of three implementation agents at once in isolated worktrees. Give each agent exclusive paths, fixtures, and completion criteria. Integrate independent commits sequentially after reviewing the diff and checking the gate. Every handoff includes the commit SHA, commands run, actual results, and outstanding blockers. Use a new worktree rooted at the integrated commit for work that depends on previous changes. ## Verification and release gates - Run memory workloads sequentially in a host-limited scope and monitor available host RAM. Compare stages, actual ART ceilings, peak managed and total app memory, output coverage, and recovery. [Benchmark procedure](tools/decompiler-bench/README.md#profile-the-modern-android-worker) - Run lint and release bundle assembly. Exercise a same-signature upgrade, legacy history import, and the notification and foreground-service behavior changes between API 29 and 37. Verify applicable Play declarations and signing in the production environment before publication. The recovery smoke prepares a disposable test project with `python3 tools/decompiler-recovery-smoke.py prepare /tmp/show-java-recovery-project`. Assemble `:app:assembleRelease` in that project, install its test-signed APK on a fresh emulator, and run `python3 tools/decompiler-recovery-smoke.py run --adb /path/to/adb --serial emulator-PORT /tmp/show-java-recovery-results`. The probe simulates low space, pauses a job for cancellation before publication, and kills the private worker in a separate case. It opens the prior result and compares the exported Java bytes after each failure. Use the host memory scope and watchdog described above. The fault-injection hooks are added only to the disposable project. Legacy history reads `show-java/sources//info.json`. The app links one folder at a time through a persisted read-only Android document-tree grant. It validates metadata and browses Java-only, resources-only, and combined results in place, independent of modern job cleanup. It loads history when the user opens it. Seekable text supports pagination. For non-seekable text the app previews the first 8 KiB, and for binary files it previews up to 256 bytes. The integrated history flow passed both folder selections on API 29 debug and API 37 minified. It rejected an unrelated folder, replaced the prior read-only grant on a valid selection, and restored access after a force-stop. Java pages, XML, and binary previews opened, and the device fixtures matched their original bytes. A follow-up on both versions verified that the streaming metadata parser rejected an invalid record nested 7,000 levels deep while preserving the valid records. The earlier API 29 job-pruning and ZIP tests confirmed that legacy history remained readable after pruning and the modern ZIP matched all nine published Java files. Use `python3 tools/legacy-history-smoke.py --serial emulator-PORT` on a disposable emulator with Show Java installed. The published GitHub v3.0.5 APK reports version code `30502` and signing certificate SHA-256 `5ee5b3da7b6701430725b462f5330955c49d624527c29f36b1a85a4325accf78`, which matches the Play app signing certificate. Play Console showed `30604` as the highest used version code during internal testing preparation. The modern candidate is `4.0.0` with version code `40000`, following the legacy major-version numbering scheme. On a disposable API 37 device, v3.0.5 and a minified modern APK signed with the same test key installed in sequence using Android's update path. The legacy app generated Java sources before the update. All original source and metadata hashes matched afterward, and the crash buffer was empty. This covers the local update path with a test signing lineage. Production still needs an upgrade exercise using Play's signing lineage. ### Offline APK inspection Debug builds ran the manifest and resource scan in airplane mode on API 29 and API 37 with HotSpot unavailable. The installed fixtures used a signed base and feature split and an eight-part set totaling 100,771,178 bytes. Every part in these runs verified. Report time starts at the **Inspect APK** tap and ends when the completed JSON artifact is published. PSS is the largest sampled worker reading. | Android API | Installed fixture | Time to report | Peak sampled worker PSS | JSON size | | --- | --- | ---: | ---: | ---: | | 29 | 2 parts, cold worker | 6.79 s | 46.0 MiB | 28,609 bytes | | 29 | 8 parts, warm worker | 2.65 s | 52.0 MiB | 42,592 bytes | | 37 | 2 parts | 0.99 s | 62.8 MiB | 28,586 bytes | | 37 | 8 parts | 4.58 s | 70.3 MiB | 42,551 bytes | The API 29 timings came from earlier debug builds of the feature. A second API 29 cold run during concurrent emulation took 13.68 seconds and sampled 51.6 MiB worker PSS. Timing includes APK retention and Android service startup. The DEX pass remains an explicit workspace action with its own scan budget. On API 29, the final debug build opened a standalone split from the document picker and reported the missing base and unknown total part count. History reopened earlier reports after an app restart, and an exported JSON report matched the published artifact byte for byte. The report controls remained reachable at 200% text size. On API 37, a DEX finding opened the matching Java source, the comparison view reopened a previous report, and the report displayed its dark theme. ### Play release handoff 1. In Latest app bundles, check the maximum version code already used and which legacy artifacts still reach devices. The legacy 3.0.6 prerelease also computes `30604`, so confirm the next valid code before assigning it. In Play App Signing, confirm the registered upload certificate and app signing certificate, then sign the AAB for upload with the registered upload key. [Update requirements](https://support.google.com/googleplay/android-developer/answer/9859350) · [App bundle explorer](https://support.google.com/googleplay/android-developer/answer/9844279) · [Play App Signing](https://support.google.com/googleplay/android-developer/answer/9842756) 2. Publish the corresponding source snapshot at the exact release revision and link it alongside distribution. The packaged notice index identifies the included licenses and their upstream sources. Keep the published source and the upload bundle tied to the same revision. [GNU GPLv3](LICENSE) · [Packaged notices](app/src/main/assets/licenses/NOTICE.txt) 3. Host the privacy policy at a public, non-geofenced, non-editable URL and enter it in App content. The app shows this policy offline from Settings. Check all actively distributed versions, including legacy builds on Android versions below 10, before changing the package-wide Data safety and ads declarations. If legacy artifacts stay available, make the hosted policy and declarations cover them as well. Update the listing description to match the shipped features and check the App content questionnaire for changes. [Modern privacy policy](app/src/main/assets/privacy-policy.txt) · [User Data policy](https://support.google.com/googleplay/android-developer/answer/10144311) · [Data safety](https://support.google.com/googleplay/android-developer/answer/10787469) · [App content](https://support.google.com/googleplay/android-developer/answer/9859455) 4. Declare the `dataSync` foreground service under **Local processing: Other**. The user selects a local file and taps Decompile. The service keeps processing if the user switches apps, and publishes the result only when processing finishes. Deferral delays access to the result, and interruption requires retrying the job. Host and attach the video captured during the API 37 smoke test. [Foreground service declaration](https://support.google.com/googleplay/android-developer/answer/13392821) 5. Use an internal or closed track to install the update over the current Play-signed app. Verify the original legacy files, read-only history import, source viewing, and ZIP export. On ARM64, verify the Play-generated APKs on a device running with 16 KiB pages. Internal App Sharing uses a separate signing key, so use a regular test track for this upgrade check. [Internal testing](https://support.google.com/googleplay/android-developer/answer/9845334) · [Internal App Sharing](https://support.google.com/googleplay/android-developer/answer/9844679) · [16 KiB support](https://developer.android.com/guide/practices/page-sizes) Full APK resource extraction stays paused. Legacy ODEX stays unsupported. The large Vineflower fixture remains limited by the Android heap, with verified worker recovery and preservation of prior results. ## Legacy baseline setup Use the published v3.0.5 APK (version code `30502`) to reproduce the legacy baseline. Its SHA-256 is `734d978afe898f04e495effa2e9bcf9e3d2c3155b9300fd2cbd6d159b36af70c`. Use an isolated emulator to avoid replacing another installed copy of Show Java. [v3.0.5 release](https://github.com/niranjan94/show-java/releases/tag/v3.0.5) · [Legacy source tree](https://github.com/niranjan94/show-java/tree/f2f71dcd0955f21c8a9538322137a7961d33e792) Host verification booted both target emulator profiles in read-only mode. An offline API 29 run opened the v3 fixture `test-application.jar` through the legacy file intent and selected CFR. It wrote `BuildConfig.java` and `MainActivity.java`, and the Android crash log stayed empty. This establishes a small-input smoke baseline. Use the large and multidex fixtures for peak-memory comparisons. [Legacy test application JAR](https://github.com/niranjan94/show-java/blob/f2f71dcd0955f21c8a9538322137a7961d33e792/app/src/androidTest/assets/test-application.jar) The first foreground run of `large.jar` on the offline API 29 emulator reproduced two Java `OutOfMemoryError` crashes in published v3.0.5, whose manifest requests `largeHeap`. The crashes occurred 26.9 and 51.1 seconds after selecting CFR. The job left 47 Java files without marking the result complete within 120 seconds. The sampled peak was 152.0 MiB app-wide PSS. Compare repeated runs of the same 1,602-class JAR, SHA-256 `8264fcc21f2527e52fc2ec5fe50496595de5b5512a6dec62523f6820e4a674b6`, on the same emulator profile with a 0.5-second nominal sampling interval. [Benchmark procedure](tools/decompiler-bench/README.md#sample-a-device-run) A minified CFR 0.152 engine probe ran the same JAR on the API 29 emulator with a measured 512 MiB ART ceiling. It produced the expected 801 Java files in 61.0 seconds, including `Unit0799.java`. Android 10 reported a peak total of 1,119,905 KiB with 469,261 KiB swap PSS. At that sample, native heap allocations accounted for 882,390 KiB and the managed heap held 210,796 KiB. The probe establishes engine completion within its test budget. Measure the integrated app separately and profile the native allocation peak before choosing a higher managed heap or an alternate runtime. A controlled follow-up with direct ART startup on one API 29 boot attributed 99.93% of live bytes with captured native stacks to ICU regex compilation. CFR compiled the same expression for each variable namer. The Android build now compiles one replacement class that shares the compiled `Pattern`. With a matched 512 MiB ART ceiling, the scratch patch reduced peak native allocation from 884,425 KiB to 2,478 KiB and sampled peak PSS from 1,121,427 KiB to 266,270 KiB. All 801 source files were byte-identical. Reusing the ZIP reader did not reduce native allocations. The integrated debug app on API 37 processed the same large JAR from the document picker through the foreground worker and published 801 Java files, including `Unit0799.java`. The ART ceiling was 576 MiB. Sampled PSS peaked at 259,425 KiB across the app and 211,499 KiB in the worker. The first start action through result publication took about 86 seconds in the UI probe, and the crash buffer stayed empty. This run used ordinary app startup and a 3 GiB emulator. A second API 37 run sent the app to the background after submission. It published all 801 sources in 90 seconds and peaked at 342,665 KiB app-wide PSS and 315,203 KiB worker PSS, with the same 576 MiB ART ceiling. The Compose viewer opened the source and exported a ZIP that matched all 801 published files byte-for-byte. The crash buffer stayed empty. The integrated debug app on a 2 GiB API 29 emulator also published all 801 files from the same JAR through the document picker and exported a byte-for-byte matching ZIP. With a 512 MiB ART ceiling, the foreground job took 127 seconds and peaked at 207,967 KiB app-wide PSS and 179,722 KiB worker PSS. The controlled regex experiment above provides the matched before-and-after measurement. On API 37, JADX's DEX input had been inflating unrelated APK entries before checking them for DEX magic. The APK adapter now checks the prefix of large entries without a `.dex` suffix before asking JADX to load the entry. It uses JADX's existing ZIP parser, which preserved duplicate-name DEX entries that the fallback reader dropped. Three fresh runs per configuration on the same API 37 emulator used a 576 MiB ART ceiling. With a 128 MiB asset, median sampled peak PSS fell from 185.1 to 96.1 MiB for the worker and from 238.4 to 149.3 MiB for the app. The previous loader hit an OOM with a 544 MiB asset. The new loader completed and published the same 10 Java sources as the asset-free APK. Multidex output, a renamed DEX shard, and resource symbol references matched the previous loader. [Fixture generation](tools/decompiler-bench/README.md#generate-the-inputs) The integrated minified APK passed the same plain and 544 MiB asset pair through the actual document picker, worker, and ZIP export on API 37. All 10 Java files in the two exports matched byte-for-byte. The JADX class-node source writing experiment produced the same 801 Java files as the Java API on the large JAR. It retained about 1.6 MiB less managed heap after explicit GC, with overlapping whole-job peak PSS ranges. The app keeps the Java API path. Before profiling was paused, three API 37 JADX runs at 192 MiB and three retained-heap runs at 576 MiB produced the same 802 Java file hashes. The 192 MiB runs covered all 69,600 generated methods. A caller in a third DEX shard decompiled and compiled successfully, with the same output hashes for the common files. Vineflower exhausted the 192 MiB heap on all three runs and the 576 MiB heap on a completed run before writing any source. An interrupted per-root prototype changed the output of a cross-class enum-switch fixture, so the shipping adapter keeps JAR-wide processing.