1

Is it possible to get the config.xml file that is generated by Cordova based applications using Adroguard?
I cannot find it under the /res folder and it is not listed in the output of get_files() method.
apktool, on the other hand, is able to get the config.xml from the apk that is use it on.

Chips
  • 117
  • 3
  • 10

1 Answers1

0

Since it is under res folder, You need to get it by unzipping the file to a temporary directory and then parse it using Axml parser. In get_files(), you must see "resources.arsc" file. The res files are part of that. You can do something like :

config_xml_path = os.path.join(<your apk unzipped path>, 'res', 'xml', 'config.xml')
with io.open(config_xml_path, 'rb') as axml_file:
   parsed_axml_file = AXMLPrinter(axml_file.read())
   axml_content = parsed_axml_file.get_buff().decode('utf-8)
   parsed_axml = minidom.parseString(axml_content.encode('utf-8'))

You might get some errors if the config.xml is badly formatted but I am not including the solution to handle those case. I hope you will get an idea with the above example.

Ranjeet
  • 393
  • 2
  • 10