Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,771,386 Members 52,153 Now Online
XDA Developers Android and Mobile Development Forum

Recompile and overwrite applications in system/app

Tip us?
 
worry
Old
#11  
worry's Avatar
Senior Member
Thanks Meter 1
Posts: 100
Join Date: Nov 2008
Location: moscow
Ok, I managed to compile it without any editing of xml.
Just added stdlib, string, vector headers to dozen of cpp/h.
 
UndeadCretin
Old
#12  
Member - OP
Thanks Meter 77
Posts: 55
Join Date: Jan 2009
Location: Crawley
Quote:
Originally Posted by worry View Post
>Managed to fix the java issue by modifying public_api.xml. Then hit several more C++ problems which I fixed and finally I can build the lot!

Can you write, what did you fix?
To fix the java issue, I modified frameworks/base/core/java/android/hardware/SensorManager to change the LIGHT_NO_MOON value to 0.0010f (from 0.001f) and in out/target/common/obj/PACKAGING I modified the <field name="LIGHT_NO_MOON" to have value-"0.0010f">

After this there were several other c++ files which were missing relevant includes. I'm afraid I didn't keep a note of these so cannot provide much detail but mostly they were missing one of the following

#include "stdlib.h"
#include "string.h"
#include "stdio.h"

I think one file needed the following include

#include <string>

and there were a couple of other files that needed other includes. The best way to find these is to google for the function name that isn't building and you should be able to find the appropriate include (that's how I did it).

Hope that helps a bit!
 
ximonx
Old
#13  
Member
Thanks Meter 19
Posts: 48
Join Date: Jan 2009
were you able to repo sync after adding the local_manifest.xml?
 
UndeadCretin
Old
#14  
Member - OP
Thanks Meter 77
Posts: 55
Join Date: Jan 2009
Location: Crawley
Quote:
Originally Posted by ximonx View Post
were you able to repo sync after adding the local_manifest.xml?
I did try that previously but it didn't work. I don't think the relevant files for the dream build are available in the release-1.0 branch. This wasn't a problem for me since I'm only interested in building the applications which work fine with the generic build.
 
Phlogiston
Old
#15  
Senior Member
Thanks Meter 0
Posts: 110
Join Date: Nov 2008
I would like to do the same for the mms application. Could you give me the steps or a link how to do it? I mean do I need the whole sources from android platform to do it? How can I just compile one application?
 
UndeadCretin
Old
#16  
Member - OP
Thanks Meter 77
Posts: 55
Join Date: Jan 2009
Location: Crawley
Quote:
Originally Posted by Phlogiston View Post
I would like to do the same for the mms application. Could you give me the steps or a link how to do it? I mean do I need the whole sources from android platform to do it? How can I just compile one application?
I downloaded the whole Android source (the release-1.0 branch) and compiled the lot. It may be possible to just build the individual application but I do not know how. It is not vital to build for the dream platform if you only care about the applications since they will work fine with the generic build.

So the basic steps to start are:

Get yourself a Linux or Mac OS platform (I use Ubuntu running in VMWare on my XP box).

Follow the instructions here: http://source.android.com/download but when you come to repo init add the flag -b release-1.0

Fix various build problems
 
ximonx
Old
#17  
Member
Thanks Meter 19
Posts: 48
Join Date: Jan 2009
When recompiling individual apps to replace system apps is there a way of just building a single application or does the entire thing need making?
 
derfolo
Old
#18  
Senior Member
Thanks Meter 1
Posts: 184
Join Date: Jan 2009
Quote:
Originally Posted by ximonx View Post
When recompiling individual apps to replace system apps is there a way of just building a single application or does the entire thing need making?
My experience is that you have to do the whole thing if you are building from source. There is one way I know of to get around this, which is to use baksmali and smali.
Phone 1:
NEXUS 5 (unrooted)

Phone 2:
NEXUS 4 (unrooted)

XDA contribution: Author of the "Keep screen awake" Call Setting on Cytown's phone.apk (used in cyanogen and other mods)
 
ximonx
Old
#19  
Member
Thanks Meter 19
Posts: 48
Join Date: Jan 2009
Just to be clear, making the entire thing = build from source root?
 
derfolo
Old
#20  
Senior Member
Thanks Meter 1
Posts: 184
Join Date: Jan 2009
Quote:
Originally Posted by ximonx View Post
Just to be clear, making the entire thing = build from source root?
If you are asking me--yes, that's what I mean. Make sure to build for dream-open as the target (it's generic by default).
Phone 1:
NEXUS 5 (unrooted)

Phone 2:
NEXUS 4 (unrooted)

XDA contribution: Author of the "Keep screen awake" Call Setting on Cytown's phone.apk (used in cyanogen and other mods)

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Droid X Receives KitKat Port, Upcoming Google Glass Firmware Improvements – XDA Developer TV

Android 4.4.3 lands on the European HTC … more

Calc+ is a Smart and Beautiful Android Calculator

As we’ve said inthe past, there are quite a few calculators available on Android. … more

Get Better Debug Data with Crash Report SDK

Developing an application is a hard and often times ungratifying task. It also requires quite a … more

Navigate to Your Favorite Places with LocationDetector

If you’re enjoying an active way of life, you probablytravel a lot, go fishing, … more