[Galaxy Note II Original Android Development] rovo89:
There are some things to mention before answering these questions. The XML files are not contained verbatim in the APK. Some files (such as layouts) are kept in a binary (pre-compiled) form, but others like strings, integers, styles etc. are stored in other binary data structures. They are optimized for fast loading at runtime. So at runtime, Android no longer looks at most resources as files, therefore you can replace them as files. Also the data structures are mostly kept in C++ coding which I can't manipulate via reflection.

Instead, Xposed intercepts at the process of loading a resource from these data structures. Before passing the request to the original C++ functions, it checks whether a replacement has been set and returns that value instead. For more complex resource types (like drawables or when translation/different configurations come into play), you can also choose to forward the resource request to your own module.

So this question can't be answered in general, it depends on what exactly you want to replace and how that is handled when resources are loaded. Let's have a look at the specific examples:

Set/Change background on a LinearLayout with a custom color

-<LinearLayout android:gravity="right" android:orientation="vertical" android:background="@color/setupwizard_background_color" android:layout_width="fill_parent" android:layout_height="fill_parent"
+<LinearLayout android:gravity="right" android:orientation="vertical" android:background="@color/billing_form_background" android:layout_width="fill_parent" android:layout_height="fill_parent"

As mentioned, layouts are stored as binary XML. It's a mess to replace them completely. However, have a look at "Modifying layouts" in the resources tutorial. You can modify the layout after it has been inflated, so you would just need to identify the LinearLayout in that particular layout resource (if it's the root node, it's simply liparam.view) and then call setBackgroundColor. No need for the custom color, you pass in an integer which represents the color.

Set/Change color attribute of a shape

- <solid android:color="@color/white" />
+ <solid android:color="#ff333333" />

A shape is a Drawable, isn't it? You can set replacements for drawables. I recommend to copy it to your module and than use the forwarder.

Set/Change textColor attribute of a TextView with a custom color

- <TextView android:textSize="@dimen/content_generic_large_size" android:textStyle="bold" android:textColor="@color/play_primary_text" android:id="@id/challenge_title" android:paddingLeft="@dimen/details_content_margin" android:paddingRight="@dimen/details_content_margin" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="10.0dip" android:layout_marginBottom="6.0dip" />
- <TextView android:textSize="@dimen/content_generic_small_size" android:textColor="@color/play_primary_text" android:id="@id/challenge_description" android:paddingLeft="@dimen/details_content_margin" android:paddingRight="@dimen/details_content_margin" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="10.0dip" android:layout_marginBottom="6.0dip" />
+ <TextView android:textSize="@dimen/content_generic_large_size" android:textStyle="bold" android:textColor="@color/white" android:id="@id/challenge_title" android:paddingLeft="@dimen/details_content_margin" android:paddingRight="@dimen/details_content_margin" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="10.0dip" android:layout_marginBottom="6.0dip" />

Same as for the background color above, use a layout inflation callback.

Set/Change color attribute of a View

- <View android:id="@id/explorer_wifi_required" android:background="@color/white" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="0.0dip" android:alpha="0.7" />
+ <View android:id="@id/explorer_wifi_required" android:background="@color/title_background" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="0.0dip" android:alpha="0.7" />

Same as for the background color above, use a layout inflation callback.

Set/Change parent of styles

- <style name="common.Activity.Light" parent="@*android:style/Theme.Light">
+ <style name="common.Activity.Light" parent="@*android:style/Theme">

Not possible, see below.

Set/Change color of styles

<style name="ContentEntryTitle" parent="@*android:style/Widget.TextView">
<item name="android:textSize">@dimen/content_entry_medium_size</item>
<item name="android:textStyle">bold</item>
- <item name="android:textColor">@color/grey</item>
+ <item name="android:textColor">#ffffffff</item>

Not possible, see below.

Set/Change existing colors

- <color name="grey">#ff999999</color>
+ <color name="grey">#ff909090</color>

You can set replacements for colors.

Create new colors

+ <public type="color" name="billing_form_background" id="0x7f0a0069" />

I think if you really wanted to, you could create fake resources. But it isn't necessary, just use the color value directly.

While most of the cases work, you cannot change styles. The are completely processed in native code. I have written that down in more detail here: http://xdaforums.com/showthread.php?p=40589016#post40589016

That's especially unfortunate in your case as the change of the parent theme is probably the most important change. There would be ways to change the theme for an Activity, but in this case the actual theme overrides/extends the original theme. Therefore you can't just set the theme to Theme.Light because then all the customizations and extension would be lost. The app might even crash if it can't find what it expects. You can try to work around this by hooking all of the layouts and adjust what the theme did to them (e.g. change all of the background colors, text colors etc), but you will probably end up with a huge amount of code and still don't have it 100% right. I don't know a better solution though, sorry.