Error When Recompiling system APK


miuifan1

Members
Feb 22, 2012
14
13
Hi. I'm trying to edit sustem.apk (miui v4) using APK Manager v4.9. "elso apktool give me an error in recompiling"

I've managed to decompile it with no errors in the log.txt. But after I make the small change in just one XML file it givs me error ..
Can anyone tell me what the problem is?

even if I decompile and then recompile without changing anything, I still get the same error


Code:
I: Building apk file...
Could Not Find C:\Users\Acer\Desktop\dev\dev\place-apk-here-for-modding\../place-apk-here-for-modding/signedSettings.apk
Could Not Find C:\Users\Acer\Desktop\dev\dev\place-apk-here-for-modding\../place-apk-here-for-modding/unsignedSettings.apk
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\Acer\apktool\framework\1.apk
I: Loaded.
I: Loading resource table from file: C:\Users\Acer\apktool\framework\3.apk
I: Loaded.
I: Decoding file-resources...
W: Cant find 9patch chunk in file: "drawable-hdpi/miui_logo.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-en-hdpi/miui_logo.9.png". Renaming it to *.png.
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: C:\Users\Acer\Desktop\dev\dev\other\..\projects\Settings.apk\res/layout-h720dp
invalid resource directory name: C:\Users\Acer\Desktop\dev\dev\other\..\projects\Settings.apk\res/layout-sw600dp
invalid resource directory name: C:\Users\Acer\Desktop\dev\dev\other\..\projects\Settings.apk\res/layout-sw600dp-land
invalid resource directory name: C:\Users\Acer\Desktop\dev\dev\other\..\projects\Settings.apk\res/layout-sw720dp
invalid resource directory name: C:\Users\Acer\Desktop\dev\dev\other\..\projects\Settings.apk\res/layout-w720dp
invalid resource directory name: C:\Users\Acer\Desktop\dev\dev\other\..\projects\Settings.apk\res/values-sw600dp
invalid resource directory name: C:\Users\Acer\Desktop\dev\dev\other\..\projects\Settings.apk\res/values-sw600dp-land
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\Acer\AppData\Local\Temp\APKTOOL254599558858102368.tmp, -I, C:\Users\Acer\apktool\framework\1.apk, -I, C:\Users\Acer\apktool\framework\3.apk, -S, C:\Users\Acer\Desktop\dev\dev\other\..\projects\Settings.apk\res, -M, C:\Users\Acer\Desktop\dev\dev\other\..\projects\Settings.apk\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\Acer\AppData\Local\Temp\APKTOOL254599558858102368.tmp, -I, C:\Users\Acer\apktool\framework\1.apk, -I, C:\Users\Acer\apktool\framework\3.apk, -S, C:\Users\Acer\Desktop\dev\dev\other\..\projects\Settings.apk\res, -M, C:\Users\Acer\Desktop\dev\dev\other\..\projects\Settings.apk\AndroidManifest.xml]
    at brut.util.OS.exec(OS.java:83)
    at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
    ... 6 more


some time give me
Code:
The system cannot find the file specified.
at the end of erro


plz any help ?
mark:( ... or any one:(
 

This error usually means.
You need the new aapt.exe from the SDK platform-tools folder.
 
Can you post the E / W sections to our logcat.miuiandroid.com site please?
 
Make sure you decompile the file again, after you've downloaded the newest aapt, then you can recompile again. (Also given that you have correct PATH in environment variables)
Otherwise, it's a known issue with apktool 1.4.3, which breaks something in the source when decompiling. But for most people, the newest aapt works.
 
@1982strand
Can u plz give me the require tools such as aapt.exe or apktool that well help in decompile or recompile apk without error in zip file
Or any thing That what u think it will help fixing my issue
Thanx
 
@1982strand
Can u plz give me the require tools such as aapt.exe or apktool that well help in decompile or recompile apk without error in zip file
Or any thing That what u think it will help fixing my issue
Thanx

Android SDK latest :)
 
Mark android sdk will take too much time .. and I have only 3g network
So that why asked for only the the require tool that well help fixing my issue
Can u mark extract them for me plz