[Nexus One Themes and Apps] david1171:
How to make .xml file for MetaMorph

Here is the video which Stericson made for making the .xml files.

Video:

[youtube]Mq4AuHKzNFo[/youtube]

It is essential that you watch that video, this is basically a break down of what that video says, and puts it into writing for those that learn by reading more so than visually.

For starters, let's get a template for the .xml file. I have made one with none of the info included so that it can be easily filled.

Template:

http://android-theme-minus.googlecode.com/files/MetaMorph_template.xml

This is what the interior of that template .xml file looks like.

<?xml version="1.0"?>

<themename></themename>
<themeversion></themeversion>
<screenshot></screenshot>
<author></author>
<authorweblink></authorweblink>
<phone></phone>
<rom></rom>
<themedescription></themedescription>

<item></item>
<path></path>
<description></description>

The following is needed as the first line of EVERY .xml file that you make

<?xml version="1.0"?>

Body/Descriptors of the .xml file

The next part of the .xml file is what lets the users know what your morph contains. None of this is actually needed, but it is nice for users so that they may be as well informed of what they are applying as possible.

<themename></themename>
<themeversion></themeversion>
<screenshot></screenshot>
<author></author>
<authorweblink></authorweblink>
<phone></phone>
<rom></rom>
<themedescription></themedescription>

This next section will break each part of this down.

themename

<themename></themename>

This is where you place the name of your theme.

example:

<themename>example</themename>

themeversion

<themeversion></themeversion>

This is where you place what version of your morph this is. In the future, this could prove useful when version checking is added.

example:

<themeversion>1.0</themeversion>

screenshot

<screenshot></screenshot>

I have not been able to get a screen shot to appear in MetaMorph (or know where it would appear inside the app, if someone knows how, then please let me know and I will update this section with more detailed instructions).

The screen shot MUST be in .png format. No other format is supported.

Do not included .png in the name of the image.

example:

<screenshot>example_screenshot</screenshot>

author

<author></author>

This is the area where you place your name as the creator of your morph.

example:

<author>david1171</author>

authorweblink

<authorweblink></authorweblink>

Here is where you can place a link to your website, twitter, thread, or anything else used to define you.

MetaMorph has a problem with some special characters not showing up, so you can use a link shortening service to place your links if they do not work inside of MetaMorph.

example:

<authorweblink>http://bit.ly/8V5CLL</authorweblink>

phone

<phone></phone>

This is where you place the phone you have tested it on, or the version of Android that you have tested it on if it will work on multiple phones.

examples:

<phone>2.1</phone>

<phone>Nexus One</phone>

rom

<rom></rom>

This is where you place the ROM and ROM version or any other requirements necessary for your morph to work.

examples:

<rom>CM 5.0.5.3</rom>

<rom>2.1 with hdpi used</rom>

themedescription

<themedescription></themedescription>

This is where you place a BRIEF description of what your morph changes overall.

example:

<themedescription>Makes phone sexeh!!</themedescription>

Location of files

This is the last part of the .xml file and tells MetaMorph what to change and the location of what is changing or being pushed to the phone.

ALWAYS, ALWAYS, ALWAYS Place framework-res.apk as the last item in your .xml file.

Pushing framework-res.apk on certain ROMs can cause a reboot, so it needs to placed as the last item in your .xml file, so that the entire morph can be applied.

<item></item>
<path></path>
<description></description>

Now to break this part of the .xml file down.

item

<item></item>

This is where you place the name .apk/.jar that you are modifying.

The name that you place in between the tags MUST BE THE EXACT SAME AS THE NAME IT HAS ON THE PHONE no exceptions.

examples:

<item>Laucher2.apk</item>

<item>DeskClock.apk</item>

<item>services.jar</item>

<item>framework-res.apk</item>

path

<path></path>

This the path that MetaMorph pulls/pushes the .apk/.jar from the phone to modify it. It must be the exact same location as it resides on the phone.

examples:

<path>/system/app/</path>

<path>/system/framework/</path>

description

<description></description>

You can place a small description of what is changed in the .apk/.jar here.

examples:

<description>Makes analog clock widget stock green</description>

<description>Changes the text to white</description>

Completed Example .xml file

<?xml version="1.0"?>

<themename>Stock Analog Clock Widget</themename>
<themeversion>1.0</themeversion>
<screenshot>clock</screenshot>
<author>david1171</author>
<authorweblink>http://bit.ly/8V5CLL</authorweblink>
<phone>Any with DeskClock.apk and hdpi</phone>
<rom>Any with DeskClock.apk and hdpi</rom>
<themedescription>Changes the analog clock widget back to stock green.</themedescription>

<item>DeskClock.apk</item>
<path>/system/app/</path>
<description>Reverts to stock green colors.</description>

Questions

Q.Can I make a morph compatible with the .thm and .xml version of MetaMorph?

A.You should be able to, just include the .thm file and the .xml file in the morph.

Q.How can I make .xml files in Windows?

A.I use PSPad to make my .xml files. To make one, open PSPad, go to File, New file..., then scroll down to XML and select it. Once that is done, then you can go about filling the .xml file with your information. I do not know about other operating systems as I primarily use Windows. :rolleyes:Yeah, I know you're telling me to sit and spin right now:rolleyes: