[Desire Android Development] v1r0x:
hello all,

I'm working on a miui port for desire z and need/want to change some values in the framework-res.

The decompile works fine, but recompile give me some errors.

At first I've used a zip with aapt.exe, apktool.jar and apktool.bat which gave me no errors but a bootloop...

After that I've used the xdaAutoTool, but got errors.

I've tried many solutions (add aapt to the path [create a new variable. I don't really understand those variables in windows. Maybe it was wrong], updated the SDK, etc.) but nothing worked for me.

Here my log output:

-----------------------------------------------------
[*] framework-res.apk
-----------------------------------------------------
Recompiling framework-res.apk folder...
W: Could not find sources
I: Building resources...
invalid resource directory name: C:\Android\Modding\Tools\xdaAutoTool\_INPUT_APK\framework-res\res/drawable-sw600dp-hdpi
invalid resource directory name: C:\Android\Modding\Tools\xdaAutoTool\_INPUT_APK\framework-res\res/layout-sw600dp
invalid resource directory name: C:\Android\Modding\Tools\xdaAutoTool\_INPUT_APK\framework-res\res/layout-w600dp
invalid resource directory name: C:\Android\Modding\Tools\xdaAutoTool\_INPUT_APK\framework-res\res/values-h720dp
invalid resource directory name: C:\Android\Modding\Tools\xdaAutoTool\_INPUT_APK\framework-res\res/values-sw600dp
invalid resource directory name: C:\Android\Modding\Tools\xdaAutoTool\_INPUT_APK\framework-res\res/values-sw600dp-land
invalid resource directory name: C:\Android\Modding\Tools\xdaAutoTool\_INPUT_APK\framework-res\res/values-sw600dp-w1024dp
invalid resource directory name: C:\Android\Modding\Tools\xdaAutoTool\_INPUT_APK\framework-res\res/values-sw600dp-w1280dp
invalid resource directory name: C:\Android\Modding\Tools\xdaAutoTool\_INPUT_APK\framework-res\res/values-w360dp
invalid resource directory name: C:\Android\Modding\Tools\xdaAutoTool\_INPUT_APK\framework-res\res/values-w480dp
invalid resource directory name: C:\Android\Modding\Tools\xdaAutoTool\_INPUT_APK\framework-res\res/values-w500dp
invalid resource directory name: C:\Android\Modding\Tools\xdaAutoTool\_INPUT_APK\framework-res\res/values-w600dp
invalid resource directory name: C:\Android\Modding\Tools\xdaAutoTool\_INPUT_APK\framework-res\res/values-w720dp
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\v1r0x\AppData\Local\Temp\APKTOOL1877504210269495695.tmp, -x, -S, C:\Android\Modding\Tools\xdaAutoTool\_INPUT_APK\framework-res\res, -M, C:\Android\Modding\Tools\xdaAutoTool\_INPUT_APK\framework-res\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, C:\Users\v1r0x\AppData\Local\Temp\APKTOOL1877504210269495695.tmp, -x, -S, C:\Android\Modding\Tools\xdaAutoTool\_INPUT_APK\framework-res\res, -M, C:\Android\Modding\Tools\xdaAutoTool\_INPUT_APK\framework-res\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
Done!

hope someone have a solution

Edit: Ok, I have found the problem. Found another apktool.jar for decompile and only replaced the resources.arsc in the stock framework-res.apk with the one from the "build" folder. Everything works fine :)