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

Search This thread

ehidle

Member
Nov 23, 2011
40
2
Getting a lot of this stuff when I try to recompile for CM10:

I: Building resources...
invalid resource directory name: C:\Users\ehidle\Desktop\framework\files-to-edit\framework-res.apk\res/anim-sw720dp
invalid resource directory name: C:\Users\ehidle\Desktop\framework\files-to-edit\framework-res.apk\res/animator
invalid resource directory name: C:\Users\ehidle\Desktop\framework\files-to-edit\framework-res.apk\res/drawable-land-xhdpi
invalid resource directory name: C:\Users\ehidle\Desktop\framework\files-to-edit\framework-res.apk\res/drawable-sw600dp-nodpi
invalid resource directory name: C:\Users\ehidle\Desktop\framework\files-to-edit\framework-res.apk\res/drawable-sw600dp-xhdpi
invalid resource directory name: C:\Users\ehidle\Desktop\framework\files-to-edit\framework-res.apk\res/drawable-sw720dp-nodpi
invalid resource directory name: C:\Users\ehidle\Desktop\framework\files-to-edit\framework-res.apk\res/drawable-xhdpi
invalid resource directory name: C:\Users\ehidle\Desktop\framework\files-to-edit\framework-res.apk\res/interpolator
invalid resource directory name: C:\Users\ehidle\Desktop\framework\files-to-edit\framework-res.apk\res/layout-sw600dp
invalid resource directory name: C:\Users\ehidle\Desktop\framework\files-to-edit\framework-res.apk\res/layout-sw720dp
invalid resource directory name: C:\Users\ehidle\Desktop\framework\files-to-edit\framework-res.apk\res/layout-w600dp
invalid resource directory name: C:\Users\ehidle\Desktop\framework\files-to-edit\framework-res.apk\res/mipmap-hdpi
invalid resource directory name: C:\Users\ehidle\Desktop\framework\files-to-edit\framework-res.apk\res/mipmap-ldpi
invalid resource directory name: C:\Users\ehidle\Desktop\framework\files-to-edit\framework-res.apk\res/mipmap-mdpi
invalid resource directory name: C:\Users\ehidle\Desktop\framework\files-to-edit\framework-res.apk\res/mipmap-xhdpi
invalid resource directory name: C:\Users\ehidle\Desktop\framework\files-to-edit\framework-res.apk\res/values-h720dp
invalid resource directory name: C:\Users\ehidle\Desktop\framework\files-to-edit\framework-res.apk\res/values-sw600dp
invalid resource directory name: C:\Users\ehidle\Desktop\framework\files-to-edit\framework-res.apk\res/values-sw600dp-land
invalid resource directory name: C:\Users\ehidle\Desktop\framework\files-to-edit\framework-res.apk\res/values-sw600dp-w960dp
invalid resource directory name: C:\Users\ehidle\Desktop\framework\files-to-edit\framework-res.apk\res/values-sw720dp
invalid resource directory name: C:\Users\ehidle\Desktop\framework\files-to-edit\framework-res.apk\res/values-sw720dp-land
invalid resource directory name: C:\Users\ehidle\Desktop\framework\files-to-edit\framework-res.apk\res/values-sw720dp-port
invalid resource directory name: C:\Users\ehidle\Desktop\framework\files-to-edit\framework-res.apk\res/values-sw720dp-w1280dp
invalid resource directory name: C:\Users\ehidle\Desktop\framework\files-to-edit\framework-res.apk\res/values-w360dp
invalid resource directory name: C:\Users\ehidle\Desktop\framework\files-to-edit\framework-res.apk\res/values-w480dp
invalid resource directory name: C:\Users\ehidle\Desktop\framework\files-to-edit\framework-res.apk\res/values-w500dp
invalid resource directory name: C:\Users\ehidle\Desktop\framework\files-to-edit\framework-res.apk\res/values-w600dp
invalid resource directory name: C:\Users\ehidle\Desktop\framework\files-to-edit\framework-res.apk\res/values-w720dp

All of these folders are present on the HDD, but are those forward slashes supposed to be backslashes?
 
Last edited:

dejanxxxx

Senior Member
Mar 21, 2012
333
11
KRAGUJEVAC
I have problem, when want decompile framewrok.jar, I get this - Error: Unable to access jarfile apktool.jar I use windows 8. What do, must decompile for porting rom. I kill my self, cant find solution 3hours.
 

dreamwave

Senior Member
update.zip?

Does it wipe userdata? I'm using an old tmobile g1 w/o a data/phone plan, and I know how to flash rc29 turn on debug etc. to sign in with WIFI, but if I need to sign in again after the update, it isn't an option, plus does even it work on the g1/adp1?
P.S. I have stock android 1.6 rooted (universal androot) rom.
EDIT:Apparently it doesn't work on the g1;well, at least I didn't brick my phone like the last time...
 
Last edited:

slicingtaco

Senior Member
May 8, 2012
911
318
C:\Earth\USA\California\Freakmont
I get this error code upon trying to decompile?


Code:
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources: spec=
0x01080291 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(AndrolibResource
s.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)
 

sot74

New member
Apr 14, 2013
3
0
java

when i run the program choosing no 1 for decompilation i get the following mesage:
'java' is not recognized as an internal or external command,
operable program or batch file.

Java is installed in my PC.

can any tell me what should i do??


thanks
 

fralken

New member
Aug 7, 2013
4
1
I get this error code upon trying to decompile?


Code:
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources: spec=
0x01080291 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(AndrolibResource
s.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)

You can replace apktool.jar with the most recent you can find in "android-apktool" project (search for apktool in Google, I cant post the url right now)

---------- Post added at 01:34 AM ---------- Previous post was at 01:26 AM ----------

when i run the program choosing no 1 for decompilation i get the following mesage:
'java' is not recognized as an internal or external command,
operable program or batch file.

Java is installed in my PC.

can any tell me what should i do??


thanks

You must add the folder containing java binaries in PATH environment variable, before running RunMe.bat, e.g.:

set PATH=C:\Program Files (x86)\Java\jre7\bin;%PATH%
 

fralken

New member
Aug 7, 2013
4
1
Btw, you need to update also "aapt.exe", you can get it from Google ADT bundle, download it from android developer site..
 

fralken

New member
Aug 7, 2013
4
1
I found that RunMe.bat in FrameworkFlash 1.1.4 has some small errors here and there.

I also updated ApkTool to version 1.5.2 and aapt.exe to most recent version (now from adt-bundle-windows-x86_64-20130729.zip)

Here is the patch diff of RunMe.bat (I changed version number to 1.1.4a to keep it different). Maybe it can be useful to others.
Code:
3,4c3,4
< SET version=1.1.4
< SET logfile=%~dp0LogSimple.txt
---
> SET version=1.1.4a
> SET logfile="%~dp0LogSimple.txt"
102c102
< echo ApkTool v1.4.3
---
> echo ApkTool v1.5.2
166c166
< java -Xmx%heapn%m -jar apktool.jar b %~dp0files-to-edit\framework-res.apk %~dp0place-framework-res-here\unsignedframework-res.apk
---
> java -Xmx%heapn%m -jar apktool.jar b "%~dp0files-to-edit\framework-res.apk" "%~dp0place-framework-res-here\unsignedframework-res.apk"
172c172
< 7za x -o %~dp0temp-files %~dp0place-framework-res-here\framework-res.apk
---
> 7za x -o"%~dp0temp-files" "%~dp0place-framework-res-here\framework-res.apk"
174c174
< DEL /Q %~dp0temp-files/resources.arsc
---
> DEL /Q "%~dp0temp-files\resources.arsc"
204c204
< 7za a -tzip %~dp0place-framework-res-here\unsignedframework-res.apk %~dp0temp-files\* -mx%usrc% -r
---
> 7za a -tzip "%~dp0place-framework-res-here\unsignedframework-res.apk" "%~dp0temp-files\*" -mx%usrc% -r
324c324
< echo        ^(  '  `  ^)`-._    _.-'^|;,^|    `-,    \_\__\`,-'>-.,-._
---
> echo        ^(  '  `  ^)`-._    _.-'^|;,^|    `-,    \_\__\`,-'.-.,-._
 
  • Like
Reactions: boywithabeard

johnnyl1111

Member
Mar 1, 2013
26
4
echo off

in my case the echo off error was caused by windows thumbs.db hidden files in the folders when i viewed as icons instead of list.
 

punkmexic

Senior Member
Nov 27, 2012
142
10
i get errors when it compiles

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
 

kennyTSV

Member
Dec 10, 2013
17
1
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.

Hi there! Thanks for creating this tool. But I'm kind of stuck trying to use it because the above instructions says to put the framework-res.apk file into that "/place-framework-res-here" directory.

So far, I extracted your zipped files to a directory --- such as c:\frameworkflasher\ directory... and then I tried creating a directory called "place-framework-res-here" under the c"\frameworkflasher directory and I also created a directory under the c: drive root directory, c:\place-framework-res-here ..... and I tried using your program to decompile.... but for either case, where the framework-res.apk was placed in either directory, it came up with a message saying that the file could not be found.

So far, I notice that the flasher.zip file does not have or contain any directory within that says 'place-framework-res-here'....so I thought it was necessary to create a directory of that name..... called exactly 'place-framework-res-here'. Thanks for your help in advance.
 
N

NOOK!E

Guest
Thanks a bunch!

Works great, now I can finally make some cool changes to my framework-res! :D
 

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.