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.
Overview
Prerequisites and setup steps are provided for using MobSF with a Genymotion device image. The page includes network, security, and ADB configuration guidance, as well as MobSF setup instructions.
Prerequisite
- MobSF is installed on your local machine.
- ADB from the Android SDK platform tools is installed on your local machine.
Setup your Genymotion instance
1. Quickstart
- Before proceeding, 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 or MS Azure).
2. Network
- Your Genymotion instance must have a Public IP.
- If the instance does not have a Public IP, it will not be reachable from the local machine.
- The Public IP will change every time the instance is shutdown and booted.
- If you wish to keep the same Public IP, use a persistent public IP such as Elastic IP when using AWS.
3. Security / Firewall
- MobSF uses adb to communicate with the Genymotion instance via TCP port 5555.
- Add an inbound rule to your EC2 firewall/security to open TCP port 5555 for your local machine IP only.
- Warning: Do not allow TCP connections to port 5555 from any IP (0.0.0.0/0). ADB connections are not secure.
- Opening TCP port 5555 to all may compromise your instance integrity and security.
- Only allow inbound connections from your local machine IP.
4. Enable ADB
- You need to enable ADB on your Genymotion instance.
- Access your Genymotion instance display.
- Go to Configuration and Enable ADB.
- For more details and alternate methods, please refer to How to enable ADB?
5. Setup MobSF
- From your local machine, ensure that you can connect to your Genymotion instance via adb:
- adb connect <public_ip>:5555
- adb devices
- Example:
- adb connect 54.78.205.214:5555
- connected to 54.78.205.214:5555
- adb devices
- List of devices attached
- 54.78.205.214:5555 device
- You can now perform MobSF Dynamic Analysis with your Genymotion instance.
- If Dynamic Analyzer doesn’t detect the instance, you need to manually configure ANALYZER_IDENTIFIER in <user_home_dir>/.MobSF/config.py, or via environment variable ANALYZER_IDENTIFIER, with the instance public IP.
- Example:
- ANALYZER_IDENTIFIER = '54.78.205.214:5555'
- If MobSF cannot detect adb, you need to configure ADB_BINARY in <user_home_dir>/.MobSF/config.py.
- Example:
- ADB_BINARY = '/Applications/Genymotion.app/Contents/MacOS/tools/adb'
Setup MobSF
- From your local machine, ensure that you can connect to your Genymotion instance via adb:
- adb connect <public_ip>:5555
- adb devices
- You can now perform MobSF Dynamic Analysis with your Genymotion instance.
- For more details and alternate methods, please refer to How to enable ADB?
Next
- Instrumented Tests with Genymotion SaaS and gmsaas
---
Note: The content above preserves the structure and details from the source while ensuring each sentence conveys a single idea and uses explicit references where needed.