Launcher3Download-android-10.0.0_r47.bat 2.0 KB

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