Reputation: 519
I downloaded android source code using google's repo tool and as far as i can see, the android source tree is separated to many git projects and the repo tool is responsible to maintain them all.
I started modifying android source and i've been searching for a right way to keep track on all the changes i'm doing.
The problem is that when i modified the source, i didn't stay in the context of only one project, i modified code from many different projects together. So committing to each project separately is out of the picture. I need a way to keep track on all the source files and not in one project.
The solution that i came up with (And i will gladly accept other ideas to do this) is to create a git project from the root tree of the source code which will just include all the files..
And so i did from android source root directory:
git init
git add -A
git commit -m "Initialize"
git branch iss1
git checkout iss1
/* Making some changes */
git add -u
git commit -m "Bla bla"
It looked good and everything, but than, when i checked out back to the master, the changes didn't go away!
So i did diff between iss1 to master and the output was:
diff --git a/frameworks/av b/frameworks/av
index 6cd6792..5cb8b7c 160000
--- a/frameworks/av
+++ b/frameworks/av
@@ -1 +1 @@
-Subproject commit 6cd6792a3289c0c50542d8113068478dbc3a5ad0
+Subproject commit 5cb8b7cb86f3fb085725fb895fde7aec78a8f9df
diff --git a/frameworks/base b/frameworks/base
index 207cffe..cc7e875 160000
--- a/frameworks/base
+++ b/frameworks/base
@@ -1 +1 @@
-Subproject commit 207cffe95a868ea21b74dd54e3ef7821162ce870
+Subproject commit cc7e8757d84646c043379f13a44125f3a2acd99b
diff --git a/frameworks/native b/frameworks/native
index 6ee97e7..d1d57ab 160000
--- a/frameworks/native
+++ b/frameworks/native
@@ -1 +1 @@
-Subproject commit 6ee97e74d2c972dec2aa6a2f231b718eae54898f
+Subproject commit d1d57ab83b9eb31bbe698b634199e4a61e762168
diff --git a/frameworks/opt/telephony b/frameworks/opt/telephony
index 93faaed..9b688da 160000
--- a/frameworks/opt/telephony
+++ b/frameworks/opt/telephony
@@ -1 +1 @@
-Subproject commit 93faaed9056491c551ef7046e9e1de7d6397e95c
+Subproject commit 9b688da398d478de1f79671b932a93629d5b2246
diff --git a/system/core b/system/core
index 68c1968..3bc3d40 160000
--- a/system/core
+++ b/system/core
@@ -1 +1 @@
-Subproject commit 68c19686e8f9b5a88e3b2729a453d03516be79f1
+Subproject commit 3bc3d40faf78fc9ce5f11da745727730d8b30493
diff --git a/system/security b/system/security
index d9adda9..7524006 160000
--- a/system/security
+++ b/system/security
@@ -1 +1 @@
-Subproject commit d9adda97221fe2b7a1be38d8ab1dc954c630a1b9
+Subproject commit 7524006ad5343197b06e006871cf07cc71883dc9
It looks like it has to do something with the subprojects inside the source code, but i don't understand what.
So how do i get a proper way to modify all of the source code and keep tracks on the changes?
Upvotes: 1
Views: 293
Reputation: 519
The way i chose to use, and the best way i see so far, is really using the
repo forall -c <command>
command which allows you to run a command in all the git projects in the AOSP.
So i started by checking out to master:
repo forall -c "git checkout master"
And then, creating new branch and checking out to it:
repo forall -c "git branch iss1"
repo forall -c "git checkout iss1"
And than, making some changes, adding, and commiting..
repo forall -c "git add -u"
repo forall -c "git commit -m BLA"
And thats working very well so far :)
Upvotes: 1
Reputation: 1149
You should fork all the different repo's that make up the project. These are found in the manifest file in the .repo folder (check the local_manifests folder here too). Change these manifest files to link to your own github forks. Then you can alter what you want and commit it to your own forked repos. If you want to revert your changes to the latest sync, just run
repo forall -vc "git reset --hard"
from your root project folder. Keep in mind that changes that have already been committed to your forks are not reverted, since this will pull the sources from those forks.
Upvotes: 0