def showInfo(apk): try: from apkinfo import APK info = APK(apk) print('Package: \t{}'.format(info.get_package())) print('Version: \t{}'.format(info.get_version_name())) print('Build: \t\t{}'.format(info.get_version_code())) print('File: \t\t{}'.format(os.path.basename(apk))) print('Size: \t\t{}'.format(os.path.getsize(apk))) except Exception as e: pass
def parse_apk(path): ''' parse apk file, get name, package, version ''' apk = APK(path) if not apk.is_valid_APK(): return None return { 'app_file': path.decode('utf8'), 'app_name': apk.get_app_name(), 'app_package': apk.get_package(), 'version_name': apk.get_version_name(), 'version_code': apk.get_version_code() }
def parse_apk(path): """ parse apk file, get name, package, version """ apk = APK(path) if not apk.is_valid_APK(): return None return { "app_file": path.decode("utf8"), "app_name": apk.get_app_name(), "app_package": apk.get_package(), "version_name": apk.get_version_name(), "version_code": apk.get_version_code(), }