bbarchivist.scripts package

Submodules

bbarchivist.scripts.archivist module

Download bar files, create autoloaders.

bbarchivist.scripts.archivist.archivist_checksw(baseurl, softwareversion, swchecked)[source]

Check availability of software releases.

Parameters:
  • baseurl (str) – Base URL for download links.
  • softwareversion (str) – Software release, 10.x.y.zzzz. Can be guessed.
  • swchecked (bool) – If we checked the sw release already.
bbarchivist.scripts.archivist.archivist_compressor(compressed, integrity, localdir, compmethod, szexe)[source]

Compress and optionally verify loaders.

Parameters:
  • compressed (bool) – Whether to compress files. True by default.
  • integrity (bool) – Whether to test downloaded files. True by default.
  • localdir (str) – Working directory. Local by default.
  • compmethod (str) – Compression method. Default is “7z”, fallback “zip”.
  • szexe (str) – Path to 7z executable.
bbarchivist.scripts.archivist.archivist_deleteuncompressed(dirs, deleted, radios)[source]

Delete uncompressed loaders.

Parameters:
  • dirs (list(str)) – List of OS/radio bar/loader/zipped folders.
  • deleted (bool) – Whether to delete uncompressed files. True by default.
  • radios (bool) – Whether to create radio autoloaders. True by default.
bbarchivist.scripts.archivist.archivist_download(download, osurls, radiourls, localdir, session, dirs)[source]

Download function.

Parameters:
  • download (bool) – Whether to download bar files. True by default.
  • osurls (list(str)) – OS file list.
  • radiourls (list(str)) – Radio file list.
  • localdir (str) – Working directory. Local by default.
  • session (requests.Session()) – Requests session object, default is created on the fly.
  • dirs (list(str)) – List of generated bar/loader/zip directories.
bbarchivist.scripts.archivist.archivist_extractbars(extract, localdir)[source]

Extract signed files from bar files.

Parameters:
  • extract (bool) – Whether to extract bar files. True by default.
  • localdir (str) – Working directory. Local by default.
bbarchivist.scripts.archivist.archivist_generateloaders(osversion, radioversion, radios, localdir, altsw, core)[source]

Generate loaders.

Parameters:
  • osversion (str) – OS version, 10.x.y.zzzz. Required.
  • radioversion (str) – Radio version, 10.x.y.zzzz. Can be guessed.
  • radios (bool) – Whether to create radio autoloaders. True by default.
  • localdir (str) – Working directory. Local by default.
  • altsw (str) – Radio software release, if not the same as OS.
  • core (bool) – Whether to create a core/radio loader. Default is false.
bbarchivist.scripts.archivist.archivist_gethashes(dirs, hashed, compressed, deleted, radios, osversion, radioversion, softwareversion, oldstyle)[source]

Make new-style info files.

Parameters:
  • dirs (list(str)) – List of OS/radio bar/loader/zipped folders.
  • hashed (bool) – Whether to hash files. True by default.
  • compressed (bool) – Whether to compress files. True by default.
  • deleted (bool) – Whether to delete uncompressed files. True by default.
  • radios (bool) – Whether to create radio autoloaders. True by default.
  • osversion (str) – OS version, 10.x.y.zzzz. Required.
  • radioversion (str) – Radio version, 10.x.y.zzzz. Can be guessed.
  • softwareversion (str) – Software release, 10.x.y.zzzz. Can be guessed.
  • oldstyle (bool) – Whether to make old-style checksum files. Default is false.
bbarchivist.scripts.archivist.archivist_getoldhashes(dirs, hashed, compressed, deleted, radios, hashdict, oldstyle)[source]

Make old-style checksum files.

Parameters:
  • dirs (list(str)) – List of OS/radio bar/loader/zipped folders.
  • hashed (bool) – Whether to hash files. True by default.
  • compressed (bool) – Whether to compress files. True by default.
  • deleted (bool) – Whether to delete uncompressed files. True by default.
  • radios (bool) – Whether to create radio autoloaders. True by default.
  • hashdict (dict({str: bool})) – Dictionary of hash rules, in ~barchivist.ini.
  • oldstyle (bool) – Whether to make old-style checksum files. Default is false.
bbarchivist.scripts.archivist.archivist_gpg(gpg, dirs, compressed, deleted, radios)[source]

GPG-sign everything.

Parameters:
  • gpg (bool) – Whether to use GnuPG verification. False by default.
  • dirs (list(str)) – List of OS/radio bar/loader/zipped folders.
  • compressed (bool) – Whether to compress files. True by default.
  • deleted (bool) – Whether to delete uncompressed files. True by default.
  • radios (bool) – Whether to create radio autoloaders. True by default.
bbarchivist.scripts.archivist.archivist_integritybars(integrity, osurls, radiourls, localdir)[source]

Check integrity of bar files, redownload if necessary.

Parameters:
  • integrity (bool) – Whether to test downloaded files. True by default.
  • osurls (list(str)) – OS file list.
  • radiourls (list(str)) – Radio file list.
bbarchivist.scripts.archivist.archivist_integrityloaders(integrity, localdir)[source]

Check integrity of build loaders.

Parameters:
  • integrity (bool) – Whether to test downloaded files. True by default.
  • localdir (str) – Working directory. Local by default.
bbarchivist.scripts.archivist.archivist_integritysigned(integrity, localdir)[source]

Check integrity of signed files.

Parameters:
  • integrity (bool) – Whether to test downloaded files. True by default.
  • localdir (str) – Working directory. Local by default.
bbarchivist.scripts.archivist.archivist_main(osversion, radioversion=None, softwareversion=None, localdir=None, radios=True, compressed=True, deleted=True, hashed=True, hashdict=None, download=True, extract=True, signed=True, compmethod='7z', gpg=False, integrity=True, altsw=None, core=False, oldstyle=False)[source]

Wrap around multi-autoloader creation code. Some combination of creating, downloading, hashing, compressing and moving autoloaders.

Parameters:
  • osversion (str) – OS version, 10.x.y.zzzz. Required.
  • radioversion (str) – Radio version, 10.x.y.zzzz. Can be guessed.
  • softwareversion (str) – Software release, 10.x.y.zzzz. Can be guessed.
  • localdir (str) – Working directory. Local by default.
  • radios (bool) – Whether to create radio autoloaders. True by default.
  • compressed (bool) – Whether to compress files. True by default.
  • deleted (bool) – Whether to delete uncompressed files. True by default.
  • hashed (bool) – Whether to hash files. True by default.
  • hashdict (dict({str: bool})) – Dictionary of hash rules, in ~barchivist.ini.
  • download (bool) – Whether to download bar files. True by default.
  • extract (bool) – Whether to extract bar files. True by default.
  • signed (bool) – Whether to delete signed files. True by default.
  • compmethod (str) – Compression method. Default is “7z”, fallback “zip”.
  • gpg (bool) – Whether to use GnuPG verification. False by default.
  • integrity (bool) – Whether to test downloaded files. True by default.
  • altsw (str) – Radio software release, if not the same as OS.
  • core (bool) – Whether to create a core/radio loader. Default is false.
  • oldstyle (bool) – Whether to make old-style checksum files. Default is false.
bbarchivist.scripts.archivist.archivist_movebars(dirs, localdir)[source]

Move bar files.

Parameters:
  • dirs (list(str)) – List of OS/radio bar/loader/zipped folders.
  • localdir (str) – Working directory. Local by default.
bbarchivist.scripts.archivist.archivist_moveloaders(dirs, localdir)[source]

Move loaders.

Parameters:
  • dirs (list(str)) – List of OS/radio bar/loader/zipped folders.
  • localdir (str) – Working directory. Local by default.
bbarchivist.scripts.archivist.archivist_removeemptyfolders(localdir)[source]

Delete empty folders.

Parameters:localdir (str) – Working directory. Local by default.
bbarchivist.scripts.archivist.archivist_removesigned(signed, localdir)[source]

Remove signed files.

Parameters:
  • signed (bool) – Whether to delete signed files. True by default.
  • localdir (str) – Working directory. Local by default.
bbarchivist.scripts.archivist.questionnaire()[source]

Questions to ask if no arguments given.

bbarchivist.scripts.autolookup module

Get software release for one/many OS versions.

bbarchivist.scripts.autolookup.execute_args(args)[source]

Get args and decide what to do with them.

Parameters:args (argparse.Namespace) – Arguments.
bbarchivist.scripts.autolookup.frozen_args(parser)[source]

Add args to parser if not frozen.

Parameters:parser (argparse.ArgumentParser) – Parser to modify.
bbarchivist.scripts.autolookup.grab_args()[source]

Parse arguments from argparse/questionnaire.

Invoke autolookup.autolookup_main() with those arguments.

bbarchivist.scripts.autolookup.questionnaire()[source]

Questions to ask if no arguments given.

bbarchivist.scripts.barlinker module

Generate bar file URL.

bbarchivist.scripts.barlinker.barlinker_main()[source]

Wrap around bbarchivist.utilities link generation.

bbarchivist.scripts.barlinker.questionnaire()[source]

Ask input from user.

bbarchivist.scripts.carrierchecker module

Checks a carrier for an OS version, can download.

bbarchivist.scripts.carrierchecker.carrierchecker_argfilter(mcc, mnc, device, directory)[source]

Filter arguments.

Parameters:
  • mcc (int) – Country code.
  • mnc (int) – Network code.
  • device (str) – Device ID (XXX100-#)
  • directory (str) – Where to store files. Default is local directory.
bbarchivist.scripts.carrierchecker.carrierchecker_bundles(mcc, mnc, hwid)[source]
Parameters:
  • mcc (int) – Country code.
  • mnc (int) – Network code.
  • hwid (str) – Device hardware ID.
bbarchivist.scripts.carrierchecker.carrierchecker_download(files, directory, osv, radv, swv, family, download=False, blitz=False, session=None)[source]

Download files, create blitz if specified.

Parameters:
  • files (list(str)) – List of files.
  • directory (str) – Where to store files. Default is local directory.
  • osv (str) – OS version, 10.x.y.zzzz.
  • radv (str) – Radio version, 10.x.y.zzzz.
  • swv (str) – Software release, 10.x.y.zzzz.
  • family (str) – Device family.
  • download (bool) – Whether or not to download. Default is false.
  • blitz (bool) – Whether or not to create a blitz package. Default is false.
  • session (requests.Session()) – Requests session object, default is created on the fly.
bbarchivist.scripts.carrierchecker.carrierchecker_download_prep(files, directory, osv, radv, swv, family, blitz=False)[source]

Prepare for downloading files.

Parameters:
  • files (list(str)) – List of files.
  • directory (str) – Where to store files. Default is local directory.
  • osv (str) – OS version, 10.x.y.zzzz.
  • radv (str) – Radio version, 10.x.y.zzzz.
  • swv (str) – Software release, 10.x.y.zzzz.
  • family (str) – Device family.
  • blitz (bool) – Whether or not to create a blitz package. Default is false.
bbarchivist.scripts.carrierchecker.carrierchecker_export(mcc, mnc, files, hwid, osv, radv, swv, export=False, upgrade=False, forced=None)[source]

Export files to file.

Parameters:
  • mcc (int) – Country code.
  • mnc (int) – Network code.
  • files (list(str)) – List of files.
  • hwid (str) – Device hardware ID.
  • osv (str) – OS version, 10.x.y.zzzz.
  • radv (str) – Radio version, 10.x.y.zzzz.
  • swv (str) – Software release, 10.x.y.zzzz.
  • export (bool) – Whether or not to write URLs to a file. Default is false.
  • upgrade (bool) – Whether or not to use upgrade files. Default is false.
  • forced (str) – Force a software release. None to go for latest.
bbarchivist.scripts.carrierchecker.carrierchecker_jsonprepare(mcc, mnc, device)[source]

Prepare JSON data.

Parameters:
  • mcc (int) – Country code.
  • mnc (int) – Network code.
  • device (str) – Device ID (XXX100-#).
bbarchivist.scripts.carrierchecker.carrierchecker_main(mcc, mnc, device, download=False, upgrade=True, directory=None, export=False, blitz=False, bundles=False, forced=None, selective=False)[source]

Wrap around bbarchivist.networkutils carrier checking.

Parameters:
  • mcc (int) – Country code.
  • mnc (int) – Network code.
  • device (str) – Device ID (XXX100-#).
  • download (bool) – Whether or not to download. Default is false.
  • upgrade (bool) – Whether or not to use upgrade files. Default is false.
  • directory (str) – Where to store files. Default is local directory.
  • export (bool) – Whether or not to write URLs to a file. Default is false.
  • blitz (bool) – Whether or not to create a blitz package. Default is false.
  • bundles (bool) – Whether or not to check software bundles. Default is false.
  • forced (str) – Force a software release. None to go for latest.
  • selective (bool) – Whether or not to exclude Nuance/other dross. Default is false.
bbarchivist.scripts.carrierchecker.carrierchecker_nobundles(mcc, mnc, hwid, family, download=False, upgrade=True, directory=None, export=False, blitz=False, forced=None, selective=False)[source]

Wrap around bbarchivist.networkutils carrier checking.

Parameters:
  • mcc (int) – Country code.
  • mnc (int) – Network code.
  • hwid (str) – Device hardware ID.
  • family (str) – Device family.
  • download (bool) – Whether or not to download. Default is false.
  • upgrade (bool) – Whether or not to use upgrade files. Default is false.
  • directory (str) – Where to store files. Default is local directory.
  • export (bool) – Whether or not to write URLs to a file. Default is false.
  • blitz (bool) – Whether or not to create a blitz package. Default is false.
  • forced (str) – Force a software release. None to go for latest.
  • selective (bool) – Whether or not to exclude Nuance/other dross. Default is false.
bbarchivist.scripts.carrierchecker.carrierchecker_selective(files, selective=False)[source]

Filter useless bar files.

Parameters:
  • files (list(str)) – List of files.
  • selective (bool) – Whether or not to exclude Nuance/other dross. Default is false.
bbarchivist.scripts.carrierchecker.execute_args(args)[source]

Get args and decide what to do with them.

Parameters:args (argparse.Namespace) – Arguments.
bbarchivist.scripts.carrierchecker.forced_args(args)[source]

Determine the forced argument.

Parameters:args (argparse.Namespace) – Arguments.
bbarchivist.scripts.carrierchecker.forced_avail(args)[source]

Determine the forced argument after availability checking.

Parameters:args (argparse.Namespace) – Arguments.
bbarchivist.scripts.carrierchecker.grab_args()[source]

Parse arguments from argparse/questionnaire.

Invoke carrierchecker.carrierchecker_main() with those arguments.

bbarchivist.scripts.carrierchecker.questionnaire()[source]

Questions to ask if no arguments given.

bbarchivist.scripts.carrierchecker.questionnaire_3digit(message)[source]

Get MCC/MNC from questionnaire.

bbarchivist.scripts.certchecker module

Checks certifications for a given device.

bbarchivist.scripts.certchecker.certchecker_family(args, datafile)[source]

Output all devices in a family.

Parameters:
  • args (argparse.Namespace) – Arguments.
  • datafile (list(dict)) – List of device entries.
bbarchivist.scripts.certchecker.certchecker_main(device, data)[source]

Wrap around bbarchivist.networkutils certification checking.

Parameters:
  • device (str) – Hardware ID, PTCRB ID, FCC ID or model number.
  • data (list(dict)) – List of device entries.
bbarchivist.scripts.certchecker.execute_args(args, datafile)[source]

Get args and decide what to do with them.

Parameters:
  • args (argparse.Namespace) – Arguments.
  • datafile (list(dict)) – List of device entries.
bbarchivist.scripts.certchecker.execute_args_end(args, datafile)[source]

Continue the first half.

Parameters:
  • args (argparse.Namespace) – Arguments.
  • datafile (list(dict)) – List of device entries.
bbarchivist.scripts.certchecker.grab_args()[source]

Parse arguments from argparse/questionnaire.

Invoke certchecker.certchecker_main() with arguments.

bbarchivist.scripts.devloader module

Generate Dev Alpha autoloader URLs.

bbarchivist.scripts.devloader.devloader_exporter(osversion, export, urls)[source]

Handle exporting links to text/stdout.

Parameters:
  • osversion (str) – OS version.
  • export (bool) – If we write URLs to file. Default is false.
  • urls (list(str)) – List of Dev Alpha URLs.
bbarchivist.scripts.devloader.grab_args()[source]

Parse arguments from argparse/questionnaire.

Invoke devloader.devloader_main() with arguments.

bbarchivist.scripts.downloader module

Only download OS/radio bar files.

bbarchivist.scripts.downloader.downloader_main(osversion, radioversion=None, softwareversion=None, localdir=None, debricks=True, radios=True, cores=False, altsw=None)[source]

Archivist’s download function, abstracted out.

Parameters:
  • osversion (str) – OS version, 10.x.y.zzzz.
  • radioversion (str) – Radio version, 10.x.y.zzzz. Can be guessed.
  • softwareversion (str) – Software release, 10.x.y.zzzz. Can be guessed.
  • localdir (str) – Working directory. Local by default.
  • debricks (bool) – Whether to download debrick OS files. True by default.
  • radios (bool) – Whether to download radio files. True by default.
  • cores (bool) – Whether to download core OS files. False by default.
  • altsw (str) – Radio software release, if not the same as OS.
bbarchivist.scripts.downloader.questionnaire()[source]

Questions to ask if no arguments given.

bbarchivist.scripts.droidlookup module

Check Android autoloader files.

bbarchivist.scripts.droidlookup.execute_args(args)[source]

Get args and decide what to do with them.

Parameters:args (argparse.Namespace) – Arguments.
bbarchivist.scripts.droidlookup.grab_args()[source]

Parse arguments from argparse/questionnaire.

Invoke droidlookup.droidlookup_main() with those arguments.

bbarchivist.scripts.droidlookup.parse_ceiling(ceil, floor)[source]

Check if ceiling value is OK.

Parameters:
  • ceil (int) – Ending OS version.
  • floor (int) – Starting OS version.
bbarchivist.scripts.droidlookup.parse_extreme(starter, minim, maxim, mintext, maxtext)[source]

Check if floor/ceiling value is OK.

Parameters:
  • starter (int) – Minimum/maximum OS version.
  • minim (int) – Minimum value for starter.
  • maxim (int) – Maximum value for starter.
  • mintext (str) – What to print if starter < minim.
  • maxtext (str) – What to print if starter > maxim.
bbarchivist.scripts.droidlookup.parse_floor(floor)[source]

Check if floor value is OK.

Parameters:floor (int) – Starting OS version.
bbarchivist.scripts.droidlookup.questionnaire()[source]

Questions to ask if no arguments given.

bbarchivist.scripts.droidlookup.questionnaire_branch()[source]

Ask about lookup branch.

bbarchivist.scripts.droidlookup.questionnaire_final(floor)[source]

Ask about lookup end.

Parameters:floor (int) – Starting OS version.
bbarchivist.scripts.droidlookup.questionnaire_initial()[source]

Ask about lookup start.

bbarchivist.scripts.droidlookup.questionnaire_single()[source]

What to ask if only one lookup is needed.

bbarchivist.scripts.droidscraper module

Scrape Android autoloader webpage.

bbarchivist.scripts.droidscraper.droidscraper_main()[source]

Wrap around bbarchivist.networkutils web scraping.

bbarchivist.scripts.escreens module

Calculates escreens codes.

bbarchivist.scripts.escreens.escreens_main()[source]

Parse arguments from argparse/questionnaire.

Invoke bbarchivist.hashutils.calculate_escreens() with arguments.

bbarchivist.scripts.escreens.questionnaire()[source]

Questions to ask if no arguments given.

bbarchivist.scripts.exeshim module

Python interface for cap/cfp.

bbarchivist.scripts.exeshim.cap_main()[source]

Run cap.

bbarchivist.scripts.exeshim.cfp_main()[source]

Run cfp.

bbarchivist.scripts.filehasher module

Applies hash functions to files.

bbarchivist.scripts.filehasher.filehasher_main()[source]

Parse arguments from argparse/questionnaire.

Invoke bbarchivist.hashutils.verifier() with those arguments.

bbarchivist.scripts.gpgrunner module

Use GPG to sign all files in a directory.

bbarchivist.scripts.gpgrunner.gpgrunner_main()[source]

Parse arguments from argparse/questionnaire.

Invoke bbarchivist.gpgutils.gpgrunner() with those arguments.

bbarchivist.scripts.gpgrunner.prep_key(key)[source]

Prepare key.

Parameters:key (str) – Key to use. 8-character hexadecimal, with or without 0x.
bbarchivist.scripts.gpgrunner.prep_key_pass()[source]

Prepare key and password.

bbarchivist.scripts.gpgrunner.prep_pass(key, password)[source]

Prepare password.

Parameters:
  • key (str) – Key to use. 8-character hexadecimal, with or without 0x.
  • password (str) – Passphrase for given key.

bbarchivist.scripts.infogenerator module

Makes a nice info file for a folder of autoloaders.

bbarchivist.scripts.infogenerator.execute_args(args)[source]

Get args and decide what to do with them.

Parameters:args (argparse.Namespace) – Arguments.
bbarchivist.scripts.infogenerator.grab_args()[source]

Parse arguments from argparse/questionnaire.

Invoke bbarchivist.scriptutils.make_info() with those arguments.

bbarchivist.scripts.infogenerator.infogenerator_main(folder, osver, radio=None, swrelease=None, device=None)[source]

Wrap around bbarchivist.scriptutils info generation.

Parameters:
  • folder (str) – Path to folder to analyze.
  • osver (str) – OS version, required for both types.
  • radio (str) – Radio version, required for QNX.
  • swrelease (str) – Software release, required for QNX.
  • device (str) – Device type, required for Android.
bbarchivist.scripts.infogenerator.questionnaire()[source]

Questions to ask if no arguments given.

bbarchivist.scripts.kernchecker module

Checks BlackBerry’s Android kernel repo for available branches.

bbarchivist.scripts.kernchecker.grab_args()[source]

Parse arguments from argparse/questionnaire.

Invoke kernchecker.kernchecker_main() with those arguments.

bbarchivist.scripts.kernchecker.kernchecker_main(utils=False)[source]

Wrap around bbarchivist.networkutils kernel checking.

Parameters:utils (bool) – If we’re checking utilities rather than kernels.

bbarchivist.scripts.kompressor module

Compress all files in a directory.

bbarchivist.scripts.kompressor.kompressor_main()[source]

Parse arguments from argparse/questionnaire.

Invoke bbarchivist.barutils.compress() with those arguments.

bbarchivist.scripts.lazyloader module

Create one autoloader for personal use.

bbarchivist.scripts.lazyloader.execute_args(args)[source]

Get args and decide what to do with them.

Parameters:args (argparse.Namespace) – Arguments.
bbarchivist.scripts.lazyloader.lazyloader_main(device, osversion, radioversion=None, softwareversion=None, localdir=None, autoloader=False, download=True, altsw=None, core=False)[source]

Wrap the tools necessary to make one autoloader.

Parameters:
  • device (int) – Device family to create loader for.
  • osversion (str) – OS version, 10.x.y.zzzz.
  • radioversion (str) – Radio version, 10.x.y.zzzz.
  • softwareversion (str) – Software version, 10.x.y.zzzz.
  • localdir (str) – Working path. Default is local dir.
  • autoloader (bool) – Whether to run loader. Default is false. Windows-only.
  • download (bool) – Whether to download files. Default is true.
  • altsw (str) – Radio software release, if not the same as OS.
  • core (bool) – Whether to create a core/radio loader. Default is false.
bbarchivist.scripts.lazyloader.questionnaire()[source]

Questions to ask if no arguments given.

bbarchivist.scripts.lazyloader.questionnaire_check(softwareversion, radioversion)[source]

Check software and radio versions.

Parameters:
  • softwareversion (str) – Software version, 10.x.y.zzzz.
  • radioversion (str) – Radio version, 10.x.y.zzzz.
bbarchivist.scripts.lazyloader.questionnaire_devices()[source]

Ask about which device this script is to be run for.

bbarchivist.scripts.lazyloader.questionnaire_getversions()[source]

Get OS, radio, and software versions.

bbarchivist.scripts.lazyloader.questionnaire_loader()[source]

Ask about whether to run an autoloader.

bbarchivist.scripts.lazyloader.questionnaire_radiocheck(radioversion, altsw=None)[source]

Get radio information in working order.

Parameters:
  • radioversion (str) – Radio version, 10.x.y.zzzz.
  • altsw (str) – Radio software release, if not the same as OS.

bbarchivist.scripts.linkgen module

Generate links from OS/radio/software.

bbarchivist.scripts.linkgen.grab_args()[source]

Parse arguments from argparse/questionnaire.

Invoke linkgen.linkgen_main() with those arguments.

bbarchivist.scripts.linkgen.linkgen_main(osversion, radioversion=None, softwareversion=None, altsw=None, sdk=False)[source]

Generate debrick/core/radio links for given OS, radio, software release.

Parameters:
  • osversion (str) – OS version, 10.x.y.zzzz.
  • radioversion (str) – Radio version, 10.x.y.zzzz. Can be guessed.
  • softwareversion (str) – Software version, 10.x.y.zzzz. Can be guessed.
  • altsw (str) – Radio software release, if not the same as OS.
  • sdk (bool) – If we specifically want SDK images. Default is False.
bbarchivist.scripts.linkgen.questionnaire()[source]

Questions to ask if no arguments given.

bbarchivist.scripts.metachecker module

Checks BlackBerry’s developer website for metadata.

bbarchivist.scripts.metachecker.metachecker_main()[source]

Wrap around bbarchivist.networkutils metadata checking.

bbarchivist.scripts.pycaptool module

cap.exe, implemented in Python.

bbarchivist.scripts.pycaptool.pycaptool_main()[source]

Parse arguments from argparse.

Invoke bbarchivist.pseudocap.make_autoloader() with arguments.

bbarchivist.scripts.sqlexport module

Export SQL database to CSV.

bbarchivist.scripts.sqlexport.grab_args()[source]

Parse arguments from argparse/questionnaire.

bbarchivist.scripts.sqlexport.pprint(avail)[source]

Pretty print the release list.

Parameters:avail (bool) – List only available entries in database (implies listing in the first place).
bbarchivist.scripts.sqlexport.sqlexport_main(listed, avail, popsw)[source]

Wrapper around CSV export function/other SQL-related stuff.

Parameters:
  • listed (bool) – List entries in database.
  • avail (bool) – List only available entries in database (implies listing in the first place).
  • popsw (tuple) – If we’re popping a software release: False if not, (“OS”, “SW”) tuple if we are.

bbarchivist.scripts.swlookup module

Check BB10 software releases.

bbarchivist.scripts.swlookup.grab_args()[source]

Parse arguments from argparse/questionnaire.

bbarchivist.scripts.swlookup.terminator(swversion, ceiling, loop=None)[source]

Handle KeyboardInterrupt calling.

Parameters:
  • swversion (str) – Software version, 10.x.y.zzzz.
  • loop (bool) – Whether or not to automatically lookup. Default is None.
  • ceiling (int) – When to stop loop. Default is 9999 (i.e. 10.x.y.9999).

bbarchivist.scripts.tcldelta module

Grab latest delta update for TCL API devices.

bbarchivist.scripts.tcldelta.grab_args()[source]

Parse arguments from argparse/questionnaire.

Invoke a function with those arguments.

bbarchivist.scripts.tcldelta.questionnaire(args)[source]

Clear up missing arguments.

Parameters:args (argparse.Namespace) – Arguments.
bbarchivist.scripts.tcldelta.tcldelta_main(curef, fvver, download=False, original=False, export=False, remote=False)[source]

Scan one PRD and produce download URL and filename.

Parameters:
  • curef (str) – PRD of the phone variant to check.
  • fvver (str) – Current firmware version.
  • download (bool) – If we’ll download the file that this returns. Default is False.
  • original (bool) – If we’ll download the file with its original filename. Default is False.
  • export (bool) – Whether to export XML response to file. Default is False.
  • remote (bool) – Whether to get OTA version from remote server. Default is False.

bbarchivist.scripts.tclloader module

Generate autoloader from TCL autoloader template.

bbarchivist.scripts.tclloader.grab_args()[source]

Parse arguments from argparse/questionnaire.

Invoke tclloader.tclloader_main() with those arguments.

bbarchivist.scripts.tclloader.tclloader_compress(compress=False, loadername=None)[source]

Compress the final autoloader if needed.

Parameters:
  • compress (bool) – If the final loader is to be compressed. Default is False.
  • loadername (str) – Name of final autoloader.
bbarchivist.scripts.tclloader.tclloader_extract(loaderfile, loaderdir, directory=False)[source]

Extract autoloader template zip if needed.

Parameters:
  • loaderfile (str) – Path to input file.
  • loaderdir (str) – Path to output folder.
  • directory (bool) – If the input file is a folder. Default is False.
bbarchivist.scripts.tclloader.tclloader_fastboot(localtools=False)[source]

Download fastboot if needed.

Parameters:localtools (bool) – If fastboot is to be copied from the input itself. Default is False.
bbarchivist.scripts.tclloader.tclloader_main(loaderfile, loadername=None, directory=False, localtools=False, compress=False, wipe=True)[source]

Scan every PRD and produce latest versions.

Parameters:
  • loaderfile (str) – Path to input file/folder.
  • loadername (str) – Name of final autoloader. Default is auto-generated.
  • directory (bool) – If the input file is a folder. Default is False.
  • localtools (bool) – If fastboot is to be copied from the input itself. Default is False.
  • compress (bool) – If the final loader is to be compressed. Default is False.
  • wipe (bool) – If the final loader wipes userdata. Default is True.

bbarchivist.scripts.tclnewprd module

Check for new PRDs for TCL API devices.

bbarchivist.scripts.tclnewprd.execute_args(args)[source]

Get args and decide what to do with them.

Parameters:args (argparse.Namespace) – Arguments.
bbarchivist.scripts.tclnewprd.grab_args()[source]

Parse arguments from argparse/questionnaire.

Invoke a function with those arguments.

bbarchivist.scripts.tclnewprd.questionnaire()[source]

Questions to ask if no arguments given.

bbarchivist.scripts.tclnewprd.questionnaire_prds()[source]

Ask about individual versus full scanning.

bbarchivist.scripts.tclnewprd.tclnewprd_main(prds=None, floor=1, ceiling=60, export=False, noprefix=False, key2mode=False)[source]

Scan every PRD and produce latest versions.

Parameters:
  • prds (list(str)) – Specific PRD(s) to check, None if all will be checked. Default is None.
  • floor (int) – When to start. Default is 1.
  • ceiling (int) – When to stop. Default is 60.
  • export (bool) – Whether to export XML response to file. Default is False.
  • noprefix (bool) – Whether to skip adding “PRD-” prefix. Default is False.
  • key2mode (bool) – Whether to use new-style prefix. Default is False.

bbarchivist.scripts.tclscan module

Check latest update for TCL API devices.

bbarchivist.scripts.tclscan.execute_args(args)[source]

Get args and decide what to do with them.

Parameters:args (argparse.Namespace) – Arguments.
bbarchivist.scripts.tclscan.grab_args()[source]

Parse arguments from argparse/questionnaire.

Invoke a function with those arguments.

bbarchivist.scripts.tclscan.questionnaire()[source]

Questions to ask if no arguments given.

bbarchivist.scripts.tclscan.questionnaire_ota()[source]

Ask about OTA versus full scanning.

bbarchivist.scripts.tclscan.questionnaire_single()[source]

Ask about single versus full scanning.

bbarchivist.scripts.tclscan.tclscan_main(ota=None, device=None, export=False, remote=False)[source]

Scan every PRD and produce latest versions.

Parameters:
  • ota (str) – The starting version if OTA, None if not. Default is None.
  • device (str) – Specific PRD to check, None if all will be checked. Default is None.
  • export (bool) – Whether to export XML response to file. Default is False.
  • remote (bool) – Whether to get OTA version from remote server. Default is False.
bbarchivist.scripts.tclscan.tclscan_single(curef, download=False, ota=None, export=False, remote=False)[source]

Scan one PRD and produce download URL and filename.

Parameters:
  • curef (str) – PRD of the phone variant to check.
  • download (bool) – If we’ll download the file that this returns. Default is False.
  • ota (str) – The starting version if OTA, None if not. Default is None.
  • export (bool) – Whether to export XML response to file. Default is False.
  • remote (bool) – Whether to get OTA version from remote server. Default is False.

Module contents

The script portion of bbarchivist.