Hey there,
I recently started modding the stock 4.2.1 Gmail app to make it inverted with red accents and I'm running into errors when trying to compile. The only changes I've made were on /res/values/colors.xml (changing color hex values only, standard stuff). I'm using APK multitools, have my framework in proper dir, using option 12 (compile non-system APK)...
Running custom TouchWiz 4.1.1 ROM on Galaxy S3 T999
Here are the logs:
--------------------------------------------------------------------------
|2013-03-01 -- 15:23:15.81|
--------------------------------------------------------------------------
java version "1.7.0_15"
Java(TM) SE Runtime Environment (build 1.7.0_15-b03)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
C:\Android\adt-bundle-windows-x86_64-20130219\other\..\projects\com.google.andro
id.gm-1.apk\res\xml\gmail_widget_info.xml:2: error: No resource identifier found
for attribute 'widgetCategory' in package 'android'
C:\Android\adt-bundle-windows-x86_64-20130219\other\..\projects\com.google.andro
id.gm-1.apk\res\xml-sw600dp\gmail_widget_info.xml:2: error: No resource identifi
er found for attribute 'widgetCategory' in package 'android'
C:\Android\adt-bundle-windows-x86_64-20130219\other\..\projects\com.google.andro
id.gm-1.apk\res\xml\widget_info.xml:2: error: No resource identifier found for a
ttribute 'widgetCategory' in package 'android'
C:\Android\adt-bundle-windows-x86_64-20130219\other\..\projects\com.google.andro
id.gm-1.apk\res\xml-sw600dp\widget_info.xml:2: error: No resource identifier fou
nd for attribute 'widgetCategory' in package 'android'
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.Androl
ibException: brut.common.BrutException: could not exec command: [aapt, p, --min-
sdk-version, 14, --target-sdk-version, 17, -F, C:\Users\Pascal\AppData\Local\Tem
p\APKTOOL8546294447776939075.tmp, -0, arsc, -I, C:\Users\Pascal\apktool\framewor
k\1.apk, -S, C:\Android\adt-bundle-windows-x86_64-20130219\other\..\projects\com
.google.android.gm-1.apk\res, -M, C:\Android\adt-bundle-windows-x86_64-20130219\
other\..\projects\com.google.android.gm-1.apk\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:358)
at brut.androlib.Androlib.buildResources(Androlib.java:283)
at brut.androlib.Androlib.build(Androlib.java:206)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:228)
at brut.apktool.Main.main(Main.java:79)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not
exec command: [aapt, p, --min-sdk-version, 14, --target-sdk-version, 17, -F, C:
\Users\Pascal\AppData\Local\Temp\APKTOOL8546294447776939075.tmp, -0, arsc, -I, C
:\Users\Pascal\apktool\framework\1.apk, -S, C:\Android\adt-bundle-windows-x86_64
-20130219\other\..\projects\com.google.android.gm-1.apk\res, -M, C:\Android\adt-
bundle-windows-x86_64-20130219\other\..\projects\com.google.android.gm-1.apk\And
roidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:357)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:336)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sd
k-version, 14, --target-sdk-version, 17, -F, C:\Users\Pascal\AppData\Local\Temp\
APKTOOL8546294447776939075.tmp, -0, arsc, -I, C:\Users\Pascal\apktool\framework\
1.apk, -S, C:\Android\adt-bundle-windows-x86_64-20130219\other\..\projects\com.g
oogle.android.gm-1.apk\res, -M, C:\Android\adt-bundle-windows-x86_64-20130219\ot
her\..\projects\com.google.android.gm-1.apk\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:355)
... 6 more
Press any key to continue . . .
Anybody knows what could be going on here? Thanks!
EDIT: for each of the problematic XML files, the attribute 'widgetCategory' has a value of 0x3...would that be normal?? Would I need a 4.2.1 framework to compile this 4.2.1 Gmail apk (don't think this would necessarily make sense...)?
Found problem to this issue!
Solution was to remove lines for attribute 'widgetCategory' for:
\res\xml\gmail_widget_info.xml
\res\xml-sw600dp\gmail_widget_info.xml
res\xml\widget_info.xml
\res\xml-sw600dp\widget_info.xml
Recompiled without any errors, couldn't find any impact on functionality!
Hi,
I am trying to translate the ROM MIUI in French for my personal use, but I'm having problems when I rebuild an apk using ApkTool.
I've downloaded MIUI from here : en.miui.com/thread-2651-1-1.html for my Huawei Honor2 U9508
I've redownloaded ApkTool from Google Code several time and reinstall Java. I also run CMD as an administrator.
I've tried to decompiled several MIUI apk like Backup.apk, Contact.apk, DesClock.apk... But I always get the same error.
Also I hadn't touch or add anything in the apk.
Here is what I get on CMD :
Code:
Microsoft Windows [version 6.2.9200]
(c) 2012 Microsoft Corporation. Tous droits réservés.
C:\Windows\system32>cd C:\Apktool\
C:\Apktool>apktool if framework-res.apk
I: Framework installed to: C:\Users\Thomas\apktool\framework\1.apk
C:\Apktool>apktool if framework-miui-res.apk
I: Framework installed to: C:\Users\Thomas\apktool\framework\6.apk
C:\Apktool>apktool d Backup.apk
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\Thomas\apktool\framework\1.apk
I: Loaded.
I: Loading resource table from file: C:\Users\Thomas\apktool\framework\6.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 Backup C:\Apktool\Compile\Backup.apk
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: C:\Apktool\Backup\res/values-largeui
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.Androl
ibException: brut.common.BrutException: could not exec command: [aapt, p, --min-
sdk-version, 16, --target-sdk-version, 16, -F, C:\Users\Thomas\AppData\Local\Tem
p\APKTOOL6764776722780995012.tmp, -0, arsc, -I, C:\Users\Thomas\apktool\framewor
k\1.apk, -I, C:\Users\Thomas\apktool\framework\6.apk, -S, C:\Apktool\Backup\res,
-M, C:\Apktool\Backup\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:358)
at brut.androlib.Androlib.buildResources(Androlib.java:283)
at brut.androlib.Androlib.build(Androlib.java:206)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:228)
at brut.apktool.Main.main(Main.java:79)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not
exec command: [aapt, p, --min-sdk-version, 16, --target-sdk-version, 16, -F, C:
\Users\Thomas\AppData\Local\Temp\APKTOOL6764776722780995012.tmp, -0, arsc, -I, C
:\Users\Thomas\apktool\framework\1.apk, -I, C:\Users\Thomas\apktool\framework\6.
apk, -S, C:\Apktool\Backup\res, -M, C:\Apktool\Backup\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:357)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:336)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sd
k-version, 16, --target-sdk-version, 16, -F, C:\Users\Thomas\AppData\Local\Temp\
APKTOOL6764776722780995012.tmp, -0, arsc, -I, C:\Users\Thomas\apktool\framework\
1.apk, -I, C:\Users\Thomas\apktool\framework\6.apk, -S, C:\Apktool\Backup\res, -
M, C:\Apktool\Backup\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:355)
... 6 more
C:\Apktool>
Can anyone help my with those errors ?
Thanks,
MrSawler
MrSawler said:
Hi,
I am trying to translate the ROM MIUI in French for my personal use, but I'm having problems when I rebuild an apk using ApkTool.
I've downloaded MIUI from here : en.miui.com/thread-2651-1-1.html for my Huawei Honor2 U9508
I've redownloaded ApkTool from Google Code several time and reinstall Java. I also run CMD as an administrator.
I've tried to decompiled several MIUI apk like Backup.apk, Contact.apk, DesClock.apk... But I always get the same error.
Also I hadn't touch or add anything in the apk.
Here is what I get on CMD :
Code:
invalid resource directory name: C:\Apktool\Backup\res/values-largeui
Can anyone help my with those errors ?
Thanks,
MrSawler
Click to expand...
Click to collapse
It's really only one error. Apktool hasn't heard of the values-largeui folder. Try deleting that folder and trying again.
That should work. If it turns out you need that folder for the app to work..well, then you're in trouble.
Sent from my SK17i using XDA Premium 4 mobile app
Ticklefish said:
It's really only one error. Apktool hasn't heard of the values-largeui folder. Try deleting that folder and trying again.
That should work. If it turns out you need that folder for the app to work..well, then you're in trouble.
Sent from my SK17i using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Hi,
Thanks for the answer. I've juste deleted the folder but I'm having a new error :
Microsoft Windows [version 6.2.9200]
(c) 2012 Microsoft Corporation. Tous droits réservés.
C:\Windows\system32>cd C:\Apktool\
C:\Apktool>apktool b Backup C:\Apktool\Compile\Backup.apk
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
C:\Apktool\Backup\res\values\public.xml:60: error: Public symbol bool/miui_font_
scale_switch declared here is not defined.
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.Androl
ibException: brut.common.BrutException: could not exec command: [aapt, p, --min-
sdk-version, 16, --target-sdk-version, 16, -F, C:\Users\Thomas\AppData\Local\Tem
p\APKTOOL55933037199130517.tmp, -0, arsc, -I, C:\Users\Thomas\apktool\framework\
1.apk, -I, C:\Users\Thomas\apktool\framework\6.apk, -S, C:\Apktool\Backup\res, -
M, C:\Apktool\Backup\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:358)
at brut.androlib.Androlib.buildResources(Androlib.java:283)
at brut.androlib.Androlib.build(Androlib.java:206)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:228)
at brut.apktool.Main.main(Main.java:79)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not
exec command: [aapt, p, --min-sdk-version, 16, --target-sdk-version, 16, -F, C:
\Users\Thomas\AppData\Local\Temp\APKTOOL55933037199130517.tmp, -0, arsc, -I, C:\
Users\Thomas\apktool\framework\1.apk, -I, C:\Users\Thomas\apktool\framework\6.ap
k, -S, C:\Apktool\Backup\res, -M, C:\Apktool\Backup\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:357)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:336)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sd
k-version, 16, --target-sdk-version, 16, -F, C:\Users\Thomas\AppData\Local\Temp\
APKTOOL55933037199130517.tmp, -0, arsc, -I, C:\Users\Thomas\apktool\framework\1.
apk, -I, C:\Users\Thomas\apktool\framework\6.apk, -S, C:\Apktool\Backup\res, -M,
C:\Apktool\Backup\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:355)
... 6 more
C:\Apktool>
Click to expand...
Click to collapse
And when I delete the line in public.xml, I'm getting another error :
C:\Apktool>apktool b Backup C:\Apktool\Compile\Backup.apk
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.Androl
ibException: brut.common.BrutException: could not exec command: [aapt, p, --min-
sdk-version, 16, --target-sdk-version, 16, -F, C:\Users\Thomas\AppData\Local\Tem
p\APKTOOL4253075425418164642.tmp, -0, arsc, -I, C:\Users\Thomas\apktool\framewor
k\1.apk, -I, C:\Users\Thomas\apktool\framework\6.apk, -S, C:\Apktool\Backup\res,
-M, C:\Apktool\Backup\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:358)
at brut.androlib.Androlib.buildResources(Androlib.java:283)
at brut.androlib.Androlib.build(Androlib.java:206)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:228)
at brut.apktool.Main.main(Main.java:79)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not
exec command: [aapt, p, --min-sdk-version, 16, --target-sdk-version, 16, -F, C:
\Users\Thomas\AppData\Local\Temp\APKTOOL4253075425418164642.tmp, -0, arsc, -I, C
:\Users\Thomas\apktool\framework\1.apk, -I, C:\Users\Thomas\apktool\framework\6.
apk, -S, C:\Apktool\Backup\res, -M, C:\Apktool\Backup\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:357)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:336)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sd
k-version, 16, --target-sdk-version, 16, -F, C:\Users\Thomas\AppData\Local\Temp\
APKTOOL4253075425418164642.tmp, -0, arsc, -I, C:\Users\Thomas\apktool\framework\
1.apk, -I, C:\Users\Thomas\apktool\framework\6.apk, -S, C:\Apktool\Backup\res, -
M, C:\Apktool\Backup\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:355)
... 6 more
C:\Apktool>
Click to expand...
Click to collapse
MrSawler said:
Hi,
I am trying to translate the ROM MIUI in French for my personal use, but I'm having problems when I rebuild an apk using ApkTool.
I've downloaded MIUI from here : en.miui.com/thread-2651-1-1.html for my Huawei Honor2 U9508
I've redownloaded ApkTool from Google Code several time and reinstall Java. I also run CMD as an administrator.
I've tried to decompiled several MIUI apk like Backup.apk, Contact.apk, DesClock.apk... But I always get the same error.
Also I hadn't touch or add anything in the apk.
Here is what I get on CMD :
Code:
Microsoft Windows [version 6.2.9200]
(c) 2012 Microsoft Corporation. Tous droits réservés.
C:\Windows\system32>cd C:\Apktool\
C:\Apktool>apktool if framework-res.apk
I: Framework installed to: C:\Users\Thomas\apktool\framework\1.apk
C:\Apktool>apktool if framework-miui-res.apk
I: Framework installed to: C:\Users\Thomas\apktool\framework\6.apk
C:\Apktool>apktool d Backup.apk
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\Thomas\apktool\framework\1.apk
I: Loaded.
I: Loading resource table from file: C:\Users\Thomas\apktool\framework\6.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 Backup C:\Apktool\Compile\Backup.apk
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: C:\Apktool\Backup\res/values-largeui
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.Androl
ibException: brut.common.BrutException: could not exec command: [aapt, p, --min-
sdk-version, 16, --target-sdk-version, 16, -F, C:\Users\Thomas\AppData\Local\Tem
p\APKTOOL6764776722780995012.tmp, -0, arsc, -I, C:\Users\Thomas\apktool\framewor
k\1.apk, -I, C:\Users\Thomas\apktool\framework\6.apk, -S, C:\Apktool\Backup\res,
-M, C:\Apktool\Backup\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:358)
at brut.androlib.Androlib.buildResources(Androlib.java:283)
at brut.androlib.Androlib.build(Androlib.java:206)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:228)
at brut.apktool.Main.main(Main.java:79)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not
exec command: [aapt, p, --min-sdk-version, 16, --target-sdk-version, 16, -F, C:
\Users\Thomas\AppData\Local\Temp\APKTOOL6764776722780995012.tmp, -0, arsc, -I, C
:\Users\Thomas\apktool\framework\1.apk, -I, C:\Users\Thomas\apktool\framework\6.
apk, -S, C:\Apktool\Backup\res, -M, C:\Apktool\Backup\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:357)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:336)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sd
k-version, 16, --target-sdk-version, 16, -F, C:\Users\Thomas\AppData\Local\Temp\
APKTOOL6764776722780995012.tmp, -0, arsc, -I, C:\Users\Thomas\apktool\framework\
1.apk, -I, C:\Users\Thomas\apktool\framework\6.apk, -S, C:\Apktool\Backup\res, -
M, C:\Apktool\Backup\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:355)
... 6 more
C:\Apktool>
Can anyone help my with those errors ?
Thanks,
MrSawler
Click to expand...
Click to collapse
Hi Bro For Miui apk its require special miui apktool
download the miui apktool from here
MrSawler said:
Hi,
I am trying to translate the ROM MIUI in French for my personal use, but I'm having problems when I rebuild an apk using ApkTool.
I've downloaded MIUI from here : en.miui.com/thread-2651-1-1.html for my Huawei Honor2 U9508
I've redownloaded ApkTool from Google Code several time and reinstall Java. I also run CMD as an administrator.
I've tried to decompiled several MIUI apk like Backup.apk, Contact.apk, DesClock.apk... But I always get the same error.
Also I hadn't touch or add anything in the apk.
Here is what I get on CMD :
Code:
Microsoft Windows [version 6.2.9200]
(c) 2012 Microsoft Corporation. Tous droits réservés.
C:\Windows\system32>cd C:\Apktool\
C:\Apktool>apktool if framework-res.apk
I: Framework installed to: C:\Users\Thomas\apktool\framework\1.apk
C:\Apktool>apktool if framework-miui-res.apk
I: Framework installed to: C:\Users\Thomas\apktool\framework\6.apk
C:\Apktool>apktool d Backup.apk
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\Thomas\apktool\framework\1.apk
I: Loaded.
I: Loading resource table from file: C:\Users\Thomas\apktool\framework\6.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 Backup C:\Apktool\Compile\Backup.apk
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: C:\Apktool\Backup\res/values-largeui
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.Androl
ibException: brut.common.BrutException: could not exec command: [aapt, p, --min-
sdk-version, 16, --target-sdk-version, 16, -F, C:\Users\Thomas\AppData\Local\Tem
p\APKTOOL6764776722780995012.tmp, -0, arsc, -I, C:\Users\Thomas\apktool\framewor
k\1.apk, -I, C:\Users\Thomas\apktool\framework\6.apk, -S, C:\Apktool\Backup\res,
-M, C:\Apktool\Backup\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:358)
at brut.androlib.Androlib.buildResources(Androlib.java:283)
at brut.androlib.Androlib.build(Androlib.java:206)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:228)
at brut.apktool.Main.main(Main.java:79)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not
exec command: [aapt, p, --min-sdk-version, 16, --target-sdk-version, 16, -F, C:
\Users\Thomas\AppData\Local\Temp\APKTOOL6764776722780995012.tmp, -0, arsc, -I, C
:\Users\Thomas\apktool\framework\1.apk, -I, C:\Users\Thomas\apktool\framework\6.
apk, -S, C:\Apktool\Backup\res, -M, C:\Apktool\Backup\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:357)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:336)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sd
k-version, 16, --target-sdk-version, 16, -F, C:\Users\Thomas\AppData\Local\Temp\
APKTOOL6764776722780995012.tmp, -0, arsc, -I, C:\Users\Thomas\apktool\framework\
1.apk, -I, C:\Users\Thomas\apktool\framework\6.apk, -S, C:\Apktool\Backup\res, -
M, C:\Apktool\Backup\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:355)
... 6 more
C:\Apktool>
Can anyone help my with those errors ?
Thanks,
MrSawler
Click to expand...
Click to collapse
Don't delete that folder, invalid resource directory errors are often due to old aapt. Make sure you are using latest aapt.
Sent from my Sony Xperia L (C2104) using Tapatalk 4 beta
Hi,
khan_frd2002 said:
Hi Bro For Miui apk its require special miui apktool
download the miui apktool from here
Click to expand...
Click to collapse
Thanks for the link, it work now, I have no more error, thanks !
varun.chitre15 said:
Don't delete that folder, invalid resource directory errors are often due to old aapt. Make sure you are using latest aapt.
Sent from my Sony Xperia L (C2104) using Tapatalk 4 beta
Click to expand...
Click to collapse
Do you know where I can only download appt ? Do I have to download the whole SDK ? Because my internet connection is a little bit slow...
MrSawler said:
Hi,
Thanks for the link, it work now, I have no more error, thanks !
Do you know where I can only download appt ? Do I have to download the whole SDK ? Because my internet connection is a little bit slow...
Click to expand...
Click to collapse
you cant get the latest apktool and appt from here
http://forum.xda-developers.com/showthread.php?t=1755243
khan_frd2002 said:
you cant get the latest apktool and appt from here
http://forum.xda-developers.com/showthread.php?t=1755243
Click to expand...
Click to collapse
Hi,
Thanks for the link, but that was where I've download Apktool and aapt, so they where not out of date.
But your MIUI Apktool seems to be working, so I will juste use it instead. But is it possible to make the same for Linux ? I would like to use it with Debian too.
Thanks,
MrSawler
Hello to all!
I have a problem with recompiling an apk. Given that the apk is a free program, in practice i decompile the apk (with apktool), I make the changes (in particular, a few tweaks to the Italian translation of the app that often is not complete), but when I go to recompile everything I have these errors:
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
E:\Documenti\Download\Francesco\apktool1.5.2\w\res\xml-v17\widget_info.xml:2: er
ror: No resource identifier found for attribute 'widgetCategory' in package 'android'
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.Androl
ibException: brut.common.BrutException: could not exec command: [aapt, p, --min-
sdk-version, 7, --target-sdk-version, 17, -F, C:\DOCUME~1\FRANCE~1\IMPOST~1\Temp
\APKTOOL5497585975401121507.tmp, -0, arsc, -I, C:\Documents and Settings\Frances
co\apktool\framework\1.apk, -S, E:\Documenti\Download\Francesco\apktool1.5.2\w\r
es, -M, E:\Documenti\Download\Francesco\apktool1.5.2\w\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:358)
at brut.androlib.Androlib.buildResources(Androlib.java:283)
at brut.androlib.Androlib.build(Androlib.java:206)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:228)
at brut.apktool.Main.main(Main.java:79)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not
exec command: [aapt, p, --min-sdk-version, 7, --target-sdk-version, 17, -F, C:\
DOCUME~1\FRANCE~1\IMPOST~1\Temp\APKTOOL5497585975401121507.tmp, -0, arsc, -I, C:
\Documents and Settings\Francesco\apktool\framework\1.apk, -S, E:\Documenti\Down
load\Francesco\apktool1.5.2\w\res, -M, E:\Documenti\Download\Francesco\apktool1.
5.2\w\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:357)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:336)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sd
k-version, 7, --target-sdk-version, 17, -F, C:\DOCUME~1\FRANCE~1\IMPOST~1\Temp\A
PKTOOL5497585975401121507.tmp, -0, arsc, -I, C:\Documents and Settings\Francesco
\apktool\framework\1.apk, -S, E:\Documenti\Download\Francesco\apktool1.5.2\w\res
, -M, E:\Documenti\Download\Francesco\apktool1.5.2\w\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:355)
... 6 more
But I do not understand what they mean. The strange thing is that if i decompile the apk and recompile without changes anythings, it gives me the same errors.
Any suggestions?
Sorry for my bad english!
Ciccio0184 said:
Hello to all!
I have a problem with recompiling an apk. Given that the apk is a free program, in practice i decompile the apk (with apktool), I make the changes (in particular, a few tweaks to the Italian translation of the app that often is not complete), but when I go to recompile everything I have these errors:
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
E:\Documenti\Download\Francesco\apktool1.5.2\w\res\xml-v17\widget_info.xml:2: er
ror: No resource identifier found for attribute 'widgetCategory' in package 'android'
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.Androl
ibException: brut.common.BrutException: could not exec command: [aapt, p, --min-
sdk-version, 7, --target-sdk-version, 17, -F, C:\DOCUME~1\FRANCE~1\IMPOST~1\Temp
\APKTOOL5497585975401121507.tmp, -0, arsc, -I, C:\Documents and Settings\Frances
co\apktool\framework\1.apk, -S, E:\Documenti\Download\Francesco\apktool1.5.2\w\r
es, -M, E:\Documenti\Download\Francesco\apktool1.5.2\w\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:358)
at brut.androlib.Androlib.buildResources(Androlib.java:283)
at brut.androlib.Androlib.build(Androlib.java:206)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:228)
at brut.apktool.Main.main(Main.java:79)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not
exec command: [aapt, p, --min-sdk-version, 7, --target-sdk-version, 17, -F, C:\
DOCUME~1\FRANCE~1\IMPOST~1\Temp\APKTOOL5497585975401121507.tmp, -0, arsc, -I, C:
\Documents and Settings\Francesco\apktool\framework\1.apk, -S, E:\Documenti\Down
load\Francesco\apktool1.5.2\w\res, -M, E:\Documenti\Download\Francesco\apktool1.
5.2\w\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:357)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:336)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sd
k-version, 7, --target-sdk-version, 17, -F, C:\DOCUME~1\FRANCE~1\IMPOST~1\Temp\A
PKTOOL5497585975401121507.tmp, -0, arsc, -I, C:\Documents and Settings\Francesco
\apktool\framework\1.apk, -S, E:\Documenti\Download\Francesco\apktool1.5.2\w\res
, -M, E:\Documenti\Download\Francesco\apktool1.5.2\w\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:355)
... 6 more
But I do not understand what they mean. The strange thing is that if i decompile the apk and recompile without changes anythings, it gives me the same errors.
Any suggestions?
Sorry for my bad english!
Click to expand...
Click to collapse
Use Xplore filemanager for decompile & recompile, for sign apk use ZipSigner...
i am trying to theme Settings.apk of 4.4.2
following this Guide :- http://forum.xda-developers.com/showthread.php?t=2634743
getting this error help me please
HTML:
C:\apktool>apktool b settings settings1.apk
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.Androl
ibException: brut.common.BrutException: could not exec command: [aapt, p, --min-
sdk-version, 19, --target-sdk-version, 19, -F, C:\Users\WINDOW~1.1\AppData\Local
\Temp\APKTOOL2317997985529882154.tmp, -0, arsc, -I, C:\Users\Windows 8.1\apktool
\framework\1.apk, -S, C:\apktool\settings\res, -M, C:\apktool\settings\AndroidMa
nifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:358)
at brut.androlib.Androlib.buildResources(Androlib.java:283)
at brut.androlib.Androlib.build(Androlib.java:206)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:228)
at brut.apktool.Main.main(Main.java:79)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not
exec command: [aapt, p, --min-sdk-version, 19, --target-sdk-version, 19, -F, C:
\Users\WINDOW~1.1\AppData\Local\Temp\APKTOOL2317997985529882154.tmp, -0, arsc, -
I, C:\Users\Windows 8.1\apktool\framework\1.apk, -S, C:\apktool\settings\res, -M
, C:\apktool\settings\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:357)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:336)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sd
k-version, 19, --target-sdk-version, 19, -F, C:\Users\WINDOW~1.1\AppData\Local\T
emp\APKTOOL2317997985529882154.tmp, -0, arsc, -I, C:\Users\Windows 8.1\apktool\f
ramework\1.apk, -S, C:\apktool\settings\res, -M, C:\apktool\settings\AndroidMani
fest.xml]
at brut.util.OS.exec(OS.java:93)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:355)
... 6 more
Caused by: java.io.IOException: Cannot run program "aapt": CreateProcess error=2
, The system cannot find the file specified
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at brut.util.OS.exec(OS.java:84)
... 7 more
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find th
e file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 11 more
yog12 said:
i am trying to theme Settings.apk of 4.4.2
following this Guide :- http://forum.xda-developers.com/showthread.php?t=2634743
getting this error help me please
HTML:
C:\apktool>apktool b settings settings1.apk
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.Androl
ibException: brut.common.BrutException: could not exec command: [aapt, p, --min-
sdk-version, 19, --target-sdk-version, 19, -F, C:\Users\WINDOW~1.1\AppData\Local
\Temp\APKTOOL2317997985529882154.tmp, -0, arsc, -I, C:\Users\Windows 8.1\apktool
\framework\1.apk, -S, C:\apktool\settings\res, -M, C:\apktool\settings\AndroidMa
nifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:358)
at brut.androlib.Androlib.buildResources(Androlib.java:283)
at brut.androlib.Androlib.build(Androlib.java:206)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:228)
at brut.apktool.Main.main(Main.java:79)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not
exec command: [aapt, p, --min-sdk-version, 19, --target-sdk-version, 19, -F, C:
\Users\WINDOW~1.1\AppData\Local\Temp\APKTOOL2317997985529882154.tmp, -0, arsc, -
I, C:\Users\Windows 8.1\apktool\framework\1.apk, -S, C:\apktool\settings\res, -M
, C:\apktool\settings\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:357)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:336)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sd
k-version, 19, --target-sdk-version, 19, -F, C:\Users\WINDOW~1.1\AppData\Local\T
emp\APKTOOL2317997985529882154.tmp, -0, arsc, -I, C:\Users\Windows 8.1\apktool\f
ramework\1.apk, -S, C:\apktool\settings\res, -M, C:\apktool\settings\AndroidMani
fest.xml]
at brut.util.OS.exec(OS.java:93)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:355)
... 6 more
Caused by: java.io.IOException: Cannot run program "aapt": CreateProcess error=2
, The system cannot find the file specified
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at brut.util.OS.exec(OS.java:84)
... 7 more
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find th
e file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 11 more
Click to expand...
Click to collapse
Looks like you need to update your tools.. aapt to be specific.. But yeah I would try to download a newer version of apktool .. HERE
lacoursiere18 said:
Looks like you need to update your tools.. aapt to be specific.. But yeah I would try to download a newer version of apktool .. HERE
Click to expand...
Click to collapse
help
HTML:
I:\apktool>apktool b st sttt.apk
I: Using Apktool 2.0.0-RC2 on st
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
st\smali\android\support\v13\app\FragmentCompat$BaseFragmentCompatImpl.smali[35,
4] Error for input '.parameter': Invalid directive
st\smali\android\support\v13\app\FragmentCompat$BaseFragmentCompatImpl.smali[36,
4] Error for input '.parameter': Invalid directive
st\smali\android\support\v13\app\FragmentCompat$BaseFragmentCompatImpl.smali[35,
15] mismatched input '"f"' expecting END_METHOD_DIRECTIVE
st\smali\android\support\v13\app\FragmentCompat$BaseFragmentCompatImpl.smali[45,
4] Error for input '.parameter': Invalid directive
st\smali\android\support\v13\app\FragmentCompat$BaseFragmentCompatImpl.smali[46,
4] Error for input '.parameter': Invalid directive
st\smali\android\support\v13\app\FragmentCompat$BaseFragmentCompatImpl.smali[45,
15] mismatched input '"f"' expecting END_METHOD_DIRECTIVE
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file
: android/support/v13/app/FragmentCompat$BaseFragmentCompatImpl.smali
at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:71)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:55)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:41)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:358)
at brut.androlib.Androlib.buildSources(Androlib.java:298)
at brut.androlib.Androlib.build(Androlib.java:284)
at brut.androlib.Androlib.build(Androlib.java:258)
at brut.apktool.Main.cmdBuild(Main.java:240)
at brut.apktool.Main.main(Main.java:89)