I have been very busy and busy. I used to say that I had to write something when I had time, and I have been very busy recently. I have had a lot of things to do with my thesis and new projects, the android source code was downloaded a long time ago. Today, sync finds that it suddenly fails and reports an error:
Error. giterror: device/common rev-List ('^ 7d4526582f88808a3194e1a3b304abb1_d2745c', 'head', '--'): Fatal: Bad object failed
result = cmd.Execute(copts, cargs) File "/home/thinkinbunny/mydroid/.repo/repo/subcmds/sync.py", line 466, in Execute project.Sync_LocalHalf(syncbuf) File "/home/thinkinbunny/mydroid/.repo/repo/project.py", line 1007, in Sync_LocalHalf lost = self._revlist(not_rev(revid), HEAD) File "/home/thinkinbunny/mydroid/.repo/repo/project.py", line 1785, in _revlist return self.work_git.rev_list(*a, **kw) File "/home/thinkinbunny/mydroid/.repo/repo/project.py", line 1930, in rev_list p.stderr))error.GitError: platform/development rev-list ('^34ccdaa87b25c2456a76aafcf09a66b2fab236ff', 'HEAD', '--'): fatal: bad object 34ccdaa87b25c2456a76aafcf09a66b2fab236ffthinkinbunny@tib-N55SF:~/mydroid$ ./repo syncFetching projects: 100% (247/247), done. Syncing work tree: 4% (10/247) Traceback (most recent call last): File "/home/thinkinbunny/mydroid/.repo/repo/main.py", line 385, in <module> _Main(sys.argv[1:]) File "/home/thinkinbunny/mydroid/.repo/repo/main.py", line 365, in _Main result = repo._Run(argv) or 0 File "/home/thinkinbunny/mydroid/.repo/repo/main.py", line 137, in _Run result = cmd.Execute(copts, cargs) File "/home/thinkinbunny/mydroid/.repo/repo/subcmds/sync.py", line 466, in Execute project.Sync_LocalHalf(syncbuf) File "/home/thinkinbunny/mydroid/.repo/repo/project.py", line 1007, in Sync_LocalHalf lost = self._revlist(not_rev(revid), HEAD) File "/home/thinkinbunny/mydroid/.repo/repo/project.py", line 1785, in _revlist return self.work_git.rev_list(*a, **kw) File "/home/thinkinbunny/mydroid/.repo/repo/project.py", line 1930, in rev_list p.stderr))error.GitError: device/common rev-list ('^7d4526582f88808a3194e1a3b304abb369d2745c', 'HEAD', '--'): fatal: bad object 7d4526582f88808a3194e1a3b304abb369d2745cthinkinbunny@tib-N55SF:~/mydroid$ ./repo syncFetching projects: 100% (247/247), done. Syncing work tree: 10% (25/247) Traceback (most recent call last): File "/home/thinkinbunny/mydroid/.repo/repo/main.py", line 385, in <module> _Main(sys.argv[1:]) File "/home/thinkinbunny/mydroid/.repo/repo/main.py", line 365, in _Main result = repo._Run(argv) or 0 File "/home/thinkinbunny/mydroid/.repo/repo/main.py", line 137, in _Run result = cmd.Execute(copts, cargs) File "/home/thinkinbunny/mydroid/.repo/repo/subcmds/sync.py", line 466, in Execute project.Sync_LocalHalf(syncbuf) File "/home/thinkinbunny/mydroid/.repo/repo/project.py", line 1007, in Sync_LocalHalf lost = self._revlist(not_rev(revid), HEAD) File "/home/thinkinbunny/mydroid/.repo/repo/project.py", line 1785, in _revlist return self.work_git.rev_list(*a, **kw) File "/home/thinkinbunny/mydroid/.repo/repo/project.py", line 1930, in rev_list p.stderr))error.GitError: platform/docs/source.android.com rev-list ('^bce007aa754159a3c4b3894c581c53940ebc2e08', 'HEAD', '--'): fatal: bad object bce007aa754159a3c4b3894c581c53940ebc2e08thinkinbunny@tib-N55SF:~/mydroid$ ./repo syncFetching projects: 100% (247/247), done. Traceback (most recent call last): File "/home/thinkinbunny/mydroid/.repo/repo/main.py", line 385, in <module> _Main(sys.argv[1:]) File "/home/thinkinbunny/mydroid/.repo/repo/main.py", line 365, in _Main result = repo._Run(argv) or 0 File "/home/thinkinbunny/mydroid/.repo/repo/main.py", line 137, in _Run result = cmd.Execute(copts, cargs) File "/home/thinkinbunny/mydroid/.repo/repo/subcmds/sync.py", line 466, in Execute project.Sync_LocalHalf(syncbuf) File "/home/thinkinbunny/mydroid/.repo/repo/project.py", line 1007, in Sync_LocalHalf lost = self._revlist(not_rev(revid), HEAD) File "/home/thinkinbunny/mydroid/.repo/repo/project.py", line 1785, in _revlist return self.work_git.rev_list(*a, **kw) File "/home/thinkinbunny/mydroid/.repo/repo/project.py", line 1930, in rev_list p.stderr))error.GitError: platform/external/bluetooth/bluez rev-list ('^5477d33e187d66961453399c53093bd18297013e', 'HEAD', '--'): fatal: bad object 5477d33e187d66961453399c53093bd18297013e
There were no results in many attempts. Google found this problem on Google group. Many people asked this question, but it was all gone. In the past, Baidu had this problem and it was so amazing, everyone has learned CC and CV, and then says "delete. what is the difference between deleting a repo and downloading a repo? Nonsense. Hateful bug.
After creating a directory and downloading it again, the dog's daily Broadband traffic has been slow recently. I don't want to download the source code for one day during the holidays.
After a long morning, I found a solution. It is actually very simple. The Android source code is actually downloaded using git. As for what repo is, check the repo and do not waste resources.
It has a picture, but Windows cannot send it.
Let me talk about the basic solution:
Besides repo. the rest of the repo are deleted. You just need to delete the CTS and so on. You don't need to worry about it. The premise is that your network is connected. As for the bad object, I don't know why. I feel like something is too old, unable to replace, delete these, sync will re-copy and parse the repo directory. If the repo is deleted, You have to download it again. It should take a long time. There is no impact on the items under Repo, but do not delete them. Otherwise, the update will hurt.
I encountered a major problem recently and found that the above methods were useless. I recently changed my house and had no network connection. I had to answer the question. I took the book to the company and planned to clean it up, by the way, an error occurred while updating the Code. If no record is recorded, the Code cannot be reproduced.
Provide an ultimate solution:
For example, if the source code directory is mydroid, create a new droid
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo$ chmod a+x ~/bin/repo
repo init -u https://android.googlesource.com/platform/manifest
Wait a moment, there will be a hidden directory repo under this directory. Just copy all the directories to replace mydroid, and then the droid will be useless and then be updated. This is the most time-consuming, there is no way to delete the repo if the network speed is great, and there are restrictions on the concurrent Google IP addresses. Cannot be downloaded
repo init -u https://android.googlesource.com/a/platform/manifest
You can only download the http://source.android.com/source/downloading.html and read this carefully. Various repo problems can be said to be bugs.
A synchronization error occurs when some files fail to be verified. The simplest method is to create a new directory. The initialization file overwrites the old one. If the Chinese language fails, the table is not clear.