:fire: Check out our recent work on integrating LLM with DroidBot to support intelligent task automation on smartphones! AutoDroid
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:
Reference
Python
(both 2 and 3 are supported)Java
Android SDK
platform_tools
directory in Android SDK to PATH
OpenCV-Python
if you want to run DroidBot in cv mode.Clone this repo and install with pip
:
git clone https://github.com/honeynet/droidbot.git
cd droidbot/
pip install -e .
If successfully installed, you should be able to execute droidbot -h
.
Make sure you have:
.apk
file path of the app you want to analyze.adb
.Start DroidBot:
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 adb devices
.-keep_env
option to avoid re-installing the test environment every time.-script <path_to_script.json>
to use DroidBot with a script.-cv
option helpful.-humanoid
option to let DroidBot communicate with Humanoid in order to generate human-like test inputs.droidbot -h
.We have conducted several experiments to evaluate DroidBot by testing apps with DroidBot and Monkey. The results can be found at DroidBot Posts. A sample evaluation report can be found here.