HACMony: automatically detecting hopping-related audio-stream conflict issues on HarmonyOS

Jinlong HE , Binru HUANG , Changwei XIA , Hengqin YANG , Jiwei YAN , Jun YAN

Front. Comput. Sci. ›› 2027, Vol. 21 ›› Issue (6) : 2106201

PDF (2797KB)
Front. Comput. Sci. ›› 2027, Vol. 21 ›› Issue (6) :2106201 DOI: 10.1007/s11704-025-50681-w
Software
RESEARCH ARTICLE
HACMony: automatically detecting hopping-related audio-stream conflict issues on HarmonyOS
Author information +
History +
PDF (2797KB)

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 switch apps seamlessly across different HarmonyOS devices. However, when apps play audio-stream-hop between different devices, they can easily trigger Hopping-related Audio-stream Conflict (HAC) scenarios. Improper resolution of HAC will lead to significant HAC issues, which are hard to detect comprehensively 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 formalize the operational semantics of HarmonyOS’s app-hopping mechanism for audio streams for the first time. Leveraging this formalization, we design an Audio-stream-aware State Transition Graph (ASTG) to model the behaviors of audio-streams during window transitions and propose a model-based approach to detect HAC issues automatically. Our techniques are implemented in a tool, HACMony, and evaluated on 20 real-world HarmonyOS apps. Experimental results reveal that 12 of the 20 apps exhibit HAC issues. Among the 53 HAC issues detected, a total of 18 unique HAC issues are manually confirmed. Additionally, we summarize the detected issues into two typical types, namely MoD and MoR, and analyz their characteristics to assist and guide both app and OS developers.

Graphical abstract

Keywords

HarmonyOS / audio-stream conflict / app-hopping / mobile testing / large language model

Cite this article

Download citation ▾
Jinlong HE, Binru HUANG, Changwei XIA, Hengqin YANG, Jiwei YAN, Jun YAN. HACMony: automatically detecting hopping-related audio-stream conflict issues on HarmonyOS. Front. Comput. Sci., 2027, 21(6): 2106201 DOI:10.1007/s11704-025-50681-w

登录浏览全文

4963

注册一个新账户 忘记密码

References

[1]

Huawei Community. Huawei’s HarmonyOS gains market share. See consumer. huawei. com/en/community/details/topicId-225051/ website, 2024

[2]

Global Times. China’s first fully home-grown mobile operating system HarmonyOS NEXT launched. See www. globaltimes. cn/page/202410/1321670. shtml website, 2024

[3]

Huawei . Hopping overview. See developer. huawei. com/consumer/en/doc/design-guides-V1/service-hop-overview-0000001089296748-V1 website, 2024

[4]

HarmonyOS . Developer Issue. See developer. huawei. com/consumer/cn/forum/topic/0202700699545450014?fid=0101587866109860105 website, 2021

[5]

HarmonyOS . Developer Issue. See developer. huawei. com/consumer/cn/forum/topic/0202646978991840491?fid=0101591351254000314 website, 2021

[6]

Yang W, Prasad M R, Xie T. A grey-box approach for automated GUI-model generation of mobile applications. In: Proceedings of the16th International Conference on Fundamental Approaches to Software Engineering. 2013, 250−265

[7]

Yang S, Zhang H, Wu H, Wang Y, Yan D, Rountev A. Static window transition graphs for android (T). In: Proceedings of the 30th IEEE/ACM International Conference on Automated Software Engineering. 2015, 658−668

[8]

Gu T, Sun C, Ma X, Cao C, Xu C, Yao Y, Zhang Q, Lu J, Su Z. Practical GUI testing of android applications via model abstraction and refinement. In: Proceedings of the 41st International Conference on Software Engineering. 2019, 269−280

[9]

Ma Y, Huang Y, Hu Z, Xiao X, Liu X. Paladin: automated generation of reproducible test cases for android apps. In: Proceedings of the 20th International Workshop on Mobile Computing Systems and Applications. 2019, 99−104

[10]

Su T, Meng G, Chen Y, Wu K, Yang W, Yao Y, Pu G, Liu Y, Su Z. Guided, stochastic model-based GUI testing of android apps. In: Proceedings of the 11th Joint Meeting on Foundations of Software Engineering. 2017, 245−256

[11]

Yan J, Wu T, Yan J, Zhang J. Widget-sensitive and back-stack-aware GUI exploration for testing android apps. In: Proceedings of 2017 IEEE International Conference on Software Quality, Reliability and Security. 2017, 42−53

[12]

Yan J, Liu H, Pan L, Yan J, Zhang J, Liang B. Multiple-entry testing of android applications by constructing activity launching contexts. In: Proceedings of the 42nd ACM/IEEE International Conference on Software Engineering. 2020, 457−468

[13]

Liu C, Wang H, Liu T, Gu D, Ma Y, Wang H, Xiao X. ProMal: precise window transition graphs for android via synergy of program analysis and machine learning. In: Proceedings of the 44th International Conference on Software Engineering. 2022, 1755−1767

[14]

Azim T, Neamtiu I. Targeted and depth-first exploration for systematic testing of android apps. In: Proceedings of 2013 ACM SIGPLAN International Conference on Object Oriented Programming Systems Languages & Applications. 2013, 641−660

[15]

Wu T, Deng X, Yan J, Zhang J . Analyses for specific defects in android applications: a survey. Frontiers of Computer Science, 2019, 13( 6): 1210–1227

[16]

Chen T, He J, Song F, Wang G, Wu Z, Yan J. Android stack machine. In: Proceedings of the 30th International Conference on Computer Aided Verification. 2018, 487−504

[17]

He J, Chen T, Wang P, Wu Z, Yan J. Android multitasking mechanism: formal semantics and static analysis of apps. In: Proceedings of the 17th Asian Symposium on Programming Languages and Systems. 2019, 291−312

[18]

He J, Wu Z, Chen T . Formalization of android activity-fragment multitasking mechanism and static analysis of mobile apps. Formal Aspects of Computing, 2025, 37( 2): 17

[19]

Huawei . About HarmonyOS. See developer. huawei. com/consumer/en/doc/harmonyos-guides-V3/harmonyos-overview-0000000000011903-V3 website, 2024

[20]

Chen H, Miao X, Jia N, Wang N, Li Y, Liu N, Liu Y, Wang F, Huang Q, Li K, Yang H, Wang H, Yin J, Peng Y, Xu F. Microkernel goes general: Performance and compatibility in the HongMeng production microkernel. In: Proceedings of the 18th USENIX Symposium on Operating Systems Design and Implementation. 2024, 465−485

[21]

Google . Android Open Source Project. See source. android. com website, 2025

[22]

OpenHarmony . OpenHarmony project. See gitee. com/openharmony/docs/blob/master/en/OpenHarmony-Overview. md website, 2025

[23]

Huawei . Introduction to Audio Focus and Audio Session. See developer. huawei. com/consumer/en/doc/harmonyos-guides-V5/audio-playback-concurrency-V5 website, 2025

[24]

Huawei . StreamUsage. See developer. huawei. com/consumer/en/doc/harmonyos-references-V13/js-apis-audio-V13#streamusage website, 2025

[25]

Amap . See url. cloud. huawei. com/tXaf6tZ5sY website, 2025

[26]

Kugou Music. See url. cloud. huawei. com/tXafXtrfyM website, 2025

[27]

HACMony . Operational semantics of app-hopping mechanism on HarmonyOS. See github. com/SQUARE-RG/hacmony/blob/main/Semantics_of_HarmonyOS_App_Hopping. pdf website, 2025

[28]

Huawei . hdc. See developer.huawei.com/consumer/en/doc/harmonyos-guides-V5/hdc-V5 website, 2025

[29]

Google . Android Debug Bridge (adb). See developer. android. com/tools/adb website, 2024

[30]

Huawei . Huawei AppGallery. See consumer. huawei. com/en/mobileservices/appgallery/ website, 2025

[31]

Google . Gemini 2.0 flash. See cloud. google. com/vertex-ai/generative-ai/docs/models/gemini/2–0-flash website, 2024

[32]

OpenAI . GPT-4o. See openai. com/index/hello-gpt-4o/ website, 2024

[33]

Alibaba . Qwen-VL-Plus. See github. com/QwenLM/Qwen-VL website, 2024

[34]

Li Y, Yang Z, Guo Y, Chen X. DroidBot: a lightweight UI-guided test input generator for android. In: Proceedings of 2017 IEEE/ACM 39th International Conference on Software Engineering Companion (ICSE-C). 2017, 23−26

[35]

HACMony . HAC issues detected by HACMony. See www. youtube. com/playlist?list=PL9InyCjzL53mWIbPP5ixylr7Qwd-kzUTa website, 2025

[36]

Youku Video. See url. cloud. huawei. com/tXLQZi7oZi website, 2025

[37]

Kuwo Music. See url. cloud. huawei. com/x7rkqpzQ1W website, 2025

[38]

Momo . See url. cloud. huawei. com/x7rZfOT2I8 website, 2025

[39]

Baidu Map. See url. cloud. huawei. com/tXQg34wJXy website, 2025

[40]

Kuaiyin . See url. cloud. huawei. com/u2T5hQKLjW website, 2025

[41]

Petal Maps. See url. cloud. huawei. com/tXRdtLucnu website, 2025

[42]

QQ Music. See url. cloud. huawei. com/tXRhftsDPW website, 2025

[43]

Tencent Video. See url. cloud. huawei. com/tXRhNDqDWo website, 2025

[44]

Ma T, Zhao Y, Li L, Liu L. CiD4HMOS: A solution to HarmonyOS compatibility issues. In: Proceedings of the 38th IEEE/ACM International Conference on Automated Software Engineering. 2023, 2006−2017

[45]

Zhu Y, Guo J, Xu F, Chen R, Zhang X, Yi S, Yu J. HM-SAF: cross-layer static analysis framework for HarmonyOS. In: Proceedings of 2023 IEEE Smart World Congress (SWC). 2023, 1−10

[46]

Chen H, Chen D, Yang Y, Xu L, Gao L, Zhou M, Hu C, Li L. ArkAnalyzer: the static analysis framework for OpenHarmony. In: Proceedings of the 47th IEEE/ACM International Conference on Software Engineering: Software Engineering in Practice. 2025, 136−147

[47]

Chen Z, Liu J, Hu Y, Wu L, Zhou Y, He Y, Liao X, Wang K, Li J, Qin Z. DeUEDroid: detecting underground economy apps based on UTG similarity. In: Proceedings of the 32nd ACM SIGSOFT International Symposium on Software Testing and Analysis. 2023, 223−235

[48]

Liu Z, Chen C, Wang J, Chen M, Wu B, Huang Y, Hu J, Wang Q. Unblind text inputs: predicting hint-text of text input in mobile apps via LLM. In: Proceedings of the CHI Conference on Human Factors in Computing Systems. 2024, 51

[49]

Liu Z, Chen C, Wang J, Chen M, Wu B, Che X, Wang D, Wang Q. Make LLM a testing expert: bringing human-like interaction to mobile GUI testing via functionality-aware decisions. In: Proceedings of the 46th IEEE/ACM International Conference on Software Engineering. 2024, 100

RIGHTS & PERMISSIONS

Higher Education Press

PDF (2797KB)

Supplementary files

Highlights

406

Accesses

0

Citation

Detail

Sections
Recommended

/