C:\apktool>apktool if framework-res.apk
I: Framework installed to: C:\Users\AUSQ\apktool\framework\1.apk
C:\apktool>apktool d -f Gallery2.apk
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\AUSQ\apktool\framework\1.apk
I: Loaded.
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Done.
I: Copying assets and libs...
C:\apktool>apktool b Gallery2 newGallery2.apk
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
C:\apktool\Gallery2\res\values\styles.xml:148: error: Error retrieving parent for item: No resource found that matches t
he given name 'TextAppearance'.
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException:
could not exec command: [aapt, p, --min-sdk-version, 10, --target-sdk-version, 16, -F, C:\Users\AUSQ\AppData\Local\Temp\
APKTOOL7808385171331998377.tmp, -0, arsc, -I, C:\Users\AUSQ\apktool\framework\1.apk, -S, C:\apktool\Gallery2\res, -M, C:
\apktool\Gallery2\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:353)
at brut.androlib.Androlib.buildResources(Androlib.java:281)
at brut.androlib.Androlib.build(Androlib.java:209)
at brut.androlib.Androlib.build(Androlib.java:177)
at brut.apktool.Main.cmdBuild(Main.java:237)
at brut.apktool.Main.main(Main.java:79)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-versi
on, 10, --target-sdk-version, 16, -F, C:\Users\AUSQ\AppData\Local\Temp\APKTOOL7808385171331998377.tmp, -0, arsc, -I, C:\
Users\AUSQ\apktool\framework\1.apk, -S, C:\apktool\Gallery2\res, -M, C:\apktool\Gallery2\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:406)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:334)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 10, --target-sdk-version, 16,
-F, C:\Users\AUSQ\AppData\Local\Temp\APKTOOL7808385171331998377.tmp, -0, arsc, -I, C:\Users\AUSQ\apktool\framework\1.ap
k, -S, C:\apktool\Gallery2\res, -M, C:\apktool\Gallery2\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:404)
... 6 more
// try loading modified aapt manually
C:\apktool> apktool b --aapt C:\apktool\aapt.exe Gallery2 test.apk
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
C:\apktool\Gallery2\res\values\styles.xml:148: error: Error retrieving parent for item: No resource found that matches t
he given name 'TextAppearance'.
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException:
could not exec command: [C:\apktool\aapt.exe, p, --min-sdk-version, 10, --target-sdk-version, 16, -F, C:\Users\AUSQ\AppD
ata\Local\Temp\APKTOOL2712698154664871659.tmp, -0, arsc, -I, C:\Users\AUSQ\apktool\framework\1.apk, -S, C:\apktool\Galle
ry2\res, -M, C:\apktool\Gallery2\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:353)
at brut.androlib.Androlib.buildResources(Androlib.java:281)
at brut.androlib.Androlib.build(Androlib.java:209)
at brut.androlib.Androlib.build(Androlib.java:177)
at brut.apktool.Main.cmdBuild(Main.java:237)
at brut.apktool.Main.main(Main.java:79)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [C:\apktool\aapt.exe, p,
--min-sdk-version, 10, --target-sdk-version, 16, -F, C:\Users\AUSQ\AppData\Local\Temp\APKTOOL2712698154664871659.tmp, -0
, arsc, -I, C:\Users\AUSQ\apktool\framework\1.apk, -S, C:\apktool\Gallery2\res, -M, C:\apktool\Gallery2\AndroidManifest.
xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:406)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:334)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [C:\apktool\aapt.exe, p, --min-sdk-version, 10, --target-s
dk-version, 16, -F, C:\Users\AUSQ\AppData\Local\Temp\APKTOOL2712698154664871659.tmp, -0, arsc, -I, C:\Users\AUSQ\apktool
\framework\1.apk, -S, C:\apktool\Gallery2\res, -M, C:\apktool\Gallery2\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:404)
... 6 more