usage: repo COMMAND [ARGS] The most commonly used repo commands are: abandon Permanently abandon a development branch branch View current topic branches branches View current topic branches checkout Checkout a branch for development cherry-pick Cherry-pick a change. diff Show changes between commit and working tree diffmanifests Manifest diff utility download Download and checkout a change gitc-delete Delete a GITC Client. gitc-init Initialize a GITC Client. grep Print lines matching a pattern info Get info on the manifest branch, current branch or unmerged branches init Initialize a repo client checkout in the current directory list List projects and their associated directories overview Display overview of unmerged project branches prune Prune (delete) already merged topics rebase Rebase local branches on upstream branch smartsync Update working tree to the latest known good revision stage Stage file(s) for commit start Start a new branch for development status Show the working tree status sync Update working tree to the latest revision upload Upload changes for code review See 'repo help <command>' for more information on a specific command. See 'repo help --all' for a complete list of recognized commands.
Options: -h, --help show this help message and exit -j JOBS, --jobs=JOBS number of jobs to run in parallel (default: 1; based on number of CPU cores) --jobs-network=JOBS number of network jobs to run in parallel (defaults to --jobs) --jobs-checkout=JOBS number of local checkout jobs to run in parallel (defaults to --jobs) -f, --force-broken obsolete option (to be deleted in the future) --fail-fast stop syncing after first error is hit --force-sync overwrite an existing git directory if it needs to point to a different object directory. WARNING: this may cause loss of data --force-remove-dirty force remove projects with uncommitted modifications if projects no longer exist in the manifest. WARNING: this may cause loss of data -l, --local-only only update working tree, don't fetch --no-manifest-update, --nmu use the existing manifest checkout as-is. (do not update to the latest revision) -n, --network-only fetch only, don't update working tree -d, --detach detach projects back to manifest revision -c, --current-branch fetch only current branch from server --no-current-branch fetch all branches from server -m NAME.xml, --manifest-name=NAME.xml temporary manifest to use for this sync --clone-bundle enable use of /clone.bundle on HTTP/HTTPS --no-clone-bundle disable use of /clone.bundle on HTTP/HTTPS -u MANIFEST_SERVER_USERNAME, --manifest-server-username=MANIFEST_SERVER_USERNAME username to authenticate with the manifest server -p MANIFEST_SERVER_PASSWORD, --manifest-server-password=MANIFEST_SERVER_PASSWORD password to authenticate with the manifest server --fetch-submodules fetch submodules from server --use-superproject use the manifest superproject to sync projects; implies -c --no-use-superproject disable use of manifest superprojects --tags fetch tags --no-tags don't fetch tags (default) --optimized-fetch only fetch projects fixed to sha1 if revision does not exist locally --retry-fetches=RETRY_FETCHES number of times to retry fetches on transient errors --prune delete refs that no longer exist on the remote (default) --no-prune do not delete refs that no longer exist on the remote -s, --smart-sync smart sync using manifest from the latest known good build -t SMART_TAG, --smart-tag=SMART_TAG smart sync using manifest from a known tag
Logging options: -v, --verbose show all output -q, --quiet only show errors
Multi-manifest options: --outer-manifest operate starting at the outermost manifest --no-outer-manifest do not operate on outer manifests --this-manifest-only only operate on this (sub)manifest --no-this-manifest-only, --all-manifests operate on this manifest and its submanifests
repo Version options: --no-repo-verify do not verify repo source code
Description
The 'repo sync' command synchronizes local project directories with the remote repositories specified in the manifest. If a local project does not yet exist, it will clone a new local directory from the remote repository and set up tracking branches as specified in the manifest. If the local project already exists, 'repo sync' will update the remote branches and rebase any new local changes on top of the new remote changes.
'repo sync' will synchronize all projects listed at the command line. Projects can be specified either by name, or by a relative or absolute path to the project's local directory. If no projects are specified, 'repo sync' will synchronize all projects listed in the manifest.
The -d/--detach option can be used to switch specified projects back to the manifest revision. This option is especially helpful if the project is currently on a topic branch, but the manifest revision is temporarily needed.
The -s/--smart-sync option can be used to sync to a known good build as specified by the manifest-server element in the current manifest. The -t/--smart-tag option is similar and allows you to specify a custom tag/label.
The -u/--manifest-server-username and -p/--manifest-server-password options can be used to specify a username and password to authenticate with the manifest server when using the -s or -t option.
If -u and -p are not specified when using the -s or -t option, 'repo sync' will attempt to read authentication credentials for the manifest server from the user's .netrc file.
'repo sync' will not use authentication credentials from -u/-p or .netrc if the manifest server specified in the manifest file already includes credentials.
By default, all projects will be synced. The --fail-fast option can be used to halt syncing as soon as possible when the first project fails to sync.
The --force-sync option can be used to overwrite existing git directories if they have previously been linked to a different object directory. WARNING: This may cause data to be lost since refs may be removed when overwriting.
The --force-remove-dirty option can be used to remove previously used projects with uncommitted changes. WARNING: This may cause data to be lost since uncommitted changes may be removed with projects that no longer exist in the manifest.
The --no-clone-bundle option disables any attempt to use $URL/clone.bundle to bootstrap a new Git repository from a resumeable bundle file on a content delivery network. This may be necessary if there are problems with the local Python HTTP client or proxy configuration, but the Git binary works.
The --fetch-submodules option enables fetching Git submodules of a project from server.
The -c/--current-branch option can be used to only fetch objects that are on the branch specified by a project's revision.
The --optimized-fetch option can be used to only fetch projects that are fixed to a sha1 revision if the sha1 revision does not already exist locally.
The --prune option can be used to remove any refs that no longer exist on the remote.
SSH Connections
If at least one project remote URL uses an SSH connection (ssh://, git+ssh://, or user@host:path syntax) repo will automatically enable the SSH ControlMaster option when connecting to that host. This feature permits other projects in the same 'repo sync' session to reuse the same SSH tunnel, saving connection setup overheads.
To disable this behavior on UNIX platforms, set the GIT_SSH environment variable to 'ssh'. For example:
export GIT_SSH=ssh repo sync
Compatibility
This feature is automatically disabled on Windows, due to the lack of UNIX domain socket support.
This feature is not compatible with url.insteadof rewrites in the user's ~/.gitconfig. 'repo sync' is currently not able to perform the rewrite early enough to establish the ControlMaster tunnel.
If the remote SSH daemon is Gerrit Code Review, version 2.0.10 or later is required to fix a server side protocol bug.
$ git status HEAD detached at 715faf5 Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) modified: vendor/chioverride/default/g_pipelines.h modified: vendor/topology/g_usecase.xml
Options: -h, --help show this help message and exit -j JOBS, --jobs=JOBS number of jobs to run in parallel (default: 8; based on number of CPU cores) -r, --regex execute the command only on projects matching regex or wildcard expression -i, --inverse-regex execute the command only on projects not matching regex or wildcard expression -g GROUPS, --groups=GROUPS execute the command only on projects matching the specified groups -c, --command command (and arguments) to execute -e, --abort-on-errors abort if a command exits unsuccessfully --ignore-missing silently skip & do not exit non-zero due missing checkouts --interactive force interactive usage
Logging options: -v, --verbose show all output -q, --quiet only show errors -p show project headers before output
Multi-manifest options: --outer-manifest operate starting at the outermost manifest --no-outer-manifest do not operate on outer manifests --this-manifest-only only operate on this (sub)manifest --no-this-manifest-only, --all-manifests operate on this manifest and its submanifests
Run `repo help forall` to view the detailed manual.
Description
Executes the same shell command in each project.
The -r option allows running the command only on projects matching regex or wildcard expression.
By default, projects are processed non-interactively in parallel. If you want to run interactive commands, make sure to pass --interactive to force --jobs 1. While the processing order of projects is not guaranteed, the order of project output is stable.
~/myProject/DT15/alps$ hmm Run "m help" for help with the build system itself.
Invoke ". build/envsetup.sh" from your shell to add the following functions to your environment: - lunch: lunch <product_name>-<build_variant> Selects <product_name> as the product to build, and <build_variant> as the variant to build, and stores those selections in the environment to be read by subsequent invocations of 'm' etc. - tapas: tapas [<App1> <App2> ...] [arm|x86|mips|arm64|x86_64|mips64] [eng|userdebug|user] - croot: Changes directory to the top of the tree, or a subdirectory thereof. - m: Makes from the top of the tree. - mm: Builds all of the modules in the current directory, but not their dependencies. - mmm: Builds all of the modules in the supplied directories, but not their dependencies. To limit the modules being built use the syntax: mmm dir/:target1,target2. - mma: Builds all of the modules in the current directory, and their dependencies. - mmma: Builds all of the modules in the supplied directories, and their dependencies. - provision: Flash device with all required partitions. Options will be passed on to fastboot. - cgrep: Greps on all local C/C++ files. - ggrep: Greps on all local Gradle files. - jgrep: Greps on all local Java files. - resgrep: Greps on all local res/*.xml files. - mangrep: Greps on all local AndroidManifest.xml files. - mgrep: Greps on all local Makefiles files. - sepgrep: Greps on all local sepolicy files. - sgrep: Greps on all local source files. - godir: Go to the directory containing a file. - allmod: List all modules. - gomod: Go to the directory containing a module. - pathmod: Get the directory containing a module. - refreshmod: Refresh list of modules for allmod/gomod.
Environment options: - SANITIZE_HOST: Set to 'true' to use ASAN for all host modules. Note that ASAN_OPTIONS=detect_leaks=0 will be set by default until the build is leak-check clean. - ANDROID_QUIET_BUILD: set to 'true' to display only the essential messages.
Look at the source to view more functions. The complete list is: addcompletions add_lunch_combo allmod build_build_var_cache cgrep check_product check_type check_variant choosecombo chooseproduct choosetype choosevariant _complete_android_module_names core coredump_enable coredump_setup cproj croot _croot destroy_build_var_cache enable_zsh_completion findmakefile get_abs_build_var getbugreports get_build_var getlastscreenshot get_make_command getprebuilt getscreenshotpath getsdcardpath gettargetarch gettop ggrep godir gomod hmm is isviewserverstarted jgrep key_back key_home key_menu lunch _lunch m make mangrep mgrep mm mma mmm mmma pathmod pez printconfig print_lunch_menu provision qpid rcgrep refreshmod resgrep runhat runtest sepgrep setpaths set_sequence_number set_stuff_for_environment sgrep should_add_completion smoketest source_s..wo_setup source_vendorsetup startviewserver stopviewserver systemstack tapas tracedmdump treegrep validate_current_shell _wrap_build
m:Makes from the top of the tree. 编译整个安卓源码树。即找到最顶层目录编译android。
mm:Builds all of the modules in the current directory, but not their dependencies. 编译当前目录下的模块,当前目录下需要有Android.mk这个makefile文件,否则就往上找最近的Android.mk文件。
mmm:Builds all of the modules in the supplied directories, but not their dependencies. To limit the modules being built use the syntax: mmm dir/:target1,target2. 编译指定路径下的模块,指定的路径下面需要有Android.mk这个文件。
11/08/2022 11:04.56 /drives/q/myProject/DT15/alps/out/target/product/tb8788p1_64_wifi adb root;adb remount product adbd is already running as root E Skipping /product W No partitions to remount /system/bin/remount exited with status 7 remount failed ✓
11/08/2022 11:05.14 /drives/q/myProject/DT15/alps/out/target/product/tb8788p1_64_wifi adb root;adb remount vendor adbd is already running as root E Skipping /vendor W No partitions to remount /system/bin/remount exited with status 7 remount failed ✓