def get_manifest(app_dir, toosl_dir, typ, binary):
 try:
  dat = read_manifest(app_dir, toosl_dir, typ, binary).replace('\n', '')
  try:
   print '[INFO] Parsing AndroidManifest.xml'
   manifest = minidom.parseString(dat)
  except:
   PrintException('[ERROR] Pasrsing AndroidManifest.xml')
   manifest = minidom.parseString('<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="Failed"  android:versionName="Failed" package="Failed"  platformBuildVersionCode="Failed" platformBuildVersionName="Failed XML Parsing" ></manifest>')
   print '[WARNING] Using Fake XML to continue the Analysis'
  return manifest
 except:
  PrintException('[ERROR] Parsing Manifest file')

def get_manifest ( app_dir , toosl_dir , typ , binary ) : try : dat = read_manifest ( app_dir , toosl_dir , typ , binary ) . replace ( '\n' , '' ) try : print '[INFO] Parsing AndroidManifest.xml' manifest = minidom . parseString ( dat ) except : PrintException ( '[ERROR] Pasrsing AndroidManifest.xml' ) manifest = minidom . parseString ( '<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="Failed"  android:versionName="Failed" package="Failed"  platformBuildVersionCode="Failed" platformBuildVersionName="Failed XML Parsing" ></manifest>' ) print '[WARNING] Using Fake XML to continue the Analysis' return manifest except : PrintException ( '[ERROR] Parsing Manifest file' )
get the manifest file .