Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,731,426 Members 53,495 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 76
Posts: 52
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 76
Posts: 52
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 76
Posts: 52
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: 183
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:
T-Mobile NEXUS S (unrooted)

Phone 2:
NEXUS ONE (unrooted)

Phone 3:
Brown and Black T-Mobile G1
ROM: Cyanogen's latest
Partitions: 6500MB FAT, 500MB EXT3
Recovery: RA-dream-v1.5.2
SPL: 1.33.2005
Radio: blahblah.26I
SD: 8GB Class 6
Theme: none
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: 183
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:
T-Mobile NEXUS S (unrooted)

Phone 2:
NEXUS ONE (unrooted)

Phone 3:
Brown and Black T-Mobile G1
ROM: Cyanogen's latest
Partitions: 6500MB FAT, 500MB EXT3
Recovery: RA-dream-v1.5.2
SPL: 1.33.2005
Radio: blahblah.26I
SD: 8GB Class 6
Theme: none
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


XDA PORTAL POSTS

Immersive Mode on Unrooted Devices with GMD Full Screen Immersive Mode

Everyone likes screen real estate–no question about that. The … more

Android Wear App Review: EchoWear Song Search – XDA Developer TV

Yesterday on XDA Developer TV, Producer AdamOutler tore down a Samsung … more

Blast Those Flags with Knock the Flags

Lately, we have seen a rather drastic shift in the world of mobile device gaming. The infamous Angry … more