Skip to content

Android setup app: native Android UI, live build log, log sharing; extras shared with the PC installer - #91

Open
schindlershadow wants to merge 1 commit into
mainfrom
android-native-installer
Open

schindlershadow wants to merge 1 commit into
mainfrom
android-native-installer

Conversation

@schindlershadow

Copy link
Copy Markdown
Owner

The Android setup app was the PC wizard's SDL canvas UI. This replaces it with native Android views (android/setup/java, no SDL) on top of the same C++ install logic, reached through JNI (setup/android_engine.cpp → libsetupcore.so). Plans, progress parsing, install.ini, payload unpacking and process handling are not duplicated.

The app

  • Pages in the game's look: night sky, slowly turning wireframe crystal, gold-framed cards, Cinzel / Noto Sans. Animated page changes.
  • Portrait and landscape. The activity handles rotation itself, so a running build is not disturbed.
  • Touch, keyboard and game controller: d-pad or stick moves, A chooses, B goes back, left/right flip switches, Y opens Logs (log size on the build page), L/R page the log. Button hints replace the version in the top bar while a controller is used.
  • Build page: live, colour-coded log, crystal progress, per-step track, elapsed time and ETA.
  • A foreground service (dataSync) keeps the build going in the background with a progress notification, and notifies when it ends.
  • Failures show the reason and the last output lines, with Share / Save / View of setup.log (share sheet via a read-only ShareProvider; Save via Android's "save as" picker).
  • Logs and reports page: build log, the game's last_run.log, updater log, and the app's own crash reports. After a crash, the next start offers the report once.
  • Smaller things: Play now after the install; install permission and all-files access resume by themselves after the settings page; monochrome notification icon.

Extras are one list for both installers (setup/extras.cpp)

  • Each entry has its key, features.ini line, title / help, switch or choices, parent switch, second disc (page texts + check), steps for both platforms (ExtraCtx::tool / download), and Redo / remove.
  • The PC wizard's Options, Change extras and disc pages, install.ini, plan_install / plan_extras, and the Android Options page and plans are all made from it.
  • A new extra is one entry and shows up in both installers. It can be marked desktop-only or Android-only if it cannot work on one.
  • Main's D1 / undub disc checks are now each extra's disc.check, so the Android app runs them too: a wrong disc gets a dialog, and its file descriptor is closed.

Also

  • Fix for secondary Android users (e.g. user 10): Python is started through the musl loader only when the patched interpreter path does not resolve. Child Pythons (psp_build.py, android_build.py, d1_moves.py) get the same prefix.
  • The update check reported "newest version" when the checker never ran. It now shows an error that points to the updater log.
  • The desktop wizard's Android code paths and setup/android.{h,cpp} are gone.
  • make_skeleton.py gained --no-sdl, --extra-res and --assets. CI builds the app without SDL and compiles against android-34.

Testing

  • PC wizard: builds; test_setup_install passes, including new cases for the shared list; --screenshots pages unchanged.
  • Real discs on the host (SETUP_TEST_DISCS): D1 USA accepted for Bartz's moves; English 012 refused for both extras; undub accepted.
  • Android emulator (KVM, Android 15, 16 KB pages), touch and controller-only:
    • picker, permission round trip, options, Change extras, Share / Save / View log, crash-report offer, install + Play now, rotation mid-build
    • wrong-disc and right-disc picks with the real ISOs
    • a temporary dummy extra added only to extras.cpp appeared and was planned in both installers
  • Not run: a real build and the update download, on any device. The emulator's ARM translation cannot load the bundled musl Python (Bionic linker: "TLS segment underaligned"). The build pages were checked with the files/ui_demo test plan (debuggable builds, run-as only). A test APK that reuses the v0.1.18 payload has been built for phone testing.

Release notes

  • The Android setup app is now a native Android app: new look with animations, works in portrait and landscape, and with touch or a game controller.
  • The Android setup app shows the build's output live while it builds, and keeps building in the background with a progress notification.
  • The Android setup app can share or save the build log when a build fails, and offers its own crash report after a crash; a new Logs and reports page lists all logs.
  • The Android setup app now refuses a wrong Dissidia 1 or undub disc as soon as it is picked, like the PC installer.
  • The Android setup app now works for secondary users on a phone (other than the owner).

🤖 Generated with Claude Code

…h installers

The Android setup app was the SDL wizard of setup/ drawn on a canvas. It is now native Android views
(android/setup/java, no SDL) over the same C++ install logic, reached through JNI (setup/android_engine.cpp,
built as libsetupcore.so):
- pages in the game's look (night sky, turning crystal, gold-framed cards, Cinzel / Noto Sans), animated
  page changes, portrait and landscape (rotation does not disturb a running build)
- touch, keyboard and game controller (d-pad / stick, A, B, Y, L / R; hints in the top bar)
- live build log with progress, step track, elapsed time and ETA; a foreground service keeps the build going
  in the background with a progress notification
- failed builds show the reason and last lines, with Share / Save / View of the log; Logs and reports lists
  the build log, the game's last_run.log, the updater log and the app's own crash reports (offered once
  after a crash)
- Play now after the install; install permission and all-files access resume by themselves

Extras are one list (setup/extras.cpp): titles, choices, parent switch, second disc (texts + check), steps
for both platforms (ExtraCtx tool / download), Redo / remove. The desktop Options, Change extras and disc
pages, install.ini, plan_install / plan_extras and the Android Options page and plans are made from it, so
a new extra is added once for both. Main's D1 / undub disc checks are the extras' disc.check, run by both.

Also: Python is started through the musl loader only when the patched interpreter path does not resolve
(secondary Android users); child pythons of psp_build.py / android_build.py / d1_moves.py get the same
prefix. The update check reports an error when the checker produced no answer (it said "newest version").
The desktop wizard lost its Android code paths (setup/android.{h,cpp}). files/ui_demo (run-as, debuggable
builds) runs a fake build plan for testing pages where the tools cannot run (the x86_64 emulator).

Co-Authored-By: Claude Opus 5.5 <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.

1 participant