Where can I find Android source code online? [closed] - android

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Where can I browse the source code for any Android Open Source Project (AOSP) application (for example the Contacts application)? Is the only way to clone the entire source repository for all of AOSP?

Everything is mirrored on omapzoom.org. Some of the code is also mirrored on github.
Contacts is here for example.
Since December 2019, you can use the new official public code search tool for AOSP: cs.android.com. There's also the
Android official source browser (based on Gitiles) has a web view of many of the different parts that make up android. Some of the projects (such as Kernel) have been removed and it now only points you to clonable git repositories.
To get all the code locally, you can use the repo helper program, or you can just clone individual repositories.
And others:
Downloading the Source Tree

2020: The official AOSP code search https://cs.android.com/
You can view the source code through http://developer.android.com, when you're reading the API there will be a link to the matching source code on GitHub, you just need to add the Android SDK Reference Search Plugin on Chrome.
I blogged about it here:
http://blog.blundellapps.com/add-source-code-links-to-android-apis/

I stumbled across Android XRef the other day and found it useful, especially since it is backed by OpenGrok which offers insanely awesome and blindingly fast search.

I've found a way to get only the Contacts application:
git clone https://android.googlesource.com/platform/packages/apps/Contacts
which is good enough for me for now, but doesn't answer the question of browsing the code on the web.

You can browse Android SDK samples from your smartphone using "Code Search":
https://market.android.com/details?id=sqwady.codesearch

This eclipse plugin allows for inline source viewing and even stepping inside the Android source code:
http://code.google.com/p/adt-addons/
(edit: specifically the "Android Sources" plugin: http://adt-addons.googlecode.com/svn/trunk/source/com.android.ide.eclipse.source.update/)

gitweb will allow you to browse through the code (and changes) via a browser.
http://git.or.cz/gitwiki/Gitweb
(Don't know if someone has already setup a public gitweb for Android, but it's probably not too hard.)

Related

Is it possible to get source code of my Android device? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
I have background about android application development and now I want to explore deeper side of the Android.
Because of Android is open source, I want to find my phone's source code, then change some values in code, and after all I can compile and flash the code into the phone and see the changes.
I know there is an android documentation here but it is not clear for me.
So, my question is how can I download the source code of my phone?
You haven't specified your device type so here are some more general ideas:
Basically it is not that simple and depends on your device. Parts of Android are open source, other parts are not. Furthermore, your Android device can have a locked bootloader which won't allow you to install your custom build firmware.
Your link shows you how to download the current Android source code using the repo tool. Usually, Android is not in a single git repo. The repo tool reads from a configuration file the different git repositories, current branches, etc. and clones them for you.
I did Android development for OMAP devices (in the past). OMAP itself is outdated but you can learn alot from the documentation: http://omapedia.org/wiki/Main_Page Furthermore, you can still buy OMAP dev boards and play around with them, build a custom image, patch things, etc.
Building a custom Android for OMAP devices works like this:
Clone Android source code
Clone Linux Kernel
Clone U-Boot bootloader
Build all three and create image files
Flash them on the device
A few words about open source: Many things ar eopen source, but not everything. E.g. GPU driver are closed source. In case of OMAP devices, you can get them precompiled. So if you want to touch something which is not open source, you run into problems.
I hope that helps you and points you a little bit into the right direction.

Beginner in Git, Starting from Android Studio [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I'm working in a project in Android Studio and up to now, I've copied my files in other directory to change my code for adding new improvements in my program.
And this way is very overwhelming for me.
But I heard that is a good idea use Git when developing, and I want to try it. But I have some questions:
My app is not published yet, should I use Git or other VCS?
How can I use Git from Android Studio?
Is there any risks to my app in development get messed while trying a VCS?
What is VCS and why should you use it?
There are many benefits of using a version control system for your projects.
Collaboration
Without a VCS in place, you're probably working together in a shared folder on the same set of files.It's extremely error-prone as sooner or later, someone will overwrite someone else's changes.
With a VCS, everybody on the team is able to work absolutely freely - on any file at any time. The VCS will later allow you to merge all the changes into a common version.
Storing Versions (Properly)
Saving a version of your project after making changes is an essential habit. But without a VCS, this becomes tedious and confusing very quickly:
Restoring Previous Versions
Being able to restore older versions of a file (or even the whole project) effectively means one thing: you can't mess up! If the changes you've made lately prove to be garbage, you can simply undo them in a few clicks. Knowing this should make you a lot more relaxed when working on important bits of a project.
Understanding What Happened
Every time you save a new version of your project, your VCS requires you to provide a short description of what was changed. Additionally (if it's a code / text file), you can see what exactly was changed in the file's content. This helps you understand how your project evolved between versions.
Backup
A side-effect of using a distributed VCS like Git is that it can act as a backup; every team member has a full-blown version of the project on his disk - including the project's complete history.
How to use GIT on Android Studio
Have a look here

Tips, tricks, and requirements for editing open source Android apps [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I'm getting back into Java programming, and I've decided that giving back by working on open source Android apps is a great way to start. I've been running Cyanogenmod nightlies for about a year now, and would like to start with some of the core apps I work with on a daily basis (Camera, gallery, GitHub, StackExchange, the list goes on)
I can find packages on GitHub easily, and I can bring them into Eclipse (Kepler) but I find myself going down a rabbit hole of endless required packages and such, and never actually getting anything to build!
Is there anywhere I can find documentation on starting to edit these things? Tutorials, tips/tricks, required reading for this sort of thing? Is there a master repo somewhere where I can grab all of the code for Cyanogen (I know, this is probably ridiculous) to make sure I have all the imports?
Is there anywhere I can find documentation on starting the edit these things?
Ask the developers of your project(s) of interest. Usually, if they really want contributions, they will have build instructions. The GitHub app does as part of its project README. The newly-released StackExchange app is not open source.
Is there a master repo somewhere where I can grab all of the code for Cyanogen (I know, this is probably ridiculous) to make sure I have all the imports?
CyanogenMod has a wiki which contains lots of project documentation, including a set of pages for how to build CM and so forth. They even have dedicated build guides for how to build from source for various device models. There is also a page describing their GitHub hosting model.
Please bear in mind that many of the apps that came to CyanogenMod from the Android Open Source Project (AOSP) are not Android SDK apps that you can build with an IDE and the SDK alone. Most have many hooks into the rest of the OS and as such need to be built as part of a larger OS build. As such, this is not what I would recommend somebody "getting back into Java programming" to get involved with as their first order of business. The being said, for further assistance in developing for CyanogenMod, contact their community through their various channels.

Porting a C++ application with Lua scripts to android? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I'm looking into porting an application called ygopro (source code here) to Android. I was just wondering if anybody can help me out by telling me what would be the best way to go about doing this? I would prefer to not spend more than about 60 hours on it and I certainly don't have the time to go through and rebuild everything from scratch. The code is in C++ and there are about 5,500 Lua scripts to do various things. Is there any easy way I can port this?
First, you'll note that the graphics library used by this project is based on has been ported to android.
There are two demos available for that project. Those will show you how to write an android application that uses this library. I suggest you essentially hack your projects source into the framework they provide.
In terms of Lua, again you'll want to use an existing port. Many of the Lua ports are oriented towards allowing access to LUA from Java via JNI, but you just want a Lua shared library out of them to link to from your C++ code. You will probably want something like AndroLua rather than the Android Scripting Environment. Pretty much, add all the folders in it's jni folder to your Android.mk includes, add it as a library, and you'll be good to go.
In terms of actual porting, I'm assuming that the project currently compiles happily under GCC. If that is the case, as you try to build it, it will complain about functions that are platform specific, and you will have to replace these. That should be manageable, if you are slowly adding code to the graphics framework demo as suggested. Beyond that, some libc functions are missing, but generally only rarely used ones.
Hope this helps. It goes without saying that you should complete some Android Native tutorials before starting. This project is more than a weekend.

SVN and syntax highlighting on Android [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
Anyone know of a Subversion client for Android OS? Same goes for a syntax highlighting text editor on there.
I have written a SVN Client for android. It is called Open Android SVN (OASVN)
Here is a link to it on the android play market : https://play.google.com/store/apps/details?id=com.valleytg.oasvn.android
Can do checkout, update, commit, cleanup, revert, export, and much more in the works.
Works with http, https, svn protocols and svn+ssh is experimental.
I will be adding merging and other features soon.
I don't know anything about its quality, but Subdroid is available in the Android market with both free and inexpensive (~1 euro) versions.
I was just thinking today that I'd like a text editor and an SVN client for Android! I couldn't find the latter, but I do know that http://svnkit.com/ would probably be a pretty good place to start.
There is an app called Touchqode which has syntax highlighting and ftp download. It comes with its own "programing optimized" keyboard. It seems pretty good for a beginning of one of the first android IDEs. I guess you can get some compilers for it too.
What I've done a few times is use a SSH client to log into my web server (but it could be your home or work machine), use SVN on there to check out the code, then use Touchqode's FTP function to work on the code from my web server. Not as elegant or convenient as using a real svn client right on Android, but it gets the job done.
From the author:
Make use of time while commuting or waiting. View and edit source code anywhere.
View and edit source code on Android phone. Touchqode is a true mobile code editor that comes with syntax highlighting, autocomplete and other features found in a desktop IDE. We support Java, HTML, JavaScript, Python, C++, C#, Ruby and PHP. Now with integrated FTP and SFTP client.
I just started testing IDEdroid and TextWarrior recently. My mini review so far for both below:
IDEdroid
Decent interface and Syntax highlighting, allows you to test code on the ideone.com web site.
TextWarrior
Pretty nice interface, Syntax highlighting for C, C++ and Java only though.
The only text editor I have found that has any kind of syntax highlighting is SilverEdit. It only does html, css and xml though, and seems generally buggy.
It's an odd request. Going to say it doesn't exist. You might be able to port Eclipse's native-java based SVN client but it would be a hack.
If the SVN server is hosted via HTTP, you could write some Delta-V\WebDav calls to access it without a lot of work.
if you root your phone and install debian on it
http://www.androidfanatic.com/community-forums.html?func=view&catid=9&id=2248
then you can easily install the debian client
I use the Android CodePad which has syntax highlighting to browse code. I find writing code on the android phone is too cumbersome in most cases.
AIDE is a new full Android IDE for developing Android apps. It doesn't have SVN support but it can edit, compile, and run Android applications directly on the device. This in combination with an SVN app would be extremely powerful.
https://play.google.com/store/apps/details?id=com.aide.ui

Categories

Resources