Effectively Modeling UI Transition Graphs for Android Apps Via Reinforcement Learning
Mobile apps are ubiquitous, and have become an indispensable part of our daily life. It is crucial to ensure the correctness, security and performance of these apps through automated GUI modeling. UI Transition Graph (UTG) is an important way of app abstract and modeling. While there have been considerable research efforts on constructing UTG through static or dynamic analysis, obtaining a relatively accurate and complete UTG is challenging. To this end, we present an approach and tool RLDroid that synergistically combines static analysis, dynamic exploration and reinforcement learning techniques to construct UTGs for Android apps. Specifically, RLDroid first extracts a seed UTG through static analysis, and uses this UTG with a depth-first strategy to guide the dynamic exploration. Then, RLDroid provides a Q-learning-based strategy initialized with the generated partial UTG to enhance dynamic exploration and outputs the final UTG. Our experiments on 29 Android apps show that RLDroid identified a total of 871 nodes (i.e., UI pages) and 2726 edges (i.e., transitions) without any false positives, which significantly outperforms the state-of-the-art GUI modeling techniques. Our two exploration strategies, the seed-UTGguided exploration and the Q-learning-enhanced exploration, make positive contributions to improving the completeness of UTG. Furthermore, the UTGs generated by RLDroid are highly useful for automated GUI testing, resulting in a 60 % increase in code coverage and the discovery of 52 additional crashes.
Authors
- Wunan Guo
- Hai Xue (ORCID: https://orcid.org/0000-0002-4567-6771)
- Daihong Zhou (ORCID: https://orcid.org/0000-0003-3538-8415)
- Zhen Dong (ORCID: https://orcid.org/0000-0003-4433-5171)
- Chen Zhang (ORCID: https://orcid.org/0000-0002-3306-9317)
- Liwei Shen (ORCID: https://orcid.org/0000-0002-8107-0590)
- Bin Hu (ORCID: https://orcid.org/0009-0000-4602-4831)
Institutions
- University of Shanghai for Science and Technology (CN)
- Fudan University (CN)
- Soochow University (CN)
- Hangzhou Dianzi University (CN)
- Shanghai Institute of Technology (CN)
Publication Details
- Published
- 2025-04-27
- DOI
- https://doi.org/10.1109/icpc66645.2025.00011
- Primary Topic
- Green IT and Sustainability
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- National Natural Science Foundation of China
- Natural Science Foundation of Jiangsu Province