Loop to obfuscate many Android apps

For research purposes, I need to check if my classifier is reliable for obfuscation techniques. My test suite is made up of 25189 Android apps from Class A and 3175 from Class B, with 20% of the apps already obfuscated. I would like to obfuscate a certain number of applications from 20% to 80%, for example, to plot the evolution of the% obfuscation function efficiency. I've heard about proguard but couldn't figure out if it allows iterating over many apks. I am using the weka API for the classification process.

Is there a way to set up such an obfuscation loop in Java, python, or with any software or frameworks?

Many thanks

+3


source to share


1 answer


You can loop through filenames in python and obfuscate with whatever command you use to obfuscate:



import subprocess

apk_filenames = ['file1.apk', 'file2.apk', ...]

for apk in apk_filenames:
    subprocess.run(['your', 'command', 'here', apk])

      

+1


source







All Articles