error: Cannot checkout platform/external/python/cpython3: ManifestInvalidRevisionError: revision refs/tags/android-12.1.0_r22 in platform/external/python/cpython3 not found Checking out: 25% (288/1140), done in 3m41.729s error: in sync : revision refs/tags/android-12.1.0_r22 in platform/external/python/cpython3 not found 正在检出文件: 100% (8554/8554), 完成.

解决:单独sync

repo sync platform/external/python/cpython3

fatal: unable to access ' android.googlesource.com/platform/to… ': Failed to connect to android.googlesource.com port 443: 拒绝连接 error: Cannot fetch platform/tools/treble from android.googlesource.com/platform/to…

拒绝连接问题:用科学上网即可

File "~/android/lineage/.repo/repo/main.py", line 79 file=sys.stderr)

解决:python3默认版本的问题

python3 ~/bin/repo init -u github.com/LineageOS/a… -b lineage-19.1

使用脚本自动恢复sync,因为sync过程中会卡住

可以参考 www.rosoo.net/a/201302/16… 在工作目录,我的是android/lineage文件夹下新建一个download.sh脚本文件,里面的内容是:

repo sync while [ $ ? == 1 ]; do echo "======sync failed, re-sync again======" sleep 3  repo sync

chomd a+x download.sh让其可以运行, 然后终端输入./download.sh就可以开始下载了,用这一步代替官方文档里的repo sync。 python3 ~/bin/repo sync

问题:已存在的失败sync文件,强制更新

error: Unable to fully sync the tree. error: Downloading network changes failed. error: Checking out local projects failed. Failing repos: packages/modules/NeuralNetworks system/connectivity/wificond Try re-running with "-j1 --fail-fast" to exit at the first error.

error: hooks is different in /~/android/lineage/.repo/projects/system/connectivity/wificond.git vs /~/android/lineage/.repo/project-objects/LineageOS/android_system_connectivity_wificond.git error.GitError: Cannot fetch --force-sync not enabled; cannot overwrite a local work tree. If you're comfortable with the possibility of losing the work tree's git metadata, use repo sync --force-sync system/connectivity/wificond to proceed.

repo sync --force-sync system/connectivity/wificond

似乎另外一个 git 进程在这个仓库中运行,例如:'git commit' 命令打 开了一个编辑器。请确认所有进程都已经关闭然后重试。如果仍然报错, 可能之前有一个 git 进程在这个仓库中异常退出: 手动删除这个文件再继续。 error: external/rust/crates/ring/: platform/external/rust/crates/ring checkout 6a5141ed9189f1cb6a54654e12ba248ae53a6286 error: Cannot checkout platform/external/rust/crates/ring Checking out: 36% (421/1140) platform/external/rust/crates/fallible-streaming-itChecking out: 37% (425/1140) platform/external/rust/crates/futuresfatal: 无法创建 '/~/android/lineage/.repo/projects/external/selinux.git/index.lock':文件已存

删除这个文件后重新sync这个失败的项目模块~/android/lineage/.repo/projects/external/rust/crates/ring.git/index.lock

makefile 错误,需要先提取设备专有blob文件

In file included from build/make/core/config.mk:313: In file included from build/make/core/envsetup.mk:312: build/make/core/product_config.mk:160: error: Can not locate config makefile for product "lineage_renoir". 20:11:38 dumpvars failed with: exit status 1 Device renoir not found. Attempting to retrieve device repository from LineageOS Github ( github.com/LineageOS ). Failed to search GitHub In file included from build/make/core/config.mk:313: In file included from build/make/core/envsetup.mk:312: build/make/core/product_config.mk:160: error: Can not locate config makefile for product "lineage_renoir". 20:11:40 dumpvars failed with: exit status 1 In file included from build/make/core/config.mk:313: In file included from build/make/core/envsetup.mk:312: build/make/core/product_config.mk:160: error: Can not locate config makefile for product "lineage_renoir". 20:11:41 dumpvars failed with: exit status 1

** Don't have a product spec for: 'lineage_renoir' ** Do you have the right repo manifest?

解决:lineageOs下载设备专属刷机包(.zip),按照 官方提取文档

我这里是第三项:- 基于有效负载的OTA:系统分区的内容作为 .img 文件存储在 payload.bin

www.jianshu.com/p/53941de91…

www.akr-developers.com/d/107

www.jianshu.com/p/14356a5da…