12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- @echo off
- set url=https://mirrors.tuna.tsinghua.edu.cn/git/AOSP/platform/
- set tag=android-10.0.0_r47
- set launcher3Url=%url%packages/apps/Launcher3
- set frameworkUrl=%url%frameworks/
- set frameworksBaseUrl=%frameworkUrl%base/
- set dirs=packages packages\\apps frameworks
- (for %%d in (%dirs%) do (
- if exist %%d (
- rd /q /s "%%d"
- echo delete dir %%d
- )
- mkdir "%%d"
- echo create dir %%d
- ))
- ::下载Launcher3
- echo.
- echo.
- echo 下载Launcher3
- set appsDir=packages/apps
- set launcher3Dir=%appsDir%/Launcher3
- @echo on
- git -C %appsDir% clone --filter=blob:none --sparse --depth 1 -b %tag% --single-branch --no-checkout %launcher3Url%
- @echo off
- git -C %launcher3Dir% sparse-checkout init --no-cone
- git -C %launcher3Dir% sparse-checkout set /*
- @echo on
- git -C %launcher3Dir% checkout -b %tag% %tag%
- @echo off
- ::删除.git目录
- rd /q /s "%launcher3Dir%/.git"
- ::下载SystemUI、launcherprotosnano
- echo.
- echo.
- echo 下载SystemUI、launcherprotosnano
- set frameworksDir=frameworks
- set frameworksBaseDir=%frameworksDir%/base
- @echo on
- git -C %frameworksDir% clone --filter=blob:none --sparse --depth 1 -b %tag% --single-branch --no-checkout %frameworksBaseUrl%
- @echo off
- git -C %frameworksBaseDir% sparse-checkout init --no-cone
- git -C %frameworksBaseDir% sparse-checkout set !/*
- git -C %frameworksBaseDir% sparse-checkout add !/packages/*
- git -C %frameworksBaseDir% sparse-checkout add !/packages/SystemUI/*
- git -C %frameworksBaseDir% sparse-checkout add packages/SystemUI/plugin_core/
- git -C %frameworksBaseDir% sparse-checkout add packages/SystemUI/shared/
- git -C %frameworksBaseDir% sparse-checkout add !/core/*
- git -C %frameworksBaseDir% sparse-checkout add !/core/proto/*
- git -C %frameworksBaseDir% sparse-checkout add !/core/proto/android/*
- git -C %frameworksBaseDir% sparse-checkout add !/core/proto/android/stats/*
- git -C %frameworksBaseDir% sparse-checkout add core/proto/android/stats/launcher/
- @echo on
- git -C %frameworksBaseDir% checkout -b %tag% %tag%
- @echo off
- ::删除.git目录
- rd /q /s "%frameworksBaseDir%/.git"
- @echo on
- pause
|