Helpers Module

apkInspector.helpers.escape_xml_entities(data)

Escaping characters that cant be included within an XML file.

Parameters:

data (str) – The string to escape

Returns:

The escaped output

Return type:

str

apkInspector.helpers.pretty_print_header(header_text, width=50, char='-')

Formatting output used for the CLI

Parameters:
  • header_text (str) – The text to be displayed

  • width (int) – total width of the display

  • char (str) – which char to be used as a filler

apkInspector.helpers.save_data_to_file(filename, data)

Write data to file

Parameters:
  • data (bytes) – the actual data

  • filename (str) – file to be saved in

apkInspector.helpers.save_to_json(filename, dictionary)

Simple method to save a dictionary as JSON into the filename.

Parameters:
  • filename (str) – the name of the file to be saved as

  • dictionary (dict) – the dictionary to be saved as JSON