0

I want to download source code for android core apps like Settings.I have following doubts

1)How can i download entire project of core apps for Android 2.2

2)Android.jar in sdk does not have API for core applications.So how to set up Eclipse to do this

3)How to test it in emmulator

Paresh Mayani
  • 127,700
  • 71
  • 241
  • 295
  • Not only is there a permissions/signature issue, a number of these apps will not build with the SDK for assorted historical reasons, and so can only be built as part of a full system build, unless you modify them to be sdk-compliant. – Chris Stratton Jul 27 '11 at 05:49

3 Answers3

0

1) For example, use following commands to download Calculator application for FROYO , I am assuming you have set up your environment including repo and git tool.

repo init -u git://android.git.kernel.org/platform/manifest.git -b froyo

git clone git://android.git.kernel.org/platform/packages/apps/Calculator.git -b froyo

Note:: (can be any other app too , just you need to change the Calculator.git to *.git)

2) I am not sure which Android.jar you are talking about, but I can suggest , update your sdk manger then download 2.2 Froyo API 8 using sdk manager. If you have not installed ADT plugin in eclipse yet , then follow steps described below ..

 a. download ADT12 from http://developer.android.com/sdk/tools-notes.html
 b. Install that plugin from Help -- > Install new Softwares in Eclipse
 c. Restart eclipse , you will see an extra option Android under Window --> Preference 
    Select the Android option and mention the sdk folder location where you are keeping
    sdk.  Now you are ready to create an Android App Project from context menu or File
    new menu option.

3) You can create emulator from "Window" --> " Android sdk and AVD Manager " option in Eclipse, then run it. Now you can run your newly created Android app , say TestApp, on this emulator. Even eclipse will automatically run the emulator for you.

Dhrubo
  • 705
  • 1
  • 14
  • 33
  • settings requires special permissions ( like write secure settings) so you cannot test it on emulator provided with sdk - you have to build your own image. (http://source.android.com/source/building.html), and then build Settings from packages/apps/Settings - "build/envsetup.sh", and then "make packages/apps/Settings" – Marek Gocał Jul 26 '11 at 13:47
  • Thanks,I didnot download git,repo tools,My development environment is Windows7.Please provide some links for them. After downloading the source for apps for example Setting.git i want to modify the source using ecclipse and install the modified application in emmulator.Is it possible? – Ramkumar Pinninti Jul 26 '11 at 15:04
  • I suggest to use Linux environment , if you want to work with Android freely, specially when you want to work with Android Source . May be you need to build the source to create system.img. You can use windows if you want to create your own Android app, it will make your life easier. If you absolutely want to use Windows 7 then you may want to look http://stackoverflow.com/questions/233421/hosting-git-repository-in-windows or google for more help, though it will be complicated for you, I suppose. Best of luck. – Dhrubo Jul 26 '11 at 15:29
  • You can also download GGit-1.7.0.2 installer and install it in your windows system. Then you have to configure git as described in http://kylecordes.com/2008/git-windows-go and use git clone git://android.git.kernel.org/platform/packages/apps/Calculator.git -b froyo to fetch Calculator app from android source. – Dhrubo Jul 27 '11 at 05:41
  • @Ramkumar- You didn't mention , whether you like my answer or not... :) – Dhrubo Jul 27 '11 at 06:35
  • Sorry for asking same question .See the link http://www.youtube.com/watch?v=3aUjukCdPyQ some android developers modify core apps Ring tones application and Home screen application.In the same way i want to modify Settings application to installation on my phone. My development platform is Windows,Eclipse ide and I want to modify settings application of Android2.2. 1)How to create project for a core application and build it on eclipse. 2)How to install it on device or atleast on emulator.Please provide complete steps. Thanks and Regards P.Ramkumar – Ramkumar Pinninti Jul 27 '11 at 07:11
0

You can download the source from The Android Open Source Project with git. In /packages/apps/ there are all the core apps, including Settings, Calendar, Browser, etc. Instructions on downloading the source are all on that site.

If you lift the source for one of those apps, you might be able to replace the old version on a running emulator. If there is some protection against that (I know they are treated differently, don't show up with the rest of the apps, etc.) you can build the OS from source (also described on that website).

robamaton
  • 690
  • 1
  • 6
  • 17
0

In my experimentation with the source change, I had to build up (make) the whole downloaded source code to get a new emulator image to see the changes I had made.

Aman Alam
  • 11,231
  • 7
  • 46
  • 81
  • Thanks,Please tell me What are change you made?In Windows or Linux?Please tell me the steps. – Ramkumar Pinninti Jul 27 '11 at 08:51
  • Many, I only remember that we successfully changed the boot splash screen :P It works on 64 bit Linux only, and since they also had used Ubuntu 64, its a good idea to use it. – Aman Alam Jul 27 '11 at 10:36