[XPERIA X8 Themes and Apps] pilu1978:
A detailed example:

In this example I describe how to modify the contacts app from ST15 4.0.2.A.0.42 to work on MiniCM7 2.2.1

Needed:

Framework-res.apk from MiniCM7 2.2.1

Framework-res.apk from official ST15 4.0.2.A.0.42

Phonebook.apk from official ST15 4.0.2.A.0.42

Decompile these apps. To decompile the phonebook.apk need add the SemcGenericUxpRes.apk with the "if" (install framework) parameter in apktool.

In the decompiled code of contacts app (the smali folder) use your best friend: the grep command. :) You can use any GUI for this tool (for example in windows: Wingrep32).

How to identify the resource identifiers in the code?

Search with grep:

const v

You will get a lot of results. What you need? the global resources ids in the code is a 32bit hexadecimal number.

The global resource ids in this form: 010xyyyy

Where is 010 the marker of global id, x=the resource type (1=attribute, 2=identifier, 3=style, 4=string, etc...) yyyy=the identifier of the resource in the group)

The local resources is similar form: 7f0xyyyy where is 7f0 the marker of local resource, x and yyyy is same.

What do you need?

Check all global resource id with this method:

When you found a global id, for example in a line:

const v1, 0x104000a

search this id in the decompiled 4.0.2.A.0.42 framework-res/res/values/public.xml file

You can see: the 104000a equal with: type=string, name="ok"

Check in in the decompiled MiniCM7 2.2.1 framework-res/res/values/public.xml file

You can see: the string named "ok" in the MiniCM7 framework have similar identifier: 0x104000a :) Now you can happy, the ids equal nothing to do...

Proceed with the next value:

For example you found this line:

const v0, 0x10402be

Check it again in the 4.0.2.A.0.42 framework-res/res/values/public.xml file

You can see: the 0x1042be is a string, named: contact_status_update_attribution_with_date

Search this value in the MiniCM7 2.2.1 framework-res/res/values/public.xml file, and you can see: the string exists, BUT different id, the contact_status_update_attribution_with_date string have id: 0x10402a5

Now you must change the id in the contacts app, change all 10402be to 10402a5 in all smali file.

And make it with all global resource id in the app...

If you found a global resource link in the app what not exist in the MiniCM7 resources, you must do it:

For example you found a string, what not exist in minicm

1. copy it from the public.xml (from the 4.0.2.A.0.42 framework-res)

2. go to the last string in the public.xml (in the MiniCM7 framework-res)

3. add the copied line

4. modify the resource id to the last id in MiniCM+1 (in the unmodified MiniCM7 the last string is "symbol_picker_gt" with the id: 0x010403fe. The first added string must be: 0x010403ff, the 2nd must be 0x01040400, the 3rd must be 0x01040401, etc...)

5. Depends on resource type (attr, bool, string, etc...) YOU MUST copy the missing resource. For example if you add a missing resource id into the public.xml what is a string, must copy the line from strings.xml into the strings.xml of MiniCM.

This is the first method :)

In the second method add all resources with missing or different identifier in the public.xml of the contacts app with a local id (started with 7f0xyyyy), and insert the missing strings, styles, etc INTO the APP. :)

And finally, you must check the resource calls in the layout files. This is much easier.

In the layout file, the local resources marked with @resourcetype, the global resources marked with @android:resourcetype (example: a local drawable resource marked with @drawable, a global drawable marked with @android:drawable). In this case the resource id is not important, just copy the missing resource into the MiniCM framework-res from the original 4.0.2.A.0.42

So, this is the basic.

With a lot of patience and a little piece of human brain EVERYBODY can do it. With a minimal programming skill this method can be automated (for example use sql tables from the xml files to find the different identifiers related to the same resource, etc)