Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,804,814 Members 51,601 Now Online
XDA Developers Android and Mobile Development Forum

[help] APKTool recompile issues

Tip us?
 
Skaeren
Old
#1  
Junior Member - OP
Thanks Meter 0
Posts: 8
Join Date: Jan 2014
Default [help] APKTool recompile issues

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
 
hnkotnis
Old
(Last edited by hnkotnis; 27th January 2014 at 01:24 AM.)
#2  
hnkotnis's Avatar
Senior Member
Thanks Meter 436
Posts: 998
Join Date: Jul 2013
Location: Sangli, Maharashtra, India, Asia, Earth, Solar System, Milky Way Galaxy, Local Galaxy Group,Universe
Quote:
Originally Posted by Skaeren View Post
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
 
Skaeren
Old
#3  
Junior Member - OP
Thanks Meter 0
Posts: 8
Join Date: Jan 2014
Quote:
Originally Posted by hnkotnis View Post
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>
 
hnkotnis
Old
#4  
hnkotnis's Avatar
Senior Member
Thanks Meter 436
Posts: 998
Join Date: Jul 2013
Location: Sangli, Maharashtra, India, Asia, Earth, Solar System, Milky Way Galaxy, Local Galaxy Group,Universe
[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.
 
Skaeren
Old
#5  
Junior Member - OP
Thanks Meter 0
Posts: 8
Join Date: Jan 2014
[QUOTE=hnkotnis;49802475]
Quote:
Originally Posted by Skaeren View Post
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, 3 views)
File Type: 7z values.7z - [Click for QR Code] (109.7 KB, 1 views)
 
hnkotnis
Old
(Last edited by hnkotnis; 28th January 2014 at 10:30 AM.)
#6  
hnkotnis's Avatar
Senior Member
Thanks Meter 436
Posts: 998
Join Date: Jul 2013
Location: Sangli, Maharashtra, India, Asia, Earth, Solar System, Milky Way Galaxy, Local Galaxy Group,Universe
[QUOTE=Skaeren;49819329]
Quote:
Originally Posted by hnkotnis View Post

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 View Post
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.
 
Skaeren
Old
#7  
Junior Member - OP
Thanks Meter 0
Posts: 8
Join Date: Jan 2014
[QUOTE=hnkotnis;49832396]
Quote:
Originally Posted by Skaeren View Post

I will try to do it.
thanks
 
hnkotnis
Old
#8  
hnkotnis's Avatar
Senior Member
Thanks Meter 436
Posts: 998
Join Date: Jul 2013
Location: Sangli, Maharashtra, India, Asia, Earth, Solar System, Milky Way Galaxy, Local Galaxy Group,Universe
@Skaeren
Please read my updated post above.
 
Skaeren
Old
#9  
Junior Member - OP
Thanks Meter 0
Posts: 8
Join Date: Jan 2014
Quote:
Originally Posted by hnkotnis View Post
@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)

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


XDA Xposed Tuesday: DonkeyGuard, Don’t Be a Donkey, Control Your Device – XDA Developer TV

Some applications ask for the world … more

Use Facebook Pictures as a LWP with Facebook View

One of the best things that Android has always offeredits users is the ability to tailor … more

Share Your Thoughts Anonymously with A Minimalist Social Network

Nowadays, almost everyone has a second life onthe Internet. Among the best … more

Enable Heads Up Notifications For The Sprint Galaxy S3

Heads up notifications, in case you didn’t already know, are an experimental … more