Launcher3Download-android-11.0.0_r48.bat 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. @echo off
  2. set url=https://mirrors.tuna.tsinghua.edu.cn/git/AOSP/platform/
  3. set tag=android-11.0.0_r48
  4. set launcher3Url=%url%packages/apps/Launcher3
  5. set frameworkUrl=%url%frameworks/
  6. set frameworksBaseUrl=%frameworkUrl%base/
  7. set frameworksLibsSystemuiUrl=%frameworkUrl%/libs/systemui/
  8. set dirs=packages packages\\apps frameworks frameworks\\libs
  9. (for %%d in (%dirs%) do (
  10. if exist %%d (
  11. rd /q /s "%%d"
  12. echo delete dir %%d
  13. )
  14. mkdir "%%d"
  15. echo create dir %%d
  16. ))
  17. ::下载Launcher3
  18. echo.
  19. echo.
  20. echo 下载Launcher3
  21. set appsDir=packages/apps
  22. set launcher3Dir=%appsDir%/Launcher3
  23. @echo on
  24. git -C %appsDir% clone --filter=blob:none --sparse --depth 1 -b %tag% --single-branch --no-checkout %launcher3Url%
  25. @echo off
  26. git -C %launcher3Dir% sparse-checkout init --no-cone
  27. git -C %launcher3Dir% sparse-checkout set /*
  28. @echo on
  29. git -C %launcher3Dir% checkout -b %tag% %tag%
  30. @echo off
  31. ::删除.git目录
  32. rd /q /s "%launcher3Dir%/.git"
  33. ::下载SystemUI
  34. echo.
  35. echo.
  36. echo 下载SystemUI
  37. set frameworksDir=frameworks
  38. set frameworksBaseDir=%frameworksDir%/base
  39. @echo on
  40. git -C %frameworksDir% clone --filter=blob:none --sparse --depth 1 -b %tag% --single-branch --no-checkout %frameworksBaseUrl%
  41. @echo off
  42. git -C %frameworksBaseDir% sparse-checkout init --no-cone
  43. git -C %frameworksBaseDir% sparse-checkout set !/*
  44. git -C %frameworksBaseDir% sparse-checkout add !/packages/*
  45. git -C %frameworksBaseDir% sparse-checkout add !/packages/SystemUI/*
  46. git -C %frameworksBaseDir% sparse-checkout add packages/SystemUI/plugin_core/
  47. git -C %frameworksBaseDir% sparse-checkout add packages/SystemUI/shared/
  48. @echo on
  49. git -C %frameworksBaseDir% checkout -b %tag% %tag%
  50. @echo off
  51. ::删除.git目录
  52. rd /q /s "%frameworksBaseDir%/.git"
  53. ::下载iconloaderlib
  54. echo.
  55. echo.
  56. echo 下载iconloaderlib
  57. set frameworksLibsDir=frameworks/libs
  58. set frameworksLibsSystemUiDir=%frameworksLibsDir%/systemui
  59. @echo on
  60. git -C %frameworksLibsDir% clone --filter=blob:none --sparse --depth 1 -b %tag% --single-branch --no-checkout %frameworksLibsSystemuiUrl%
  61. @echo off
  62. git -C %frameworksLibsSystemUiDir% sparse-checkout init --no-cone
  63. git -C %frameworksLibsSystemUiDir% sparse-checkout set !/*
  64. git -C %frameworksLibsSystemUiDir% sparse-checkout add !/*/
  65. git -C %frameworksLibsSystemUiDir% sparse-checkout add /iconloaderlib/
  66. @echo on
  67. git -C %frameworksLibsSystemUiDir% checkout -b %tag% %tag%
  68. @echo off
  69. ::删除.git目录
  70. rd /q /s "%frameworksLibsSystemUiDir%/.git"
  71. @echo on
  72. pause