--- title: "Integrate the Malware Detection SDK" slug: "mwd-sdk-ig-integrate-the-sdk-1-2-0" updated: 2025-12-11T16:09:07Z published: 2025-12-11T16:09:07Z canonical: "docs.onespan.com/mwd-sdk-ig-integrate-the-sdk-1-2-0" excludeFromSearch: true --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.onespan.com/llms.txt > Use this file to discover all available pages before exploring further. # Integrate the Malware Detection SDK ## Android For the SDK to function, you need to generate a malware list that can be used by the SDK, and link some libraries to your project. ### Malware list You can generate the required malware list and key file with the Malware List Encryption Tool that is provided with the SDK product package. Run the `java -jar MalwareListEncryptionTool.jar` command to view instructions on how to use this tool. To generate a malware list - Provide a JSON file to the tool: ```plaintext java -jar MalwareListEncryptionTool.jar -f /path/to/list.json -o output [  {    "packageName": "ExamplePackage1",    "md5Hash" : "valid-md5-hash",    "sha1Hash": "valid-sha1-hash",    "sha256Hash": "valid-sha256-hash"  } ] ``` The encryption tool also handles null or empty values: ```plaintext [  {    "packageName": null,    "md5Hash" : "valid-md5-hash",  } ] ``` This generates the required files: - signed_malware_list.json: encrypted malware list used by the SDK - app_keys.json: keys for using the malware list - client_keys.json: keys that can be used to regenerate malware lists without having to create the app_keys.json file again ### Required dependencies and libraries The following dependencies and libraries are required for the SDK to function: ```java // WorkManager dependencies   implementation("androidx.work:work-runtime-ktx:2.10.0")     // Kotlin serialization   implementation("org.jetbrains.kotlinx:kotlinx-serialization-core:1.7.1")   implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.1")     // Android Security Crypto   implementation("androidx.security:security-crypto:1.1.0-alpha06") ``` ### Integration steps To use the Malware Detection SDK in your Android project 1. Locate the app/libs folder in your project, or create one if it does not exist 2. Link Add MalwareDetectionSDK.aar from the OneSpan Mobile Security Suite package to the app/libs folder. 3. Add `implementation(files("libs/MalwareDetectionSDK.aar"))` to the build.gradle file. 4. Generate the malware list and keys file. See [Malware list](/mobile/docs/mwd-sdk-ig-integrate-the-sdk-1-2-0#malware-list) for more information. 5. Add the generated malware list (signed_malware_list.json) and keys file (app_keys.json) to your application’s assets in app/src/main/assets. 6. Initialize the Malware Detection SDK features, using the file names: - Malware detection: ```plaintext MalwareDetection.getInstance(context, "app_keys.json", "signed_malware_list.json") ``` - RAT detection: ```plaintext RatDetection.getInstance(context) ``` - Sideloading detection: ```plaintext SideLoadingDetection.getInstance(context) ``` ## iOS To use the Malware Detection SDK in your iOS project 1. Link MalwareDetectionSDK.xcframework from the OneSpan Mobile Security Suite or Project Cyber package to your Xcode project (linked framework and libraries). You are now ready to use the Malware Detection SDK.