Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

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

OP wesf90

24th May 2012, 03:55 AM   |  #61  
blackhemi4x4's Avatar
Senior Member
Flag Loganville, GA USA
Thanks Meter: 63
 
277 posts
Join Date:Joined: Mar 2011
More
help, step 2 echo off error
Ive tried a few times and cant compile this. I made one value change, but even if i make no changes, i get the same error. this is the stock 4.0.4 ICS nexus s framework.

here is the error, please help


java version "1.7.0_03"
Java(TM) SE Runtime Environment (build 1.7.0_03-b05)
Java HotSpot(TM) 64-Bit Server VM (build 22.1-b02, mixed mode)
I: Loading resource table...
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: C:\FrameworkFlasher-1.1.4\files-to-edit\framework-res.apk\res/animator
invalid resource directory name: C:\FrameworkFlasher-1.1.4\files-to-edit\framework-res.apk\res/drawable-sw600dp-hdpi
invalid resource directory name: C:\FrameworkFlasher-1.1.4\files-to-edit\framework-res.apk\res/interpolator
invalid resource directory name: C:\FrameworkFlasher-1.1.4\files-to-edit\framework-res.apk\res/layout-sw600dp
invalid resource directory name: C:\FrameworkFlasher-1.1.4\files-to-edit\framework-res.apk\res/layout-w600dp
invalid resource directory name: C:\FrameworkFlasher-1.1.4\files-to-edit\framework-res.apk\res/mipmap-hdpi
invalid resource directory name: C:\FrameworkFlasher-1.1.4\files-to-edit\framework-res.apk\res/mipmap-ldpi
invalid resource directory name: C:\FrameworkFlasher-1.1.4\files-to-edit\framework-res.apk\res/mipmap-mdpi
invalid resource directory name: C:\FrameworkFlasher-1.1.4\files-to-edit\framework-res.apk\res/mipmap-xhdpi
invalid resource directory name: C:\FrameworkFlasher-1.1.4\files-to-edit\framework-res.apk\res/values-h720dp
invalid resource directory name: C:\FrameworkFlasher-1.1.4\files-to-edit\framework-res.apk\res/values-sw600dp
invalid resource directory name: C:\FrameworkFlasher-1.1.4\files-to-edit\framework-res.apk\res/values-sw600dp-land
invalid resource directory name: C:\FrameworkFlasher-1.1.4\files-to-edit\framework-res.apk\res/values-sw600dp-w1024dp
invalid resource directory name: C:\FrameworkFlasher-1.1.4\files-to-edit\framework-res.apk\res/values-sw600dp-w1280dp
invalid resource directory name: C:\FrameworkFlasher-1.1.4\files-to-edit\framework-res.apk\res/values-w360dp
invalid resource directory name: C:\FrameworkFlasher-1.1.4\files-to-edit\framework-res.apk\res/values-w480dp
invalid resource directory name: C:\FrameworkFlasher-1.1.4\files-to-edit\framework-res.apk\res/values-w500dp
invalid resource directory name: C:\FrameworkFlasher-1.1.4\files-to-edit\framework-res.apk\res/values-w600dp
invalid resource directory name: C:\FrameworkFlasher-1.1.4\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\MATTHE~1\AppData\Local\Temp\APKTOOL627879 0603619692638.tmp, -x, -S, C:\FrameworkFlasher-1.1.4\files-to-edit\framework-res.apk\res, -M, C:\FrameworkFlasher-1.1.4\files-to-edit\framework-res.apk\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(An drolibResources.java:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib .java:301)
at brut.androlib.Androlib.buildResources(Androlib.jav a: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\MATTHE~1\AppData\Local\Temp\APKTOOL627879 0603619692638.tmp, -x, -S, C:\FrameworkFlasher-1.1.4\files-to-edit\framework-res.apk\res, -M, C:\FrameworkFlasher-1.1.4\files-to-edit\framework-res.apk\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(An drolibResources.java:191)
... 6 more
6th June 2012, 04:40 PM   |  #62  
Junior Member
Flag Nottingham
Thanks Meter: 2
 
16 posts
Join Date:Joined: Dec 2010
Donate to Me
More
I'm getting pretty much the same set of errors as blackhemi4x4 above.
7th June 2012, 05:06 AM   |  #63  
timekeeper's Avatar
Senior Member
Flag Vancouver, BC
Thanks Meter: 47
 
400 posts
Join Date:Joined: Nov 2006
More
Thanks for your tool! I'm trying it on a framework-res from a CM9/ICS based rom and editing some xml lines in framework-res.apk\res\values\dimens.xml.

However, I get an error after it decompiles, and I am trying to recompile it, even after a not making any changes. It says echo off, and some error have occurred. Here is the framework-res:

http://dl.dropbox.com/u/2339461/framework-res.apk

and the logfile:

http://dl.dropbox.com/u/2339461/LogProcess.txt

Any ideas would be much appreciated.
9th June 2012, 08:29 AM   |  #64  
chitose_ndy's Avatar
Senior Member
Flag Jakarta
Thanks Meter: 144
 
1,439 posts
Join Date:Joined: Jan 2011
More
wow!

thanks so much for sharing

im gonna try this on my sony xperia S.

if its working, i will made a thread for you on the xperia s forum
9th June 2012, 09:59 AM   |  #65  
chitose_ndy's Avatar
Senior Member
Flag Jakarta
Thanks Meter: 144
 
1,439 posts
Join Date:Joined: Jan 2011
More
okay.. there's an error while recompiling..

here :

-r, --no-res
Do not decode resources.
-d, --debug
Decode in debug mode. Check project page for more info.
-f, --force
Force delete destination directory.
-t <tag>, --frame-tag <tag>
Try to use framework files tagged by <tag>.
--keep-broken-res
Use if there was an error and some resources were dropped, e.g.:
"Invalid config flags detected. Dropping resources", but you
want to decode them anyway, even with errors. You will have to
fix them manually before building.
b[uild] [OPTS] [<app_path>] [<out_file>]
Build an apk from already decoded application located in <app_path>.

It will automatically detect, whether files was changed and perform
needed steps only.

If you omit <app_path> then current directory will be used.
If you omit <out_file> then <app_path>/dist/<name_of_original.apk>
will be used.

OPTS:

-f, --force-all
Skip changes detection and build all files.
-d, --debug
Build in debug mode. Check project page for more info.

if|install-framework <framework.apk> [<tag>]
Install framework file to your system.

For additional info, see: http://code.google.com/p/android-apktool/

ECHO is off.
An error has occurred. Check the log for more info.
ECHO is off.

Press any key to continue . . .

it says that ECHO is off.
what is that actually?
11th June 2012, 11:18 PM   |  #66  
bswann's Avatar
Senior Member
Flag Mobile,AL
Thanks Meter: 515
 
959 posts
Join Date:Joined: Mar 2011
More
I'm getting that same error about echo and I cannot find anything about it.
13th June 2012, 06:12 PM   |  #67  
Senior Member
Thanks Meter: 25
 
112 posts
Join Date:Joined: Apr 2012
Quote:
Originally Posted by wesf90

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://forum.xda-developers.com/show...0#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!
Updates are on the way! This script is constantly being tweaked to allow for more functionality. Subscribe to this thread for the latest news and updates.

A very big thanks for this toll.
I was able to prepare update.zip using ur script but unable to flash.
Error0 : installation aborted.
Pl help me how to install this...
Just copying the apk made phone into bootlooop. Pl help to install

Sent from my Micromax A60 using XDA
Last edited by s.yogamurthy; 13th June 2012 at 06:32 PM.
13th July 2012, 10:25 AM   |  #68  
masterex567's Avatar
Senior Member
Thanks Meter: 1,801
 
2,313 posts
Join Date:Joined: Mar 2012
Help.
Hey. I tried to use this to make some changes to framework-res.apk. It decompiles easily but the problem comes when recompiling.

It tells me Echo is off.

The log shows:
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
libpng error: Read Error
ERROR: Failure processing PNG image C:\framework\files-to-edit\framework-res.apk\res\drawable-mdpi\jog_tab_bar_left_end_confirm_gray.9.png
libpng error: Read Error

And there are hundreds of those errors.
And hundreds of these ones:
C:\framework\files-to-edit\framework-res.apk\res\values\public.xml:3258: error: Public symbol drawable/jog_ring_holo_ring_normal declared here is not defined.

And this one: Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\Preyansh\AppData\Local\Temp\APKTOOL342537 0845215149414.tmp, -x, -S, C:\framework\files-to-edit\framework-res.apk\res, -M, C:\framework\files-to-edit\framework-res.apk\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(An drolibResources.java:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib .java:301)
at brut.androlib.Androlib.buildResources(Androlib.jav a: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\Preyansh\AppData\Local\Temp\APKTOOL342537 0845215149414.tmp, -x, -S, C:\framework\files-to-edit\framework-res.apk\res, -M, C:\framework\files-to-edit\framework-res.apk\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(An drolibResources.java:191)
... 6 more

The full log is attached.
Attached Files
File Type: txt LogProcess.txt - [Click for QR Code] (147.2 KB, 8 views)
14th July 2012, 10:27 PM   |  #69  
crazyguns's Avatar
Senior Member
Flag London
Thanks Meter: 33
 
185 posts
Join Date:Joined: Aug 2011
Donate to Me
More
your thread was an absolute life saver dude!

noob here, about 2 weeks since my first android phone, sgs2 white. i thought i was a smarta$$ when i renamed framework-res.apk as .zip and extracted, edited and replaced using rootExplorer! the whole thing crashed and got stuck in infinite boot! thankfully i have a dual boot with cmiui, and flashed the old framework-res update.

then i googled like hell about framework and found your amazing thread! This is the simplest thing ever! Thanks for making it man.
I've now properly modded it with your flasher!

Wanted to get rid of the pattern lock pngs, so that it looks extra conspicuous! success!
15th July 2012, 02:24 PM   |  #70  
AlexVendettA's Avatar
Junior Member
Flag Florence
Thanks Meter: 2
 
25 posts
Join Date:Joined: Jul 2012
More
Unhappy
i have my htc one x(europe) and i tried this application and decompilation works.. but compilation doesn't..
p.s. sorry for my english i'm italian -.-''
p.p.s. the phone has android 4.0.3 and HTC sense 4.0 and it's rooted too
there is my log file
Attached Files
File Type: txt LogProcess.txt - [Click for QR Code] (25.5 KB, 7 views)
Last edited by AlexVendettA; 15th July 2012 at 02:39 PM.

Post Reply Subscribe to Thread

Tags
error status 6, error status 7, flash framework, flash update, update.zip
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes