How to use MobSF with Genymotion SaaS
This section explains how to use MobSF with Genymotion SaaS.
Prerequisites
- The setup uses the gmsaas CLI.
- The path to the Android SDK must be configured.
- The placeholder <sdk_path> should point to the Android SDK installation directory.
- The Android SDK installation directory should be similar to the ANDROID_SDK_ROOT environment variable.
- The Android SDK installation directory should also be similar to the deprecated ANDROID_HOME variable.
- Authentication configuration is required.
- A Genymotion SaaS API token is required.
- If a token has not been created yet, follow the steps from the online documentation.
- The next step is to use the following command:
- Alternatively, the API Token can be stored in the environment variable: GENYMOTION_API_TOKEN.
- The configuration should be verified.
- Run the configuration verification command.
- If the command returns “Authentication OK” and “Android SDK OK”, gmsaas is set up.
Connect an instance to ADB
- Start the instance.
- When the instance is in “Running” state, copy the instance UUID. The UUID can be obtained from the Genymotion SaaS UI dashboard or by using the gmsaas recipes list command.
- Use the command that replaces <instance_uuid> with the instance UUID.
- The command returns to the shell once ADB is connected.
- If the –adb-serial-port <PORT> option is set, the instance will be connected to ADB on localhost:<PORT>.
- Another method is to connect any running instances to ADB by combining this command with the –quiet or -q option and xargs.
- Verify with the adb devices command; adb should now be connected to “localhost:XXXXX device”.
- Example: (the exact command examples appear in the source but are not shown here).
Configure MobSF
1. Clone MobSF open-source code to your computer.
2. Modify the code by editing the Mobile-Security-Framework-MobSF/mobsf/DynamicAnalyzer/views/android/environment.py script and comment the following lines in def connect_n_mount(self). Save the script.
3. Install MobSF.
- It is strongly recommended to use a Python Virtual Environment to install and use MobSF.
- In the Mobile-Security-Framework-MobSF folder, run: (the exact install command is not shown in this document)
4. Launch MobSF.
- When done, run this command: (the exact launch command is not shown here)
- Now, you can access MobSF by browsing to http://localhost:8000/.
- Log in and navigate to DYNAMIC ANALYSER.
- Your Genymotion SaaS instance should appear as connected at localhost:XXXXX.
---
MobSF and Genymotion Device Image
Julien Maneyrol
2024-04-23
Setup and use MobSF with Genymotion Device Image for Cloud providers.