Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,783,010 Members 44,736 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
blackhemi4x4
Old
#61  
blackhemi4x4's Avatar
Senior Member
Thanks Meter 63
Posts: 276
Join Date: Mar 2011
Location: Loganville, GA USA
Default 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
Nexus 7 32gb Wi-Fi 4.2.1
SGSIII 16gb Pebble Blue
Nexus S
 
Red_Nick
Old
#62  
Junior Member
Thanks Meter 2
Posts: 16
Join Date: Dec 2010
Location: Nottingham

 
DONATE TO ME
I'm getting pretty much the same set of errors as blackhemi4x4 above.
 
timekeeper
Old
#63  
timekeeper's Avatar
Senior Member
Thanks Meter 47
Posts: 400
Join Date: Nov 2006
Location: Vancouver, BC
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.

LG G2-D803 running cloudystock 4.4.2 rooted/xposed
Google Nexus7 16GB running JB 4.3 ParanoidAndroid

Retired:
Samsung Galaxy S4 i9500 running wanamlite V3.4 Android 4.3 with Adam kernel
Samsung Galaxy Note 2 N7100 running rooted stock Touchwiz
Samsung Galaxy S2X T989D on Wind Mobile running CM10-nightlies
Wind Mobile Optimus G2x running Genesis - Stable Build1 - CM9/AOKP Hybrid
T-Mobile HTC HD2 running NexusHD2-ICS-4.0.3-CM9 V2.3 HWA

Need Dropbox? (+500MB)
 
chitose_ndy
Old
#64  
chitose_ndy's Avatar
Senior Member
Thanks Meter 138
Posts: 1,421
Join Date: Jan 2011
Location: Jakarta
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
Smartphone at the moment

My second Smartphone

My first Smartphone
 
chitose_ndy
Old
#65  
chitose_ndy's Avatar
Senior Member
Thanks Meter 138
Posts: 1,421
Join Date: Jan 2011
Location: Jakarta
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?
Smartphone at the moment

My second Smartphone

My first Smartphone
 
bswann
Old
#66  
bswann's Avatar
Senior Member
Thanks Meter 514
Posts: 959
Join Date: Mar 2011
Location: Mobile,AL
I'm getting that same error about echo and I cannot find anything about it.
 
s.yogamurthy
Old
(Last edited by s.yogamurthy; 13th June 2012 at 05:32 PM.)
#67  
Senior Member
Thanks Meter 25
Posts: 112
Join Date: Apr 2012
Quote:
Originally Posted by wesf90 View Post
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
 
masterex567
Old
#68  
masterex567's Avatar
Senior Member
Thanks Meter 1,790
Posts: 2,312
Join Date: Mar 2012
Default 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, 5 views)
Samsung Galaxy Ace S5830: DroidACE
Samsung Galaxy S3 I9300:
If you like my work, Press that thanks button!
 
crazyguns
Old
#69  
crazyguns's Avatar
Senior Member
Thanks Meter 31
Posts: 181
Join Date: Aug 2011
Location: London

 
DONATE TO ME
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!
 
AlexVendettA
Old
(Last edited by AlexVendettA; 15th July 2012 at 01:39 PM.)
#70  
AlexVendettA's Avatar
Junior Member
Thanks Meter 1
Posts: 22
Join Date: Jul 2012
Location: Florence
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)

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

Advanced Search
Display Modes