How to use get_min_sdk_version method in Airtest

Best Python code snippet using Airtest

apk_parser.py

Source:apk_parser.py Github

copy

Full Screen

...43 '27': '8.1',44 '28': '9',45 '29': '10.0'46 }47 return sdk_version_dict.get(self.apk.get_min_sdk_version(), '')48 @property49 def bundle_identifier(self):50 return self.apk.get_package()51 @property52 def app_icon(self):53 return self.apk.get_file(self.apk.get_app_icon())54 @property55 def extra(self):56 return {57 'min_sdk_version': self.apk.get_min_sdk_version(),58 'target_sdk_version': self.apk.get_target_sdk_version()...

Full Screen

Full Screen

Check-CVE-2017-13156.py

Source:Check-CVE-2017-13156.py Github

copy

Full Screen

...16 else:17 print("v3 scheme: False")18 if app_object.is_signed_v2() or app_object.is_signed_v3():19 apk_min_sdk_version, android_version = "24", "7.0.0"20 if app_object.get_min_sdk_version() < apk_min_sdk_version:21 print("minSdkVersion: "+app_object.get_min_sdk_version()+" ")22 print(str(apk_name) + " " + str(hashlib.md5(open(apk_name,'rb').read()).hexdigest())+" is \033[31mVULNERABLE\033[0m")23 print(str(apk_name) + " can be exploited on devices running Android version < " + android_version)24 else:25 print(str(apk_name) + " is NOT vulnerable")26 exit() 27 else: 28 print(str(apk_name) + " is NOT signed")29 exit()30def main():31 parser = argparse.ArgumentParser()32 parser.add_argument("apk_filename", metavar="apk", type=str, help="APK to test")33 args = parser.parse_args()34 print("\nChecking if " + str(args. apk_filename) + " is vulnerable to CVE-2017-13156 vulnerability\n")35 print(str(args. apk_filename) + " md5: "+str(hashlib.md5(open(args. apk_filename,'rb').read()).hexdigest())+"\n")...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run Airtest automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful