[Tool]Advanced ApkTool v4.2.0[Windows][10/02/2016]

What's your opinion about Advanced ApkTool?

  • I love it.

    Votes: 364 72.1%
  • I like it.

    Votes: 98 19.4%
  • I'm not bothered.

    Votes: 23 4.6%
  • I don't like it.

    Votes: 8 1.6%
  • I hate it.

    Votes: 12 2.4%

  • Total voters
    505
Search This thread

WhiteNeo

Senior Member
Feb 13, 2013
2,448
4,097
@BDFreak Really awesome tool, been using this one for several months now and never encountered an issue. :)
However, trying to install an Android 5.1 framework fails with the following error:

Code:
RSCDecoder.java:78)
        at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:47)
        at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:39)
        at brut.androlib.res.AndrolibResources.installFramework(AndrolibResources.java:662)
        at brut.androlib.res.AndrolibResources.installFramework(AndrolibResources.java:644)
        at brut.androlib.Androlib.installFramework(Androlib.java:636)
        at brut.apktool.Main.cmdInstallFramework(Main.java:240)
        at brut.apktool.Main.main(Main.java:87)

Unfortunately, as the window size is locked I can't see the whole error message..
Would be great if you could fix this one! :)

Anyway, thanks for this great tool mate! :good:
 

simoboy89

Senior Member
Jan 6, 2013
53
3
hello friend, thank you for your work. I have a problem when you recompile, how do I fix?
 

Attachments

  • SystemUI.apk_-04-2015-_20-19.txt
    142.8 KB · Views: 24

rer3

Senior Member
Aug 17, 2013
214
88
Bandung
I tried to decompile systemUI.apk from .690 stock deodexed rom, already install the framework-res.apk and SemcGenericUxpRes.apk from the rom, but your Advanced ApkTool v 4.1.0 can't decompile it. please help...
 

Attachments

  • SystemUI.apk_---_8-40.txt
    1.8 KB · Views: 18

Brava27

Senior Member
Sep 7, 2012
3,730
992
Toronto
So I can decompile, I fix some values here and there and when I recompile I get this:

Log For : framework-res.apk

Log Type : Recompiling

Log Recorded At : Thu 16-04-2015 1:33:09.97

Log Recorded By : Advanced ApkTool v4.1.0 By BDFreak

------------------------------------------------------

W: Could not find sources
C:\Users\BRAVA\Desktop\AdvancedApkTool\3-Out\framework-res.apk\res\drawable-sw360dp-xxxhdpi\ic_knox_badge.PNG: error: File is case-insensitive equivalent to: C:\Users\BRAVA\Desktop\AdvancedApkTool\3-Out\framework-res.apk\res\drawable-xxxhdpi\ic_knox_badge.png
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [C:\Users\BRAVA\AppData\Local\Temp\brut_util_Jar_4145538247507964460.tmp, p, --forced-package-id, 1, --min-sdk-version, 21, --target-sdk-version, 21, --version-code, 21, --version-name, 5.0.2-G920W8VLU1AOCG, -F, C:\Users\BRAVA\AppData\Local\Temp\APKTOOL1419647242275865316.tmp, -x, -0, arsc, -S, C:\Users\BRAVA\Desktop\AdvancedApkTool\3-Out\framework-res.apk\res, -M, C:\Users\BRAVA\Desktop\AdvancedApkTool\3-Out\framework-res.apk\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:442)
at brut.androlib.Androlib.buildResources(Androlib.java:379)
at brut.androlib.Androlib.build(Androlib.java:282)
at brut.androlib.Androlib.build(Androlib.java:255)
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\BRAVA\AppData\Local\Temp\brut_util_Jar_4145538247507964460.tmp, p, --forced-package-id, 1, --min-sdk-version, 21, --target-sdk-version, 21, --version-code, 21, --version-name, 5.0.2-G920W8VLU1AOCG, -F, C:\Users\BRAVA\AppData\Local\Temp\APKTOOL1419647242275865316.tmp, -x, -0, arsc, -S, C:\Users\BRAVA\Desktop\AdvancedApkTool\3-Out\framework-res.apk\res, -M, C:\Users\BRAVA\Desktop\AdvancedApkTool\3-Out\framework-res.apk\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:506)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:428)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [C:\Users\BRAVA\AppData\Local\Temp\brut_util_Jar_4145538247507964460.tmp, p, --forced-package-id, 1, --min-sdk-version, 21, --target-sdk-version, 21, --version-code, 21, --version-name, 5.0.2-G920W8VLU1AOCG, -F, C:\Users\BRAVA\AppData\Local\Temp\APKTOOL1419647242275865316.tmp, -x, -0, arsc, -S, C:\Users\BRAVA\Desktop\AdvancedApkTool\3-Out\framework-res.apk\res, -M, C:\Users\BRAVA\Desktop\AdvancedApkTool\3-Out\framework-res.apk\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:500)
... 6 more

------------------------------------------------------

Any idea why? If I do not edit anything in the apk it will actually recompile, but I want to edit things in the file.
Anyone help me out please?
 

WhiteNeo

Senior Member
Feb 13, 2013
2,448
4,097
So I can decompile, I fix some values here and there and when I recompile I get this:

Log For : framework-res.apk

Log Type : Recompiling

Log Recorded At : Thu 16-04-2015 1:33:09.97

Log Recorded By : Advanced ApkTool v4.1.0 By BDFreak

------------------------------------------------------

W: Could not find sources
C:\Users\BRAVA\Desktop\AdvancedApkTool\3-Out\framework-res.apk\res\drawable-sw360dp-xxxhdpi\ic_knox_badge.PNG: error: File is case-insensitive equivalent to: C:\Users\BRAVA\Desktop\AdvancedApkTool\3-Out\framework-res.apk\res\drawable-xxxhdpi\ic_knox_badge.png
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [C:\Users\BRAVA\AppData\Local\Temp\brut_util_Jar_4145538247507964460.tmp, p, --forced-package-id, 1, --min-sdk-version, 21, --target-sdk-version, 21, --version-code, 21, --version-name, 5.0.2-G920W8VLU1AOCG, -F, C:\Users\BRAVA\AppData\Local\Temp\APKTOOL1419647242275865316.tmp, -x, -0, arsc, -S, C:\Users\BRAVA\Desktop\AdvancedApkTool\3-Out\framework-res.apk\res, -M, C:\Users\BRAVA\Desktop\AdvancedApkTool\3-Out\framework-res.apk\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:442)
at brut.androlib.Androlib.buildResources(Androlib.java:379)
at brut.androlib.Androlib.build(Androlib.java:282)
at brut.androlib.Androlib.build(Androlib.java:255)
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\BRAVA\AppData\Local\Temp\brut_util_Jar_4145538247507964460.tmp, p, --forced-package-id, 1, --min-sdk-version, 21, --target-sdk-version, 21, --version-code, 21, --version-name, 5.0.2-G920W8VLU1AOCG, -F, C:\Users\BRAVA\AppData\Local\Temp\APKTOOL1419647242275865316.tmp, -x, -0, arsc, -S, C:\Users\BRAVA\Desktop\AdvancedApkTool\3-Out\framework-res.apk\res, -M, C:\Users\BRAVA\Desktop\AdvancedApkTool\3-Out\framework-res.apk\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:506)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:428)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [C:\Users\BRAVA\AppData\Local\Temp\brut_util_Jar_4145538247507964460.tmp, p, --forced-package-id, 1, --min-sdk-version, 21, --target-sdk-version, 21, --version-code, 21, --version-name, 5.0.2-G920W8VLU1AOCG, -F, C:\Users\BRAVA\AppData\Local\Temp\APKTOOL1419647242275865316.tmp, -x, -0, arsc, -S, C:\Users\BRAVA\Desktop\AdvancedApkTool\3-Out\framework-res.apk\res, -M, C:\Users\BRAVA\Desktop\AdvancedApkTool\3-Out\framework-res.apk\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:500)
... 6 more

------------------------------------------------------

Any idea why? If I do not edit anything in the apk it will actually recompile, but I want to edit things in the file.
Anyone help me out please?

If you delete the png in sw360dp, your framework should compile fine. Deleting this image probably won't cause issues because it is still included elsewhere.
 

giltros1

Senior Member
May 31, 2012
65
7
hi guys i get this error decompile

W: Could not decode attr value, using undecoded value instead: ns=android, name=touchscreenBlocksFocus, value=0xffffffff
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x0101048f
at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:59)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:57)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:53)
at brut.androlib.res.decoder.ResAttrDecoder.decode(ResAttrDecoder.java:36)
at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(AXmlResourceParser.java:369)
at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValue(XmlPullParserDelegate.java:69)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartTag(StaticXmlSerializerWrapper.java:267)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(StaticXmlSerializerWrapper.java:211)
at brut.androlib.res.decoder.XmlPullStreamDecoder$1.event(XmlPullStreamDecoder.java:83)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDecoder.java:141)
at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(ResStreamDecoderContainer.java:33)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:114)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:99)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:323)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:131)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:101)
at brut.apktool.Main.cmdDecode(Main.java:165)
at brut.apktool.Main.main(Main.java:81)
 

Vivek_Neel

Inactive Recognized Contributor / Themer
Dec 23, 2012
10,372
23,696
31
Chennai
hi guys i get this error decompile

W: Could not decode attr value, using undecoded value instead: ns=android, name=touchscreenBlocksFocus, value=0xffffffff
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x0101048f
at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:59)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:57)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:53)
at brut.androlib.res.decoder.ResAttrDecoder.decode(ResAttrDecoder.java:36)
at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(AXmlResourceParser.java:369)
at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValue(XmlPullParserDelegate.java:69)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartTag(StaticXmlSerializerWrapper.java:267)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(StaticXmlSerializerWrapper.java:211)
at brut.androlib.res.decoder.XmlPullStreamDecoder$1.event(XmlPullStreamDecoder.java:83)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDecoder.java:141)
at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(ResStreamDecoderContainer.java:33)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:114)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:99)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:323)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:131)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:101)
at brut.apktool.Main.cmdDecode(Main.java:165)
at brut.apktool.Main.main(Main.java:81)

Make sure you install framework first

Sent from my A0001 using Tapatalk 2
 

giltros1

Senior Member
May 31, 2012
65
7
only apk no framework is ok thanks, with frame no ok
sorry for my english
 
Last edited:

fabinou85

Senior Member
Nov 13, 2012
96
20
hi, i try to modify SystemUI on my S5. I use this Rom http://xdaforums.com/galaxy-s5/development/rom-t3078179.

When i decompile then recompile SystemUi without any modification (wiht or not sugn or zipaligne or both) i have the same issue :
  • Black Background
  • no Lockscreen
  • no screenshot
  • no status bar
  • no swipe for toggles
no error messages.... do u have an idea to help me?
 

Attachments

  • IMG_0124.JPG
    IMG_0124.JPG
    17.3 KB · Views: 312

balla48801

Senior Member
Jul 29, 2008
429
314
hi, i try to modify SystemUI on my S5. I use this Rom http://xdaforums.com/galaxy-s5/development/rom-t3078179.

When i decompile then recompile SystemUi without any modification (wiht or not sugn or zipaligne or both) i have the same issue :
  • Black Background
  • no Lockscreen
  • no screenshot
  • no status bar
  • no swipe for toggles
no error messages.... do u have an idea to help me?

I have this same issue with systemui.apk. Also if i decompile secsettings.apk i get the same thing but no response to touch either. I dont get any errors when recompiling either. Even if I leave them untouched and recompile i get the same result. Every thing else I have decompile and recompile works fine. I have noticed if i zip the files and flash them in recovery over existing rom they work fine but if I backup with twrp and then restore its back to no lockscreen, status bar, or touch response. Glad to see im not the only one.
 

bdorr1105

Senior Member
Sep 6, 2008
4,129
3,114
I have this same issue with systemui.apk. Also if i decompile secsettings.apk i get the same thing but no response to touch either. I dont get any errors when recompiling either. Even if I leave them untouched and recompile i get the same result. Every thing else I have decompile and recompile works fine. I have noticed if i zip the files and flash them in recovery over existing rom they work fine but if I backup with twrp and then restore its back to no lockscreen, status bar, or touch response. Glad to see im not the only one.
Just downloaded the latest apktool and replace the one used in here... Rename it the same way bdfreak did. Worked for me
 

maalav

Member
Aug 22, 2013
36
8
guys how can i install framework im using the latest version it gives me error when decompiling framework-res but systemui gets decompiled without any problems
 

Top Liked Posts

  • There are no posts matching your filters.
  • 412
    I made this tool specially for the owners of Sony Xperia devices. As in new frimware of Sony when we edit framework-res.apk we get infinite bootloop. I have made some framework mod for Sony devices. That's why people keep PM'ing me how did I edit framework-res.apk. So, here is the solution for them. This tool can be use for other manufacturers too.

    http%3A%2F%2Fs20.postimg.org%2Fb51utr8vx%2FAdvance_Apk_Tool_Portal.png


    Main Features :


    • User friendly
    • Automated Decompiling APK/JAR
    • Automated Recompiling APK/JAR
    • Automated Sign APK/JAR
    • Automated Zipalign APK/JAR
    • No need to copy META-INF folder after recompiling
    • Sony Xperia owners won't face bootloop after recompiling framework-res.apk



    Changelog :

    v4.2.0 :


    • Based on Apktool 2.0.3 (Android Marshmallow Supported)


    v4.1.0 :


    • Based on Apktool 2.0.0-RC3 (Android Lollipop Supported)


    v4.0.0 :


    • Based on Apktool 2.0.0-RC2
    • Added "Only Recompile" Option
    • Added "Recompile And Then Sign" Option
    • Added "Recompile And Then Zipalign" Option
    • Added "Recompile, Sign And Then Zipalign" Option
    • Wiping "Frameworks" Folder Option Added


    v3.0.0 :


    • Based on Apktool 2.0.0-RC1
    • Added "More Menu" Option
    • Added "Decompile All Files" Option
    • Added "Recompile All Files" Option
    • Added "Sign All Files" Option
    • Added "Zipalign All Files" Option


    v2.0.0 :


    • Based on Apktool 2.0.0-Beta9
    • Added Support For JAR Files
    • Added "Zipalign Files" Option
    • Added "Wipe Folders" Option
    • Fully Support Xperia Z1 Compact's Files


    v1.0.0 :


    • Initial Release



    Bugs :


    • You Should Find And Let Me Know (I DIDN'T FIND ANY)



    Download :

    v4.2.0 :


    Mod edit: above link no longer available.
    File may still be available here: https://xdaforums.com/showpost.php?p=69215130&postcount=682






    How To Use :


    • Extract the downloaded file anywhere in your pc
    • Double click on "Advanced ApkTool.exe" to start the tool
    • Copy your framework files to the "2-In" folder & also the apk files you want to decompile
    • Install Framework first (Install OEM specfic framework also)
    • Decompile apk, the decompiled folder can be found inside "3-Out" folder
    • After editing Recompile it, recompiled file should be found inside "4-Done" folder
    • If needed sign the recompiled file, it will replace the recompiled file inside "4-Done" folder
    • You can also zipalign the recompiled file, it will replace the recompiled file inside "4-Done" folder
    • You can wipe any folder easily by wipe folder option
    • You can find more in more menu option



    Thanks To :




    XDA:DevDB Information
    Advanced ApkTool, Tool/Utility for the Android General

    Contributors
    BDFreak

    Version Information
    Status: Stable
    Current Stable Version: v4.2.0
    Stable Release Date: 2016-02-10

    Created 2014-02-07
    Last Updated 2016-02-10
    114
    Screenshots

    Screenshots :

    v4.2.0 :

    BDFreak_Advanced_Apk_Tool_v4_0_2_1.png


    v4.1.0 :

    BDFreak_Advanced_Apk_Tool_v4_0_1_1.png


    v4.0.0 :

    BDFreak_Advanced_Apk_Tool_v4_0_0_1.png


    BDFreak_Advanced_Apk_Tool_v4_0_0_2.png


    BDFreak_Advanced_Apk_Tool_v4_0_0_3.png


    v3.0.0 :

    BDFreak_Advanced_Apk_Tool_v3_0_0_1.png


    BDFreak_Advanced_Apk_Tool_v3_0_0_2.png


    v2.0.0 :

    BDFreak_Advanced_Apk_Tool_v2_0_0_1.png


    BDFreak_Advanced_Apk_Tool_v2_0_0_2.png


    BDFreak_Advanced_Apk_Tool_v2_0_0_3.png


    v1.0.0 :

    BDFreak_Advanced_Apk_Tool_v1_0_0_1.png


    BDFreak_Advanced_Apk_Tool_v1_0_0_2.png


    BDFreak_Advanced_Apk_Tool_v1_0_0_3.png


    BDFreak_Advanced_Apk_Tool_v1_0_0_4.png


    BDFreak_Advanced_Apk_Tool_v1_0_0_5.png


    BDFreak_Advanced_Apk_Tool_v1_0_0_6.png


    BDFreak_Advanced_Apk_Tool_v1_0_0_7.png
    47
    Updated with latest Apktool version 2.2.1.
    13
    Updated with latest Apktool version 2.2.2 (Nougat support)