Welcome to Our Website!

I had all this over in my Android Kitchen Web Page because I was gona combine the Kitchen, Git/GitHub and Building ALL in one Page. Needless to say, I have changed my mind. Kitchen and Building are still together but we moved Git to here.

 June 11th, 2016/9:25am  Starting again. I have been gone almost a year, well, it has been a year, and I have forgotten most of what I learned. Didn't know it all that well to begin with -but- not using it for a year kinda puts a damper on things. So, we are starting over and trying to learn.

   

   Git Stuff


The Git repository is stored in the same directory as the project itself, in a subdirectory called .git. (please notice the leading '.' ) There is only one .git directory, normally in the root directory of the project. -But- in this Google/CyanogenMod setup it is stored in:
    cm11.0-rezound/.repo/repo/.git
where cm11.0-rezound is my 'root' dir. (August 12, 2015)

config@       description@  HEAD       hooks@    index  info@  logs@  objects@
packed-refs@  refs@         rr-cache@  shallow@  svn@
total 16
-rw-r--r-- 1 ctaylor users 225 Jun 11 09:10 index
lrwxrwxrwx 1 ctaylor users  39 Jun  5 12:14 config -> ../../.repo/projects/android.git/config
lrwxrwxrwx 1 ctaylor users  59 Jun  5 12:14 objects -> ../../.repo/project-objects/CyanogenMod/android.git/objects/
lrwxrwxrwx 1 ctaylor users  60 Jun  5 12:14 rr-cache -> ../../.repo/project-objects/CyanogenMod/android.git/rr-cache/
lrwxrwxrwx 1 ctaylor users  57 Jun  5 12:14 hooks -> ../../.repo/project-objects/CyanogenMod/android.git/hooks/
lrwxrwxrwx 1 ctaylor users  37 Jun  5 12:14 logs -> ../../.repo/projects/android.git/logs/
lrwxrwxrwx 1 ctaylor users  37 Jun  5 12:14 refs -> ../../.repo/projects/android.git/refs/
lrwxrwxrwx 1 ctaylor users  40 Jun  5 12:14 shallow -> ../../.repo/projects/android.git/shallow
-rw-r--r-- 1 ctaylor users  41 Jun  5 12:14 HEAD
lrwxrwxrwx 1 ctaylor users  55 Jun  5 12:14 svn -> ../../.repo/project-objects/CyanogenMod/android.git/svn/
lrwxrwxrwx 1 ctaylor users  56 Jun  5 12:14 info -> ../../.repo/project-objects/CyanogenMod/android.git/info/
lrwxrwxrwx 1 ctaylor users  63 Jun  5 12:14 description -> ../../.repo/project-objects/CyanogenMod/android.git/description
lrwxrwxrwx 1 ctaylor users  44 Jun  5 12:14 packed-refs -> ../../.repo/projects/android.git/packed-refs
Well, we have learned a lot. The projects are listed in the manifest.xml file and "each" project has its own .git dir. Some of them are 2,3 or 4 levels deep -and- a few are even farther... 13 levels deep!!
And from  StackFlow   we have a lot of info...very informative Web Page... pieces of which will probably be copied into here so's I don't loose it. -And- we have:  Getting Started - Git Basics  


 git Commands - Ones I have used. Perhaps more explanation later.
 git init   -- Create an empty Git repository or reinitialize an existing one
 git log   -- Show commit logs
 git status -s   -- view the status of your files in the working directory and staging area
 git clone   -- copy a git repository so you can add to it
    git clone https://github.com/sultanxda/Android
    git clone https://github.com/sultanxda/android_device_htc_msm8660-common -b cm-11.0
    git clone https://github.com/sultanxda/android_vendor_htc -b cm-11.0

 git revert   -- revert the changes that the related patches introduce,
    git revert --no-edit b71b47d72b129915327f41653b06edaea5008534 || retval=1
    git revert 5e097bc6832fa307a617a1c4e2ac727c899efe5e
 git diff   -- shows diff of what is staged and what is modified but unstaged



 Using manifests    manifest-format    SmartGit    gittutorial    Git_For_Eclipse_Users    EGit User_Guide  
                           




   

  Re-Sync Failure / Protection

Technically, I did not have a failure. I had modified some code, did NOT check it in but then tried to UpDate the Build Code. I really expected it to over-write my changes -but- it didn't. The scenario was like this:

ctaylor@Tipper-i7:~/Android/cm11.0-rezound
> time repo sync -j8
   . . .
Fetching project CyanogenMod/android_packages_apps_CMHome
Fetching projects: 100% (476/476), done.  
Syncing work tree:  58% (277/476)  error: Your local changes to the following files would be overwritten by checkout:
        media/libstagefright/OMXCodec.cpp
Please, commit your changes or stash them before you can switch branches.
Aborting
Syncing work tree: 100% (476/476), done.  

frameworks/av/: discarding 1 commits
vendor/cm/: discarding 1 commits
error: frameworks/av/: CyanogenMod/android_frameworks_av checkout ebdbd54cafa24515b57abf664c4f90f52603ad51 

real    7m49.603s
user    1m1.922s
sys     0m24.636s
ctaylor@Tipper-i7:~/Android/cm11.0-rezound
> git status
fatal: Not a git repository (or any parent up to mount point /home)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
ctaylor@Tipper-i7:~/Android/cm11.0-rezound
> cd frameworks/av
ctaylor@Tipper-i7:~/Android/cm11.0-rezound/frameworks/av
> git status
HEAD detached from ebdbd54
Changes not staged for commit:
  (use "git add ..." to update what will be committed)
  (use "git checkout -- ..." to discard changes in working directory)

        modified:   media/libstagefright/OMXCodec.cpp

no changes added to commit (use "git add" and/or "git commit -a")
ctaylor@Tipper-i7:~/Android/cm11.0-rezound/frameworks/av
> git checkout -- media/libstagefright/OMXCodec.cpp
ctaylor@Tipper-i7:~/Android/cm11.0-rezound/frameworks/av
> git status
HEAD detached from ebdbd54
nothing to commit, working directory clean
ctaylor@Tipper-i7:~/Android/cm11.0-rezound/frameworks/av
> cd ../..
ctaylor@Tipper-i7:~/Android/cm11.0-rezound
> time repo sync -j8

Now then right, or wrong, I discarded my changes. They didn't work anyway and I wanted a clean fresh copy to work with. So the tail-end of the above does the trick.
This was accomplished primarily with the help of Team Member Shaun.

 The Compile Afterwards  Alllllrighty now ... we are going to just start the compile and NOT perform the "cherrypics" that are normally required. Why?? Want to see just what is required and how much of it affects the Camcorder.

Well, it did not compile.

   

   GitHub Stuff

 git and github intro   - & -  GitHub Help   - & -  Think Like (a) Git  

 August 12th, 2015/4:06am   Things you find... the .git repository is supposed to be in the 'root' dir of the project. -But- Google/Cyanogen has moved it, (see beginning above) so I do believe that is the reason I have gotten the errors in the following.

We have decided to place our "references" to our newly acquired info, and knowledge of, this GitHub... here in our "references" to info, and knowledge of, Dsixda's Android Kitchen. Since we will probably be using them together anyway. Both of these have been set up in our openSuSE 12.3 System.

Now then, some may say that they are NOT used together. Wellll... that all depends on how you look at it. We are trying to learn more about the  Android System  -but- also -and- more importantly our HTC ReZound. We have contacted various individuals concerning this phone -and- the use of the software. We have tried to recognize ALL of those who have helped, and hope we have not missed any. IF you see something that you think you should have credit for, and haven't, please let us know.

#0) /usr/lib/git/git-gui Included with openSuSE install... IF you select it. And a tour... (this tour is Windows oriented, mine is Linux oriented. Man Page is both.) The Man Page

 April 18th, 2014/1:17am  Alllllrighty now... this git-gui is entered on the command line as "git gui". Notice that the dash '-' is missing. On our system it produced the followng:

Clicking on the "Open Recent Repository" parameter entry produced: In -or- out of the proper dir of "~/Android/cm11.0-rezound" or "~/Android/cm11.0-rezound/android". IT chose the "~/Android/cm11.0-rezound/android". Why?? I don't know ... yet. More on this 'gui' as we continue. Well, actually right now cause of the following error(s)!!

Instead of clicking on "Open Recent Repository", we click on "Open Existing Repository" which produced: We clicked on "Browse" and got: We selected the default and got: (we had previously moved into the proper dir.) which is rather strange, since we have been creating and compiling from this dir for the past couple of months. It was supposed to be a clone of the one our "OnLine".

OK... learn new things all the time.    ANDROID_BUILD_TOP   is the container for your projects, which in this case is ~Android/cm11.0-rezound, and it does NOT get a "git init". So it will NOT be a "git repository".



#1) The Git code was installed through the Yast2 installer... because... it was/is part of the openSuSE distribution. As usual, the Author used some other system with 'apt' and 'get' commands. The following is our initial "setup".

 Note: Quote from: Stack Overflow  When creating a commit with Git, it uses the configuration values of user.name (the real name) and user.email (email address). Those config values can be overridden on the console by setting and exporting the environment variables GIT_{COMMITTER,AUTHOR}_{NAME,EMAIL}.

Git doesn't know anything about GitHub's users, because GitHub is not part of Git.

#2) Now then, we had searched for info and found How to Use GitHub and blindly followed the directions ... and then got stumped. Not necessarily cause of the information on the page -but- because we didn't understand it enough and there wasn't quite enough info. Think the writer expected the reader to know more than they -or we- do. Anywho, the very first command assumes that you are using Ubuntu -or- Debiian. We were/are not. Therefore, we installed the Git that came with our openSuSE distribution. (repeat??)

 Another Note:  Be careful following tutorials... even this one. You may get things setup -- that you really don't want setup. A "git init" at the wrong place can be quite strange. Yeah, we followed blindly on some things -and- that is the reason for this warning. MAKE SURE that you are in the "correct directory" BEFORE you do a "git init".
And you do NOT use this in the ~Android/cm11.0-rezound dir. That is only a Top Level Container.

   git version    This will, naturally, display the version of Git that you have installed on your system. The version that we got with our openSuSE was/is: git version 1.8.1.4

   git config --global user.name "Your Name Here"
   git config --global user.email "your_email@youremail.com"  
 
Now then, the first item in demo, as we have already mentioned, was the install of Git. The second was these two commands. We executed the first and 'nothing' obvious happened. We later found that it created a file in our home dir -- .gitconfig file -- and the contents of it was:

[user]
        name = Chuck Txxx

Now the above was a direct listing of the file. ie; 'less .gitconfig'

 December 9th, 2013/12:31pm  Ok now, things can, and will, get interesting ... as we learn. The above info was -before- we Re-Installed our opeSuSE 12.3 -after- trying openSuSE 13.1.(Which was a BIG disappointment) Then we set things up for a CyanogenMod compile. Think that git config was called during those processes. Consequently, we got another version of the .getconfig file. To which we will add the above commands which will result in the following:

[color]
        ui = auto
[user]
        name = Chuck Tayr
        email = chucktr--trcompu.xxx

   git config --global --list    This is the command to list the contents of that file and it will show:

ctayr@dusty-tr2:~
> git config --global --list
color.ui=auto
user.name=Chuck Tayr
user.email=chucktx--trcompu.xxx

   git config --global --unset-all user.name    Then we have the removal. This will remove the user -but- when you add them -or- another back in it leaves a blank for the former. Another 'dump' of the file showing our 'playing' with the add and delete operations.

[user]
[user]
[user]
        name = Chuckxx

Now then, in the 'other' author's defense we do believe that he was expecting us to be on "GetHub.com" and signing up. The 'Home' page has the following on it:

But then, we also want to set things up on our own system -and- we do believe that info should be present -and- probably the same. We created the file 'locally' and used our Full name and our gmail address with the following commands:
   git config --global user.name "Chuck Tayr"
   git config --global user.email "chuckxxxx@gmail.com"  
 

The list command    git config --global --list    then shows:

user.name=Chuck Tayr
user.email=chuckxxxx@gmail.com

We are not showing our 'actual' address cause some will use it maliciously. But we think you get the idea. In addition we are using our Gmail address cause... it seems that Google is connected in all this... somewhere.

Now then, from Bootcamp / Set Up Git we get
         git config --global credential.helper cache    
which is going to set things up to hold our username and password so we don't have to enter it all the time. Only thing is... we don't have a password yet!! What's more we get:
Congratulations, you now have Git and GitHub all set up! What do you want to do next?
Well the Git is on our PC -but- where is the GitHub???

  Your Account

 Where/Who am I??? - December 18th, 2013/8:17am  To check your git setting, run this command:
  git config user.email  -or-   git config user.name 

To get to your Account Settings, you will use one of the above -and- a password. Now then, IF you don't know your password... then you haven't set up an Account. The only other thing would be that you have forgotten it and there are provisions for that.

 At 11:40am  We joined GitHub. Well, we created our Account. We had to use chuckxx for our username. Normal Email address, normal password and we'll get Public Repos.

We enquired and got the following answer about the names:
Your GitHub username is different to the full name you use to author commits. Your username will be used to represent your profile on GitHub:
     https://github.com/<username>
In other words you have two usernames. One your full name and the other one that you make up.

Further Info on 'Where' Created.

Questions from us; Answers from them(Petros) -And- later remarks from us.

> First, what I would like to do is --- Set up a GitHub on my Personal Computer. My Machine. Is that possible?? Or are they only on the Internet??

github.com is a cloud service and you can't install it locally. What you should install is the Git client, (or any Git client) because you need that to be able to work with Git repositories, which is what GitHub is based on.

> Second, Can I copy a GitHub that is on the Net to my machine??

If you are referring to a Git repository, yes, and this is the essence of working with Git repositories. You have to clone them locally.

Duhhh... I was a squeaky clean 'noob'. You get exactly what is 'out' there onto your machine. In this case, the complete source code directory structure with all the code. You get to make changes and play with it ... 'Locally'.

> Third, Can I have it in both places??

If you are referring to a Git repository, yes, you have one on github.com and then anyone with access can clone it locally and start working on it.

Let us know if you have more questions.

Cheers,
Petros


Annnnddd... now with 'some' knowlege I am realizing how silly the above questions were. -But- on the other hand... IF you don't know until you ask.....and use it.... And then it becomes obvious!!

  Info from _litz

Now we got ourselves totally cornfused and decided to ask. We presented our questions to _litz:

Mr _litz,
I/we am/are trying to learn this as quick as possible -before- all of you move on. 
My biggest question is how the sources are coordinated. Yes, I know there are 
tutorials and descriptions -but- I thought a couple of questions answered could 
help get me started faster.

Now in working with this, we have found that the following directory structure is created:
ctaylor@dusty-tr2:~/Android
> lsd cm11.0-rezound/
abi/               CherryPick-1-11-14.txt  FixRepo-1-12-14.txt    libcore/          prebuilts/
android/           cherrypick.sh*          FixRepo-1-14-14-2.txt  libnativehelper/  sdk/
AndroidNotes.txt*  cherryresult.txt        FixRepo-1-14-14.txt    Makefile*         system/
art/               cts/                    fixrepo_litz.sh*       make.sh*          tools/
bionic/            dalvik/                 fixrepo.sh*            MemNote.txt       vendor/
bootable/          developers/             frameworks/            ndk/              vigor/
build/             development/            hardware/              out/
Build-1-11-14.txt  device/                 InitRepo-1-11-14.txt   packages/
build.err          docs/                   initrepo_hybrid.sh*    pdk/
build.log          external/               kernel/                prebuilt/

ctaylor@dusty-tr2:~/Android/cm11.0-rezound
> lsd .repo
local_manifests/  manifests/  manifests.git/  manifest.xml  project.list  projects/  repo/

Now then, there are 'extra' entries in the directory that we have displayed above. Because of 'failures', we had to make some test runs and save the results. The entries in Red are extras. And finally our question was:

Now then, how much of the above is from the CM Team and how much of it needs to be modified for
the ReZound?? Is it just the "vigor" dir?? I would like to be able to do what Neo, Flyhalf
and you are doing. Update the Rez to the latest CM ... on my own. Don't expect you to tell me
everything, but hopefully point me in the proper directions. There is a "key" or "spark"
that I am missing and once that is gained I know that I will be able to continue. You know, 
there is always something that all of a sudden says, "OhYeah!! That's how it works!!"

To which _litz replied: (His comments in green)

Ahh, that's the magic of "repo" ...

Look in the .repo directory.   Notice the '.' this makes it a hidden dir.

In there, you'll see a manifest.xml file. This contains all the projects supplied by CM.
When examined, you'll find that all the dirs listed are projects.

This is generated by the repo init command, using CM's android.git file and selecting the "cm-11.0" project
in the repo init command line. In our case this is inside the initrepo_hybrid.sh performed in  step 10  down below. e.g. : repo init -b cm-11.0 -u git://github.com/CyanogenMod/android.git You'll also note, there is a directory called local_manifests, and inside this directory is local_manifests.xml. This is the directory (and file) that contains all the device specific projects. In our case, everything specific to "vigor". This is downloaded either directly by the user and placed in place, or the "initrepo.sh" script achieves the same thing via wget and some other shell commands. e.g. : wget https://raw.github.com/vigor/android...est_hybrid.xml (in the case of initrepo.sh, it grabs the above file, then renames it to "local_manifest.xml") If you have done this before the repo init command, repo will automatically grab manifest.xml, and then use BOTH manifest.xml and local_manifest.xml to download and maintain all the required projects ... both CM's and the device specific projects in local_manifest (e.g., all our vigor projects). Now, as for the "vigor" specific items ... if you look inside the local_manifest.xml file, you'll see each project listed line by line. "path=" tells where in the source tree the project is to be placed "name=" is the actual name of the project (github and repo use this) "revision=" is the branch of the project. In our case, in vigor, it's either "cm-11.0" or "cm-11.0_hyrbid". revision merely denotes which actual "tree" of code to use. There are trees for each version of cm (9, 10, 11. etc), for instance. - litz

Now the above in NOT meant to replace, or supplant, any of the excellent documentation already available on Git and GitHub. This is just to get us started... on the ReZound in particular. Anything NOT in green is 'my' wording and 'my' way of understanding.

  Git Repo

Well, the next item in Bootcamp is... Create A Repo. We find the same words at the top of the Web Page:
If you've found yourself on this page, we're assuming you're brand new to Git and GitHub. This guide will walk you through the basics and explain a little bit about how everything works along the way.

Well, it is true... we are new and trying to learn. So, let's follow along.

Checking Your Settings

If you want to check your settings, you can use the git config --list command to list all the settings Git can find at that point. We changed from our home dir to the AndroidSDK dir we created earlier and the command listed the items in our ~/.gitconfig file in our home dir.
Refer: Getting Started

> git config --list
color.ui=auto
user.name=Chuck Tayr
user.email=chuckxx@trcompu.xxx
credential.helper=cache --timeout=3600
gui.recentrepo=/home/ctayr/Android/cm11.0-rezound/android
gui.recentrepo=/home/ctayr/Android/cm11.0-rezound/device/htc/vigor

Giggle

  • Giggle (homepage) is a graphical frontend for browsing history of Git repositories (think of gitk on GTK+). Result of a Hackathon 2007, later developed by Imendio's Carlos Garnacho and Sven Herzberg and then by Mathias Hasselmann. Currently maintained by the GNOME community. Available from http://git.gnome.org/browse/giggle/