Fork of droidbot (https://github.com/honeynet/droidbot) that adds gym environment to Droidbot.
Python
(both 2 and 3 are supported)Java
Android SDK
- Add
platform_tools
directory in Android SDK toPATH
- (Optional)
OpenCV-Python
if you want to run DroidBot in cv mode.
Clone this repo and intall with pip
:
git clone
cd droidbot/
pip install -e .
- Gym (https://github.com/openai/gym for installation instructions)
- Stable-Baselines (https://github.com/hill-a/stable-baselines for installation instructions)
- TensorFlow
- pip install opencv-python
- Run Emulator or connect to real Android device using adb.
If you are using Android emulator. Install Android Studio, select the Android Emulator component in the SDK Tools tab of the SDK Manager.
If you are using Android real device or multiple devices, you may need to use
-d <device_serial>
to specify the target device. The easiest way to determine a device's serial number is calling adb devices. - Add App Under test to APKs directory.
- From terminal and droidbot directory run the "start_q_learning.py" script. Example usage:
python3 start_q_learning.py -a App_Under_Test.apk -o /my_output_dir/ -is_emulator -policy gym
- In
my_output_dic directory
findindex.html
to view the UTG model.
DroidbotX: Test Case Generation Tool for Android Applications Using Q-Learning (https://www.mdpi.com/997092)
Yasin, H.N.; Hamid, S.H.A.; Raja Yusof, R.J. DroidbotX: Test Case Generation Tool for Android Applications Using Q-Learning. Symmetry 2021, 13, 310. https://doi.org/10.3390/sym13020310