error: Unable to fully sync the tree while cloning AOSP - android

Downloading android-8.1.0_r20. After downloading 45gb this error occurs.
Error message in the terminal:
error: libcore/: platform/libcore checkout ed54621bf38a761388fe5ea56d71c64befaa9f40
error: Cannot checkout platform/libcore
Checking out: 100% (592/592), done in 15m55.329s
error: Unable to fully sync the tree.
error: Checking out local projects failed.
Failing repos:
external/libunwind
external/kmod
frameworks/compile/slang
external/autotest
libcore
Try re-running with "-j1 --fail-fast" to exit at the first error.
The source link of this git tag
https://android.googlesource.com/platform/libcore/+/refs/tags/android-8.1.0_r20
Can anyone please tell me how to resolve this?

This issue is probably due to the Partition type of your drive, where you are downloading the code.
Please make sure the drive Partition type is a Linux Filesystem (i.e. ext4).

It's strange but such issue happens when I try to sync AOSP on my Ubuntu PC to external usb-ssd drive but syncing to main drive to home directory works fine.
Moreover to reproduce such issue it is enough to clone one of the mentioned repos, e.g. libcore:
$ git clone https://android.googlesource.com/platform/libcore -b android-11.0.0_r45
and then check it with git status,
on main drive:
$ git status
Not currently on any branch.
nothing to commit, working tree clean
on external usb-ssd drive:
$ git status
Not currently on any branch.
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
deleted: Android.bp
deleted: AndroidTest-core-tests.xml
deleted: CleanSpec.mk
deleted: JavaLibrary.bp
deleted: LICENSE
deleted: NOTICE
...
<6590 other deleted files>
...
Untracked files:
(use "git add <file>..." to include in what will be committed)
Android.bp
AndroidTest-core-tests.xml
CleanSpec.mk
JavaLibrary.bp
LICENSE
...
<total 34 untracked files>
...
xml/
Summary:
If you use external drive for cloning AOSP try to do it into main drive (home directory).

Related

Build celadon android source error: : Please resolve Conflict(s) and re-run lunch

I followed celadon guide to build android source for my x86 platform device.
https://01.org/projectceladon/documentation/getting-started/build-source#build-os-image
$ make clobber
$ source build/envsetup.sh
$ lunch caas-userdebug
few minutes later, I got this error:
Project vendor/intel/external/project-celadon/audio
Applying 01_679470_1-Tuning-period_size-and-period_count-for-QEMU-KVM.patch
ALERT : Conflicts Observed while patch application !!
prebuilts/clang/host/linux-x86
Error: Please resolve Conflict(s) and re-run lunch...
Executing mixin update...
Updater-caas: processing: device/intel/project-celadon/caas/mixins.spec
Updater-caas: mixinsdir: device/intel/mixins/groups
I have no idea to resolve this problem, is there someone Who has encountered a similar problem?
Thanks!
I reset my source code by:
repo forall -vc "git reset --hard"
And it worked.

stuck on creating 'moor_database.g.dart'

I wanted to generate file 'moor_database.g.dart' by typing the command 'flutter packages pub run build_runner watch' but after doing some procedures it just tells: [INFO] Succeeded after 9.0s with 0 outputs (4 actions)
And inside the terminal results I saw this warning:
[WARNING] moor_generator:moor_generator on lib/data/moor.dart: Missing "part 'moor.g.dart';".
I had this message because I had my own file called moor.dart which conflicted with the moor library file (that's why that command was not working properly) but Android Studio didn't give any direct errors or warning on that, after renaming my file name, everything worked

repo init warning: failed to restrict file handles

Here when I run repo init -u git#foo.bar -b dev on windows , and it shows a warning repo init warning: failed to restrict file handles, seems like some files get broken, any one could do me a favor ? thanks all the time : )
Install previous version of git v2.15.1.windows.2

git cloning Goldfish object corrupt error

I was trying to clone Android Goldfish kernel source code by using the following command,
git clone https://android.googlesource.com/kernel/goldfish
but as it needed to download around 900MB of data I thought what the heck and went through with this one,
git clone https://android.googlesource.com/kernel/goldfish --branch android-goldfish-3.4 --depth 1
this reduced the download size to around 120MB and the downloading was done but with an error during unpacking objects.
Later when I used git status I saw a large number of files were deleted and they were shown as if they not even added and committed. I, foolishly, added them and committed them as new commit named 'local commit'.
git log --oneline
ca6ded2 Local Commit
2a51970 Merge branch 'android-3.4' into android-goldfish-3.4
c9cb2c8 UPSTREAM: netfilter: x_tables: fix unconditional helper
ac342b9 Merge branch 'android-3.4' into android-goldfish-3.4
Now after checking the files on remote, it became clear that the files which were shown deleted and which I committed are in the remote but not showing locally. So I tried to reset to previous commit. But these errors are shown:
git reset 2a51970
error: failed to read object b56d12bf5900c8f266132bc9b50dadfb092af10a at offset 26783674 from .git/objects/pack/pack-3ce58ac57f33a98f718e926caccca5ea5fa3a1fd.pack
fatal: packed object b56d12bf5900c8f266132bc9b50dadfb092af10a (stored in .git/objects/pack/pack-3ce58ac57f33a98f718e926caccca5ea5fa3a1fd.pack) is corrupt
fsck shows following:
git fsck
Checking object directories: 100% (256/256), done.
error: .git/objects/pack/pack-3ce58ac57f33a98f718e926caccca5ea5fa3a1fd.pack SHA1 checksum mismatch
error: index CRC mismatch for object b56d12bf5900c8f266132bc9b50dadfb092af10a from .git/objects/pack/pack-3ce58ac57f33a98f718e926caccca5ea5fa3a1fd.pack at offset 26783674
error: cannot unpack b56d12bf5900c8f266132bc9b50dadfb092af10a from .git/objects/pack/pack-3ce58ac57f33a98f718e926caccca5ea5fa3a1fd.pack at offset 26783674
error: index CRC mismatch for object 6149b476d9dffe06bcd1e3e3136bc335fd3dbf98 from .git/objects/pack/pack-3ce58ac57f33a98f718e926caccca5ea5fa3a1fd.pack at offset 27883077
error: inflate: data stream error (invalid distance too far back)
error: cannot unpack 6149b476d9dffe06bcd1e3e3136bc335fd3dbf98 from .git/objects/pack/pack-3ce58ac57f33a98f718e926caccca5ea5fa3a1fd.pack at offset 27883077
Checking objects: 100% (41134/41134), done.
My question:
Is there a way to fix this without initiating the cloning process again.
AND
Was the cloning done properly or I did something wrong there?
Thank you.
It seems I found a way to fix this!
For all object corruption error relating to git, I think the best, hassle free, thing to do will be to make use of git-repair.
My procedure to Fix this (Ubuntu 16.04):
Install git-repair
sudo apt install git-repair
Goto the local git repo directory
Run git-repair
git-repair
Thats it! All the corrupt objects were fixed(not going into technical details!) and the repo was in working condition.

Jenkins-CI SCP Plugin cannot find files to upload

I have Jenkins-CI compiling an Android app I'm working on. Compiles it great but it will not upload the release apk via SCP. I have set the source to bin/* and it gives me the following error. Does anyone have a suggestion on what I have configured wrong? I've had it working in the past, but I forgot to get the config before I re-installed Fedora on the machine.
[SCP] Connecting to smccloud.com
ERROR: Failed to upload files
2: No such file
at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2289)
at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:1741)
at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:1758)
at com.jcraft.jsch.ChannelSftp.stat(ChannelSftp.java:1715)
at be.certipost.hudson.plugin.SCPSite.upload(SCPSite.java:188)
at be.certipost.hudson.plugin.SCPRepositoryPublisher.perform(SCPRepositoryPublisher.java:218)
at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:682)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:657)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:635)
at hudson.model.Build$RunnerImpl.post2(Build.java:161)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:604)
at hudson.model.Run.run(Run.java:1400)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:175)
Build step 'Publish artifacts to SCP Repository' changed build result to UNSTABLE
I encountered this error when I was trying to copy to a directory that didn't exist on the target machine. Create the directory(s) on the target first and this should go away and the copy work.
On the target machine you are seeing something like:
No such file or directory
when you try to navigate to the non-existent directory.
If the plugin isn't working for you can use the shell script with expect, as a post build step, to do it for you.

Categories

Resources