[HOW-TO] Compiling System Apps (Contacts, Mms, Browser, etc.)

1,122 posts
Thanks Meter: 6
By Wysie, Senior Member on 24th December 2009, 02:51 AM
Post Reply Email Thread
Hi all, before I begin, this is NOT meant to be a complete guide, but rather, just help to point in the right direction for those who want to compile/mod some of the system apps, but are a little lost. I was like this myself, and searched all over the place before putting bits and pieces together. Thanks goes out to xenio2000 and cytown for some of their advice.

To compile system apps such as Mms.apk, Contacts.apk, etc. you need the entire Android source. Also, you have to be running either Linux or OS X (with case-sensitive file system). Personally I dual boot Ubuntu 9.10 for it, so this instructions will be based on Ubuntu 9.10.

Step 1: Get Android Sources
To get the Android sources, follow the Linux instructions here:

Remember you have to specify "-b donut" at the end of your repo command if you want to get the Donut base. Otherwise you will get master which is a mix of Eclair already .

Step 2: Get Java 5
If you are running Ubuntu 9.10, you will need to install Java 5 as you cannot compile AOSP on Java 6. I followed the instructions here:, and used Method 1. However, I downloaded Java 5 update 22 here: (the one linked in the post is update 21).

The reason I use method 1 over method 2 is that this way, I only export the path when I want to compile (and it's only within the environment), while my browsers like Firefox, etc. are still running the latest Java 6.

Step 3: gcc
Lastly, I remember having some issues compiling due to gcc. I followed the guide here:

Step 4: Compiling
Once all is done, you can "cd" to the root directory of your Android source, and type "make Contacts" or "make Mms". The first compilation will be a little long. I know of some people who do "make", that is they compile the entire source the first time, before using "mmm Phone". I don't recommend that because doing a "make" without any parameters will result in compilation of many apps you don't need, or want, and it's very slow.

Also, to "replace" the AOSP Contacts with let's say my Contacts, just "cd" to your root directory of Android, and type "git clone git://". You can then play with my code but can't push back (need to know more git stuff for that). I suggest you fork the repos you are interested in, so you can push and make direct changes. Sorry I can't advice much on that, as I use git as though it's svn :X. I'm a git noob.

Hope it helps . As I said earlier, this is just to give you guys a rough idea of what's needed. In fact, I copied and paste my reply to someone else into here.
24th December 2009, 03:00 AM |#2  
bmfc187's Avatar
Senior Member
Flag Austin, TX
Thanks Meter: 14
This will prove to be helpful, im sure. right now i dont have my Android environment setup, i had some problems upgrading to Karmic, and so i wiped my linux partition and started over with a fresh install. So far ive been too lazy to set it all up again, but already you've answered some questions i had, thanks!

24th December 2009, 10:33 AM |#3  
xenio2000's Avatar
Senior Member
Thanks Meter: 23
Just a little suggestion:
If you use Ubuntu just to work on Android Source and nothing else, install Ubuntu 9.04 you will have less headache on compile and you can skip step 2 and 3 on Wysie guide.
24th December 2009, 12:14 PM |#4  
OP Senior Member
Thanks Meter: 6
Xenio: you mean 8.04?
24th December 2009, 01:30 PM |#5  
xenio2000's Avatar
Senior Member
Thanks Meter: 23
Ubuntu 8.04 is what Google suggest, I am using 9.04 and it is ok
With the 9.10 I have got a lot of problem with compile and java5/6
Probably with your tips is ok Ubuntu 9.10 but I use w7 for every day works
And I use Linux only for android source.
24th December 2009, 04:16 PM |#6  
Inactive Recognized Developer
Thanks Meter: 4,355
hi wysie.

there appears to be no issues compiling AOSP with JDK 1.6. I only use this revision to compile.
2nd March 2010, 04:15 PM |#7  
OP Senior Member
Thanks Meter: 6
Sorry for the really late reply, till today I still get "JDK 1.5 required" when trying to compile .
29th March 2010, 05:38 PM |#8  
Senior Member
Flag N: 54° 0' 58" E: 20° 2' 25"
Thanks Meter: 105
Donate to Me

I tried to compile Mms from rgv151 - nothing changed, just for fun = I received 'Error 41'.
if i try to compile stock mms from source it will work.


[email protected]:~/mydroid$ make Mms
build/core/ uwaga: polecenia zakrywające dla obiektu `out/target/product/generic/obj/include/libpv/getactualaacconfig.h'
build/core/ uwaga: ignoruję stare polecenia dla obiektu `out/target/product/generic/obj/include/libpv/getactualaacconfig.h'
Install: out/host/linux-x86/bin/aapt
Copying out/target/common/obj/JAVA_LIBRARIES/core_intermediates/classes-full-debug.jar
Install: out/host/linux-x86/framework/dx.jar
Install: out/host/linux-x86/bin/dx
target Prebuilt: libgoogleclient (out/target/common/obj/JAVA_LIBRARIES/libgoogleclient_intermediates/javalib.jar)
Copying out/target/common/obj/JAVA_LIBRARIES/ext_intermediates/classes-full-debug.jar
Install: out/host/linux-x86/bin/aidl
Copying out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes-full-debug.jar
target Java: Mms (out/target/common/obj/APPS/Mms_intermediates/classes)
android_packages_apps_Mms/src/com/android/mms/activity/ incompatible types
found : java.lang.String
required: java.util.List<java.lang.String>
contactStruct.notes = contactC.getString(
android_packages_apps_Mms/src/com/android/mms/activity/ addContactmethod(int,int,java.lang.String,java.lan g.String,boolean) in android.syncml.pim.vcard.ContactStruct cannot be applied to (java.lang.String,java.lang.String,java.lang.Strin g,java.lang.String)
contactStruct.addContactmethod(kind, data, type, label);
android_packages_apps_Mms/src/com/android/mms/transaction/ incompatible types
found : android.telephony.SmsMessage[]
required: android.telephony.gsm.SmsMessage[]
SmsMessage[] msgs = Intents.getMessagesFromIntent(intent);
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
3 errors
make: *** [out/target/common/obj/APPS/Mms_intermediates/classes-full-debug.jar] Błąd 41

Sorry for my English.

Greets, Laszlo.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes