Source-linked AI summary
Cross-Platform Application Migration to HarmonyOS: An Agentic Pipeline with Artifact-Derived Verification
Ergun Biçici, Mehmet Kaygusuz, Fatih Turan Gündoğdu, Emre Filiz, Çağatay Kızıldağ, Bünyamin Eymen Alagöz, Emincan Özcan, Sadi Çelik, Tolunay Öztürk, Ege Bulut, Said Aldemir
TL;DR
Android and iOS applications must be reconstructed for HarmonyOS NEXT, and compilation alone does not establish functional correctness. HMOS Migrator automates migration and scores it from source-recorded behavior and pipeline artifacts without a reference implementation. Across twelve runs, structural reproduction was strong while on-device behavior and UI fidelity remained limited.
Problem
HarmonyOS NEXT uses ArkTS and ArkUI rather than the Android runtime, so existing applications must be reconstructed, and functional assurance remains a challenge beyond syntactic compilation.
Source: §I · p. 1Method
HMOS Migrator generates an installable HarmonyOS application, replays recorded interactions, and derives verification scores from source states and pipeline artifacts without a reference implementation.
Source: §I · p. 1, §III · p. 2Results
Across twelve runs and six applications, completeness was 83.3 %–100.0 %, on-device behaviour was 4.3 %–63.1 %, and element-level fidelity was 21.1 %–63.2 %.
Source: §VI · p. 6Takeaways & Limitations
Successful generation and compilation do not establish behavioural correctness; replay coverage and on-device evidence are essential to assess whether the generated application works.
Source: §VI · p. 6The positive temporal trend does not establish causal improvement because the corpus is small and spans different applications and model versions.
Source: §VI · p. 6
Abstract
from arXiv · showhide
The migration of applications written for a different platforms like Android or iOS to HarmonyOS NEXT requires a complete rewrite in ArkTS. Although LLMs automate the translation of source constructs into ArkTS, syntactic compilation is not enough and functional assurance is a critical open challenge in HarmonyOS NEXT migration. We present HMOS~Migrator, an agentic pipeline that reads an application's source code, generates an ArkTS project, and validates the result by replaying recorded interactions on a real device. We cast the scoring problem as quality estimation without a reference implementation; we score a migration using only the source application's recorded behaviour and the artifacts produced by the pipeline. We define seven weighted metrics, each constructed so that reduced measurement cannot artificially raise the score. Over twelve runs across six open-source applications, the pipeline's structural reproduction is high (completeness \pct{83.3}--\pct{100.0}), while on-device behaviour (\pct{4.3}--\pct{63.1}) and UI fidelity (\pct{21.1}--\pct{63.2}) remain the primary limits. Scores improve steadily over time: $+0.45$~points per day overall ($R^2=0.44$, $p=0.019$) and $+0.47$ over the model-free subset ($R^2=0.39$, $p=0.029$), with corresponding to fit angles of $+8.4^{\circ}$ and $+11.7^{\circ}$ respectively.
I. INTRODUCTION
HarmonyOS NEXT requires Android and iOS applications to be reconstructed in ArkTS, making application-scale migration and functional validation challenging. HMOS Migrator automates migration and artifact-derived verification without a reference implementation, and evaluates the pipeline across twelve runs and six applications.
I. INTRODUCTION
- Because HarmonyOS NEXT uses ArkTS and ArkUI rather than the Android runtime, migration requires reconstructing application logic, data access, UI, resources, navigation, and platform services.The paper frames this application-scale reconstruction as a target for LLM automation that still requires systematic execution and validation.Source: §I · p. 1
- The pipeline automates migration from a source repository to an installable HarmonyOS application and an artifact-derived verification report.In the measured NetNewsWire run, 117.8 × 10^3 source lines took 17.9 hours, or about 15.2 hours per 100 × 10^3 lines.Source: §I · p. 1
- Scoring uses recorded source states and interactions plus migration artifacts, without an independently implemented target reference.Deterministic programs recompute published quantities, model-based methods judge semantic or visual properties, and scores include evidence coverage.Source: §I · p. 1
- The evaluation covers twelve migration runs across six open-source applications, including Android and iOS, and measures execution cost and verification reproducibility and coverage.The paper identifies the pipeline, artifact-based verification framework, and end-to-end evaluation as its three primary contributions.Source: §I · p. 1
- The five-phase pipeline spans source ingestion, logic and screen generation, feature validation, and reporting, with a bounded repair loop that flags unresolved divergence for review.The figure also indicates the handset required for each phase.Source: Figure 1 · p. 2
II. RELATED WORK
Prior work addresses ArkTS generation, code translation, and reference-free quality estimation, but leaves a gap around validating dynamically synthesized applications. HMOS Migrator instead uses source-recorded states and replayed target states to assess behavior and artifacts.
II. RELATED WORK
- Prompt-level ArkTS work reports best-model 22.7 % Pass@1, while iterative compiler feedback raises syntactic Pass@1 to 91 %.The benchmark reports lower performance on UI tasks than algorithmic tasks.Source: §II · p. 2
- Rule-based UI transpilation [3] assumes established source-to-target framework correspondences, but HarmonyOS has none, requiring screen reconstruction.Replay also exercises generated code and enables cross-application behavioral comparison,, whereas prior trace-transfer work assumes both applications are already implemented.Source: §II · p. 2
- Visual layout matching cannot verify function, and translation bugs catalogued by Pan et al. motivate execution-based verification.A visually accurate screen may still fail to operate.Source: §II · p. 2
- Unlike reference-free translation estimators,, this method scores execution and UI artifacts against recorded source states and requires sensitivity to measurement coverage.It does not train a quality predictor or extract predictive features.Source: §II · p. 2
III. PIPELINE ARCHITECTURE
HMOS Migrator accepts a source repository and connected source and HarmonyOS devices, then generates and validates a target application through five phases. Its traversal graph preserves interaction-reached states, and validation replays interactions with bounded repair before reporting artifact-derived quantities.
III. PIPELINE ARCHITECTURE
- A single command accepts a source repository and two connected devices, producing an ArkTS project and migration report; corresponding emulators may also be used.One device runs the original application and the other runs HarmonyOS.Source: §III · p. 2
- The pipeline has five phases: unified ingestion, logic generation, screen generation, feature validation, and reporting.Feature validation deploys the application, replays recorded interactions on HarmonyOS hardware or an emulator, and returns divergent state pairs for re-authoring within a bounded retry budget.Source: §III · p. 2
- Unified ingestion extracts source structure and runtime states, traverses navigable screens, and records a graph whose nodes pair screenshots with repository-code indexes.A state is a screen plus the taps that reached it, so the same screen reached by different paths yields distinct states.Source: §III · p. 2
IV. VERIFICATION SCHEME
The scheme scores migrations with seven weighted artifact-based metrics, designed to prevent reduced measurement from raising scores. It distinguishes structural coverage and navigation from behavioral verification and visual fidelity.
IV. VERIFICATION SCHEME
- Screen capture coverage measures the share of source screens reached and photographed; uncaptured screens cannot be planned, replayed, or evaluated downstream.This metric limits all subsequent metrics.Source: §IV · p. 3
- Migration completeness counts source screens realized by generated pages with actual content, excluding compiling pages that render only empty placeholders.It measures migration breadth, not whether the implementation works.Source: §IV · p. 3
- Navigation edges measures recorded source transitions reproduced by routes that generated code actually performs, not merely routes listed in a table.Having a screen does not establish that users can reach it correctly.Source: §IV · p. 3
- Feature verify checks whether a control actually runs and does what it should, using device logs, UI trees, and before-and-after gesture dumps.Unexercised critical checks and high-risk features without any check also enter the denominator, so missing evidence cannot improve the score.Source: §IV · p. 3
- Replay coverage counts source states that are reached on the corresponding target screen, while states never replayed remain uncovered in the denominator.A reachable, replayable button may still perform the wrong operation, so replay coverage is distinct from feature correctness.Source: §IV · pp. 3–4
- Extended-tree vision gives graded model judgments of captured states, while UI fidelity uses pooled F1 to match semantic labels rather than raw pixels.Uncaptured or unjudged states are excluded from the extended-tree score but still counted.Source: §IV · p. 4
V. EXPERIMENTS
The experiments report twelve runs across six open-source applications, using each run's vendored checkout as the version ingested by the pipeline.
V. EXPERIMENTS
- Twelve runs across six open-source applications were scored, published, and included in a performance-trend fit.Each run's version came from its own vendored checkout, the exact code ingested by the pipeline.Source: §V · p. 4
- The application versions used for scoring were taken from their own vendored checkouts.These checkouts represent the exact code ingested by the pipeline.Source: §V · p. 4
- A performance trend fit was applied to all twelve runs.Source: §V · p. 4
A. Model generation is not constant
The run corpus spans changes in model assignment during data collection, including a release-boundary run and a final run from another vendor.
A. Model generation is not constant
- Three pre-release runs used Opus 4.8, while seven subsequent runs used Opus 5.Model assignment was based on active execution windows.Source: A. Model generation is not constant · p. 4
- The VLC run on 29/07 spanned the release boundary and was annotated separately.Source: A. Model generation is not constant · p. 4
- The final run, SwiftRadio on 28/08, used GPT 5.6 Luna, so the corpus is not a single-vendor series.The model variation also influences performance trends across time.Source: A. Model generation is not constant · p. 4
B. Execution cost
The NetNewsWire run’s execution cost is reported through distinct time and token measures, with prompt-cache reads accounting for most processed tokens.
B. Execution cost
- The NetNewsWire 17/08 run processed 117.8 × 10^3 source lines across 882 files, with 17.9 h wall-clock, 13.8 h active time, and 16.9 agent work-hours.Wall-clock includes idle time; active wall-clock omits idle periods, while work-hours aggregate subagent runtimes.Source: B. Execution cost · p. 4, Table III · p. 5
- 1.82 × 10^9 of 1.87 × 10^9 processed tokens (97.3%) were repeated context re-reads; the model generated 5.23 × 10^6 output tokens.Processed tokens include input, cache reads, and output; new input excludes cache reads, and phase percentages use the denominators specified for each column.Source: B. Execution cost · p. 4, Table III · p. 5
- The run involved 86 subagents and 1,145 main-thread turns.The accompanying cost summary reports 16.9 cumulative agent work-hours, exceeding 13.8 active wall-clock hours because parallel agent runtimes are aggregated.Source: B. Execution cost · pp. 4–5
- Table IV reports seven verification metrics; VLC rows exclude television, while Screens counts the source inventory before that exclusion and Model is attributed per Section V-A.Source: Table IV · p. 5
C. Results
Across twelve runs, aggregate scores show a positive temporal trend, but differences in applications and model generations prevent attributing it to pipeline improvement. Replay coverage also determines how much downstream behavior and visual fidelity can be assessed.
C. Results
- High structural completeness alone does not ensure a high overall score, because downstream behavior and visual fidelity require corresponding states to be reachable during replay.Low replay coverage leaves limited evidence for feature and visual verification.Source: C. Results · p. 5
- Application and model-generation differences, including a final run on a different application, prevent the regression from distinguishing pipeline improvement from application difficulty or model capability.Nine of twelve leave-one-run-out refits fall below the 0.05 level, and the authors report the trend as an observed association rather than demonstrated pipeline improvement.Source: C. Results · p. 5
- The paper also links the observed trend to LLM model developments and iterative HMOS Migrator improvements, while cautioning that the regression does not demonstrate pipeline improvement.Source: C. Results · p. 5
- Across twelve runs, the all-metric aggregate increased +0.450 points per day (R^2 = 0.44, p = 0.0191), and the model-free aggregate increased +0.474 points per day (R^2 = 0.39, p = 0.0292).Figure 2 reports normalized fit angles of +8.4° and +11.7°, respectively; the model-free lane remains above the all-steps lane, although both fits turn down at the rightmost observations.Source: C. Results · p. 5, Figure 2 · p. 6
VI. CONCLUSION
Across twelve runs and six applications, structural reproduction was generally strong, but functional verification and UI fidelity remained the main limits. Scores rose with date, though the small, heterogeneous corpus does not establish causal improvement.
- Across twelve runs and six applications, completeness was 83.3 %–100.0 %, on-device behaviour was 4.3 %–63.1 %, and element-level fidelity was 21.1 %–63.2 %.Source: §VI · p. 6
- Successful generation and compilation alone do not establish behavioural correctness; replay coverage and on-device evidence remain essential, and unexercised or unverifiable cases are not treated as successes.Source: §VI · p. 6
- The aggregate score rose +0.450 points per day (+8.4° normalized angle), and the model-free aggregate rose +0.474 points per day (+11.7°), but the small, heterogeneous corpus does not establish causality.Source: §VI · p. 6