[TOOL] Framework Flasher 1.1.4 (1/14/12) - Easily modify and flash framework-res.apk

Search This thread

rajbokul2

New member
Sep 26, 2014
2
0
show failed

I see this error


++ Decompiling the APK. Please, please be patient :) ++
echo off
An error has occurred. check the log file for more info
echo off


pls help

Finally! After days of struggling to figure out how to modify my ROM's framework-res.apk and create a working flashable update.zip to install the framework-res.apk changes, I have finally figured out how (big thanks to the guys here: http://xdaforums.com/showthread.php?p=20962080#post20962080) and have created an automated script to help others struggling with the same problem.

Framework Flasher 1.1.4
Feel free to download and experiment with it. This is my first gift to the XDA/Android Hacking community, and I plan on doing more. I just want to test the waters for now :) Feedback would be nice. Let me know if I've helped you in some way!

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

What does it do?
It extracts your framework-res.apk file and allows you to edit the files. After editing, the script will compile, sign the apk, create your update.zip with the correct structure for flashing, and then sign the .zip. Everything you need to modify and flash your framework-res.apk file.


How do I use it?
Download the .zip from the link below and extract it somewhere on your PC. Drag the framework-res.apk file that you want to modify and/or flash into the /place-framework-res-here/ directory. Double-click on RunMe.bat and off you go! Do the steps (1-5) in order and you shouldn't have any problems.


Who needs this?
A LOT of people according to how many google searches I did in the past 3-4 days.


Will it work for files other than framework-res.apk?
Currently, no. However it would be easy to implement that functionality if I saw that people would benefit from it.


I found a bug... what do I do?
Post it in this topic. I'll do what I can to make continual updates as long as I see people are benefiting from it. I'm sure there are bugs in it somewhere, so just let me know.


Where do I download this snazzy piece of software?
http://www.mediafire.com/?1nc14hkhs2yrqmt


The little disclaimer
If you download this tool, please say thanks! Not only does it motivate me to continue to improve this software, but it also let's me know how many users are using it! Thanks!
This script is mainly intended for use with editing script files (xml, etc.), and normal (non 9png) images. 9pngs have been successfully repacked using this tool! If you run into any problems, be sure to make it known!
This tools was created to work with the Droid X2. If you are experiencing problems using it, first ensure that you are in fact using a Droid X2.
 

_moelle

Inactive Recognized Themer
Jan 24, 2014
4,064
8,830
NRW
these errors i got can you help me



---------------------------------------------------------------------
| Log - 16/12/2013 -- 3:03:29.66 |
---------------------------------------------------------------------
THE LOG BELOW IS FOR YOUR MOST RECENT PROCESS ONLY.


java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) Client VM (build 24.45-b08, mixed mode, sharing)
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: C:\zda\files-to-edit\framework-res.apk\res/anim-sw720dp
invalid resource directory name: C:\zda\files-to-edit\framework-res.apk\res/animator
invalid resource directory name: C:\zda\files-to-edit\framework-res.apk\res/drawable-land-xhdpi
invalid resource directory name: C:\zda\files-to-edit\framework-res.apk\res/drawable-sw600dp-480dpi
invalid resource directory name: C:\zda\files-to-edit\framework-res.apk\res/drawable-sw600dp-nodpi
invalid resource directory name: C:\zda\files-to-edit\framework-res.apk\res/drawable-sw600dp-xhdpi
invalid resource directory name: C:\zda\files-to-edit\framework-res.apk\res/drawable-sw720dp-nodpi
invalid resource directory name: C:\zda\files-to-edit\framework-res.apk\res/drawable-xhdpi
invalid resource directory name: C:\zda\files-to-edit\framework-res.apk\res/interpolator
invalid resource directory name: C:\zda\files-to-edit\framework-res.apk\res/layout-sw600dp
invalid resource directory name: C:\zda\files-to-edit\framework-res.apk\res/layout-sw720dp
invalid resource directory name: C:\zda\files-to-edit\framework-res.apk\res/layout-w600dp
invalid resource directory name: C:\zda\files-to-edit\framework-res.apk\res/mipmap-480dpi
invalid resource directory name: C:\zda\files-to-edit\framework-res.apk\res/mipmap-hdpi
invalid resource directory name: C:\zda\files-to-edit\framework-res.apk\res/mipmap-ldpi
invalid resource directory name: C:\zda\files-to-edit\framework-res.apk\res/mipmap-mdpi
invalid resource directory name: C:\zda\files-to-edit\framework-res.apk\res/mipmap-xhdpi
invalid resource directory name: C:\zda\files-to-edit\framework-res.apk\res/values-h720dp
invalid resource directory name: C:\zda\files-to-edit\framework-res.apk\res/values-mcc310-mnc-1
invalid resource directory name: C:\zda\files-to-edit\framework-res.apk\res/values-mcc450-mnc-1
invalid resource directory name: C:\zda\files-to-edit\framework-res.apk\res/values-sw380dp
invalid resource directory name: C:\zda\files-to-edit\framework-res.apk\res/values-sw380dp-land
invalid resource directory name: C:\zda\files-to-edit\framework-res.apk\res/values-sw600dp
invalid resource directory name: C:\zda\files-to-edit\framework-res.apk\res/values-sw600dp-land
invalid resource directory name: C:\zda\files-to-edit\framework-res.apk\res/values-sw600dp-port
invalid resource directory name: C:\zda\files-to-edit\framework-res.apk\res/values-sw600dp-w960dp
invalid resource directory name: C:\zda\files-to-edit\framework-res.apk\res/values-sw720dp
invalid resource directory name: C:\zda\files-to-edit\framework-res.apk\res/values-sw720dp-land
invalid resource directory name: C:\zda\files-to-edit\framework-res.apk\res/values-sw720dp-port
invalid resource directory name: C:\zda\files-to-edit\framework-res.apk\res/values-sw720dp-w1280dp
invalid resource directory name: C:\zda\files-to-edit\framework-res.apk\res/values-w360dp
invalid resource directory name: C:\zda\files-to-edit\framework-res.apk\res/values-w480dp
invalid resource directory name: C:\zda\files-to-edit\framework-res.apk\res/values-w500dp
invalid resource directory name: C:\zda\files-to-edit\framework-res.apk\res/values-w600dp
invalid resource directory name: C:\zda\files-to-edit\framework-res.apk\res/values-w720dp
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\ubuntu\AppData\Local\Temp\APKTOOL3963921379553896941.tmp, -x, -S, C:\zda\files-to-edit\framework-res.apk\res, -M, C:\zda\files-to-edit\framework-res.apk\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
at brut.androlib.Androlib.buildResources(Androlib.java:248)
at brut.androlib.Androlib.build(Androlib.java:171)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\ubuntu\AppData\Local\Temp\APKTOOL3963921379553896941.tmp, -x, -S, C:\zda\files-to-edit\framework-res.apk\res, -M, C:\zda\files-to-edit\framework-res.apk\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more

I got the same error on try to compile :((
 

tyson kishor

Member
Jul 21, 2014
9
5
thanx & need help

i have done everything correct and got an update file to but how to install it. bcoz 'm using Micromax canvas nitro 4.4.2 kitkat verson in which external sd card optoion doesn't work plzz help me to fix it
 

wmn79

Senior Member
Feb 20, 2008
281
54
Amsterdam
With me the issue was because the 7za.exe was unable to be extracted to the resources dir. I think this is because I am using Windows 7 64-bit. What I did is copy 7z.exe and 7z.dll from my normal 7zip installation folder (program files/7zip) and paste this is in the resources directory. Next I opened the runme.bat in Notepad++ and replaced all 4 occurrences of 7za with 7z. This did the trick for me. Hope this helps you guys.
 

FROSTSMAKER

New member
Jan 12, 2015
1
0
Help Me Error

java version "1.7.0_04"
Java(TM) SE Runtime Environment (build 1.7.0_04-b20)
Java HotSpot(TM) Client VM (build 23.0-b21, mixed mode)
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources: spec=0x01080297 drawable/ic_ab_back_holo_dark, config=-hdpi
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:65)
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:58)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:196)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:165)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:130)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:105)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:82)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:48)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:315)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:50)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:43)
at brut.androlib.Androlib.getResTable(Androlib.java:44)
at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:148)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)
at brut.apktool.Main.cmdDecode(Main.java:128)
at brut.apktool.Main.main(Main.java:65)

thanks for frameworkflasher, but,.. I got that problem.
please give me a solution.
 

SanMistry

Member
Aug 16, 2014
37
4
Dear mate, congrats for this.

But i need help regarding Xposed Framework. I'm using CM11 in XoloQ1000 & framework option is inbuilt in setting.

Now, when i try to update any module by download in side & install, it shows 'App can't installed" & aays same package with similar signature is installed.

Please help me if possible.
 

Mr.CuriosCity

New member
Feb 7, 2015
2
0
<5> Great news ?

do i really have to wait the zip ? how long does it take ? where can i see the final zip file folder ?
-TIA- newbie here help T-T
 

Mr.CuriosCity

New member
Feb 7, 2015
2
0
Error in Decompiling

java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b17)
Java HotSpot(TM) Client VM (build 23.25-b01, mixed mode, sharing)
Could Not Find C:\Documents and Settings\frankie 8\Desktop\fram\resources\struct\system\framework\framework-res.apk
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources: spec=0x010802ad drawable/ic_ab_back_holo_dark, config=-hdpi
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:65)
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:58)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:196)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:165)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:130)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:105)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:82)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:48)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:315)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:50)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:43)
at brut.androlib.Androlib.getResTable(Androlib.java:44)
at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:148)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)
at brut.apktool.Main.cmdDecode(Main.java:128)
at brut.apktool.Main.main(Main.java:65)
.
.
??
 

ocd_amp

Senior Member
May 28, 2014
372
202
Install Java, or if you have some program that uses Java, copy over JRE folder into this program's folder, and then Edit the Bat file. CTRL F to find all commands that access JAVA and Enter the Proper Path i.e. D:\Android\Temp-folder\FrameworkFlasher-1.1.4\jre\bin or Whatever Path you have. Then run the batch file.

I get the same error. Has anyone figured out why? @wesf90 have you updated this tool?
 

grdharsh19

Senior Member
Feb 10, 2015
65
2
Not Working...!!!

hey its not working for me .... i open runme.bat and pressed 1 for decompiling the framework
which was kept in the folder " place framework res.apk here" but nothing was decompiled and a error had occurred saying " ECHO is off. An error has occurred. check logs for more info." and at last press any key... . when i pressed nothing happened................ i am not geting what is the problem...... plezz just see what is the problem..??
 

trogl0dyte

Member
Aug 6, 2013
32
7
Corrected and updated the tool to v 1.1.4b

Corrected errors in RunMe.bat and updated the tool with latest apktool v2.0.1 and faapt v2 by Chainfire.
Cheers!!:highfive:
Tool works fine now!:):)
 

Attachments

  • FrameworkFlasher-1.1.4b.zip
    6.4 MB · Views: 752

freeare

New member
Sep 12, 2015
1
0
Problem

Hi!

First of all, thank you for this great thing! But for me not worked, when i installed from cwm.
The cwm says: installation aborted, status 255.
The decompile-edit-recompile-sign-create zip was done well.
Device: Chuwi Vi10 Pro
 
Last edited:

MBechirM

Senior Member
Mar 28, 2017
142
79
Tunis
Samsung Galaxy S7 Edge
| Log - Sat 08/12/2017 -- 0:23:00.61 | folder\LogSimple.txt
---------------------------------------------------------------------
THE LOG BELOW IS FOR YOUR MOST RECENT PROCESS ONLY.


java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Could not decode arsc file
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:55)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:315)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:50)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:43)
at brut.androlib.Androlib.getResTable(Androlib.java:44)
at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:148)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)
at brut.apktool.Main.cmdDecode(Main.java:128)
at brut.apktool.Main.main(Main.java:65)
Caused by: java.io.IOException: Expected: 0x001c0001, got: 0x00000000
at brut.util.ExtDataInput.skipCheckInt(ExtDataInput.java:48)
at brut.androlib.res.decoder.StringBlock.read(StringBlock.java:45)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:97)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:82)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:48)
... 8 more
---------------------------------------------------------------------------------------------------------
Update: ok i fixed it by updating to latest version but now i get this


---------------------------------------------------------------------
| Log - Sat 08/12/2017 -- 0:34:15.86 | folder\FrameworkFlasher-1.1.4b\LogSimple.txt
---------------------------------------------------------------------
THE LOG BELOW IS FOR YOUR MOST RECENT PROCESS ONLY.


java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)
W: Config flags size > 48. Exceeding bytes: 0x100000000000000.
W: Invalid config flags detected. Dropping resources: dimen-watch-v23-ERR0
W: Config flags size > 48. Exceeding bytes: 0x100000000000000.
W: Invalid config flags detected. Dropping resources: dimen-w180dp-watch-v23-ERR1
W: Config flags size > 48. Exceeding bytes: 0x200000000000000.
W: Invalid config flags detected. Dropping resources: dimen-watch-v23-ERR2
W: Config flags size > 48. Exceeding bytes: 0x200000000000000.
W: Invalid config flags detected. Dropping resources: dimen-w210dp-watch-v23-ERR3
W: Config flags size > 48. Exceeding bytes: 0x100000000000000.
W: Invalid config flags detected. Dropping resources: layout-watch-v23-ERR4
W: Config flags size > 48. Exceeding bytes: 0x200000000000000.
W: Invalid config flags detected. Dropping resources: layout-watch-v23-ERR5
W: Config flags size > 48. Exceeding bytes: 0x200000000000000.
W: Invalid config flags detected. Dropping resources: bool-watch-v23-ERR6
W: Config flags size > 48. Exceeding bytes: 0x100000000000000.
W: Invalid config flags detected. Dropping resources: fraction-watch-v23-ERR7
W: Config flags size > 48. Exceeding bytes: 0x100000000000000.
W: Invalid config flags detected. Dropping resources: fraction-w170dp-watch-v23-ERR8
W: Config flags size > 48. Exceeding bytes: 0x200000000000000.
W: Invalid config flags detected. Dropping resources: fraction-watch-v23-ERR9
W: Could not decode attr value, using undecoded value instead: ns=android, name=padding, value=0x010500c8
W: Could not decode attr value, using undecoded value instead: ns=android, name=layout_width, value=0x010500c6
W: Could not decode attr value, using undecoded value instead: ns=android, name=layout_height, value=0x010500c6
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x010500c8
at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:59)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:65)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:61)
at brut.androlib.res.data.value.ResReferenceValue.getReferent(ResReferenceValue.java:57)
at brut.androlib.res.data.value.ResReferenceValue.encodeAsResXml(ResReferenceValue.java:47)
at brut.androlib.res.data.value.ResScalarValue.encodeAsResXmlAttr(ResScalarValue.java:46)
at brut.androlib.res.decoder.ResAttrDecoder.decode(ResAttrDecoder.java:47)
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:247)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:134)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:104)
at brut.apktool.Main.cmdDecode(Main.java:165)
at brut.apktool.Main.main(Main.java:81)
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 317
    Finally! After days of struggling to figure out how to modify my ROM's framework-res.apk and create a working flashable update.zip to install the framework-res.apk changes, I have finally figured out how (big thanks to the guys here: http://xdaforums.com/showthread.php?p=20962080#post20962080) and have created an automated script to help others struggling with the same problem.

    Framework Flasher 1.1.4
    Feel free to download and experiment with it. This is my first gift to the XDA/Android Hacking community, and I plan on doing more. I just want to test the waters for now :) Feedback would be nice. Let me know if I've helped you in some way!

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

    What does it do?
    It extracts your framework-res.apk file and allows you to edit the files. After editing, the script will compile, sign the apk, create your update.zip with the correct structure for flashing, and then sign the .zip. Everything you need to modify and flash your framework-res.apk file.


    How do I use it?
    Download the .zip from the link below and extract it somewhere on your PC. Drag the framework-res.apk file that you want to modify and/or flash into the /place-framework-res-here/ directory. Double-click on RunMe.bat and off you go! Do the steps (1-5) in order and you shouldn't have any problems.


    Who needs this?
    A LOT of people according to how many google searches I did in the past 3-4 days.


    Will it work for files other than framework-res.apk?
    Currently, no. However it would be easy to implement that functionality if I saw that people would benefit from it.


    I found a bug... what do I do?
    Post it in this topic. I'll do what I can to make continual updates as long as I see people are benefiting from it. I'm sure there are bugs in it somewhere, so just let me know.


    Where do I download this snazzy piece of software?
    http://www.mediafire.com/?1nc14hkhs2yrqmt


    The little disclaimer
    If you download this tool, please say thanks! Not only does it motivate me to continue to improve this software, but it also let's me know how many users are using it! Thanks!
    This script is mainly intended for use with editing script files (xml, etc.), and normal (non 9png) images. 9pngs have been successfully repacked using this tool! If you run into any problems, be sure to make it known!
    This tools was created to work with the Droid X2. If you are experiencing problems using it, first ensure that you are in fact using a Droid X2.
    8
    Change Log
    1.1.4 (1/14/12)
    - Corrected the Log error. You can now see error logs!
    - Corrected an error processing problem where Framework Flasher would instantly close without warning

    1.1 (1/7/12)
    - Made compatibility tweaks
    - Removed unnecessary overhead

    1.0 (1/6/12)
    - Initial Release


    When reporting errors, please ensure that there are no spaces in your file path, and include what ROM and version you are running.
    5
    Updated to 1.1.4a

    Hey there!

    I've just updated & packed Framework Flasher as per fralken guidelines. Pushed to version 1.1.4a

    Enjoy! :highfive:
    3
    Corrected and updated the tool to v 1.1.4b

    Corrected errors in RunMe.bat and updated the tool with latest apktool v2.0.1 and faapt v2 by Chainfire.
    Cheers!!:highfive:
    Tool works fine now!:):)
    3
    Hello :)

    This is an awesome little tool you got here. I haven't tried it yet but I'll likely give it a shot eventually.

    You should add functionality for SystemUI.apk, that's the other "real big" file people like to edit. Just a suggestion based on what I know about theming :)

    Very nice!

    Thanks. I will definitely look into adding this. I'll update the OP with any changes or updates.

    So r u telling me this will modify everything including the. 9 png images..also can u get into the xml files as well or images only...i use apk manager and with the. 9 pngs u cannot touch the 9 patches or change the image without using draw 9 patch to ensure the apk will recompile

    Sent from my DROID X2 using xda premium

    Not tested 9pngs with this, it's mainly intended for scripting (xml files, etc. along with normal non 9png images). I've updated the OP to include a little disclaimer stating this fact. Thanks for pointing that out.