[help] APKTool recompile issues

Search This thread

Skaeren

Member
Jan 5, 2014
8
0
I am looking for help with APKTool. I have tried using the current stable version, as well as the 2.x beta. Both with same result. I am even using the dependancies on the official google code site. My android sdk is fully updated, and both JRE and JDK are installed (both installations done about 2 weeks ago, with no prompt to update since)

Code:
C:\Development\android>apktool.bat b framework-res framework-res-new.apk
I: Using Apktool 2.0.0-Beta7 on framework-res
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: C:\Development\android\framework-res\res/values
-mcc454-mnc-1
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.Androl
ibException: brut.common.BrutException: could not exec command: [C:\Users\Shanno
n\AppData\Local\Temp\brut_util_Jar_147258541274646456.tmp, p, --min-sdk-version,
 17, --target-sdk-version, 17, -F, C:\Users\Shannon\AppData\Local\Temp\APKTOOL12
39664133003724430.tmp, -x, -0, arsc, -S, C:\Development\android\framework-res\re
s, -M, C:\Development\android\framework-res\AndroidManifest.xml]
        at brut.androlib.Androlib.buildResourcesFull(Androlib.java:434)
        at brut.androlib.Androlib.buildResources(Androlib.java:362)
        at brut.androlib.Androlib.build(Androlib.java:285)
        at brut.androlib.Androlib.build(Androlib.java:258)
        at brut.apktool.Main.cmdBuild(Main.java:233)
        at brut.apktool.Main.main(Main.java:88)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not
 exec command: [C:\Users\Shannon\AppData\Local\Temp\brut_util_Jar_14725854127464
6456.tmp, p, --min-sdk-version, 17, --target-sdk-version, 17, -F, C:\Users\Shann
on\AppData\Local\Temp\APKTOOL1239664133003724430.tmp, -x, -0, arsc, -S, C:\Devel
opment\android\framework-res\res, -M, C:\Development\android\framework-res\Andro
idManifest.xml]
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:481)
        at brut.androlib.Androlib.buildResourcesFull(Androlib.java:415)
        ... 5 more
Caused by: brut.common.BrutException: could not exec command: [C:\Users\Shannon\
AppData\Local\Temp\brut_util_Jar_147258541274646456.tmp, p, --min-sdk-version, 1
7, --target-sdk-version, 17, -F, C:\Users\Shannon\AppData\Local\Temp\APKTOOL1239
664133003724430.tmp, -x, -0, arsc, -S, C:\Development\android\framework-res\res,
 -M, C:\Development\android\framework-res\AndroidManifest.xml]
        at brut.util.OS.exec(OS.java:89)
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:475)
        ... 6 more
 
I am looking for help with APKTool. I have tried using the current stable version, as well as the 2.x beta. Both with same result. I am even using the dependancies on the official google code site. My android sdk is fully updated, and both JRE and JDK are installed (both installations done about 2 weeks ago, with no prompt to update since)

Error log says could not find resources. It means you have not installed framework-res.apk (in case of Samsung Touchwiz phones install twframework also).

Solution :-
Pull framwork-red.apk and for Samsung TW phones pull twframawork-res.apk and put it where you keep files in apktool.

If you are using APK Multitool with GUI, then first button is for installing framework.

If you are using command line apktool, type
Code:
apktool if framework-res.apk
to install framework.
Then decompile and recompile.

Press Thanks if helped

Sent from my GT-S5360 Gadget of Mass Destruction using xda-app
Using CWM........Busybox Commands........No I use my hands :D
 
Last edited:

Skaeren

Member
Jan 5, 2014
8
0
Error log says could not find resources. It means you have not installed framework-res.apk (in case of Samsung Touchwiz phones install twframework also).

Solution :-
Pull framwork-red.apk and for Samsung TW phones pull twframawork-res.apk and put it where you keep files in apktool.

If you are using APK Multitool with GUI, then first button is for installing framework.

If you are using command line apktool, type
Code:
apktool if framework-res.apk
to install framework.
Then decompile and recompile.

Press Thanks if helped

Sent from my GT-S5360 Gadget of Mass Destruction using xda-app
Using CWM........Busybox Commands........No I use my hands :D


This did not help

Code:
C:\Development\android>apktool.bat if framework-res.apk
I: Framework installed to: C:\Users\Shannon\apktool\framework\1.apk

Code:
C:\Development\android>apktool.bat d framework-res.apk
I: Using Apktool 2.0.0-Beta7 on framework-res.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Loading resource table...
I: Copying assets and libs...
I: Copying unknown files/dir...
I: Copying original files...

Code:
C:\Development\android>apktool.bat b framework-res framework-res-new.apk
I: Using Apktool 2.0.0-Beta7 on framework-res
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: C:\Development\android\framework-res\res/values
-mcc454-mnc-1
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.Androl
ibException: brut.common.BrutException: could not exec command: [C:\Users\Shanno
n\AppData\Local\Temp\brut_util_Jar_3655706423395563843.tmp, p, --forced-package-
id, 1, --min-sdk-version, 17, --target-sdk-version, 17, --version-code, 17, --ve
rsion-name, 4.2.1-WW_epad-10.6.2.10-20130918, -F, C:\Users\Shannon\AppData\Local
\Temp\APKTOOL5651618845894214526.tmp, -x, -0, arsc, -S, C:\Development\android\f
ramework-res\res, -M, C:\Development\android\framework-res\AndroidManifest.xml]
        at brut.androlib.Androlib.buildResourcesFull(Androlib.java:434)
        at brut.androlib.Androlib.buildResources(Androlib.java:362)
        at brut.androlib.Androlib.build(Androlib.java:285)
        at brut.androlib.Androlib.build(Androlib.java:258)
        at brut.apktool.Main.cmdBuild(Main.java:233)
        at brut.apktool.Main.main(Main.java:88)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not
 exec command: [C:\Users\Shannon\AppData\Local\Temp\brut_util_Jar_36557064233955
63843.tmp, p, --forced-package-id, 1, --min-sdk-version, 17, --target-sdk-versio
n, 17, --version-code, 17, --version-name, 4.2.1-WW_epad-10.6.2.10-20130918, -F,
 C:\Users\Shannon\AppData\Local\Temp\APKTOOL5651618845894214526.tmp, -x, -0, ars
c, -S, C:\Development\android\framework-res\res, -M, C:\Development\android\fram
ework-res\AndroidManifest.xml]
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:481)
        at brut.androlib.Androlib.buildResourcesFull(Androlib.java:415)
        ... 5 more
Caused by: brut.common.BrutException: could not exec command: [C:\Users\Shannon\
AppData\Local\Temp\brut_util_Jar_3655706423395563843.tmp, p, --forced-package-id
, 1, --min-sdk-version, 17, --target-sdk-version, 17, --version-code, 17, --vers
ion-name, 4.2.1-WW_epad-10.6.2.10-20130918, -F, C:\Users\Shannon\AppData\Local\T
emp\APKTOOL5651618845894214526.tmp, -x, -0, arsc, -S, C:\Development\android\fra
mework-res\res, -M, C:\Development\android\framework-res\AndroidManifest.xml]
        at brut.util.OS.exec(OS.java:89)
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:475)
        ... 6 more

C:\Development\android>
 
This did not help

Code:
C:\Development\android>apktool.bat if framework-res.apk
I: Framework installed to: C:\Users\Shannon\apktool\framework\1.apk
................................................................

Try with Android Multitool.

If it does not work give me that apk and framework. I will try to decompile it.

Wait........ Is it a 3rd party app? (I mean not a system app?)
Then it might be possible that developer is using some other resources, different than in your framework.
 

Skaeren

Member
Jan 5, 2014
8
0
This did not help

Code:
C:\Development\android>apktool.bat if framework-res.apk
I: Framework installed to: C:\Users\Shannon\apktool\framework\1.apk
................................................................

Try with Android Multitool.

If it does not work give me that apk and framework. I will try to decompile it.

Wait........ Is it a 3rd party app? (I mean not a system app?)
Then it might be possible that developer is using some other resources, different than in your framework.

Thanks, but it didn't help. I will keep the tool, ask my girlfriend to look over the log when there is time, but so far, still an error. I have not been able to recompile.

It is a system app. I modified one file to enable calls on my TF300TG. I have included 7zip files of the apk, and of the values folder. The values folder goes inside the res folder of the decompiled apk, before recompiling. If you could recompile for me, I will give you all the cookies!
 

Attachments

  • framework-res.7z
    6.2 MB · Views: 163
  • values.7z
    109.7 KB · Views: 57
Thanks, but it didn't help. I will keep the tool, ask my girlfriend to look over the log when there is time, but so far, still an error. I have not been able to recompile.

It is a system app. I modified one file to enable calls on my TF300TG. I have included 7zip files of the apk, and of the values folder. The values folder goes inside the res folder of the decompiled apk, before recompiling. If you could recompile for me, I will give you all the cookies!

You did not tell me you had JellyBean. I found it when I took a look at framework-res.apk manifest.
There is some problem with decompiling and recompiling JB Framework. (No problem for other apks)
So I did a bit searching and I found this

Grab an ICS framework-res apk. Replace manifest resources.arsc and res from the ICS apk with the one from jb apk. Then dexompile with apktool142.jar and then edit. Then recompile with apktoll144.jar. then open the apk that recompiled and take out manifest resources.arsc and res and place back in jb framework :) sorry if its to confusing. But just a quick write up

Sent from my SPH-L710 using XDA App



Added at 28/01/2014 04:00 PM IST
I also found this thread
This contains JB Decompiling tool and there are some guides of framework-res modifications.
 
Last edited:

Skaeren

Member
Jan 5, 2014
8
0
@Skaeren
Please read my updated post above.

I thank you for your assistance. I will take a look at the link when I get home. I know it might be asking a lot, but would it be possible for you to make the required resources.arsc for me? Basically, I only need two variabls in bools.xml changed. I have attached my bools.xml file.

If you are able to, I greatly appreciate the help. Hell, I greatly appreciate the help anyway. This stuff is a little beyond my current knowledge pool though.
 

Attachments

  • bools.7z
    1.4 KB · Views: 33

restuesaputra

Senior Member
Jun 21, 2013
67
7
Semarang
is this proble solved? you want recompiled system file like systemui.apk?
try to delete folder "values-mcc9989-mnc999" in your decopile folder /res/here

press thanks button if i helped you
 

mashiha

New member
Apr 8, 2014
1
0
Problem while decompiling SystemUI.apk

I can decompile framework-res.apk but i cant able to decompile SystemUI.apk 4.2.2.
Any Solution???
thanks in advance
 

Attachments

  • Untitled-1.png
    Untitled-1.png
    26.8 KB · Views: 147