一句话:提出面向 OpenHarmony 应用的动态分析框架 HapTest,可复用定制并检出 26 个崩溃。
ArkTS 是面向 OpenHarmony 移动操作系统的新编程语言,但社区缺少针对 OpenHarmony 应用的动态分析框架,难以检测崩溃、性能与安全问题。本文提出 HapTest,一个专为 OpenHarmony 应用特性设计的开源动态分析框架,提供 PTG、DataHub 等基础动态分析能力,可供开发者复用并定制以支持恶意软件或性能问题检测等特定分析。评估表明 HapTest 具有较高分析覆盖率与有效性;在 OpenHarmony 应用市场前 20 个热门商业应用(下载量均达百万级)上,其测试方法在 20 个应用中的 11 个中发现了 26 个此前未报告的崩溃,验证了实用性。
ArkTS is a new programming language dedicated to developing applications (apps) for the emerging OpenHarmony mobile operating system. Like other programs, apps developed with ArkTS suffer from bugs, leading to, e.g., crashes, or performance and security issues. Our community usually uses dynamic analysis to analyze the app's behavior and detect bugs. Unfortunately, a framework tailored for OpenHarmony apps dynamic analysis is not yet available for the developer community. To bridge this gap, we propose a new dynamic analysis framework named HapTest, which has been specifically designed to cope with OpenHarmony apps' original features. We make HapTest publicly available as an open-source project. Our HapTest has several fundamental dynamic analysis features (e.g., PTG, DataHub, etc.) that are ready to be reused by developers, and further customized to enable specific dynamic analysis, for instance, to detect malware or performance issues. Experiment results show that our HapTest achieves both high analysis coverage and high effectiveness. In addition, our HapTest is evaluated on the top 20 popular commercial apps from the OpenHarmony app market, each with at least millions of downloads. Our testing method revealed 26 previously unreported crashes in 11 out of the 20 applications, which demonstrates the practicality of HapTest.
@inproceedings{paperbot9025,
title = {HapTest: The Dynamic Analysis Framework for OpenHarmony},
author = {Farong Liu and Mingyi Zhou and Yakun Zhang and Ting Su and Bo Sun and Jacques Klein and Xiang Gao and Li Li},
booktitle = {FSE},
year = {2025},
doi = {10.1145/3696630.3728565}
}