Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Loop to obfuscate many android apps

For research purpose I need to test if my classifier is robust to obfuscation techniques. My testing set is made of 25189 android apps from class A and 3175 from class B, with 20% apps already obfuscated. I would like to obfuscate a certain amount of theses apps from 20% to 80% for example to plot the evolution of efficiency function of obfuscation %. I have heard about proguard but couldn't figure out if it allow to loop over many apks. I am using weka API for the classification process.

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

Many thanks

like image 253
Vanpourix Avatar asked Jun 12 '26 04:06

Vanpourix


1 Answers

You could loop over the file names in python and obfuscate via whatever command you are using to do the obfuscation:

import subprocess

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

for apk in apk_filenames:
    subprocess.run(['your', 'command', 'here', apk])
like image 87
mattjegan Avatar answered Jun 13 '26 19:06

mattjegan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!