[Android Software Development] oSandmaNo:
Ok I found it.

Now I cant find the framework-res in the miui system/frameworks folder.

Are we supposed to decompile the files from MIUI or the base rom?

EDIT:

I took the ones from the base rom and now I have this:

cp .build/services.jar .build/ZIP/system/framework/services.jar
cp .build/android.policy.jar .build/ZIP/system/framework/android.policy.jar
cp .build/framework.jar .build/ZIP/system/framework/framework.jar
build .build/Phone.apk...
--------------------------------------------
cp -r Phone .build
/home/nick/patchrom/tools/apktool b .build/Phone .build/Phone.apk
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
/home/nick/patchrom/mb526/.build/Phone/res/values-da/strings.xml:200: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
/home/nick/patchrom/mb526/.build/Phone/res/values-da/strings.xml:201: error: Unexpected end tag string
/home/nick/patchrom/mb526/.build/Phone/res/values-es/strings.xml:204: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
/home/nick/patchrom/mb526/.build/Phone/res/values-es/strings.xml:205: error: Unexpected end tag string
/home/nick/patchrom/mb526/.build/Phone/res/values-fi/strings.xml:200: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
/home/nick/patchrom/mb526/.build/Phone/res/values-fi/strings.xml:201: error: Unexpected end tag string
/home/nick/patchrom/mb526/.build/Phone/res/values-it/strings.xml:203: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
/home/nick/patchrom/mb526/.build/Phone/res/values-it/strings.xml:204: error: Unexpected end tag string
/home/nick/patchrom/mb526/.build/Phone/res/values-lv/strings.xml:205: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
/home/nick/patchrom/mb526/.build/Phone/res/values-lv/strings.xml:206: error: Unexpected end tag string
/home/nick/patchrom/mb526/.build/Phone/res/values-nb/strings.xml:200: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
/home/nick/patchrom/mb526/.build/Phone/res/values-nb/strings.xml:201: error: Unexpected end tag string
/home/nick/patchrom/mb526/.build/Phone/res/values-ru/strings.xml:208: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
/home/nick/patchrom/mb526/.build/Phone/res/values-ru/strings.xml:209: error: Unexpected end tag string
/home/nick/patchrom/mb526/.build/Phone/res/values-sv/strings.xml:203: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
/home/nick/patchrom/mb526/.build/Phone/res/values-sv/strings.xml:204: error: Unexpected end tag string
/home/nick/patchrom/mb526/.build/Phone/res/values-zh-rTW/strings.xml:205: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
/home/nick/patchrom/mb526/.build/Phone/res/values-zh-rTW/strings.xml:205: error: Unexpected end tag string
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL6921232571825378223.tmp, -I, /home/nick/apktool/framework/1.apk, -S, /home/nick/patchrom/mb526/.build/Phone/res, -M, /home/nick/patchrom/mb526/.build/Phone/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
at brut.androlib.Androlib.buildResources(Androlib.java:248)
at brut.androlib.Androlib.build(Androlib.java:171)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL6921232571825378223.tmp, -I, /home/nick/apktool/framework/1.apk, -S, /home/nick/patchrom/mb526/.build/Phone/res, -M, /home/nick/patchrom/mb526/.build/Phone/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
make: *** [.build/Phone.apk] Error 1
nick@nick-laptop:~/patchrom/mb526$

Im porting from CM7.2

EDIT 2:

Im getting this exact same error when i try to build for the sample i9100