<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://onnocenter.or.id/wiki/index.php?action=history&amp;feed=atom&amp;title=Doc%3A_Using_local_manifests</id>
	<title>Doc: Using local manifests - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://onnocenter.or.id/wiki/index.php?action=history&amp;feed=atom&amp;title=Doc%3A_Using_local_manifests"/>
	<link rel="alternate" type="text/html" href="https://onnocenter.or.id/wiki/index.php?title=Doc:_Using_local_manifests&amp;action=history"/>
	<updated>2026-04-19T18:10:35Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.4</generator>
	<entry>
		<id>https://onnocenter.or.id/wiki/index.php?title=Doc:_Using_local_manifests&amp;diff=41809&amp;oldid=prev</id>
		<title>Onnowpurbo: New page: &lt;languages /&gt; &lt;translate&gt; == Introduction == &lt;!--T:1--&gt;  &lt;!--T:2--&gt; When you execute &lt;code&gt;repo sync&lt;/code&gt;, dozens of git repositories are updated from [http://www.github.com/cyanogen...</title>
		<link rel="alternate" type="text/html" href="https://onnocenter.or.id/wiki/index.php?title=Doc:_Using_local_manifests&amp;diff=41809&amp;oldid=prev"/>
		<updated>2015-01-02T21:57:06Z</updated>

		<summary type="html">&lt;p&gt;New page: &amp;lt;languages /&amp;gt; &amp;lt;translate&amp;gt; == Introduction == &amp;lt;!--T:1--&amp;gt;  &amp;lt;!--T:2--&amp;gt; When you execute &amp;lt;code&amp;gt;repo sync&amp;lt;/code&amp;gt;, dozens of &lt;a href=&quot;/wiki/index.php/Git&quot; title=&quot;Git&quot;&gt;git&lt;/a&gt; repositories are updated from [http://www.github.com/cyanogen...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;languages /&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Introduction == &amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
When you execute &amp;lt;code&amp;gt;repo sync&amp;lt;/code&amp;gt;, dozens of [[git]] repositories are updated from [http://www.github.com/cyanogenmod CyanogenMod on GitHub]. Most of these repositories are defined in CyanogenMod's build manifest, i.e. the '''default manifest'''. Any additional repositories that you would like synced can be added to a '''local manifest'''.&lt;br /&gt;
&lt;br /&gt;
== The default manifest == &amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
The master list of all the git repositories that together comprise the CyanogenMod source code are defined in [http://github.com/CyanogenMod/android CyanogenMod's default.xml manifest]. This manifest is located under the head of the android source tree in the &amp;lt;code&amp;gt;.repo/manifests/&amp;lt;/code&amp;gt; directory. The &amp;lt;code&amp;gt;.repo&amp;lt;/code&amp;gt; directory was created when you first executed &amp;lt;code&amp;gt;repo init&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
The manifest is formatted in [[wikipedia:xml|XML]] markup and contains information regarding which git repositories to use, where they are located on the internet, where to put them in the source code directory, and what branches of the git repositories are used. Some of these repositories are pulled, unmodified from AOSP, but most come from CyanogenMod on GitHub.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
If you wanted to change this list, you could edit &amp;lt;code&amp;gt;default.xml&amp;lt;/code&amp;gt; directly. However, this would make your local copy of the manifest conflict with the official version. This could create issues when the official manifest is updated, as it would clash with your changes. This is where local manifests come into play.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
{{note|note=The manifest file itself is updated every time you do a &amp;lt;code&amp;gt;repo sync&amp;lt;/code&amp;gt;. In this way, the list of all the component git repositories is kept up-to-date, along with the source.}}&lt;br /&gt;
&lt;br /&gt;
== The local manifest == &amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
Creating a '''local manifest''' allows you to customize the list of repositories used in your copy of the source code by overriding or supplementing the default manifest. In this way, you can add, remove, or replace source code in the official manifest with your own. By including repositories (which need not even reside on GitHub) in a local manifest, you can continue to synchronize with the &amp;lt;code&amp;gt;repo sync&amp;lt;/code&amp;gt; command just as you would have previously. Only now, both the official repositories from the default manifest and the additional repositories you specify will be checked for updates.&lt;br /&gt;
&lt;br /&gt;
=== Adding and replacing repositories === &amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
To add to the contents of the default manifest, create a folder called &amp;lt;code&amp;gt;local_manifests&amp;lt;/code&amp;gt; under the &amp;lt;code&amp;gt;.repo&amp;lt;/code&amp;gt; directory, then create an XML file (text file with .xml extension) inside that directory. You can call the XML file anything you like, as long as it ends in &amp;lt;code&amp;gt;.xml&amp;lt;/code&amp;gt;. Also, you can create separate XML files for different groups of repositories. e.g. mako.xml for Google Nexus 4 related repositories and cat-eater.xml for an unofficial device on which you're working.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
Let's start with an example which we can use to describe the syntax:&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
 &amp;lt;code&amp;gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;manifest&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
   &amp;lt;remote name=&amp;quot;omap&amp;quot; fetch=&amp;quot;&amp;lt;nowiki&amp;gt;git://git.omapzoom.org/&amp;lt;/nowiki&amp;gt;&amp;quot; /&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
   &amp;lt;remove-project name=&amp;quot;CyanogenMod/android_hardware_ti_omap3&amp;quot; /&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
   &amp;lt;project path=&amp;quot;hardware/ti/omap3&amp;quot; name=&amp;quot;platform/hardware/ti/omap3&amp;quot; remote=&amp;quot;omap&amp;quot; revision=&amp;quot;jb-dev&amp;quot;/&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;/manifest&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
The first line containing &amp;lt;code&amp;gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&amp;lt;/code&amp;gt; is a standard XML declaration, telling interpreters this is an eXtensible Markup Language file. Once this is established, the &amp;lt;code&amp;gt;&amp;lt;manifest&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;/manifest&amp;gt;&amp;lt;/code&amp;gt; tags enclose some contents which the &amp;lt;code&amp;gt;repo&amp;lt;/code&amp;gt; command will recognize. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
First, a '''remote''' for [[git]] is declared and given the name &amp;quot;omap&amp;quot;. In git, a remote essentially refers to a place and method for accessing a git repository. See [http://git-scm.com/book/en/Git-Basics-Working-with-Remotes here] for more info.) In this case, omapzoom.org is a site that contains special up-to-date repositories for Texas Instrument's OMAP platform. This is equivalent to the following &amp;lt;code&amp;gt;git&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;git remote add omap &amp;lt;nowiki&amp;gt;git://git.omapzoom.org/&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
The next line removes a project (specifically, [http://www.github.com/cyanogenmod/android_hardware_ti_omap3 cyanogenmod/android_hardware_ti_omap3]) declared in the default manifest. After running &amp;lt;code&amp;gt;repo sync&amp;lt;/code&amp;gt;, it will no longer be available in the source tree.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
The next line defines a ''new'' project. In this case, it replaces the removed project ''android_hardware_ti_omap3'' with one from Texas Instruments, using the &amp;quot;omap&amp;quot; remote that was defined above.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
When adding a new project that ''replaces'' an existing project, you should always remove that project before defining the replacement. However, not every new project need replace an existing cyanogenmod project. You can simply add a new project to the source code, such as when you want to [[Doc:_adding_your_own_app|add your own app]] to the build.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
Note that when adding new projects, there are at least three parts defined:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;remote&amp;lt;/code&amp;gt; -- the name of the remote. this can be one that was defined in either the default &amp;lt;code&amp;gt;manifest&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;local_manifest.xml&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; -- the name of the git project-- for github it has the format ''account_name/project_name''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;path&amp;lt;/code&amp;gt; -- where the git repository should go in your local copy of the source code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;revision&amp;lt;/code&amp;gt; -- (''optional'') which branch or tag to use in the repository. If this attribute is omitted, &amp;lt;code&amp;gt;repo sync&amp;lt;/code&amp;gt; will use the revision specified by the &amp;lt;code&amp;gt;&amp;lt;default ... /&amp;gt;&amp;lt;/code&amp;gt; tag in the default manifest.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
After creating '''.repo/local_manifests/your_file.xml''', you should be able to &amp;lt;code&amp;gt;repo sync&amp;lt;/code&amp;gt; and the source code will be updated accordingly.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:31--&amp;gt;&lt;br /&gt;
{{note|note=You can use local repositories in the manifest by creating a remote that points to &amp;lt;code&amp;gt;file:///path/to/source&amp;lt;/code&amp;gt;. For example: &amp;lt;code&amp;gt;&amp;lt;remote name=&amp;quot;local-omap&amp;quot; fetch=&amp;quot;file:////home/username/myomap&amp;quot; /&amp;gt;&amp;lt;/code&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
== Recreating CyanogenMod releases using manifests == &amp;lt;!--T:32--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:33--&amp;gt;&lt;br /&gt;
CyanogenMod builds as of CM 10.0.0 include (and install locally to the device) an XML file with the exact manifest of what was used to generate them. This allows users to build an exact replica of the CM version on their device, as obtained from [http://download.cyanogenmod.com download.cyanogenmod.com]. ''Note:'' these manifests may conflict with your local manifest, so it is recommended that you move your local manifests to a backup directory.&lt;br /&gt;
&lt;br /&gt;
=== Obtaining the manifest === &amp;lt;!--T:34--&amp;gt;&lt;br /&gt;
In order to build using this manifest, you must retrieve the file and place it in your '''.repo/manifests/''' folder. The file you pull can be renamed to whatever you like; in this example it is called '''cm-10.0.0.xml'''. You can obtain the manifest in one of two ways:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:35--&amp;gt;&lt;br /&gt;
1. Pull the file from your device:&lt;br /&gt;
 &amp;lt;code&amp;gt;cd /your/repo/path&lt;br /&gt;
 adb pull /system/etc/build-manifest.xml .repo/manifests/cm-10.0.0.xml&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:36--&amp;gt;&lt;br /&gt;
''OR''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:37--&amp;gt;&lt;br /&gt;
2. Extract /system/etc/build-manifest.xml from the ROM zip and place it into '''.repo/manifests''', manually.&lt;br /&gt;
&lt;br /&gt;
=== Enabling the manifest === &amp;lt;!--T:38--&amp;gt;&lt;br /&gt;
Switch to this new manifest and enable it by typing:&lt;br /&gt;
 &amp;lt;code&amp;gt;repo init -m cm-10.0.0.xml&lt;br /&gt;
 repo sync&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:39--&amp;gt;&lt;br /&gt;
You now can build using the exact manifest that was used to generate your device's ROM.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:40--&amp;gt;&lt;br /&gt;
After you are done building with the special manifest, you can go back to mainline with:&lt;br /&gt;
 &amp;lt;code&amp;gt;repo init -m default.xml&lt;br /&gt;
 repo sync&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Errors == &amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
If you receive any errors, double-check to make sure that the XML is &amp;quot;valid&amp;quot;-- that is, ensure that the file contains proper XML by verifying all &amp;lt; and &amp;gt; brackets match, and that all open quotations are closed properly, etc. Other problems may include missing values, such as not defining a remote and then using it.&lt;br /&gt;
&lt;br /&gt;
== See also == &amp;lt;!--T:28--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:29--&amp;gt;&lt;br /&gt;
* [http://stackoverflow.com/questions/5672394/using-a-local-manifest-xml-with-repo Stack Overflow]: ''using a local_manifest.xml with repo''&lt;br /&gt;
* [http://gerrit.googlesource.com/git-repo/+/master/docs/manifest-format.txt repo Manifest Format]: the official, technical documentation for repo manifests&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Referensi==&lt;br /&gt;
&lt;br /&gt;
* http://wiki.cyanogenmod.org/w/Doc:_Using_local_manifests&lt;/div&gt;</summary>
		<author><name>Onnowpurbo</name></author>
	</entry>
</feed>