Skip to content

Port Fini to mobile using a shared encryption runtime - #104

Open
defisym wants to merge 6 commits into
masterfrom
codex/fini-mobile-shared-encryption
Open

defisym wants to merge 6 commits into
masterfrom
codex/fini-mobile-shared-encryption

Conversation

@defisym

@defisym defisym commented Nov 4, 2026 •

Copy link
Copy Markdown
Owner

Modifying existing stuff

Port Fini's Windows ACE set to Android JNI and an author-built iOS native library, reusing the existing C++ INI/codecs and Win32 encrypted-asset formats. Plugins call the existing Encryption C ABI; only the common libofe_encryption.so / dynamic OFEEncryption.framework links libcrypto.

Repository layout and publishing

  • Extensions/Fini remains the Windows Visual Studio project and existing ToInstall release staging area.
  • Extensions/iOS/Fini owns the standalone Xcode project, Runtime adapter, build/configuration scripts, tests and Mac handoff inputs. Open Extensions/iOS/Fini/Fini.xcodeproj and build the FiniXCFramework scheme after configuring the local Fusion export.
  • Extensions/Android_Gradle owns Java/JNI adapters, native component targets under app/src/main/cpp, toolchain/publisher support under cmake, tests and Fini-JNI.md. The ACE contract is under tests/fini.
  • Shared Fini behavior is enabled in the original Extensions/Fini/IniCore.h using FINI_PORTABLE_RUNTIME. Without that macro the existing INI API requires neither mobile Runtime/JSON nor encryption linkage. There is no additional _DeLib/Fini mobile core tree.
  • Encryption algorithms remain in the original _DeLib/Encryption sources. Android integration lives under Android_Gradle/app/src/main/cpp/Encryption and cmake/Encryption; Apple build/handoff integration lives under iOS/Encryption. Clients still use one shared runtime. Shared OpenSSL preparation is under _Script/Encryption and Apple artifact verification under iOS/Tools.
  • Mac builds and stages the client/common artifacts separately; the author commits/pushes them. Windows pull and VS RunOnly's existing Fini publisher verify the handoff, create/decode-check Fini.ext, update packages/installations and rebuild the release archive without Xcode.
  • Reuse PR iOS: FindTheWay Runtime and Windows .ext publishing #100's independent legacy .ext codec. The target-aware, idempotent export configurator links the native libraries and embeds/signs one common encryption framework, preserving device signing and unrelated flags.
  • Normalize declared source/header/XML text while keeping binary plists, libraries and archives byte-exact. Reject stale/corrupt artifacts with source-path diagnostics and preserve known-good outputs on failure. Exclude private SDK exports and build caches.

The common, Android, iOS and shared-encryption skills document the independent platform projects and approved shared encryption contract. Library adaptations belong in original files behind narrow macros or in the corresponding platform component directory, rather than a Mobile subtree in a Windows library. PR #100 is synchronized, preserving FTW's implementation/artifacts. FTW-specific architecture and algorithm assumptions are not requirements for unrelated plugins.

Fini's archive includes its Objective-C++ adapter, so changes to that compiled source require a Mac rebuild. Export-only loader/configurator edits are packaged on Windows without rebuilding.

Validation

  • 57 Python tests pass across shared/FTW iOS publishing, Fini iOS handoff/project/publishing, Android publishing and native-tool/package checks.
  • Rebuilt all four Android ABIs with NDK 28.2.13676358, native API 26 and CMake 3.22.1. Audited dynamic references/C exports, 64-bit 16 KiB alignment, no crypto implementation in libfini, separate packages and one-time/conflicting common-runtime staging.
  • Both macro branches compile: the default INI API builds without mobile/JSON dependencies, and the portable branch passes the existing core/JNI checks. The common Android package's extracted source tree also configures/builds independently.
  • Host C++/real JNI/production Java checks pass for all 20 actions, 4 conditions and 11 expressions, existing Windows ciphertext, Unicode/NUL, lifecycle and reentrant destruction. Runtime API doubles are fixtures.
  • Verified generated Xcode project paths/schemes, exported-project idempotency, actual Git LF/CRLF conversion and rejection of text/binary mutations. Published source inventory uses the new directories and contains no old Fini platform subtree.
  • Windows object helper comparison shows no changes; their previously validated platform behavior is preserved. git diff --check passes.

Remaining platform validation

No Fini Apple binaries, licensed SDK sources or build caches are committed. The author still needs to compile on Mac and verify actual Fusion export, Apple final linking and device behavior. Project-generation/model tests and verified .ext framing do not establish those results. Windows MSBuild and a full Android APK/device test are not claimed. Android common-runtime installation uses explicit exported-project staging; automatic selection of an arbitrary common ZIP by the proprietary exporter is not established.

Reuse the Encryption C ABI across plugins, add Android JNI and an iOS Xcode project, and preserve author-built Mac artifacts for Windows VS packaging.

Document the shared runtime contract in the porting skills and add native, ACE, package and cross-machine handoff checks.
Add the common/iOS skill layers, retain the approved shared encryption contract, and generalize FTW-specific architecture and adapter rules.

Reuse the verified legacy .ext codec, add idempotent export linking and common-framework embedding, harden Mac/Windows text and binary verification, and keep Runtime sources out of legacy SDK scaffolding.
Preserve FTW's iOS implementation and publishing artifacts while retaining generalized iOS guidance and Fini's approved shared encryption contract. Verify both iOS publishers and Android publishing with 57 Python tests.
Move the owned Xcode project, adapter, build script, tests and Mac handoff inputs to Extensions/iOS/Fini. Move Android configuration and documentation into Android_Gradle, and portable core/ACE files into _DeLib/Fini. Preserve the Windows VS project and ToInstall release workflow.

Update generated project, include/build/publisher/manifest paths and enforce the platform-first layout in repository skills. Remove stray positional arguments from OpenSSL preparation.

Validation: 57 Python tests, host core and full JNI ACE checks, four real Android ABI builds and binary/package audit, source-inventory checks and git diff --check.
Enable Fini's portable Runtime in the original IniCore.h with FINI_PORTABLE_RUNTIME, retaining the default INI API without mobile/JSON dependencies. Put Android native integration under app/src/main/cpp and move shared encryption build/package integration to its respective Android and iOS projects. Keep the existing Encryption C++ implementation and a single shared runtime; no duplicate algorithms.

Update manifests, publishers, Mac handoff locations, documentation and skills. Validate both macro branches, 57 Python tests, full host JNI/ACE regression, four Android ABI builds/audit, standalone common-package source build and source inventories.
Apply the original-source macro or platform-component placement rule automatically to every future plugin and library port. Require Android/iOS skills and repository/skill authoring instructions to preserve it without repeated author prompting.

Documentation only; git diff --check passes.

This branch has not been deployed

No deployments
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