• Home
  • Raw
  • Download

Lines Matching +full:openssl +full:- +full:no +full:- +full:verbose

10 #      http://www.apache.org/licenses/LICENSE-2.0
23 challenge-response unlock protocol.
28 '--pik_cert', '--puk_cert', and '--puk' command line swtiches, or
32 - Product Intermediate Key (PIK) certificate: 'pik_certificate.*\.bin'
33 - Product Unlock Key (PUK) certificate: 'puk_certificate.*\.bin'
34 - PUK private key: 'puk.*\.pem'
42 --clear_factory_digest=false option is used. There is no harm to clear this
46 - Python 2.7.x, 3.2.x, or newer (for argparse)
47 - PyCrypto 2.5 or newer (for PKCS1_v1_5 and RSA PKCS#8 PEM key import)
48 - Android SDK Platform Tools (for fastboot), in PATH
49 - https://developer.android.com/studio/releases/platform-tools
56 …%(prog)s [-h] [-v] [-s SERIAL] [--clear_factory_digest=true|false] unlock_creds.zip [unlock_creds_…
57 %(prog)s --pik_cert pik_cert.bin --puk_cert puk_cert.bin --puk puk.pem"""
61 %(prog)s unlock_creds.zip unlock_creds_2.zip -s SERIAL
63 %(prog)s --pik_cert pik_cert.bin --puk_cert puk_cert.bin --puk puk.pem"""
83 # PEM-encoded RSA keys
146 - Product Intermediate Key (PIK) certificate: 'pik_certificate.*\.bin'
147 - Product Unlock Key (PUK) certificate: 'puk_certificate.*\.bin'
148 - PUK private key: 'puk.*\.pem'
154 - archive: Filename of zip archive containing unlock credentials.
202 …rsing the AvbCertUnlockChallenge struct returned from 'fastboot oem at-get-vboot-unlock-challenge'.
204 The file provided to the constructor should be the full 52-byte
251 'fastboot oem at-get-vboot-unlock-challenge'.
265 this tool with the full avbtool. avbtool also uses openssl by default whereas
267 no officially supported openssl binary distributions.
273 'fastboot oem at-get-vboot-unlock-challenge'.
290 def AuthenticatedUnlock(all_creds, serial=None, verbose=False): argument
298 to fastboot's '-s' switch to select the device to unlock.
299 verbose: [optional] Enable verbose output, which prints the fastboot
309 args = ['fastboot'] + (['-s', serial] if serial else []) + args
310 if verbose:
314 args, stderr=subprocess.STDOUT).decode('utf-8')
316 if verbose:
321 fastboot_cmd(['oem', 'at-get-vboot-unlock-challenge'])
339 fastboot_cmd(['oem', 'at-unlock-vboot'])
341 res = fastboot_cmd(['getvar', 'at-vboot-state'])
342 if re.search(r'avb-locked(:\s*|=)0', res) is not None:
349 print(e.output.decode('utf-8'))
350 print("Command '{}' returned non-zero exit status {}".format(
357 def FindUnlockCredentialsInDirectory(dir, verbose=False): argument
367 if verbose:
370 if verbose:
377 def ClearFactoryPersistentDigest(serial=None, verbose=False): argument
382 the device is again locked, causing confusion. There is no harm to clear this
387 to fastboot's '-s' switch to select the device to unlock.
388 verbose: [optional] Enable verbose output, which prints the fastboot
404 args = ['fastboot'] + (['-s', serial] if serial else []) + args
405 if verbose:
409 args, stderr=subprocess.STDOUT).decode('utf-8')
411 if verbose:
416 fastboot_cmd(['oem', 'at-write-persistent-digest'])
420 print(e.output.decode('utf-8'))
421 print("Command '{}' returned non-zero exit status {}".format(
433 elif value.strip().lower() in ('false', 'f', 'no', 'n', 'off', '0'):
447 '-v',
448 '--verbose',
451 'enable verbose output, e.g. prints fastboot commands and their output')
453 '-s',
454 '--serial',
456 "specify device to unlock, either by serial or any other valid value for fastboot's -s arg"
459 '--clear_factory_digest',
468 # argparse doesn't support specifying this argument format - two groups of
470 # group to be specified - so we define them as optional arguments and do the
473 # Argument group #1 - Unlock credential zip archive(s) (or directory
486 # Argument group #2 - Individual credential files
488 '--pik_cert',
492 '--puk_cert',
496 '--puk',
500 # Print help if no args given
501 args = parser.parse_args(in_args if in_args else ['-h'])
508 'bundle argument is mutually exclusive with --pik_cert, --puk_cert, and --puk'
513 parser.error("--pik_cert is required if --puk_cert or --puk' is given")
515 parser.error("--puk_cert is required if --pik_cert or --puk' is given")
517 parser.error("--puk is required if --pik_cert or --puk_cert' is given")
530 FindUnlockCredentialsInDirectory(path, verbose=args.verbose))
535 parser.error('No unlock credentials were found in any of the given paths')
539 ret = AuthenticatedUnlock(creds, serial=args.serial, verbose=args.verbose)
541 ret = ClearFactoryPersistentDigest(serial=args.serial, verbose=args.verbose)