Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
fernando sor
Old
(Last edited by fernando sor; 24th January 2012 at 05:20 AM.)
#1  
fernando sor's Avatar
Recognized Themer - OP
Thanks Meter 4478
Posts: 8,918
Join Date: Sep 2010
Location: shaker heights-Ohio
Default decompiling and recompiling framework-res for ics

greetings

this is a basic tutorial on decompiling and recompiling framework-res for ics.

thanks to this thread here which posted the latest aapt and the idea to use two versions of apktool. more is needed though and there are some unnecessary actions so i am adding to this for the rezound.

download this file which contains two versions of apktool and the latest aapt

apktools

add the contents to your apktool folder. rename apktool 1.4.2 to just apktool

install your ics framework

apktool if framework-res.apk
apktool if com.htc.resourses.apk

you will see flag errors but disregard.

decompile framework-res

apktool d framework-res.apk <out>

again you will see flag errors but disregard.you will also see errors in values-hdpi and values- xdpi pointing to the drawables xml. i deleted both xmls to mod the battery percentage.

to recompile. rename apktool to apktool 1.4.2. rename apktool 1.4.3 to just apktool.

this is rather strange but this is what has worked. go to res/values/anims

change this

<anim name="htc_ime_decelerate_interpolator">@anim/zzz_htc_ime_decelerate_interpolator</anim>

to

<item type="anim" name="htc_ime_decelerate_interpolator">@anim/zzz_htc_ime_decelerate_interpolator</item>

then recompile.

apktool b <out>

the anims xml is rebuilt as before which is the strange part.

please post any questions or issues
The Following 15 Users Say Thank You to fernando sor For This Useful Post: [ Click to Expand ]
 
lllboredlll
Old
#2  
lllboredlll's Avatar
Recognized Developer
Thanks Meter 3319
Posts: 2,355
Join Date: Dec 2007
Location: 69 6e 20 61 20 64 65 76 69 63 65 20 6e 65 61 72 20 79 6f 75

 
DONATE TO ME
dude ty so much for this.... u are the king of theme

Accepted NOT Expected

Remember, the "Thanks" button costs you nothing.




Quote:
Quote:
Originally Posted by USAsokr View Post
No worries though. lllboredlll is a god-fearing church-going droid-hacking incredible-modding machine
The Following 2 Users Say Thank You to lllboredlll For This Useful Post: [ Click to Expand ]
 
racinwarrior
Old
#3  
racinwarrior's Avatar
Senior Member
Thanks Meter 417
Posts: 1,081
Join Date: Aug 2010

 
DONATE TO ME
you are then man bro. thanks for this. now off to mess with stuff.....
 
NilsP
Old
(Last edited by NilsP; 24th January 2012 at 02:26 PM.)
#4  
NilsP's Avatar
Recognized Developer
Thanks Meter 4578
Posts: 5,679
Join Date: Jul 2009
Location: Near Albany NY

 
DONATE TO ME
Thank you kind sir.. On to the fun

EDIT: I have not tackled the framework yet but it fixed the problem I have been having with SystemUI. I finally get a consistent decompile and re-compile of it.

Thanks
Couple of links:

My HTC Rezound ROM's: Here
My HTC Incredible ROM's: Here
My Personal Page: Here
The Following User Says Thank You to NilsP For This Useful Post: [ Click to Expand ]
 
scrosler
Old
#5  
scrosler's Avatar
Recognized Developer
Thanks Meter 31098
Posts: 16,757
Join Date: Feb 2007
Location: Fargo

 
DONATE TO ME
Quote:
Originally Posted by NilsP View Post
Thank you kind sir.. On to the fun

EDIT: I have not tackled the framework yet but it fixed the problem I have been having with SystemUI. I finally get a consistent decompile and re-compile of it.

Thanks
How because I cant get SysUI?
 
NilsP
Old
#6  
NilsP's Avatar
Recognized Developer
Thanks Meter 4578
Posts: 5,679
Join Date: Jul 2009
Location: Near Albany NY

 
DONATE TO ME
Quote:
Originally Posted by scrosler View Post
How because I cant get SysUI?
I just set it up this way and de-compiled with 1.4.2 and re-compiled with 1.4.3 and it only gave me warnings. I actually think the aapt is the answer since that was where I was getting the "could not execute error" after it could not do resources.

It is not 100% because the SystemUI flashed over a live ROM fine but I lost the notification bar on a full wipe. Not sure yet if it is apktool or me.
Couple of links:

My HTC Rezound ROM's: Here
My HTC Incredible ROM's: Here
My Personal Page: Here
 
racinwarrior
Old
#7  
racinwarrior's Avatar
Senior Member
Thanks Meter 417
Posts: 1,081
Join Date: Aug 2010

 
DONATE TO ME
did you guys get sysUI decompiled yet? i olny get a smali folder and nothing else.
 
fernando sor
Old
#8  
fernando sor's Avatar
Recognized Themer - OP
Thanks Meter 4478
Posts: 8,918
Join Date: Sep 2010
Location: shaker heights-Ohio
Quote:
Originally Posted by racinwarrior View Post
did you guys get sysUI decompiled yet? i olny get a smali folder and nothing else.
i didnt have an issue with systemui with the newer aapt. i decompiled, modded and recompiled with apktool 1.4.3
 
MrSmith317
Old
#9  
Senior Member
Thanks Meter 299
Posts: 968
Join Date: Jun 2010
Location: Philadelphia
Quote:
Originally Posted by NilsP View Post
I just set it up this way and de-compiled with 1.4.2 and re-compiled with 1.4.3 and it only gave me warnings. I actually think the aapt is the answer since that was where I was getting the "could not execute error" after it could not do resources.

It is not 100% because the SystemUI flashed over a live ROM fine but I lost the notification bar on a full wipe. Not sure yet if it is apktool or me.
I recompiled my SystemUI last night with a few Smali edits to see if I could get data working. Did a full factory wipe(still no good on the data) but it didn't hose anything else.
“Around here, however, we don't look backwards for very long.
We keep moving forward, opening up new doors and doing new things,
because we're curious...and curiosity keeps leading us down new paths.”

-Walt Disney
 
NilsP
Old
#10  
NilsP's Avatar
Recognized Developer
Thanks Meter 4578
Posts: 5,679
Join Date: Jul 2009
Location: Near Albany NY

 
DONATE TO ME
Quote:
Originally Posted by fernando sor View Post
i didnt have an issue with systemui with the newer aapt. i decompiled, modded and recompiled with apktool 1.4.3
Quote:
Originally Posted by MrSmith317 View Post
I recompiled my SystemUI last night with a few Smali edits to see if I could get data working. Did a full factory wipe(still no good on the data) but it didn't hose anything else.
I finally got a good compile of SystemUI with the new aapt and 1.4.2 apktools. Then I redid it with 1.4.3 and it worked fine. So they key is the aapt fernando provided.

By the way, de-compile with 1.4.2 and re-compile with 1.4.3 was the way I got a failure of the apk with losing the notifications bar.
Couple of links:

My HTC Rezound ROM's: Here
My HTC Incredible ROM's: Here
My Personal Page: Here

 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...

XDA PORTAL POSTS

Side-Swiping Multitasking with Kakudo

Recovering iPad users may still remember the multitasking function where you can swipe left or right to … more

Learn to Edit Graphics for your Development Work

The importance of good and appropriate graphics for your development work is undeniable. Be … more

Tasker Alternative: AutomateIt, Automates Your Device Tasks – XDA Developer TV

XDA Developer TV Producer Kevin wants to help make your … more