HACMony: Automatically Testing Hopping-related Audio-stream Conflict Issues on HarmonyOS

📅 2025-04-10
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This paper addresses the Audio-stream Conflict (HAC) problem in HarmonyOS distributed scenarios, wherein ambiguous cross-device application navigation semantics and the absence of multi-device collaborative testing mechanisms hinder effective HAC detection. To tackle this, we propose the first formal audio navigation semantics model and construct an Audio Service Transition Graph (ASTG). Based on ASTG, we design a model-driven automated HAC detection method. We systematically identify and categorize two canonical HAC patterns: MOD (Multi-device Concurrent Preemption) and MOR (Migration State Mismatch). Our approach detects HACs in 11 out of 20 real-world HarmonyOS applications, enabling precise localization and classification. The framework provides a reusable diagnostic infrastructure for both system and application developers, along with empirically grounded insights for mitigating distributed audio inconsistencies.

Technology Category

Application Category

📝 Abstract
HarmonyOS is emerging as a popular distributed operating system for diverse mobile devices. One of its standout features is app-hopping, which allows users to seamlessly transition apps across different HarmonyOS devices. However, when apps playing audio streams hop between devices, they can easily trigger Hopping-related Audio-stream Conflict (HAC) scenarios. Improper resolution of HAC will lead to significant HAC issues, which are harder to detect compared to single-device audio-stream conflicts, due to the unclear semantics of HarmonyOS's app-hopping mechanism and the lack of effective multi-app hopping testing methods. To fill the gap, this paper introduces an automated and efficient approach to detecting HAC issues. We formalized the operational semantics of HarmonyOS's app-hopping mechanism for audio streams for the first time. Leveraging this formalization, we designed an Audio Service Transition Graph (ASTG) to model the behaviors of audio-API-related services and proposed a model-based approach to detect HAC issues automatically. Our techniques were implemented in a tool, HACMony, and evaluated on 20 real-world HarmonyOS apps. Experimental results reveal that 11 of the 20 apps exhibit HAC issues. Additionally, we summarized the detected issues into two typical types, namely MOD and MOR, and analyzed their characteristics to assist and guide both app and OS developers.
Problem

Research questions and friction points this paper is trying to address.

Detecting Hopping-related Audio-stream Conflicts (HAC) on HarmonyOS
Modeling audio service behaviors via Audio Service Transition Graph (ASTG)
Automating HAC issue detection and classification into MOD and MOR types
Innovation

Methods, ideas, or system contributions that make the work stand out.

Formalized app-hopping semantics for audio streams
Designed Audio Service Transition Graph (ASTG)
Automated HAC issue detection via model-based approach
🔎 Similar Papers
No similar papers found.
J
Jinlong He
Technology Center of Software Engineering, Institute of Software, Chinese Academy of Sciences, Beijing, China
B
Binru Huang
Technology Center of Software Engineering, Institute of Software, Chinese Academy of Sciences, Beijing, China
H
Hengqin Yang
Technology Center of Software Engineering, Institute of Software, Chinese Academy of Sciences, Beijing, China
Jiwei Yan
Jiwei Yan
Institute of Software, Chinese Academy of Sciences
Software TestingProgram AnalysisMobile Application
J
Jun Yan
Technology Center of Software Engineering, Institute of Software, Chinese Academy of Sciences, Beijing, China