# xml parse DOMTree = xml.dom.minidom.parse(manifest_path) collection = DOMTree.documentElement
str1 = collection.getAttribute("package")
activity = collection.getElementsByTagName("activity") for a in activity: intent_filter = a.getElementsByTagName("intent-filter") for i in intent_filter: action = i.getElementsByTagName("action") for ac in action: ac_name = ac.getAttribute("android:name") if ac_name == "android.intent.action.MAIN": str2 = a.getAttribute("android:name") print("****************************************************") print("%s/%s" % (str1,str2)) print("****************************************************") print("deleting files,please wait...") shutil.rmtree(out_dir) exit(0)