I'm working on AOSP, which I got from an OEM (without any CVS like Git or Repo). So I tried to get all Android projects using repo init ...
I followed all the docs but most of them talks about the AOSP mirror, How to track the Android project with repo?
Thank you.
If you have received all the source code without and VCS (Git or Repo) like say as a tarball then you cannot use the repo, and if you create manifest by yourself also it is too much work for almost no result.
Instead, create a new Git/Gerrit repository and use the same. All review and CI/CD can be done via the same.
Related
I have built the webrtc for android using the Pristine IO web srcipts from here https://github.com/pristineio/webrtc-build-scripts. I have cloned the git repo of webrtc also, but don't see any tagged releases of it anywhere. In fact I don't see even a single tag and only 2-3 branches other than master.
My question is how do people generally version their webrtc builds? Is it solely dependent on git commit sha only?
Edit: generated files are
Hi #vKashyap usually the version is a part of the path or a library name (the output file after building) and it should look in your case like this: ./webrtc-build-scripts/ios/webrtc/libWebRTC-LATEST-Universal-Debug.a.version.txt
Moreover to fetch and build a particular version you can check the following guide:
https://www.chromium.org/developers/how-tos/get-the-code/working-with-release-branches
It would be easier to do things if you use the scripts provided by webrtc.org directly. Everything is simplified now as per as steps are concerned for building webrtc. See https://webrtc.org/native-code/android/
The webrtc.org code uses git so you can do the following (after you have done fetch --nohooks webrtc_android or equivalent steps) to get the tags:
git fetch --tags
Once you get the tags, you can switch to any tagged branch using git checkout for e.g.
git checkout branch-heads/55
The above command will checkout webrtc code equivalent to chrome 55. Then you can follow webrtc.org instructions to build.
I have several projects on my laptop. I would like to upload all of them to GitHub and in one repository called Android-projects. After searching the web and being bombarded by different material I got confused. How can I do that? I didn't quite understand the answers found on this website. All my attempts failed.
I have GitHub Desktop and Git Shell installed on my laptop, but don't know how to use them.
Nothing much to do there:
Create an empty directory and add it to git or create a project on github and clone it to get the empty directory
Add your projects one by one to that directory and checkin
NOTE: Tracking changes will become a bit tedious with this appropriate. You will need to be careful if you are working on multiple projects at the same time.
In the main project folder where all your android projects are present, initialize a git repository there. git init
now create a repository on github.
Finally, add (push) your code to github.
I have an Android project composed of AOSP, and other code in an Ubuntu environment. As you know, I used git and its associated tool repo to download AOSP according to the procedures on android source site. Now I want to have a way of controlling the changes I make to the environment. I have read about Git, but perhaps not enough to know what is the best way to do this. Maybe I already have this capability just by using Git locally? So my question is: What is the best way to save state in my build environment please, and how do I save this on Github as a remote backup repository? I believe I need to have a .gitignor file to exclude object files? Basically I have a WORKING_DIRECTORY with all of my code in there. That directory has a .repo and .git directory in it.
You will find that most or all of your changes will be under certain branches. For me, I develop roms for the Nexus 9 so a lot of my changes are under device/htc/flounder. The common branch is frameworks/base/ where I also make a lot of changes.
To this end I have two separate git repos that store these:
https://github.com/seanashmore/frameworks_base
https://github.com/seanashmore/device_htc_flounder
To create these, I created a github account. Then went to each of he top level folders i.e. frameworks/base and device/htc/flounder and ran the command 'git init'. This initializes those directories as git repositories. You also need to create the repos on your github account, this will give you url's for you to 'push' your code to.
The initial push of frameworks/base will take some time as it is quite large, but once you have done that first push its very handy to keep track of your code changes and all the other benefits that git brings.
A very handy git guide can be found here: http://rogerdudler.github.io/git-guide/
If you need any more information or help just ask.
This question already has answers here:
How do you synchronise projects to GitHub with Android Studio?
(13 answers)
Closed 5 years ago.
I'm using Android Studio to code my apps. Now I want to work on 2 PC's and thought about using a Cloud-Service. I decided to use GitHub, but I can't find a way to synchronize my GitHub account with my Android Studio project...
Can anyone explain this to me ?
Best way to do this is probably through the good ol' command line. First, make sure you have git installed and in your path. You can get instructions from here.
Next, go to GitHub and create a new repository with a title and such. Instructions on that here. Don't worry about creating your first commit, we're going to do that on your local machine.
Now for the fun part.
Copy the repo link of your choice (I prefer ssh, but it depends on how far you went with the set up part) and head to the terminal.
cd ~/project-path-here
git init
git add .
git commit -am "initial commit"
git remote add origin <your link>
git push -u origin master
If all has gone well, you can reload the github page and see your new push.
On your other computer, you'll be able to clone down the repo you created.
cd ~/project-path-here
git clone <your link>
You can then use git pull and git push to retrieve and send changes to the server.
You can also look into Github's desktop application if you're on Windows or Mac for a simpler time, but I find these lack some more advanced features of git.
EDIT: To register your new git repo with Android Studio, Intellij, RubyMine, etc., go to the project settings (File->Settings), search for version control, and specify that your project is using git for version control. Here for more information on that. Once that is enabled, the VCS drop down will have more features. The ones to look at are Commit Changes (git commit and push) and Update Project (git pull).
Under the VCS tab in your Studio, there's on option to publish the project to Github. Will ask for your credentials, then you're good to go to push your code.
Just getting into Android app dev and I thought I might mention here that I think that we should gitignore the build folder. It's huge and it doesn't need to be repo'd
[Edit] I'm referring to the app/build folder. And hey I see it's not included in the Android Studio .gitignore
For my Android app, I need the source code for uuidlib that I would like to build as a static library and link with my native code. Another post Include uuid.h into Android NDK project mentions that the source code is available in AOSP at external/e2fsprogs/lib/uuid/ directory.
I followed the instruction on AOSP page and did a "repo init" and a "repo sync." The synchronization is still going on for the past one hour.
I am wondering if there is a better way to obtain the source code for just the library I need and not download the entire 10G of repository on my machine.
If not, what do I need to do to get uuid after "repo sync" finishes? Regards.
I am wondering if there is a better way to obtain the source code for just the library I need and not download the entire 10G of repository on my machine.
Per the repository instructions:
git clone https://android.googlesource.com/platform/external/e2fsprogs