MultiROM Once Again Available for the Galaxy S4

Multiboot, or the ability to select betweenmultiple operating systems on a single device at … more

Build an Impractical But Awesome Lego Mindstorm Dock

The vast majority of what we cover here on the XDA-Developers News Portal relates to … more

MultiROM Makes its Way Over to the HTC One (M8)

While browsing our forum, you will undoubtedly find more than a few enticing ROMs available … more

Welcome to the New XDA-Developers Portal!

You may recall that a few weeks ago, we opened up the XDA-2015 forum themesto intrepid users … more
Post Reply

[help] APKTool recompile issues

27th January 2014, 12:49 AM   |  #1  
OP Junior Member
Thanks Meter: 0
 
8 posts
Join Date:Joined: Jan 2014
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
27th January 2014, 01:19 AM   |  #2  
hnkotnis's Avatar
Senior Member
Flag Sangli, Maharashtra, India, Asia, Earth, Solar System, Milky Way Galaxy, Local Galaxy Group,Universe
Thanks Meter: 438
 
998 posts
Join Date:Joined: Jul 2013
More
Quote:
Originally Posted by Skaeren

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
Last edited by hnkotnis; 27th January 2014 at 01:24 AM.
27th January 2014, 02:02 AM   |  #3  
OP Junior Member
Thanks Meter: 0
 
8 posts
Join Date:Joined: Jan 2014
Quote:
Originally Posted by hnkotnis

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


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>
27th January 2014, 10:11 AM   |  #4  
hnkotnis's Avatar
Senior Member
Flag Sangli, Maharashtra, India, Asia, Earth, Solar System, Milky Way Galaxy, Local Galaxy Group,Universe
Thanks Meter: 438
 
998 posts
Join Date:Joined: Jul 2013
More
[QUOTE=Skaeren;49795003]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.
27th January 2014, 09:45 PM   |  #5  
OP Junior Member
Thanks Meter: 0
 
8 posts
Join Date:Joined: Jan 2014
[QUOTE=hnkotnis;49802475]
Quote:
Originally Posted by Skaeren

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!
Attached Files
File Type: 7z framework-res.7z - [Click for QR Code] (6.21 MB, 4 views)
File Type: 7z values.7z - [Click for QR Code] (109.7 KB, 1 views)
28th January 2014, 09:51 AM   |  #6  
hnkotnis's Avatar
Senior Member
Flag Sangli, Maharashtra, India, Asia, Earth, Solar System, Milky Way Galaxy, Local Galaxy Group,Universe
Thanks Meter: 438
 
998 posts
Join Date:Joined: Jul 2013
More
[QUOTE=Skaeren;49819329]
Quote:
Originally Posted by hnkotnis


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

Quote:
Originally Posted by monstaX

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 by hnkotnis; 28th January 2014 at 10:30 AM.
28th January 2014, 10:26 AM   |  #7  
OP Junior Member
Thanks Meter: 0
 
8 posts
Join Date:Joined: Jan 2014
[QUOTE=hnkotnis;49832396]
Quote:
Originally Posted by Skaeren


I will try to do it.

thanks
28th January 2014, 12:51 PM   |  #8  
hnkotnis's Avatar
Senior Member
Flag Sangli, Maharashtra, India, Asia, Earth, Solar System, Milky Way Galaxy, Local Galaxy Group,Universe
Thanks Meter: 438
 
998 posts
Join Date:Joined: Jul 2013
More
@Skaeren
Please read my updated post above.
28th January 2014, 09:18 PM   |  #9  
OP Junior Member
Thanks Meter: 0
 
8 posts
Join Date:Joined: Jan 2014
Quote:
Originally Posted by hnkotnis

@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.
Attached Files
File Type: 7z bools.7z - [Click for QR Code] (1.4 KB, 1 views)

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Android Q&A, Help & Troubleshooting by ThreadRank