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
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 () scenarios. Improper resolution of will lead to significant 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 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 () to model the behaviors of audio-streams during window transitions and propose a model-based approach to detect issues automatically. Our techniques are implemented in a tool, , and evaluated on 20 real-world HarmonyOS apps. Experimental results reveal that 12 of the 20 apps exhibit issues. Among the 53 issues detected, a total of 18 unique issues are manually confirmed. Additionally, we summarize the detected issues into two typical types, namely and , and analyz their characteristics to assist and guide both app and OS developers.
HarmonyOS / audio-stream conflict / app-hopping / mobile testing / large language model
| [1] |
|
| [2] |
|
| [3] |
|
| [4] |
|
| [5] |
|
| [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] |
|
| [9] |
|
| [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] |
|
| [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] |
|
| [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] |
|
| [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] |
|
| [18] |
|
| [19] |
|
| [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] |
|
| [22] |
|
| [23] |
|
| [24] |
|
| [25] |
|
| [26] |
|
| [27] |
|
| [28] |
|
| [29] |
|
| [30] |
|
| [31] |
|
| [32] |
|
| [33] |
|
| [34] |
|
| [35] |
|
| [36] |
|
| [37] |
|
| [38] |
|
| [39] |
|
| [40] |
|
| [41] |
|
| [42] |
|
| [43] |
|
| [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] |
|
| [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] |
|
| [48] |
|
| [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 |
Higher Education Press
/
| 〈 |
|
〉 |