yashsingh1/xdaforums huggingface dataset:
[Motorola Droid X2] wesf90:
I don't see the attachment, possibly forgot?

I'm putting the final tweaks on Framework Flasher v1.2. This will hopefully resolve any past errors. The release will be soon, there are BIG changes. Would have been today but I found a pretty big bug that might take a day or two to fix.

Wes
[Motorola Droid X2] _Sparks:
Sorry I uploaded it on xda before but I think it never worked because it was too large. The link for the file is attached in my previous post.
[Motorola Droid X2] wesf90:
No problem, thanks. I'll get back with you as soon as I can :)
[Motorola Droid X2] wesf90:
Sparks and trailblazer:

Alrighty, sorry for such a delay in response, I have to make FrameworkFlash work around my normal job :)

Anyway, the error is being caused from incorrectly formatted XML files. There is a bug report on it here: http://code.google.com/p/android-ap... Type Status Priority Milestone Owner Summary

In order to fix this error and allow the file to be compiled correctly, you would need to edit the xml files causing the problem. Apparently, it's caused by there being more than one "%d" in some of the values.

I'm releasing a quick update to FF (version 1.1.4) which corrects the logging problem. This way you can view your logs. Hopefully within a week I'll be releasing FF 1.2, which adds a lot more features to FF which could possibly help you with this problem :)
[Motorola Droid X2] trailblazerz11:
I read somewhere else to add '%' to the 2nd '%d' in each file it errors out.

I used apk mutitool and it compiled.....after editing half the value files.

Thanks for your support and help!
[Motorola Droid X2] wesf90:
APK Multitool receives the same error as does Framework Flasher, the only difference is that APKM continues to compile anyway, while FF does not. I may override this for future releases.

Thanks for the input!
[Motorola Droid X2] nism240sx:
should this work with cm7???
[Motorola Droid X2] wesf90:
I don't see why not. However, since DX2 CM7 is still at an unstable release level, I've not even tried. Go ahead and make a nandroid backup and give it a shot! Report back here and let us know the results. I'm sure a lot of people would love to start modding CM7.

Wes
[Motorola Droid X2] shmizan:
hey.

megaupload is offline.. is there another mirror?
[Motorola Droid X2] johnp357:
yes, please tell us how you resolved this. i get the same error.

thanks,
[Motorola Droid X2] IDMA.DROID.X2:
All Mega sites are down, government attacked them and arrested Dotcom for a boat load of stuff. So don't expect to see them around anymore...
[Motorola Droid X2] DandyNL:
Thanks! This helps me a lot:)

Can you make this also for SystemUI.apk?

Keep up the good work!
[Motorola Droid X2] :
Just tried to use it. When I try to recompile I get the following http://screencast.com/t/f10YXWLLfR .. But, there's nothing in the logs.
[Motorola Droid X2] toxic77:
Hi,

I tried your tool, yes it created the update.zip file with a signed framework res apk in it, it installed with no problems, but after rebooting the tablet it didn't overwrite the framework res apk on my tablet, I also checked the file size using root explorer and the apk is not changed at all?

Hope you could fix this..
[Motorola Droid X2] batabe:
Place the Framework Flasher's directory in the root of your drive.

Probably it has problem with spaces in the path...
[Motorola Droid X2] _Sparks:
Are you sure its easy to implement. You still haven't included this feature. I mean no offence.
[Motorola Droid X2] wesf90:
Fairly easy. I had began working on v2 of the software and it was coming along great. Working for many .apk files, doing everything automatically. However, interest seems to have dropped quickly. That demotivated me. So, I'm probably 2-3 hours from finishing Framework Flasher v2, I just couldn't find the motivation to finish it.

Once I get priorities out of the way, I'll certainly finish v2. v2 will blow your mind :)
[Motorola Droid X2] _Sparks:
Thanks, I cant wait for it!
[Motorola Droid X2] troy00:
It works!

I have been trying to edit my framework-res.apk and every time I did (no matter the method) I would get a black screen upon reboot after the boot animation.

But...using this wonderful tool...it worked brilliantly! Granted I was only editing the .pngs.

I can confirm that this tool will work on a Samsung Galaxy S2 T989.

Thank you very much for this useful tool! :)
[Motorola Droid X2] PRincess Luna:
Errors while recompiling

Let me start by saying i have been trying (unsuccessfully) for weeks to decompile, edit, and recompile this .apk file off of my phone. I'm trying to run the ICS build for the international SGS2 on my AT&T version, and i want the on screen buttons to work because the capacitive ones don't (at least not correctly). However, Nothing, i repeat, NOTHING, can successfully recompile the .apk file i have. This program has gotten the furthest out of any of them (i've tried 4 or 5), and you seem like a nice guy (Everyone else i asked just kinda told me to &%$# off).

All i need to do is edit 2 or 3 .xml files, changing a single value in each. However, even if i don't edit the files, i just decompile it then hit recompile, i get a ton of errors. It would be really awesome of you could take a tiny bit of time to help me. I'm attaching both the log from your program and the .apk file i'm trying to modify below.

If it helps, these are the mods i'm attempting: http://xdaforums.com/showthread.php?t=1364757

Framework file - http://www.mediafire.com/?8caxndfii1d81nm

Log - http://www.mediafire.com/?kyaxum4qs91qi1v (i put a few tries in there, the errors are consistent)

Thanks!
[Motorola Droid X2] pokimoon:
First of all i would like to tell you appreciate about this pretty good news:)

If you got any free time please could you tell me how can i do this steps because i got trouble with it for afew days i can't flash my update.zip to my deviece -.- i tried to sign update.zip "i would like to give the link of the page which i used but i cant.. It contain the autosign.bat"please let me know the steps for the correct strucute

Also i can't use the system.img aswell with out sign protocol (correct structure)

also tried dsixda kitchen too

have a good days
[Motorola Droid X2] skippycentraal:
awesome tool but i have tryed to add values-nl into framework-res.apk and my wfs boot jehhhh but when its boot to the beginning i'll get many errors.

Hoop you can help my out
[Motorola Droid X2] alex_72gr:
I am trying to change the framework.res to make it possible to send sms, your program decompiles well but even with out changing anything compiling givew an error and echo off... what is the problem?
[Motorola Droid X2] wesf90:
That is usually due to the ROM you're using was compiled with erroneous data, however that is not ALWAYS the case. Are you trying to decompile/compile a ROM other than stock?
[Motorola Droid X2] alex_72gr:
Thanks for responding.

I am run EOS ICS 4.0.4 on motorola xoom. I want to enable sms, there has been someone who was putting out an update with almost every new nightly however he has recently stopped and I need to do it by my self. I have decompiled and recopiled apks before but not framework. If I use apktool I usualy get an apk half the size and I am afraid to use it. Can you help me please? If you d like I can send you the framework I want to change to have a look at it and tell me what I am doing wrong.

Thanks
[Motorola Droid X2] Red_Nick:
I'm getting pretty much the same set of errors as blackhemi4x4 above.
[Motorola Droid X2] timekeeper:
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.
[Motorola Droid X2] chitose_ndy:
wow!

thanks so much for sharing :D

im gonna try this on my sony xperia S.

if its working, i will made a thread for you on the xperia s forum :)
[Motorola Droid X2] chitose_ndy:
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?
[Motorola Droid X2] bswann:
I'm getting that same error about echo and I cannot find anything about it.
[Motorola Droid X2] s.yogamurthy:
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
[Motorola Droid X2] masterex567:
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\APKTOOL3425370845215149414.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(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\Preyansh\AppData\Local\Temp\APKTOOL3425370845215149414.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(AndrolibResources.java:191)

... 6 more

The full log is attached.
[Motorola Droid X2] crazyguns:
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! :D
[Motorola Droid X2] AlexVendettA:
i have my htc one x(europe) and i tried this application and decompilation works.. but compilation doesn't.. :confused:

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
[Motorola Droid X2] highvoltagegenerator:
I'm running into the same errors the others have reported.

The script fails during compiling the apk with " An error has occurred. Check the log for more info.", and it crashes. All the log says is "The system cannot find the file specified." I uploaded the framework-res and log files, hope this helps.

dl.dropbox.com/u/9665305/framework-res.apk

dl.dropbox.com/u/9665305/LogProcess.txt

dl.dropbox.com/u/9665305/LogSimple.txt
[Motorola Droid X2] boywithabeard:
WORKS!

I was having the echo error as well, trying to recompile framework.res from SkyIcs 4.2. until I swapped the aapt file in the resources folder with the latest SDK aapt. Voila...recompile, sign, zip, flash, yay! Please thank me and the fine gentlemen who started this thread!
[Motorola Droid X2] Wintrmte:
Was aapt the only thing you replaced? I put the latest aapt in and I still get that dang error.
[Motorola Droid X2] brandestoch:
I have this echo problem, log in attachment, please help me
[Motorola Droid X2] brandestoch:
A new error.

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

| Log - ter 24/07/2012 -- 0:13:08,26 |

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

THE LOG BELOW IS FOR YOUR MOST RECENT PROCESS ONLY.

java version "1.6.0_16"

Java(TM) SE Runtime Environment (build 1.6.0_16-b01)

Java HotSpot(TM) Client VM (build 14.2-b01, mixed mode, sharing)

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...

F:\FrameworkFlasher-1.1.4\files-to-edit\framework-res.apk\res\drawable-hdpi\decrease.PNG: error: File is case-insensitive equivalent to: F:\FrameworkFlasher-1.1.4\files-to-edit\framework-res.apk\res\drawable-mdpi\decrease.png

Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\APKTOOL1372494628566567112.tmp, -x, -S, F:\FrameworkFlasher-1.1.4\files-to-edit\framework-res.apk\res, -M, F:\FrameworkFlasher-1.1.4\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:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\APKTOOL1372494628566567112.tmp, -x, -S, F:\FrameworkFlasher-1.1.4\files-to-edit\framework-res.apk\res, -M, F:\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(AndrolibResources.java:191)

... 6 more
[Motorola Droid X2] crzfish:
tried, but it didn't work for me :(

here is the log
[Motorola Droid X2] .x.x.x.Peria:
FIX

1.) Thank You for this tool, _finally_ I was able to edit that damn framework-res.apk :victory:

2.) I can't imagine how it works for others, but I needed to delete the space after "-o" option for compile (line 172):

7za x -o%~dp0temp-files %~dp0place-framework-res-here\framework-res.apk

3.) Flashed zip seems to works, however here it's log:

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

| Log - 2012/07/26 -- 8:26:21.45 |

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

THE LOG BELOW IS FOR YOUR MOST RECENT PROCESS ONLY.

java version "1.7.0_03"

Java(TM) SE Runtime Environment (build 1.7.0_03-b05)

Java HotSpot(TM) Client VM (build 22.1-b02, mixed mode, sharing)

W: Could not find sources

I: Checking whether resources has changed...

I: Building apk file...

The system cannot find the file specified.

Invalid switch - "resources.arsc".

The system cannot find the path specified.
[Motorola Droid X2] lokeshsaini94:
hey!!!

nice tool...

i have only one problem i can not compile apk back...

i even tried to just decompile and then compile without but it shows error even in that case....
[Motorola Droid X2] Shaksterz:
Thanks for this tool!

I used this tool to help me enable ICS on screen buttons for the CM10 preview on the SGSII GT-i9100. I had the same problem that many other people with ICS ROMs were having, that the decompilation worked but then recompilation did not. Don't know why this worked, but once I moved the Framework Flasher folder to the root of my hard drive (C:\) the compilation and all the other steps worked. Also, I'm not sure if this did anything (it didn't do anything at first but it might contribute to why this worked), but I replaced the APKTool files with the ones in the zip file attached in this post, or alternatively found on the link below

http://xdaforums.com/showthread.php?t=1495002

Hope this works for you guys like it did for me :)
[Motorola Droid X2] cxj1995:
i got a error about ECHO is off
[Motorola Droid X2] simster007:
Compiling Error

Thanks for an awesome utility!!

I seem to have the same common compiling error as the above users...

I have tried with the aapt.exe from sdk, running in c dir, but no luck so far.

Can any1 figure out this compiling error? That would be most helpful!!

Thanks...

Log attached
[Motorola Droid X2] Xentar712:
Same problem here. Tried everything suggested.

Edit: Just fixed my problem by changing my folder to one word. It was "Framework Flasher" but is now "Framework1". Guess the batch file doesn't like two multi-worded folders
[Motorola Droid X2] CarlosAbia:
Everything works in the script, but when I flash the zip, nothing gets edited! I don't understand the part where it says that I must delete the files that I modified, located in the /temp-files/ folder, where is that folder? :confused:

Thanks for your help
[Motorola Droid X2] Xentar712:
If there's no folder, don't worry about it. There isn't always one. What are you editing? Have you extracted the file again to verify if it really wasn't edited?

---------- Post added at 06:22 PM ---------- Previous post was at 06:17 PM ----------

I have the same os as you. I tried every suggestion in this forum, including downloading alternate resource files and editing part of a batch file. Nothing worked... Then i edited the folder name to be c:\framework1 and it mysteriously worked. I can't explain it.
[Motorola Droid X2] CarlosAbia:
I edited lockscreen options, but all that changes are the dots of the JB lockscreen, the lock icon never changed, Is there a tutorial for that?
[Motorola Droid X2] hiarc:
I had very similar issues (including the ECHO off error), however, they have disappeared when I replaced the aapt and apktool files downloaded from this thread. Hopefully this solves some of your problems as well.
[Motorola Droid X2] niv3d:
Any word on ECHO is off error when trying to recompile?
[Motorola Droid X2] pluGinSz:
I'm using Xperia Ray CM10 by FXP... it already set as "false" but no affects :S
[Motorola Droid X2] the0bserver:
I've had a quick look at the batch file, the problem lies on line 166 with this Java command:

java -Xmx%heapn%m -jar apktool.jar b %~dp0files-to-edit\framework-res.apk %~dp0place-framework-res-here\unsignedframework-res.apk

My guess is that the error everybody is experiencing is in relation to the difference in filesystem notation; Windows uses a backslash, whereas any sensible operating system (!) uses forward slash. Hence:

I will have a go at trying to work out the issue, but I have little experience with APKs and the like (and I am technically supposed to be working right now..), so don't expect miracles!
[Motorola Droid X2] Megalith27:
Great tool, thanks a lot, makes decompiling a little more automated. But I am having issues with compiling.

First of all, I had to remove this part of java code in RunMe.bat

java -Xmx%heapn%m -jar

as I was getting following errors with them

java version "1.3.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_01)
Java HotSpot(TM) Client VM (build 1.3.1_01, mixed mode)
java.lang.UnsupportedClassVersionError: brut/apktool/Main (Unsupported major.minor version 50.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Exception in thread "main"

But without that prefix decompilation went smooth.

While on compilation the RunMe.bat gave me error and when I looked in the LogProcess.txt these were the only lines in there

java version "1.3.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_01)
Java HotSpot(TM) Client VM (build 1.3.1_01, mixed mode)

So I dont know what the error is but I cant even recompile unchanged file.

Anyone has an input on this?

Thanks in advance
[Motorola Droid X2] spoony2144:
I'm Trying to enable on-screen navigation buttons on ics rom for galaxy ace, i manage to decompile the framework-res.apk and edit the files but when i try to compile it again i get:

(removing old files...)

(compiling)

ECHO is off

An error has occurred. Check the log for more info.

ECHO is off.

Press any key to continue...

Can you help please? I'm kind of a Noob so help would be great :) thanks in advance...
[Motorola Droid X2] scream_clarity:
Having the same trouble. Always just says that Echo is off during compile.
[Motorola Droid X2] bigwilly90210:
same here. stupid echo off error and nothing works... sad, very sad. thanks for the tool though, seems nice. would like it if somebody would look into it.
[Motorola Droid X2] G0G0L:
Good, good
[Motorola Droid X2] hiarc:
Use the aapt and apktool files listed in that thread, that fixed the problems for me. They are maintained by ibotpeaches, and they will most likely make your decompiling/compiling jobs a lot easier.
[Motorola Droid X2] legendarydave:
I tried to replace those two files in FF but, that changes nothing. I noticed that it took longer to tell me it failed. ECHO is OFF. Love this tool though. I have also tried a couple other tweaks and fail to find the sweet spot.

All I want to do is enable the CRT style animation, like so many others, on my kfazz cm10 D1....
[Motorola Droid X2] Gusta_HR:
Cant modify Framework-res.apk, all went good with no errors. I just change config_animateScreenLights in bools.xml (for crt-off), but now after flashing update.zip I'm getting fc's and errors when in homescreen. Strangely i noticed that modifyed .apk is much smaller than original one (4.5mb< 8.5mb) ! after compiling.

EDIT: I did it few months ago without problems.

Well.. I've just look at a log and it says

The system cannot find the file specified.

Invalid switch - "resources.arsc".

Script doesnt create /temp-files/ folder on my hdd.