Please help me for decompile and recompile - Java for Android App Development

dear anyone can help me, please....
i am trying to decompile .apk using xdaAUTOTOOL v4.03,
following the instruction for decompile it 100% succes but i am facing a problem when try to recompile it,
below are the error message
-----------------------------------------------------
[*] Processing Abacus folder...
-----------------------------------------------------
Recompiling Abacus.apk...
I: Smaling...
I: Building resources...
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\johanes\AppData\Local\Temp\APKTOOL71941129915223021.tmp, -I, C:\Users\johanes\apktool\framework\1.apk, -S, C:\xdaAutoTool_V4.0.3\_INPUT_APK\Abacus\res, -M, C:\xdaAutoTool_V4.0.3\_INPUT_APK\Abacus\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(Unknown Source)
at brut.androlib.Androlib.buildResourcesFull(Unknown Source)
at brut.androlib.Androlib.buildResources(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.apktool.Main.cmdBuild(Unknown Source)
at brut.apktool.Main.main(Unknown Source)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\johanes\AppData\Local\Temp\APKTOOL71941129915223021.tmp, -I, C:\Users\johanes\apktool\framework\1.apk, -S, C:\xdaAutoTool_V4.0.3\_INPUT_APK\Abacus\res, -M, C:\xdaAutoTool_V4.0.3\_INPUT_APK\Abacus\AndroidManifest.xml]
at brut.util.OS.exec(Unknown Source)
... 7 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)
... 8 more
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the 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
and then
----------------------------------------------------
[*] Processing framework-res folder...
-----------------------------------------------------
Recompiling framework-res.apk...
W: Could not find sources
I: Building resources...
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\johanes\AppData\Local\Temp\APKTOOL2330454914228838825.tmp, -x, -S, C:\xdaAutoTool_V4.0.3\_INPUT_APK\framework-res\res, -M, C:\xdaAutoTool_V4.0.3\_INPUT_APK\framework-res\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(Unknown Source)
at brut.androlib.Androlib.buildResourcesFull(Unknown Source)
at brut.androlib.Androlib.buildResources(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.apktool.Main.cmdBuild(Unknown Source)
at brut.apktool.Main.main(Unknown Source)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\johanes\AppData\Local\Temp\APKTOOL2330454914228838825.tmp, -x, -S, C:\xdaAutoTool_V4.0.3\_INPUT_APK\framework-res\res, -M, C:\xdaAutoTool_V4.0.3\_INPUT_APK\framework-res\AndroidManifest.xml]
at brut.util.OS.exec(Unknown Source)
... 7 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)
... 8 more
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the 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
DONE!
Please help me to solve this problem

Related

(basic?) apktool help needed (linux)

Hi all,
I've been working on this problem for a while now and can't figure it out... I've set my paths, but when I try to run "./apktool b out", I get these errors. The main error seems to be "could not exec command: [aapt"
Any help would be appreciated.
Environment:
Code:
[email protected]:~/Desktop/Android$ echo $ADB
/home/user/apktool/
[email protected]:~/Desktop/Android$ ls /home/user/apktool/
aapt apktool framework
[email protected]:~/Desktop/Android$ ls .
aapt apktool apktool.jar out
Error:
Code:
[email protected]:~/Desktop/Android$ ./apktool b out
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL3036840749983313245.tmp, -I, /home/user/apktool/framework/1.apk, -S, /home/user/Desktop/Android/out/res, -M, /home/user/Desktop/Android/out/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(Unknown Source)
at brut.androlib.Androlib.buildResourcesFull(Unknown Source)
at brut.androlib.Androlib.buildResources(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.apktool.Main.cmdBuild(Unknown Source)
at brut.apktool.Main.main(Unknown Source)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL3036840749983313245.tmp, -I, /home/user/apktool/framework/1.apk, -S, /home/user/Desktop/Android/out/res, -M, /home/user/Desktop/Android/out/AndroidManifest.xml] at brut.util.OS.exec(Unknown Source)
... 7 more
Caused by: java.io.IOException: Cannot run program "aapt": java.io.IOException: error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:474)
at java.lang.Runtime.exec(Runtime.java:610)
at java.lang.Runtime.exec(Runtime.java:483)
... 8 more
Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.<init>(UNIXProcess.java:164)
at java.lang.ProcessImpl.start(ProcessImpl.java:81)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:467)
... 10 more
Please delete thread, I fixed my issue. But for future people: I didn't place files in /usr/local/bin, then the files were not chmod'ed correctly.

[Q] Problem Recompiling Stock Apps

I tried decompiling the apss, making small changes like changing one .9 png file.
But even if I make no changes, I still cannot recompile it. For other apps I have no problems, just the stock apps, like the SPlannerWidget.
Using apktool to recompile, this is the error I get:
C:\Users\user\Desktop\AndroidApktool>W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
C:\Users\user\Desktop\AndroidApktool\SPlannerAppWi dget\res\values\public.xml:385: error: Public symbol color/APKTOOL_DUMMY_00f3 declared here is not defined.
C:\Users\user\Desktop\AndroidApktool\SPlannerAppWi dget\res\values\public.xml:386: error: Public symbol color/APKTOOL_DUMMY_00f4 declared here is not defined.
C:\Users\user\Desktop\AndroidApktool\SPlannerAppWi dget\res\values\public.xml:387: error: Public symbol color/APKTOOL_DUMMY_00f5 declared here is not defined.
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 16, --target-sdk-version, 17, -F, C:\Users\user\AppData\Local\Temp\APKTOOL4454488444 059374456.tmp, -0, arsc, -I, C:\Users\user\apktool\framework\1.apk, -S, C:\Users\user\Desktop\AndroidApktool\SPlannerAppWi dget\res, -M, C:\Users\user\Desktop\AndroidApktool\SPlannerAppWi dget\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib .java:358)
at brut.androlib.Androlib.buildResources(Androlib.jav a: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, 17, -F, C:\Users\user\AppData\Local\Temp\APKTOOL4454488444 059374456.tmp, -0, arsc, -I, C:\Users\user\apktool\framework\1.apk, -S, C:\Users\user\Desktop\AndroidApktool\SPlannerAppWi dget\res, -M, C:\Users\user\Desktop\AndroidApktool\SPlannerAppWi dget\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(An drolibResources.java:357)
at brut.androlib.Androlib.buildResourcesFull(Androlib .java:336)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 16, --target-sdk-version, 17, -F, C:\Users\user\AppData\Local\Temp\APKTOOL4454488444 059374456.tmp, -0, arsc, -I, C:\Users\user\apktool\framework\1.apk, -S, C:\Users\user\Desktop\AndroidApktool\SPlannerAppWi dget\res, -M, C:\Users\user\Desktop\AndroidApktool\SPlannerAppWi dget\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(An drolibResources.java:355)
... 6 more
Why can't I recompile? I see a lot of mods for stock apps here, so obviously, people can successfully recompile stock apps.
I already have framework-res.apk and twframework-res.apk in there.
What's wrong?
excellentlanding said:
I tried decompiling the apss, making small changes like changing one .9 png file.
But even if I make no changes, I still cannot recompile it. For other apps I have no problems, just the stock apps, like the SPlannerWidget.
Using apktool to recompile, this is the error I get:
C:\Users\user\Desktop\AndroidApktool>W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
C:\Users\user\Desktop\AndroidApktool\SPlannerAppWi dget\res\values\public.xml:385: error: Public symbol color/APKTOOL_DUMMY_00f3 declared here is not defined.
C:\Users\user\Desktop\AndroidApktool\SPlannerAppWi dget\res\values\public.xml:386: error: Public symbol color/APKTOOL_DUMMY_00f4 declared here is not defined.
C:\Users\user\Desktop\AndroidApktool\SPlannerAppWi dget\res\values\public.xml:387: error: Public symbol color/APKTOOL_DUMMY_00f5 declared here is not defined.
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 16, --target-sdk-version, 17, -F, C:\Users\user\AppData\Local\Temp\APKTOOL4454488444 059374456.tmp, -0, arsc, -I, C:\Users\user\apktool\framework\1.apk, -S, C:\Users\user\Desktop\AndroidApktool\SPlannerAppWi dget\res, -M, C:\Users\user\Desktop\AndroidApktool\SPlannerAppWi dget\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib .java:358)
at brut.androlib.Androlib.buildResources(Androlib.jav a: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, 17, -F, C:\Users\user\AppData\Local\Temp\APKTOOL4454488444 059374456.tmp, -0, arsc, -I, C:\Users\user\apktool\framework\1.apk, -S, C:\Users\user\Desktop\AndroidApktool\SPlannerAppWi dget\res, -M, C:\Users\user\Desktop\AndroidApktool\SPlannerAppWi dget\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(An drolibResources.java:357)
at brut.androlib.Androlib.buildResourcesFull(Androlib .java:336)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 16, --target-sdk-version, 17, -F, C:\Users\user\AppData\Local\Temp\APKTOOL4454488444 059374456.tmp, -0, arsc, -I, C:\Users\user\apktool\framework\1.apk, -S, C:\Users\user\Desktop\AndroidApktool\SPlannerAppWi dget\res, -M, C:\Users\user\Desktop\AndroidApktool\SPlannerAppWi dget\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(An drolibResources.java:355)
... 6 more
Why can't I recompile? I see a lot of mods for stock apps here, so obviously, people can successfully recompile stock apps.
I already have framework-res.apk and twframework-res.apk in there.
What's wrong?
Click to expand...
Click to collapse
read that perhaps can help
http://forum.xda-developers.com/showthread.php?t=2259308

[Q] TW 4.4.2 SecContacts Recompile Errors

Has anyone been able to successfully recompile the 4.4.2 SecContacts_Osup.apk after editing/theming the app? I keep getting the following error when trying to recompile with apktool and if I fix the error to get the apk to recompile then the contacts app force closes after installing to phone
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
C:\APK-Multi-Tool\other\..\projects\SecContacts_OSup.apk\res\layout\photo_selector_view_popup.xml:9: error: Error: No resource found that matches the given name (at 'layout' with value '@layout/photo_updates_header').
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 19, --target-sdk-version, 19, -F, C:\Users\Brett\AppData\Local\Temp\APKTOOL5711550799888320867.tmp, -0, arsc, -I, C:\Users\Brett\apktool\framework\1.apk, -S, C:\APK-Multi-Tool\other\..\projects\SecContacts_OSup.apk\res, -M, C:\APK-Multi-Tool\other\..\projects\SecContacts_OSup.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, 19, --target-sdk-version, 19, -F, C:\Users\Brett\AppData\Local\Temp\APKTOOL5711550799888320867.tmp, -0, arsc, -I, C:\Users\Brett\apktool\framework\1.apk, -S, C:\APK-Multi-Tool\other\..\projects\SecContacts_OSup.apk\res, -M, C:\APK-Multi-Tool\other\..\projects\SecContacts_OSup.apk\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:357)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:336)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 19, --target-sdk-version, 19, -F, C:\Users\Brett\AppData\Local\Temp\APKTOOL5711550799888320867.tmp, -0, arsc, -I, C:\Users\Brett\apktool\framework\1.apk, -S, C:\APK-Multi-Tool\other\..\projects\SecContacts_OSup.apk\res, -M, C:\APK-Multi-Tool\other\..\projects\SecContacts_OSup.apk\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:355)
... 6 more
tterb1980 said:
Has anyone been able to successfully recompile the 4.4.2 SecContacts_Osup.apk after editing/theming the app? I keep getting the following error when trying to recompile with apktool and if I fix the error to get the apk to recompile then the contacts app force closes after installing to phone
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
C:\APK-Multi-Tool\other\..\projects\SecContacts_OSup.apk\res\layout\photo_selector_view_popup.xml:9: error: Error: No resource found that matches the given name (at 'layout' with value '@layout/photo_updates_header').
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 19, --target-sdk-version, 19, -F, C:\Users\Brett\AppData\Local\Temp\APKTOOL5711550799888320867.tmp, -0, arsc, -I, C:\Users\Brett\apktool\framework\1.apk, -S, C:\APK-Multi-Tool\other\..\projects\SecContacts_OSup.apk\res, -M, C:\APK-Multi-Tool\other\..\projects\SecContacts_OSup.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, 19, --target-sdk-version, 19, -F, C:\Users\Brett\AppData\Local\Temp\APKTOOL5711550799888320867.tmp, -0, arsc, -I, C:\Users\Brett\apktool\framework\1.apk, -S, C:\APK-Multi-Tool\other\..\projects\SecContacts_OSup.apk\res, -M, C:\APK-Multi-Tool\other\..\projects\SecContacts_OSup.apk\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:357)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:336)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 19, --target-sdk-version, 19, -F, C:\Users\Brett\AppData\Local\Temp\APKTOOL5711550799888320867.tmp, -0, arsc, -I, C:\Users\Brett\apktool\framework\1.apk, -S, C:\APK-Multi-Tool\other\..\projects\SecContacts_OSup.apk\res, -M, C:\APK-Multi-Tool\other\..\projects\SecContacts_OSup.apk\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:355)
... 6 more
Click to expand...
Click to collapse
I have the same error...I try to re install new TWframework and new framework res app...but nothing happend....
Cocolopes said:
I have the same error...I try to re install new TWframework and new framework res app...but nothing happend....
Click to expand...
Click to collapse
I was finally able to get it to work. Replace the photo_selector_view_popup.xml in the layouts folder with the one that I have attached here then recompile SecContacts as usual. Then use 7zip to copy the manifest.mf from the original SecContacts to the one you just created and you should be good to go. By doing this I was able to recompile and install my themed SecContacts and everything is working as usual.
Some help pls!
tterb1980 said:
I was finally able to get it to work. Replace the photo_selector_view_popup.xml in the layouts folder with the one that I have attached here then recompile SecContacts as usual. Then use 7zip to copy the manifest.mf from the original SecContacts to the one you just created and you should be good to go. By doing this I was able to recompile and install my themed SecContacts and everything is working as usual.
Click to expand...
Click to collapse
Hi @tterb1980,
I replaced with the attached file of yours, and it did recompile. Then I used the manifest.mf from old contact apk to my new one (used store option in winrar). Then I placed the new apk (with manifest.mf of old one) to system/priv-app, but it's not showing in app drawer.
What wrong do you think I'm doing. Do I need to use the resources.arsc file, too, of old apk?

Error decompiling APK

I am trying to decompile an LG app that is called LgNfc.apk, as the name says it's for the NFC control.. I want to hide the N icon when NFC is on, so I need to decompile this APK.
It is dependand from another APK that is called com.lge.apk so I did link to use that APK when decompiling (apktool if com.lge.apk)
The APK will decompile but the real problem is that it gives me a warning message, so if I decompile and try to recompile again (without touching the code) it gives me an error, so recompilation can't be done.
Here is what I get:
C:\Users\Feche\Desktop\apktool>apktool d nfc.apk
I: Using Apktool 2.0.0 on nfc.apk
I: Loading resource table...
I: Decoding Shared Library (com.lge), pkgId: 2
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\Feche\apktool\framework\1.apk
W: Could not decode attr value, using undecoded value instead: ns=android, name=
theme, value=0x01030594
I: Loading resource table from file: C:\Users\Feche\apktool\framework\2.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
testI: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
Click to expand...
Click to collapse
As you can see, it throws an decode attr value warning, I don't know what it's causing that.. here is the error when I want to recompile:
C:\Users\Feche\Desktop\apktool>apktool b C:\Users\Feche\Desktop\apktool\nfc
I: Using Apktool 2.0.0
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether resources has changed...
I: Building resources...
C:\Users\Feche\Desktop\apktool\nfc\AndroidManifest.xml:40: error: Error: No reso
urce type specified (at 'theme' with value '@16975252').
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.Androl
ibException: brut.common.BrutException: could not exec command: [C:\Users\Feche\
AppData\Local\Temp\brut_util_Jar_8175709690237026012.tmp, p, --shared-lib, --min
-sdk-version, 21, --target-sdk-version, 21, --rename-manifest-package, com.andro
id.nfc, --version-code, 21, --version-name, 5.0-1431077049, -F, C:\Users\Feche\A
ppData\Local\Temp\APKTOOL561295787776399176.tmp, -0, arsc, -I, C:\Users\Feche\ap
ktool\framework\1.apk, -I, C:\Users\Feche\apktool\framework\2.apk, -S, C:\Users\
Feche\Desktop\apktool\nfc\res, -M, C:\Users\Feche\Desktop\apktool\nfc\AndroidMan
ifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:458)
at brut.androlib.Androlib.buildResources(Androlib.java:396)
at brut.androlib.Androlib.build(Androlib.java:285)
at brut.androlib.Androlib.build(Androlib.java:256)
at brut.apktool.Main.cmdBuild(Main.java:225)
at brut.apktool.Main.main(Main.java:84)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not
exec command: [C:\Users\Feche\AppData\Local\Temp\brut_util_Jar_8175709690237026
012.tmp, p, --shared-lib, --min-sdk-version, 21, --target-sdk-version, 21, --ren
ame-manifest-package, com.android.nfc, --version-code, 21, --version-name, 5.0-1
431077049, -F, C:\Users\Feche\AppData\Local\Temp\APKTOOL561295787776399176.tmp,
-0, arsc, -I, C:\Users\Feche\apktool\framework\1.apk, -I, C:\Users\Feche\apktool
\framework\2.apk, -S, C:\Users\Feche\Desktop\apktool\nfc\res, -M, C:\Users\Feche
\Desktop\apktool\nfc\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:419)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:444)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [C:\Users\Feche\Ap
pData\Local\Temp\brut_util_Jar_8175709690237026012.tmp, p, --shared-lib, --min-s
dk-version, 21, --target-sdk-version, 21, --rename-manifest-package, com.android
.nfc, --version-code, 21, --version-name, 5.0-1431077049, -F, C:\Users\Feche\App
Data\Local\Temp\APKTOOL561295787776399176.tmp, -0, arsc, -I, C:\Users\Feche\apkt
ool\framework\1.apk, -I, C:\Users\Feche\apktool\framework\2.apk, -S, C:\Users\Fe
che\Desktop\apktool\nfc\res, -M, C:\Users\Feche\Desktop\apktool\nfc\AndroidManif
est.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:413)
... 6 more
Click to expand...
Click to collapse
Any ideas why is this happening? Thanks :cyclops:
Have you installed the frameworks before decompiling?
Vivek_Neel said:
Have you installed the frameworks before decompiling?
Click to expand...
Click to collapse
Oops I did it last night, it was late and I didn't check if the framework was installed, indeed was that, thank you!
The only problem is that if I decompile and recompile again without touching the code, I get no errors but NFC won't start (it doesn't work), any ideas? I tried signing the APK but no success
Bump!
Bump
Bump

[Q] Problems compiling with ApkTool

Hello.
I'm trying to modify some elements in SystemUI.apk (status bar icons), so I edited an especific XML file to do so.
I'm using Windows 10 on my Laptop and Lollipop on my device
I know how to compile and decompile APK's, so that's not my real problem. I'm using the latest version of ApkTool.
ApkTool decompiles the SystemUI without any problems but my problem begins when I'm trying to recompile the APK again (Even if I DON'T edit any files of the APK).
I got the following error:
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [C:\Users\Jonathan\AppData\Local\Temp\brut_util_Jar_92819838988690248.tmp
[and a huuuuge blablablabla]
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [C:\Users\Jonathan\AppData\Local\Temp\brut_util_Jar_92819838988690248.tmp, p, --forced-package-id, 127, --min-sdk-version, 21, --target-sdk-version, 21, --version-code, 21, --version-name, 5.0.2-G530HXXU2BOH5, -F, C:\Users\Jonathan\AppData\Local\Temp\APKTOOL368471836953682867.tmp
[More blablabla]
at brut.util.OS.exec(OS.java:93)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:419)
... 6 more
Caused by: java.io.IOException: Cannot run program "C:\Users\Jonathan\AppData\Local\Temp\brut_util_Jar_92819838988690248.tmp": CreateProcess error=206, El nombre del archivo o la extensión es demasiado largo
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=206, El nombre del archivo o la extensión es demasiado largo
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
Click to expand...
Click to collapse
Any ideas please?
Thanks in advance!

Categories

Resources