bbarchivist.scripts package

Submodules

bbarchivist.scripts.archivist module

Download bar files, create autoloaders.

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)[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.
  • 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 bar 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.
bbarchivist.scripts.archivist.grab_args()[source]

Parse arguments from argparse/questionnaire.

Invoke archivist.archivist_main() with those arguments.

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.autolookup_main(osversion, loop=False, log=False, autogen=False, inc=3, sql=False, quiet=False, ceiling=9996, mailer=False)[source]

Lookup a software release from an OS. Can iterate.

Parameters:
  • osversion (str:param mcc: Country code.) – OS version, 10.x.y.zzzz.
  • loop (bool) – Whether or not to automatically lookup. Default is false.
  • log (bool) – Whether to log. Default is false.
  • autogen (bool) – Whether to create text links. Default is false.
  • inc (int) – Lookup inc. Default is 3.
  • sql (bool) – Whether to add valid lookups to a database. Default is false.
  • quiet (bool) – Whether to only output if release exists. Default is false.
  • ceiling (int) – When to stop loop. Default is 9996 (i.e. 10.x.y.9996).
  • mailer (bool) – Whether to email new valid links. Default is false.
bbarchivist.scripts.autolookup.grab_args()[source]

Parse arguments from argparse/questionnaire.

Invoke autolookup.autolookup_main() with those arguments.

bbarchivist.scripts.cap module

cap.exe, implemented in Python.

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

Parse arguments from argparse.

Invoke bbarchivist.pseudocap.make_autoloader() with arguments.

bbarchivist.scripts.cfp module

Python interface for cfp.

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

Run cfp.

bbarchivist.scripts.carrierchecker module

Checks a carrier for an OS version, can download.

bbarchivist.scripts.carrierchecker.carrierchecker_main(mcc, mnc, device, download=False, upgrade=True, directory=None, export=False, blitz=False, bundles=False, forced=None)[source]

Wrap around bbarchivist.networkutils carrier checking.

Parameters:
  • mcc (int) – Country code.
  • mnc (int) – Network code.
  • device (str) – Device ID (SXX100-#)
  • 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.
bbarchivist.scripts.carrierchecker.grab_args()[source]

Parse arguments from argparse/questionnaire.

Invoke carrierchecker.carrierchecker_main() with those arguments.

bbarchivist.scripts.certchecker module

Checks certifications for a given device.

bbarchivist.scripts.certchecker.certchecker_main(device)[source]

Wrap around bbarchivist.networkutils certification checking.

Parameters:device (str) – Hardware ID, PTCRB ID, FCC ID or model number.
bbarchivist.scripts.certchecker.grab_args()[source]

Parse arguments from argparse/questionnaire.

Invoke certchecker.certchecker_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, integrity=True, 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.
  • integrity (bool) – Whether to test downloaded bar files. True by default.
  • altsw (str) – Radio software release, if not the same as OS.
bbarchivist.scripts.downloader.grab_args()[source]

Parse arguments from argparse/questionnaire.

Invoke downloader from archivist.archivist_main() with arguments.

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

Questions to ask if no arguments given.

bbarchivist.scripts.escreens module

Calculates escreens codes.

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

Parse arguments from argparse/questionnaire.

Invoke bbarchivist.filehashtools.calculate_escreens() with arguments.

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

Questions to ask if no arguments given.

bbarchivist.scripts.filehasher module

Applies hash functions to files.

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

Parse arguments from argparse/questionnaire.

Invoke bbarchivist.filehashtools.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.filehashtools.gpgrunner() with those arguments.

bbarchivist.scripts.kernchecker module

Checks BlackBerry’s Android kernel repo for available branches.

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

Wrap around bbarchivist.networkutils kernel checking.

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.grab_args()[source]

Parse arguments from argparse/questionnaire.

Invoke lazyloader.lazyloader_main() with 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.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, temp=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.
  • temp (bool) – If file we write to is temporary.
bbarchivist.scripts.linkgen.questionnaire()[source]

Questions to ask if no arguments given.

bbarchivist.scripts.sqlexport module

Export SQL database to CSV.

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

Wrapper around CSV export function.

Invoke bbarchivist.sqlutils.export_sql_db().

Module contents

The script portion of bbarchivist.