In this tutorial, it is assumed that you are familiar with MobSF and you are using it from a physical local machine. For detailed information about MobSF, please refer to MobSF documentation.
- MobSF installed on your local machine
- ADB from the Android SDK platform tools installed on your local machine
Setup your Genymotion instance
Before proceeding, please read Genymotion Device image (PaaS) Requirements carefully.
Then, refer to Genymotion Device image Quickstart to get started with Genymotion for your Cloud provider (AWS, GCP, Alibaba, MS Azure, Oracle Cloud).
Your instance must have a Public IP or it will not be reachable from your local machine. This IP will change every time the instance is shutdown and booted.
If you wish to keep the same Public IP, we recommend using a persistent public IP, such as Elastic IP if you are using AWS.
MobSF uses adb to communicate with Genymotion instance via TCP port 5555.
So, add an inbound rule to your EC2 firewall/security to open TCP port 5555 for your local machine IP only:
Do not allow TCP port 5555 to anyone (0.0.0.0/0). ADB connection is not secure - opening TCP port 5555 to anyone may compromize your instance security! Only allow your local machine IP.
4. Enable ADB
You need to enable ADB on your Genymotion instance. To do so:
- Access your Genymotion instance display
- Go to Configuration and Enable ADB
For more details and alternate methods, please refer to How to enable ADB?
From your local machine, ensure that you can connect to your Genymotion instance via adb:
adb connect <public_ip>:5555
$ adb connect 220.127.116.11:5555
connected to 18.104.22.168:5555
$ adb devices
List of devices attached
You can now perform MobSF Dynamic Analysis with your Genymotion instance.
If Dynamic Analyzer doesn't detect the instance, you need to manually configure
<user_home_dir>/.MobSF/config.py, or via environment variable
ANALYZER_IDENTIFIER, with the instance public IP.
ANALYZER_IDENTIFIER = '22.214.171.124:5555'.
If MobSF cannot detect adb, you need to configure
ADB_BINARY = '/Applications/Genymotion.app/Contents/MacOS/tools/adb'.