Lines Matching refs:cmd
185 def RunCommand(cmd, verbose=False, env=None): argument
189 cmd[0] = FindBinaryPath(cmd[0])
192 print('Running: ' + ' '.join(cmd))
194 cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=env)
200 assert p.returncode is 0, 'Failed to execute: ' + ' '.join(cmd)
490 cmd = ['mke2fs']
491 cmd.extend(['-O', '^has_journal']) # because image is read-only
492 cmd.extend(['-b', str(BLOCK_SIZE)])
493 cmd.extend(['-m', '0']) # reserved block percentage
494 cmd.extend(['-t', 'ext4'])
495 cmd.extend(['-I', '256']) # inode size
496 cmd.extend(['-N', str(inode_num)])
498 cmd.extend(['-U', uu])
499 cmd.extend(['-E', 'hash_seed=' + uu])
500 cmd.append(img_file)
501 cmd.append(str(size_in_mb) + 'M')
502 RunCommand(cmd, args.verbose, {'E2FSPROGS_FAKE_TIME': '1'})
506 cmd = ['sefcontext_compile']
507 cmd.extend(['-o', compiled_file_contexts])
508 cmd.append(args.file_contexts)
509 RunCommand(cmd, args.verbose)
512 cmd = ['e2fsdroid']
513 cmd.append('-e') # input is not android_sparse_file
514 cmd.extend(['-f', args.input_dir])
515 cmd.extend(['-T', '0']) # time is set to epoch
516 cmd.extend(['-S', compiled_file_contexts])
517 cmd.extend(['-C', args.canned_fs_config])
518 cmd.append('-s') # share dup blocks
519 cmd.append(img_file)
520 RunCommand(cmd, args.verbose, {'E2FSPROGS_FAKE_TIME': '1'})
522 cmd = ['e2fsdroid']
523 cmd.append('-e') # input is not android_sparse_file
524 cmd.extend(['-f', manifests_dir])
525 cmd.extend(['-T', '0']) # time is set to epoch
526 cmd.extend(['-S', compiled_file_contexts])
527 cmd.extend(['-C', args.canned_fs_config])
528 cmd.append('-s') # share dup blocks
529 cmd.append(img_file)
530 RunCommand(cmd, args.verbose, {'E2FSPROGS_FAKE_TIME': '1'})
533 cmd = ['resize2fs']
534 cmd.append('-M') # shrink as small as possible
535 cmd.append(img_file)
536 RunCommand(cmd, args.verbose, {'E2FSPROGS_FAKE_TIME': '1'})
545 cmd = ['avbtool']
546 cmd.append('add_hashtree_footer')
547 cmd.append('--do_not_generate_fec')
548 cmd.extend(['--algorithm', 'SHA256_RSA4096'])
549 cmd.extend(['--hash_algorithm', 'sha256'])
550 cmd.extend(['--key', args.key])
551 cmd.extend(['--prop', 'apex.key:' + key_name])
555 cmd.extend(['--salt', salt])
556 cmd.extend(['--image', img_file])
558 cmd.append('--no_hashtree')
560 cmd.extend(shlex.split(args.signing_args))
561 RunCommand(cmd, args.verbose)
574 cmd = ['avbtool']
575 cmd.append('resize_image')
576 cmd.extend(['--image', img_file])
577 cmd.extend(['--partition_size', str(partition_size)])
578 RunCommand(cmd, args.verbose)
581 cmd = ['soong_zip']
582 cmd.extend(['-o', img_file])
583 cmd.extend(['-C', args.input_dir])
584 cmd.extend(['-D', args.input_dir])
585 cmd.extend(['-C', manifests_dir])
586 cmd.extend(['-D', manifests_dir])
587 RunCommand(cmd, args.verbose)
630 cmd = ['aapt2']
631 cmd.append('link')
632 cmd.extend(['--manifest', android_manifest_file])
634 cmd.extend(['--rename-manifest-package', args.override_apk_package_name])
637 cmd.extend(['--version-code', str(manifest_apex.version)])
639 cmd.extend(['--version-name', manifest_apex.versionName])
641 cmd.extend(['--target-sdk-version', args.target_sdk_version])
643 cmd.extend(['--min-sdk-version', args.min_sdk_version])
646 cmd.extend(['--min-sdk-version', '29'])
648 cmd.extend(['-A', args.assets_dir])
649 cmd.extend(['-o', apk_file])
650 cmd.extend(['-I', args.android_jar_path])
651 RunCommand(cmd, args.verbose)
654 cmd = ['soong_zip']
655 cmd.append('-d') # include directories
656 cmd.extend(['-C', content_dir]) # relative root
657 cmd.extend(['-D', content_dir]) # input dir
660 cmd.extend(['-s', file_]) # don't compress any files
661 cmd.extend(['-o', zip_file])
662 RunCommand(cmd, args.verbose)
665 cmd = ['merge_zips']
666 cmd.append('-j') # sort
667 cmd.append(unaligned_apex_file) # output
668 cmd.append(apk_file) # input
669 cmd.append(zip_file) # input
670 RunCommand(cmd, args.verbose)
673 cmd = ['zipalign']
674 cmd.append('-f')
675 cmd.append(str(BLOCK_SIZE))
676 cmd.append(unaligned_apex_file)
677 cmd.append(args.output)
678 RunCommand(cmd, args.verbose)