Android 9 Source Code download error

Hi,

i can’t download the Android 9 Source Code for the edge.

repo init -u https://github.com/khadas/android_manifest.git -b khadas-edge-pie
repo sync -j4

Fetching projects: 41% (277/674)
Fetching project android_toolchain_benchmark
Skipped fetching project android_toolchain_benchmark (already have persistent ref)
Fetching project android_external_netcat
Skipped fetching project android_external_netcat (already have persistent ref)
Fetching project android_external_python_enum34
Skipped fetching project android_external_python_enum34 (already have persistent ref)
Fetching project android_external_ltp
Skipped fetching project android_external_ltp (already have persistent ref)
Fetching project android_external_valgrind
Skipped fetching project android_external_valgrind (already have persistent ref)
Fetching project android_device_rockchip_rk3399
fatal: Couldn’t find remote ref refs/heads/c44fe0b18eae500811a0bafc733ef3f0ffac9e38
fatal: Couldn’t find remote ref refs/heads/087d19389776d16f7c58f5c085aebadd0f726ef2
fatal: Couldn’t find remote ref refs/heads/1e2bdf693b57314ff24e96b00eb81c17f9a14f2f
fatal: Couldn’t find remote ref refs/heads/c44fe0b18eae500811a0bafc733ef3f0ffac9e38
fatal: Couldn’t find remote ref refs/heads/398454d914257e95f8387fea50af7d8353281ff2
fatal: Couldn’t find remote ref refs/heads/087d19389776d16f7c58f5c085aebadd0f726ef2
error: Cannot fetch android_RKDocs_rk3399 from https://github.com/khadas/android_RKDocs_rk3399
Fetching project android_external_ImageMagick
Skipped fetching project android_external_ImageMagick (already have persistent ref)
error: Cannot fetch android_vendor_rockchip_common from https://github.com/khadas/android_vendor_rockchip_common
error: Cannot fetch android_device_rockchip_rk3399 from https://github.com/khadas/android_device_rockchip_rk3399
error: Cannot fetch android_device_rockchip_common from https://github.com/khadas/android_device_rockchip_common

error: Exited sync due to fetch errors

I tried several times.

But i can download the source Code for the VIM3
repo init -u https://github.com/khadas/android_manifest.git -b khadas-vim3-pie
repo sync -j4

Syncing work tree: 100% (686/686), done.

how to solve the problem?

Thanks

.repo/project-objects/
.repo/projects/

Under the above two directories, find the warehouse where the error occurred and delete it.
for example ( android_device_rockchip_rk3399 ):


Then synchronize it separately

repo sync -c device/rockchip/rk3399

sorry that did not work.

markus@markus-Virtual-Machine:~/khadas/pie$ rm -rf .repo/project-objects/android_device_rockchip_rk3399.git/ .repo/projects/device/rockchip/rk3399.git/markus@markus-Virtual-Machine:~/khadas/pie$ rm -rf .repo/project-objects/android_device_rockchip_common.git/ .repo/projects/device/rockchip/common.git/markus@markus-Virtual-Machine:~/khadas/pie$ rm -rf .repo/project-objects/android_vendor_rockchip_common.git/ .repo/projects/vendor/rockchip/common.git/markus@markus-Virtual-Machine:~/khadas/pie$ repo sync -c device/rockchip/rk3399
Fetching project android_device_rockchip_rk3399
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0
curl: (22) The requested URL returned error: 404 Not Found
Server does not provide clone.bundle; ignoring.
fatal: Couldn’t find remote ref refs/heads/087d19389776d16f7c58f5c085aebadd0f726ef2
fatal: Couldn’t find remote ref refs/heads/087d19389776d16f7c58f5c085aebadd0f726ef2
error: Cannot fetch android_device_rockchip_rk3399 from https://github.com/khadas/android_device_rockchip_rk3399

error: Exited sync due to fetch errors

Hi

You can try to run
repo sync -j1
Then it can show you the exact folder running into a problem.
Then delete that folder in both locations, .repo/project-objects/ &
.repo/projects/ manually from a file manager not terminal command.
Then run repo sync -j1 again and continue.

Also try to remove the ‘upstream’ part for line 10, 17, 37 or revert all changed lines to the old values in pink and try again to repo sync -j1. The manifest file will be somewhere in the .repo/manifest folder or look for the shortcut manifest.xml file in the .repo folder, right click it and check the original file’s location. The folders you have problems with seem to be the ones updated recently, maybe older versions of them will sync correctly, you can try that.

2 Likes

image
You try again:

.repo/project-objects/
.repo/projects/

Under the above two directories, find the warehouse where the error occurred and delete it.
for example ( android_device_rockchip_rk3399 ):

Then synchronize it separately

repo sync -c device/rockchip/rk3399
1 Like

thanks it works now.

Hello,

I am getting the same error. I also tried the script but it is failing every time.
Sharing the screenshot of my terminal.

Thanks in advance.

You follow the steps above and take a screenshot.

Hello,

I follow your steps but still, it is failing.
Sharing the screenshot.

Error: fatal: Couldn’t find remote ref refs/heads/1e2bdf693b57314ff24e96b00eb81c17f9a14f2f

I didn’t see you operating as required.

I followed the steps which you suggested earlier. Still, it is not able to fetch that particular directory.
Sharing the screenshot below.

$ cd .repo/manifests
$ git log

Execute the command above and take a look at the screenshot.

Sharing the screenshot.

I’m sorry, It has been corrected.

image

Now, I can fetch that particular directory.

Thanx for your quick reply.

I had to install git-lfs

sudo apt-get install git-lfs

Git-lfs is used when uploading code. and when downloading code, I don’t know if it’s necessary.