Just An Application

August 20, 2009

A Standalone Android Runtime: Resources

Filed under: Android, Java, Mobile Java, Standalone Android Runtime — Tags: , , , — Simon Lewis @ 6:20 pm

Interestingly it turns out that the SystemServer has a number of associated UI elements, for example the Status Bar (see below) which is an instance of StatusBarView and is owned by the StatusBarService, and like much of the UI in Android they are constructed using resources,


The StatusBar Which Is Owned By The StatusBarService In The SystemServer

Resources are handled, like the binary XML with which they are often associated, largely in native code. The three files of most interest are the previously mentioned ResourceTypes.h, ResourceTypes.cpp which can be found in


and android_util_AssetManager.cpp which can be found in


There is quite a bit of resource handling code, ResourceTypes.cpp is approximately 4000 lines, and android_util_AssetManager.cpp approximately 1500, and it is somewhat opaque to say the least, but the functionality it implements can actually be replicated in Java, ‘tho possibly rather imperfectly, its very difficult to tell.

Copyright (c) 2009 By Simon Lewis. All Rights Reserved.


Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Blog at WordPress.com.

%d bloggers like this: