Hi,
I'm going to port Firefox OS to my I9082 but I have some problems after "./config.sh i9082".
It can't get some repositories from android.git.linaro.com and after that it stuck at "Fetching objects: 25% (20/78)" and after this, I waited for 8 hours!!!!! :crying:
after this, i closed the terminal.
I tried again using "repo sync" to continue but there is a new problem! It says that some of repos not found! for example i can't get "platform/external/freetype" and "platform/external/dbus" from linaro git.
Can anybody help me?
Delete broken projects and sync again
DataUnit said:
Hi,
I'm going to port Firefox OS to my I9082 but I have some problems after "./config.sh i9082".
It can't get some repositories from android.git.linaro.com and after that it stuck at "Fetching objects: 25% (20/78)" and after this, I waited for 8 hours!!!!! :crying:
after this, i closed the terminal.
I tried again using "repo sync" to continue but there is a new problem! It says that some of repos not found! for example i can't get "platform/external/freetype" and "platform/external/dbus" from linaro git.
Can anybody help me?
Click to expand...
Click to collapse
Delete all folder expect .repo and start over.
arky_r said:
Delete all folder expect .repo and start over.
Click to expand...
Click to collapse
I did this action 4 times and when I executed the command again, it will stop at another project! :crying:
DataUnit said:
I did this action 4 times and when I executed the command again, it will stop at another project! :crying:
Click to expand...
Click to collapse
Did you reading the repo tips at xda-universityDOTcom ?
Syncing a full new source tree in minutes!
Time might come when you’ll need to work with several full source trees. For example, you may want to have an AOKP source tree as well as a CM tree.
Obvisouly, you could repeat the same steps, to repo init and then repo sync -j 8 -c for both. But that would be twice as time consuming.
There is an alternative that should be much faster. Lets say that you have already initialized and synced a CM source tree, in ~/android/cm.
Now, we will prepare a new repo for AOKP tree, in ~/android/aokp. Here comes the trick: We will use the --reference flag of repo init to indicate to repo that we already have a local repository that it can take information from, instead of downloading everything from Internet again:
mkdir ~/android/aokp cd ~/android/aokp repo init --reference=~/android/cm -u git://github.com/AOKP/platform_manifest.git -b jb
1
2
3
mkdir ~/android/aokp
cd ~/android/aokp
repo init --reference=~/android/cm -u git://github.com/AOKP/platform_manifest.git -b jb
You should notice a big time diference, from hours for a full repo sync, down to minutes using this trick!
Related
First, follow these instructions to get your system setup for build:
http://wiki.cyanogenmod.com/index.php?title=Compile_CyanogenMod_for_Sholes
You'll need at least 15GB of disk space. Once you've got all the prerequisites installed:
Code:
mkdir ~/android
cd ~/android
repo init -u git://github.com/Mioze7Ae/android.git -b froyo
repo sync -j 2
. build/envsetup.sh
lunch cyanogen_sholest-eng
vendor/cyanogen/get-rommanager
make -j 2 bacon
If everything goes well, the update package will be something like out/target/product/sholest/update-cm-6.1.2-0.10-11.08.08-MilestoneXT720-signed.zip
This is my current understanding of the voodoo:
repo init : sets up your repository and downloads a manifest file that identifies other repositories
repo sync : downloads all the repositories and checks out a working copy
. build/envsetup.sh : parses all the makefiles and such to create a menu of available devices to build
lunch : configures the source tree to build a specific device (run lunch with no arguments to get a menu)
get-rommanager : apparently needed for some reason
make bacon : actually builds everything and creates the ota package. You may want to consider something like "make -j 8 bacon >build.out 2>build.err"
repo sync takes either metric or imperial eons (whichever is larger) (-j N can help by opening multiple concurrent downloads if you have a fast uplink). On a dual AMD Opteron 248 machine with 6GB build takes about 3 hours (Ubuntu 11.04 64-bit). On a dual Xeon [email protected] (8 cores total) with 16GB RAM running debian lenny 64-bit, build takes ~15 min. You want to pick the -j to be 1-2 times the number of CPUs (I used -j 2 on the AMD and -j 8 on the Xeon). The android build system does a pretty good job at pegging your CPUs.
I don't currently know how to tag the state of the entire tree, so when nadlabak or milaq or anyone else updates repositories that I didn't fork, there's a chance it may break things from time-to-time. I'm currently waiting for a build from a fresh checkout to complete. Hopefully it's not broken...
Edit: Fresh compile succeeded, update applied and booted. Happy hacking!
Feel free to peruse my repositories at http://github.com/Mioze7Ae
See also: http://android.doshaska.net/cm6build
Thanks: nadlabak, milaq, stlifey, #milestone-modding
Thanks, will add cm6 to mine build server. =)
Maybe we should make todo list and make changes that we need?
Then move it to main build tree?
fjfalcon said:
Thanks, will add cm6 to mine build server. =)
Maybe we should make todo list and make changes that we need?
Then move it to main build tree?
Click to expand...
Click to collapse
Im on it.. flashing once i have finished uploading XT720 XDA Special Hellmonger Edition, il collect data and proc
i was able to compile configs.ko
so we can dump the config of the running moto kernel
Code:
insmod configs.ko
zcat /proc/config.gz
attached is tar with module and dumped config from Central Europe kernel...
so may be finally we will be able to "debug" why on the singapore kernel it is stated that tvout works, and did not work on other kernels....
So please do:
Code:
adb push configs.ko /tmp
adb shell
/system/bin/insmod /tmp/configs.ko
exit from adb shell
Code:
adb pull /proc/config.gz
and post
Which Kernel (e.g. Central European, Korean, Singapore, Cincinaty etc....) is used
and the corresponding config.gz
edit: forget to attache
badly.... it is not the runing kernel config, but the config i have compiled.... sorry
du -h .repo - how much it has?
fjfalcon said:
du -h .repo - how much it has?
Click to expand...
Click to collapse
$ du -hs .repo
4.2G .repo
$ du -hs .
12G .
FYI, I just merged updates from milaq's repo and broke the build. Will update when I get it sorted again.
Mioze7Ae said:
FYI, I just merged updates from milaq's repo and broke the build. Will update when I get it sorted again.
Click to expand...
Click to collapse
It's working again. I'm still getting the hang of this repo/git stuff. What appears to have happened is that when I first forked milaq's repo a few weeks ago I happened to fork after the first part of a two-part commit. So, now the tree is sync'd up with milaq's latest (0.12--screenshot in powermenu, w00t!). It installs and boots but it's minimally tested.
Maybe you can archive android dir and paste it to some speed hosting?
Cause i still getting it at build server at mine work that currently free....
fjfalcon said:
Maybe you can archive android dir and paste it to some speed hosting?
Cause i still getting it at build server at mine work that currently free....
Click to expand...
Click to collapse
Hmm. I'm I'll see about that, but .repo is 4GB... and android is 12GB... that's going to be slow nomatter what... and those stupid rapid/multi/whatevers don't seem to handle resume... after the initial repo sync, the next sync is much faster.
Is repo sync still down? Or rather, is android.git.kernel.org still down? I tried repo syncing from RC2 to RC3, so I could implement a patch for Exchange security features (more on this later, I will update when I get it working).
For now, I will try the compile on RC2.
I do know it was down last Friday, but I haven't had a chance to try more recently.
Keep in mind when you read this that I am a complete noob at building android in general, I just can't wait to use this rom. I have successfully built CyanogenMod before, but that's it.
So, I've got my Ubuntu VM which I've built CyanogenMod in before, and I'm attempting to init a repo with the command (repo init -u git://github.com/omnirom/android.git), and it creates a bunch of tags, then I get an error "Error: revision refs/heads/master in manifests not found". Each subsequent time I try to run the command I get "Error: manifest required for this command -- please run init". It also appears that the .repo folder is pretty empty as compared to my cyanogen one.
Am I doing something wrong? Or am I just jumping the gun and the rom isn't ready to build yet.
Or they named the manifest different, or it needs to be updated first I think, I got the same error.
Sent from my Nexus 7 using XDA Premium 4 mobile app
legomaster181 said:
Keep in mind when you read this that I am a complete noob at building android in general, I just can't wait to use this rom. I have successfully built CyanogenMod before, but that's it.
So, I've got my Ubuntu VM which I've built CyanogenMod in before, and I'm attempting to init a repo with the command (repo init -u git://github.com/omnirom/android.git), and it creates a bunch of tags, then I get an error "Error: revision refs/heads/master in manifests not found". Each subsequent time I try to run the command I get "Error: manifest required for this command -- please run init". It also appears that the .repo folder is pretty empty as compared to my cyanogen one.
Am I doing something wrong? Or am I just jumping the gun and the rom isn't ready to build yet.
Click to expand...
Click to collapse
Archaic1881 said:
Or they named the manifest different, or it needs to be updated first I think, I got the same error.
Sent from my Nexus 7 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Try this, after looking in the omnirom/android sub you will see there is a branch option which you must supply in the repo init command thru the -b command line parameter
Code:
repo init -u git://github.com/omnirom/android.git -b android-4.3
it's working for me, downloading source as we speak.. If I can get a successful build for my N4 I will post any findings / issues that I come across that can possibly help others to build also..
VoiD_Dweller said:
Try this, after looking in the omnirom/android sub you will see there is a branch option which you must supply in the repo init command thru the -b command line parameter
Code:
repo init -u git://github.com/omnirom/android.git -b android-4.3
it's working for me, downloading source as we speak.. If I can get a successful build for my N4 I will post any findings / issues that I come across that can possibly help others to build also..
Click to expand...
Click to collapse
I think they must've fixed it, because I swear I tried that before, but it's working now. Thanks!
Same here. At least it works now.
Sent from my Nexus 7 using XDA Premium 4 mobile app
legomaster181 said:
I think they must've fixed it, because I swear I tried that before, but it's working now. Thanks!
Click to expand...
Click to collapse
Yeah, I originally tried it without the branch specified and got the same error..
I faced similar problem, found a workaround
VoiD_Dweller said:
Yeah, I originally tried it without the branch specified and got the same error..
Click to expand...
Click to collapse
In repo sync I faced similar problem.
...
Fetching projects: 68% (11/16) Fetching project css/scripts.git
Fetching projects: 75% (12/16) Fetching project linuxbsp/u-boot.git
Fetching projects: 100% (16/16), done.
error: manifest required for this command -- please run init
After analyzing a bit, I found for one of the git repo the checkout folder is created and it is empty.
(originally It happend because the branch I was trying to checkout was not existing)
I deleted the empty folder and ran repo sync again. problem was solved.
May be a bug in repo to be fixed?
another option is to use an "strace" for instance when i have problems downloading i will use this $ strace repo sync -f" it will show you the path of the missing file which can easily be removed for a resync
Hi people, this is my first post here, I think is the best place where I can discuss my programming issues. If this post isn't in the correct place, please move it and forgive my dumbness.
I'm working in some personal projects, android apps, in my house. There I have my PC with Eclipse and Git, at the end of the weekend I'm always commiting changes and uploading them to GitHub. When I go to my office, sometimes I have some spare time and I open Eclipse to start working, but of course I synchronize the GitHub repository data with my local data (in order to work with the latest changes I've made in my house), but I'm always having troubles with this action: I don't know how to discard my local old files, keep the files that haven't been modified and download the latest version of my modified files. I always end deleting the folder and cloning the repo again because I mess the files... I'm sure there is a better way.
So, I'd be delighted if you could assist me on how should I work with this feature of Git. I'd like too to take advice to improve my workflow. I've checked lots of sites and tutorials about Git but I haven't been able to get useful info to match with my workflow...
Thank you in advance
kyomuga said:
Hi people, this is my first post here, I think is the best place where I can discuss my programming issues. If this post isn't in the correct place, please move it and forgive my dumbness.
I'm working in some personal projects, android apps, in my house. There I have my PC with Eclipse and Git, at the end of the weekend I'm always commiting changes and uploading them to GitHub. When I go to my office, sometimes I have some spare time and I open Eclipse to start working, but of course I synchronize the GitHub repository data with my local data (in order to work with the latest changes I've made in my house), but I'm always having troubles with this action: I don't know how to discard my local old files, keep the files that haven't been modified and download the latest version of my modified files. I always end deleting the folder and cloning the repo again because I mess the files... I'm sure there is a better way.
So, I'd be delighted if you could assist me on how should I work with this feature of Git. I'd like too to take advice to improve my workflow. I've checked lots of sites and tutorials about Git but I haven't been able to get useful info to match with my workflow...
Thank you in advance
Click to expand...
Click to collapse
Hi, this should be the right section for talking git, don't worry
My understanding is that you have some local (uncommited) changes on your machine at work, and you want to pull the latest commits from your distant repository while avoiding merge conflicts, is that correct ?
If it is, then you have several solutions at your disposal:
The easiest and cleanest way is to stash your local changes, pull the new commits and then pop the stashed changes to commit them over the up-to-date repo later on:
(replace <remote> and <branch> with your actual remote and target branch, for example git pull origin master)
Code:
git stash
git pull <remote> <branch>
git stash pop
The branch is now up to date and your local changes are still there for you to commit or to continue modifying.
If instead you decide that you don't need the local changes you stashed anymore, instead of popping them you can clear the stash:
Code:
git stash clear
If you want to fetch remote changes for all the branches, replace the git pull with:
Code:
git fetch <remote>
If all you want is to get rid of your local changes and sync with upstream repo, you can use:
Code:
git checkout .
git pull <remote> <branch>
Hope this helps, let me know if you need further help, or if I didn't understand your question properly :silly:
Androguide.fr said:
If all you want is to get rid of your local changes and sync with upstream repo, you can use:
Code:
git checkout .
git pull <remote> <branch>
Click to expand...
Click to collapse
Thank you very much. This is what I need, or at least what fits best with my workflow, as I'm always starting programming from the point i've stopped working in another place, being like this:
When I get to work:
Code:
git checkout .
git pull <remote> <branch>
So I'm getting my updated code as I stopped programming at home
Minutes after going home:
Code:
git add .
git commit -m "another day, another commit"
git push origin master
When I get home:
Code:
git checkout .
git pull <remote> <branch>
So I'm getting my updated code as I stopped programming at work
Minutes after going to bed:
Code:
git add .
git commit -m "another day, another commit"
git push origin master
This is a correct workflow? or I'm misusing the benefits of Git?
kyomuga said:
Thank you very much. This is what I need, or at least what fits best with my workflow, as I'm always starting programming from the point i've stopped working in another place, being like this:
When I get to work:
Code:
git checkout .
git pull <remote> <branch>
So I'm getting my updated code as I stopped programming at home
Minutes after going home:
Code:
git add .
git commit -m "another day, another commit"
git push origin master
When I get home:
Code:
git checkout .
git pull <remote> <branch>
So I'm getting my updated code as I stopped programming at work
Minutes after going to bed:
Code:
git add .
git commit -m "another day, another commit"
git push origin master
This is a correct workflow? or I'm misusing the benefits of Git?
Click to expand...
Click to collapse
Yeah, this looks correct, as long as you don't need your local changes this is probably the best way.
Docker template for building CyanogenMod
Building CyanogenMod requires quite a lot of work. You will need to install a large number of dependencies, and you will need to read through lots of documentation.
Docker is a rather new software to automate the deployment of applications inside a software container.
Here is a Docker container for running an environment which contains everything that is needed to compile CyanogenMod. It will be very easy to install, and it will just work! The Github page contains some further information on how to get started.
NOTE: You will need to install Docker to proceed: https://www.docker.io/gettingstarted/
How to run:
Code:
git clone https://github.com/stucki/docker-cyanogenmod.git
cd docker-cyanogenmod
./run.sh
How to build CyanogenMod for your device:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-13.0
repo sync
source build/envsetup.sh
brunch <device codename> # example: brunch grouper
Download:
Github URL: https://github.com/stucki/docker-cyanogenmod
ChangeLog:
see https://github.com/stucki/docker-cyanogenmod/blob/master/CHANGELOG.md
Questions and Answers:
see http://forum.xda-developers.com/android/help/qa-docker-template-building-cyanogenmod-t3173025
Any feedback is welcome. Enjoy!
michael_ch said:
Docker template for building CyanogenMod
Building CyanogenMod requires quite a lot of work. You will need to install a large number of dependencies, and you will need to read through lots of documentation.
Docker is a rather new software to automate the deployment of applications inside a software container.
Here is a Docker container for running an environment which contains everything that is needed to compile CyanogenMod. It will be very easy to install, and it will just work! The Github page contains some further information on how to get started.
How to build:
Code:
git clone https://github.com/stucki/docker-cyanogenmod.git
cd docker-cyanogenmod
./build.sh
How to run:
Code:
cd docker-cyanogenmod
./run.sh
How to build CyanogenMod for your device:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
repo sync
source build/envsetup.sh
breakfast <device codename> # example: breakfast grouper
brunch <device codename> # example: brunch grouper
Download:
Github URL: https://github.com/stucki/docker-cyanogenmod
ChangeLog:
Code:
2014-02-16
* Initial release
Any feedback is welcome. Enjoy!
Click to expand...
Click to collapse
seems interesting!!!!
Awesome !!! Thanks a lot OP
michael_ch said:
Docker template for building CyanogenMod
Click to expand...
Click to collapse
:good: nice.......
You missed one point though .....
Code:
BUILD_HOST_32bit=1 (Cyanogenmod needs 32 bit binaries to compile)
and you can incorporate this in your code
Code:
RUN apt-get purge openjdk-\* icedtea-\* icedtea6-\*
RUN add-apt-repository ppa:webupd8team/java
RUN apt-get update && sudo apt-get install oracle-java6-installer
This installs the correct jdk for cyanogenmodand resolves the incorrect jre errors some people will get..Just my 2 cents!!..
There is scope for expansion, I have a built a similar tool but not getting the time anymore to push new updates..,,,anyways keep up the good work..
Wow. This is superb. ! This will really reduce our most of the work. Thanks op
Dark Wraith said:
:good: nice.......
You missed one point though .....
Code:
BUILD_HOST_32bit=1 (Cyanogenmod needs 32 bit binaries to compile)
Click to expand...
Click to collapse
32bit libraries are installed on the system. Just try it out, I successfully built images for i9100 and grouper without specifying this line...
Dark Wraith said:
and you can incorporate this in your code
Code:
RUN apt-get purge openjdk-\* icedtea-\* icedtea6-\*
RUN add-apt-repository ppa:webupd8team/java
RUN apt-get update && sudo apt-get install oracle-java6-installer
Click to expand...
Click to collapse
Again, I don't get those errors. Anyone else encountering these problems?
Dark Wraith said:
This installs the correct jdk for cyanogenmodand resolves the incorrect jre errors some people will get..Just my 2 cents!!..
There is scope for expansion, I have a built a similar tool but not getting the time anymore to push new updates..,,,anyways keep up the good work..
Click to expand...
Click to collapse
Thank you! I will do my best...
I get this error when running
"./build.sh"
./build.sh: 10: ./build.sh: docker: not found
Dasmikko said:
I get this error when running
"./build.sh"
./build.sh: 10: ./build.sh: docker: not found
Click to expand...
Click to collapse
Well. You will need to install Docker, of course, see https://www.docker.io/gettingstarted/#h_installation.
Sorry, I thought it's clear. But I will update the post accordingly...
very interesting. will try
ubuntu 32 bit not works for this???
michael_ch said:
Well. You will need to install Docker, of course, see https://www.docker.io/gettingstarted/#h_installation.
Sorry, I thought it's clear. But I will update the post accordingly...
Click to expand...
Click to collapse
Works now
So does this create a local_manifest.xml(which is needed) for you if you're trying to build for an unsupported device
sent from my JEDI ELITE Note 3
for best xda results, click to enlarge ?
http://img268.imageshack.us/img268/9564/searchitnoob.gif
markbencze said:
So does this create a local_manifest.xml(which is needed) for you if you're trying to build for an unsupported device
Click to expand...
Click to collapse
Nope, the manifest is created by running the "breakfast" command. Check the 1st post for more info.
I have also used this box to successfully build an image for the Motorola Moto G. As this is not part of the CyanogenMod project yet, I had to install the manifest using the steps described on the following Github page: https://github.com/razrqcom-dev-team/android_local_razrqcom
Code:
# see https://github.com/razrqcom-dev-team/android_local_razrqcom
mkdir .repo/local_manifests
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
curl -L -o .repo/local_manifests/msm8226.xml -O -L https://raw.github.com/razrqcom-dev-team/android_local_razrqcom/msm8226-kk/msm8226.xml
curl -L -o .repo/local_manifests/vendor.xml -O -L https://raw.github.com/razrqcom-dev-team/android_local_razrqcom/msm8226-kk/vendor.xml
# after that, sync all repositories
repo sync
# start building falcon (that's the codename for the Moto G)
source build/envsetup.sh
brunch falcon
Kudos for this goes to @dhacker29 and his team!
michael_ch said:
Nope, the manifest is created by running the "breakfast" command. Check the 1st post for more info.
I have also used this box to successfully build an image for the Motorola Moto G. As this is not part of the CyanogenMod project yet, I had to install the manifest using the steps described on the following Github page: https://github.com/razrqcom-dev-team/android_local_razrqcom
Click to expand...
Click to collapse
Ok well maybe I'll give it a whirl then. I was trying to build beanstalk for the n3 and I init the repo referencing the cm repo I already had synced, then sunced repo etc. When I tried breakfast there was no option to choose my device.
So by using this tool and following your directions will it allow me to do so then?
sent from my JEDI ELITE Note 3
for best xda results, click to enlarge ?
http://img268.imageshack.us/img268/9564/searchitnoob.gif
Is this only cyanogenmod restricted or we can use on other ROMs also?
Sent from my GT-I9100 using XDA Premium 4 mobile app
I get permission denied?
safariking said:
I get permission denied?
Click to expand...
Click to collapse
Run with sudo
markbencze said:
So by using this tool and following your directions will it allow me to do so then?
Click to expand...
Click to collapse
This is not a tool, it is just a script which creates a virtual machine with all that is needed for building CyanogenMod.
koolkunz said:
Is this only cyanogenmod restricted or we can use on other ROMs also?
Click to expand...
Click to collapse
Looking at the build requirements for OmniROM, I think it will also work for other ROMs: http://docs.omnirom.org/Setting_Up_A_Compile_Environment
In case that something is missing, just update the Dockerfile and run build.sh to rebuild the image.
michael_ch said:
This is not a tool, it is just a script which creates a virtual machine with all that is needed for building CyanogenMod.
Looking at the build requirements for OmniROM, I think it will also work for other ROMs: http://docs.omnirom.org/Setting_Up_A_Compile_Environment
In case that something is missing, just update the Dockerfile and run build.sh to rebuild the image.
Click to expand...
Click to collapse
OK..thanks...I wanna build omni
Sent from my GT-I9100 using XDA Premium 4 mobile app
I just did a build for grouper, but I can't find the builded file.. Where does it go? and does it output a zip file?
michael_ch said:
Docker template for building CyanogenMod
Building CyanogenMod requires quite a lot of work. You will need to install a large number of dependencies, and you will need to read through lots of documentation.
Docker is a rather new software to automate the deployment of applications inside a software container.
Here is a Docker container for running an environment which contains everything that is needed to compile CyanogenMod. It will be very easy to install, and it will just work! The Github page contains some further information on how to get started.
NOTE: You will need to install Docker to proceed: https://www.docker.io/gettingstarted/
How to build:
Code:
git clone https://github.com/stucki/docker-cyanogenmod.git
cd docker-cyanogenmod
./build.sh
How to run:
Code:
cd docker-cyanogenmod
./run.sh
How to build CyanogenMod for your device:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
repo sync
source build/envsetup.sh
breakfast <device codename> # example: breakfast grouper
brunch <device codename> # example: brunch grouper
Download:
Github URL: https://github.com/stucki/docker-cyanogenmod
ChangeLog:
Code:
2014-02-16
* Initial release
Any feedback is welcome. Enjoy!
Click to expand...
Click to collapse
bro can this be used to make unofficial ports too???
I assume you already have all your build packages installed. This guide is merely showing how to obtain a mirror copy of the android source for local purposes.
I will be using OmniRom for the duration of this guide, but for those who use CM or other projects, the concept should remain the same.
I do not expect this guide to be useful for everyone but there will be many who are going to be thankful that did not initially know this could be done.
Due to the rapid development, I ran into a huge issue pretty quickly when having to nuke/resync the various repos for building. The total space required for a full omni source is roughly 508,334 items, totaling 14.4 GB based on today from branch android-5.1 and requires pulling from a massive number of git repos online. So if bandwidth is an issue then constantly syncing after nuking the source could become an issue for you real quick. Not to mention the time it takes just to pull all of this data from the internet onto your computer.
However, by creating a Mirror of the source and its numerous git repos, the source is roughly 19,696 items, totalling 16.5 GB based on today from branch android-5.1.
Now, for those asking, why do a mirror? It is relatively simple. When using several sources, especially in situations where bandwidth is scarce, it is better to create a local mirror of the entire content, and to sync from that mirror (which requires no network access). The download for a full mirror is smaller than the download of two sources, while containing more information.
These instructions assume that the mirror is created in /path/to/home/android/mirror. The first step is to create and sync the mirror itself.
Code:
mkdir -p ~/android/mirror
Code:
cd ~/android/mirror
Code:
repo init -u https://github.com/omnirom/android.git -b android-5.1 [COLOR="Red"]--mirror[/COLOR]
Code:
repo sync -j# -f --no-clone-bundle
Basically this allows you to initialize a local mirror of an android repo (--mirror) and then later allow you to point subsequent repo pulls to that local copy which will be explained further into this guide. The mirror looks nothing like the actual source used to make builds.
Once the mirror repo has synced, then we are ready to establish the actual source in another directory that will pull directly from the mirror locally.
Code:
mkdir -p ~/android/omni
Code:
cd ~/android/omni
Code:
repo init -u git://github.com/omnirom/android.git -b android-5.1 [COLOR="Red"]--reference=/path/to/home/android/mirror/[/COLOR]
Code:
repo sync -j# -f --no-clone-bundle
Note the use of the ‘–-reference’ parameter. This uses my local mirror of the android sources instead of pulling across the network again.
Now I can pull one of the various repos, using that same ‘--reference’ parameter (pointed at my local omni mirror) and profit!
From here on out, should I want to update the omni source with the latest changes I just go to the mirror directory and run:
Code:
repo sync
Then, I switch over to the omni directory and run the same command to pull those changes from the local directory.
Even further, should I nuke something in the omni directory, I can simply delete it and run repo sync to pull from the local mirror to fix the problem and never have to worry about pulling data from the network itself.
Here is an example for a clearer picture:
I make changes in /android/omni/bootable/recovery
I do not like the changes I have made
I delete /android/omni/bootable recursively
I run repo sync to restore /android/omni/bootable
The sync pulls from the local mirror instead of downloading the repo from the internet.
Time for syncing is cut in half if not more
Everything is still intact
Thanks for that bro us Linux noobs will find it very useful