12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- @echo off
- set url=https://mirrors.tuna.tsinghua.edu.cn/git/AOSP/platform/
- set tag=android-12.1.0_r27
- set launcher3Url=%url%packages/apps/Launcher3
- set frameworkUrl=%url%frameworks/
- set frameworksBaseUrl=%frameworkUrl%base/
- set frameworksLibsSystemuiUrl=%frameworkUrl%/libs/systemui/
- set dirs=packages packages\\apps frameworks frameworks\\libs
- (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、WindowManager-Shell、Framework Aidl
- echo.
- echo.
- echo 下载SystemUI、WindowManager-Shell、Framework Aidl
- 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 !/libs/*
- git -C %frameworksBaseDir% sparse-checkout add !/libs/WindowManager/*
- git -C %frameworksBaseDir% sparse-checkout add /libs/WindowManager/Shell/*.*
- git -C %frameworksBaseDir% sparse-checkout add /libs/WindowManager/Shell/OWNERS
- git -C %frameworksBaseDir% sparse-checkout add /libs/WindowManager/Shell/**/*.aidl
- git -C %frameworksBaseDir% sparse-checkout add /libs/WindowManager/Shell/src/com/android/wm/shell/util/**/*.java
- git -C %frameworksBaseDir% sparse-checkout add /libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitScreenConstants.java
- git -C %frameworksBaseDir% sparse-checkout add /core/java/**/*.aidl
- @echo on
- git -C %frameworksBaseDir% checkout -b %tag% %tag%
- @echo off
- ::删除.git目录
- rd /q /s "%frameworksBaseDir%/.git"
- ::下载iconloaderlib
- echo.
- echo.
- echo 下载iconloaderlib
- set frameworksLibsDir=frameworks/libs
- set frameworksLibsSystemUiDir=%frameworksLibsDir%/systemui
- @echo on
- git -C %frameworksLibsDir% clone --filter=blob:none --sparse --depth 1 -b %tag% --single-branch --no-checkout %frameworksLibsSystemuiUrl%
- @echo off
- git -C %frameworksLibsSystemUiDir% sparse-checkout init --no-cone
- git -C %frameworksLibsSystemUiDir% sparse-checkout set !/*
- git -C %frameworksLibsSystemUiDir% sparse-checkout add !/*/
- git -C %frameworksLibsSystemUiDir% sparse-checkout add /iconloaderlib/
- @echo on
- git -C %frameworksLibsSystemUiDir% checkout -b %tag% %tag%
- @echo off
- ::删除.git目录
- rd /q /s "%frameworksLibsSystemUiDir%/.git"
- @echo on
- pause
|