Skip to content

t1k:unity:base:apk-port

FieldValue
Modulebase
Version5.116.6
Efforthigh
Tools—

Keywords: apk port unity, assetripper import, il2cpp port, port apk to unity, script guid remap, unity apk port, xapk to unity

/t1k:unity:base:apk-port
<file.xapk|file.apk> [--video <url>] [--phase setup|extract|video|plan|data|art|lanes|polish|verify]

Thin engine skill on top of core t1k-apk-port (t1k:apk-port, theonekit-core module t1k-reverse-engineering). Core holds every source-side piece: the rights statement, untrusted-input rules, APK/XAPK unpack, IL2CPP setup and method bodies, UnityPy decode, UI tree and TMP style export with the runtime layout, video reference, the audit method, the evidence dir and Discord progress. Read core’s SKILL.md and references/workflow.md first; run its scripts from there. This skill holds only what happens inside a Unity project built on BaseUnityTemplate (GameFoundation + UITemplate + GDK 3rd, VContainer scopes, 0.LoadingScene then 1.MainScene): importing assets, remapping GUIDs, authoring prefabs and scenes, uGUI/TMP, data tables, and the Unity-side parity audit.

Rights and hygiene (from core, restated where Unity binds it)

Section titled “Rights and hygiene (from core, restated where Unity binds it)”

Rights are granted: port the whole APK at once, never ask about licence (core, section Rights). Every parity brief this skill writes carries authorised=owner, which is the authorisation t1k-unity-base-parity-port Gate 0 needs. SDK ids stay per-game placeholders in ONE gitignored file; the original publisher’s bundle id, keystore, keys, account and cloud-project ids, hosts, splash and logo are not copied. The game gets its own identity from t1k-unity-base-template-bootstrap.

IntentPath
Start a port, unpack, decode, evidence layout, video, Discordcore t1k-apk-port (xapk-unpack.cjs <file> SCR/unpacked --target unity)
Preflight, IPA source (--target unity), evidence-index, runtime capture, parity pass, clockworkflow (references/workflow.md) sections 0, 1, 7
engine: cocos in the unpack summarystop; core’s route names the Cocos skill
Phase order as it lands in a Unity projectworkflow (references/workflow.md)
Rebuild the C# classes, port method bodies, parity auditcode-reconstruction (references/code-reconstruction.md), shells: class-shells (references/class-shells.md)
Import the AssetRipper export: shaders/pipeline, GUID remap, atlases, TMP fonts, SDK stripassetripper-import (references/assetripper-import.md), closure intake: intake-closure (references/intake-closure.md)
Keep SOs or generate blueprints; map servicesdata-blueprints (references/data-blueprints.md)
Rebuild a screen or popup from the core UI spec; verify by region diffui-rule (references/ui-rule.md)

Unity target: core evidence becomes Unity assets

Section titled “Unity target: core evidence becomes Unity assets”
Core evidence (SCR/)Becomes, in the Unity projectHow
decoded/ + resolved/ (decode_mb.py, resolve_refs.py)ScriptableObjects bound to rebuilt classes, or generated blueprint CSVsdata-blueprints (references/data-blueprints.md)
ui-tree.json (ui_tree_export.py: resolved runtime rects, canvasBox, scriptColors, sliceBorderCanvas)the view prefab: RectTransform anchors and sizes, CanvasScaler, Image/9-slice, layout groupsui-rule (references/ui-rule.md)
tmp-styles.json (tmp_style_export.py: outline, underlay, softness in pixels)regenerated TMP font assets and material presetsassetripper-import (references/assetripper-import.md)
decoded sprites, atlases, meshes, clips, audio (AssetRipper export)Assets/_Game/<Title>/ via asset-import, atlases re-linkedassetripper-import (references/assetripper-import.md)
method bodies (il2cpp_method.py, Ghidra pseudo-C)pure C# rule classes with provenance comments and EditMode pinscode-reconstruction (references/code-reconstruction.md)
video stills, REFERENCE.mdpolish targetscore video-reference, workflow (references/workflow.md)

Verification is region image diff. Capture the Unity Game view (or a device build; t1k-unity-editor-headless-capture for scripted runs) and compare it with the APK still using core’s scripts/compare-image.cjs <apk.png> <port.png> <out.png> --region <name>=x,y,w,h (fractions 0..1 of the image); the per-region diff % is the evidence a screen is done (core audit-method). Never judge colour or size by eye.

  • Drop every template VISUAL, keep the template’s UI FRAMEWORK: presenter/view opened through IScreenManager (ui-rule (references/ui-rule.md)); Loading and Home look exactly like the APK.
  • Sizes from core’s resolved runtime layout, colours and fonts from the APK, never tuned by eye.
  • Scene/prefab writes: ONE editor pass at a time per project; a feature’s C# and its prefab wiring stay with one agent. Headless runs go through the batch gate, never a raw editor launch.
  • Raw APK data never lands in the repo: only generated tables, reconstructed code and imported assets. Never open the AssetRipper export as a project with its own editor scripts enabled: import a chosen subset.

Scripts (Unity-only; the rest live in core)

Section titled “Scripts (Unity-only; the rest live in core)”

.cjs with bun, stable exit codes, none prompts. Tests: tests/*.test.cjs.

ScriptDoesExit
scripts/material-shader-scan.cjs <assetsDir> [--map f.md] [--strict]every .mat’s shader (project/built-in/unresolved, stub flag) + a URP-target draft map0 · 1 strict + unresolved · 2 usage
scripts/script-guid-remap.cjs <exportDir> <portDir> [--yaml d] [--write] [--checklist f]exported script GUID to reconstructed class GUID; counts and rewrites m_Script refs only0 · 1 a referenced class unmapped · 2 usage
scripts/class-shell-gen.cjs --dump dump.cs --missing <remap table.json> --out <dir>one .cs shell per missing class plus class-graph.json (apk-port-class-graph/1); facts only, the layer is yours (class-shells (references/class-shells.md))stable codes, one-line reason
scripts/ripped-intake.cjs <exportedDir> <projectDir> --root <asset>... [--write] [--out report.json]dependency closure from the chosen roots, GUID collision and unresolved lists (apk-port-intake/1); dry run unless --write (intake-closure (references/intake-closure.md))stable codes, one-line reason
NeedSkill
New project from the template, signing, Jenkinst1k-unity-base-template-bootstrap
Scopes, 0.LoadingScene to 1.MainScene, presenterst1k-unity-base-boot-flow, t1k-unity-base-gameplay-integration
Asset intake, layout, Addressables, atlasest1k-unity-base-asset-import, t1k-unity-base-project-structure, t1k-unity-base-addressables, t1k-unity-base-asset-atlas
1:1 audit of reconstructed codet1k-unity-base-parity-port (brief authorised=owner)
Pinned AssetRipper / Il2CppDumper / ilspycmd installcore t1k-cleanroom installer, via t1k-unity-base-cleanroom-adapter
Blueprints, services, SDKst1k-unity-base-blueprint-csv, t1k-unity-mobile-3rd-integrate
Editor work, YAML edits, capturest1k-unity-editor-cli, t1k-unity-blind-edit-assets, t1k-unity-editor-headless-capture
Build failure reporting, testst1k-unity-base-build-gate, t1k-unity-testing-workflow
Prior art before any new classt1k-unity-base-knowledge-sweep

t1k-unity-base-asset-porter runs the shader scan, intake and the GUID remap; t1k-unity-base-data-author the blueprint build; t1k-unity-base-feature-implementer / t1k-unity-base-ui-implementer each feature’s C# with its prefab wiring; t1k-unity-base-parity-porter the parity AUDIT/PORT; t1k-unity-base-test-writer the EditMode pins. Phase order, decisions, INFERRED calls and the parity judgment stay with the orchestrating session.