[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] RivaultUser:
I'm recently trying to edit my framework with this mod

http://xdaforums.com/show....php?t=1916094

Well actually the steps in that thread are very simple, but since I'm trying to apply that to my Xperia Ray so it must have slightly different steps

What I want to ask :

- In framework/res, I found drawable-.........( mdpi,hdmpi,ldpi,etc.). If I'm going to replace the .9png's picture in there, should I make the picture as same as the original picture dimension? I'm using Dev-Drawable app in the Play Store ( it makes picture to drawable- hdpi,mdpi,etc. ), the result of using it is it gives me the mdpi version of the picture but with different dimesion from the original picture.

- I found errors and it says that I have errors in the /res/values/public.xml

I found this :

Code:

Don't do that! I think I should explain the purpose of public.xml file in the project wiki, because many people are confused. Note that you don't need this file when you build an apk from sources and apktool building mechanisms are very similar, so guess what: you could remove this file from decoded application and apktool will rebuild it without any problems. I had a reason why to generate public.xml - it's a feature, not a bug!

Well, the reason is: there may be references to resources in the application code. If resources ids will change after build, then code will reference different resources than in original apk. public.xml file gives us sureness that resources will get same ids after build - it's the only one reason to use this file. And you want to manually modify these ids

Adding or removing new resources is somewhat tricky. Yeah, I should write about that in the wiki.

You could remove any line from public.xml (even making a "hole" in the ids) at any moment, but you must be sure, that resource isn't referenced in the code.

There is never much sense in modifying ids in public.xml, because then modified lines lose their purpose.

If you want to add new resources, e.g. drawables and use them in the XML files you don't have to change anything in the public.xml file.

If you want to add new resources and use them in your code, then you have to add them into public.xml, because you need to reference them somehow. Or you could use Resources.getIdentifier() method, but this is ugly.

And now the most tricky part: if you want to remove some resources, you have to remove info about them from public.xml as well. So first you have to be sure that they aren't referenced in the code. But there is also this "hole" problem, so:

If these resources are at the end of ids stack, then there is no problem.

If resources are near the end of ids stack and you are sure, that all resources after them aren't referenced in the code as well, then you could just remove them all. Actually you have did virtually the same, cause after modifying ids you made these lines totally useless, you broke them, so you could just remove them.

If you want to remove some resources, but add same or greater quantity of new ones (of the same type), then there is no problem - new resources will automatically fill in "holes" in ids. You don't have to add them to public.xml .

If none of above conditions are met, then you have holes and you have to fill them by something. But you don't have to add "useless .pngs" - just add:

Code:

<item type="drawable" name="DUMMY1" />

<item type="drawable" name="DUMMY2" />

<item type="drawable" name="DUMMY3" />

...

Like above, you don't have to add these resources to the public.xml .

And because I'm a newbie I don't really get what that mean. So I just delete the files that I'm going to replace and I can re-compile the framework, but I got bootloop, LOL.

I confused about :

1."You could remove any line from public.xml (even making a "hole" in the ids) at any moment, but you must be sure, that resource isn't referenced in the code."

What are the "holes" and " referenced in the code" mean?

2. Because I want to add .png's picture to the drawable-mdpi folder, Do I need to add dummies to the public.xml ?

3. I'm using the tricky signing method ( open archive in the original framework, copy meta-inf & android manifest and replace those files to the modded framework). Is this cause me an error?

Help me mateee