We added a new policy named
memory_guided, which uses machine learning to automatically identify similar views and avoid redundant explorations.
Please give it a try!
pip install torch transformers
Then, start droidbot with the `-policy memory_guided``:
python start.py -a <xxx.apk> -o <output_dir> -policy memory_guided -grant_perm -random
DroidBot is a lightweight test input generator for Android. It can send random or scripted input events to an Android app, achieve higher test coverage more quickly, and generate a UI transition graph (UTG) after testing.
A sample UTG is shown here.
DroidBot has the following advantages as compared with other input generators:
Li, Yuanchun, et al. "DroidBot: a lightweight UI-guided test input generator for Android." In Proceedings of the 39th International Conference on Software Engineering Companion (ICSE-C '17). Buenos Aires, Argentina, 2017.
Python(both 2 and 3 are supported)
platform_toolsdirectory in Android SDK to
OpenCV-Pythonif you want to run DroidBot in cv mode.
Clone this repo and install with
git clone https://github.com/honeynet/droidbot.git cd droidbot/ pip install -e .
If successfully installed, you should be able to execute
Make sure you have:
.apkfile path of the app you want to analyze.
droidbot -a <path_to_apk> -o output_dir
That's it! You will find much useful information, including the UTG, generated in the output dir.
-d <device_serial>to specify the target device. The easiest way to determine a device's serial number is calling
-keep_envoption to avoid re-installing the test environment every time.
-script <path_to_script.json>to use DroidBot with a script.
-humanoidoption to let DroidBot communicate with Humanoid in order to generate human-like test inputs.