FORUMS
Remove All Ads from XDA
Honor 7x
Win an Honor 7X!

[tutorial]**Fix for recompiling framework-res with apktool** 4/15/2012

9,721 posts
Thanks Meter: 5,626
 
By fernando sor, Recognized Themer on 15th April 2012, 09:46 PM
Post Reply Email Thread
8th May 2012, 09:54 AM |#81  
he_stheone64's Avatar
Senior Member
Flag Düsseldorf
Thanks Meter: 10,782
 
More
Since many of you guys might only be in need to decompile all the .9`s in com.htc.resources, there is a workaround that allows you to compile these.

Decompile with:

1. java -jar apktool.jar d --keep-broken-res com.htc.resources.apk com.htc.resources-decoded

This ignores all errors and decompiles the apk incl. all patched pngs.

2. Make your changes and copy the changed png`s in any given decompiled apk (I use calendarprovider.apk for this task, very slim apk, compiles fast...) and compile them

I will look into the current state and see, whether I can brute force the apk to build
The Following 2 Users Say Thank You to he_stheone64 For This Useful Post: [ View ] Gift he_stheone64 Ad-Free
 
 
8th May 2012, 10:00 AM |#82  
fisha21's Avatar
Senior Member
Thanks Meter: 4,304
 
More
Quote:
Originally Posted by he_stheone64

Certainly you can address a lot of areas, but I don`t like half baken Themes, so I decided not to publish the Skin and Theme, that is basically ready.

I know exactly what you mean...I had to go from v0.1 to v2.1 before I had something I was happy to release. Still new to m.10 editing, so I'm not entirely sure what aspects of Sense these control. Hopefully you'll manage to find a workaround for the com.htc.resources issue.

Any ideas how the stock skins are able to change the lockring, but custom skins cannot?


Edit: you posted your workaround while I was typing this...fast work! I will try that out a bit later and let you know how it works. To be honest, I'm prob more keen to get at the xmls in there. Have managed to sort most of the .9.pngs by making the custom skin....a trick I learnt from you, by the way, so thanks for that


Sent from my HTC One X using xda premium
The Following 2 Users Say Thank You to fisha21 For This Useful Post: [ View ] Gift fisha21 Ad-Free
8th May 2012, 10:06 AM |#83  
he_stheone64's Avatar
Senior Member
Flag Düsseldorf
Thanks Meter: 10,782
 
More
It`s not only the lockring, same issue with Rosie dock...

You will also have all xml`s decompiled with this workaround, but now compiling them successfully will be a bigger task. In any case now you have a base to start fixing issues, which is more likely then staring at a base of empty folders
8th May 2012, 10:26 AM |#84  
chrisch1974's Avatar
Inactive Recognized Developer
Thanks Meter: 3,684
 
Donate to Me
More
Quote:
Originally Posted by he_stheone64

It`s not only the lockring, same issue with Rosie dock...

You will also have all xml`s decompiled with this workaround, but now compiling them successfully will be a bigger task. In any case now you have a base to start fixing issues, which is more likely then staring at a base of empty folders

For fixing the recompiling you first need to fix the *ERR* folders and get their correct names. Or you are maybe going to loose the correct dimension values for your resolution.
The Following 2 Users Say Thank You to chrisch1974 For This Useful Post: [ View ] Gift chrisch1974 Ad-Free
8th May 2012, 11:02 AM |#85  
he_stheone64's Avatar
Senior Member
Flag Düsseldorf
Thanks Meter: 10,782
 
More
Thx chrisch - I certainly did that already and dimens values are just fine in the correct value folders. Can someone upload framework-res.apk from One X ROM? - Edit: got it already...

In any case I can only spend a very limited amount of time on this project (since I use a One S), but using this base I`m sure you have enough good guys here in One X forum to go fo it.
The Following 2 Users Say Thank You to he_stheone64 For This Useful Post: [ View ] Gift he_stheone64 Ad-Free
8th May 2012, 11:18 AM |#86  
Scabes24's Avatar
Recognized Themer
Flag Seattle, WA
Thanks Meter: 903
 
Donate to Me
More
Quote:
Originally Posted by fisha21

I know exactly what you mean...I had to go from v0.1 to v2.1 before I had something I was happy to release. Still new to m.10 editing, so I'm not entirely sure what aspects of Sense these control. Hopefully you'll manage to find a workaround for the com.htc.resources issue.

Any ideas how the stock skins are able to change the lockring, but custom skins cannot?



Sent from my HTC One X using xda premium

Some of the images & colors used for the stock skin.apks are in the m10 files in fusion.apk.


Sent from my HTC One X
The Following 2 Users Say Thank You to Scabes24 For This Useful Post: [ View ] Gift Scabes24 Ad-Free
8th May 2012, 12:17 PM |#87  
he_stheone64's Avatar
Senior Member
Flag Düsseldorf
Thanks Meter: 10,782
 
More
Quote:
Originally Posted by chrisch1974

For fixing the recompiling you first need to fix the *ERR* folders and get their correct names. Or you are maybe going to loose the correct dimension values for your resolution.

chrisch - do you have a clue about the correct names needed for the ERR folders? I was able to track down all errors, but without the correct folder names, these will surely not compile properly.
8th May 2012, 04:15 PM |#88  
chrisch1974's Avatar
Inactive Recognized Developer
Thanks Meter: 3,684
 
Donate to Me
More
Quote:
Originally Posted by he_stheone64

chrisch - do you have a clue about the correct names needed for the ERR folders? I was able to track down all errors, but without the correct folder names, these will surely not compile properly.

I'm not sure atm. I was comparing it with a Sense 3.5 GB com.htc.resources and there are some folders missing now like values-w1dp-hdpi, values-w2dp-hdpi, values-w4dp-hdpi and values-w5dp-hdpi. But really not sure which ones are missing too.

I'm also trying to catch them with aapt atm. But looks like a pain.

For the moment you could try to delete the *ERR* folders and try to fix the rest to rebuild it. It will result in a not 100% correct com.htc.resources but it will maybe help until we can fix the rest.
8th May 2012, 05:12 PM |#89  
he_stheone64's Avatar
Senior Member
Flag Düsseldorf
Thanks Meter: 10,782
 
More
I did that already (that was my first "dirty" attack ), but then there are multiple errors about missing resources. Everything else is fixed, but renaming these folders is a pain.
8th May 2012, 08:34 PM |#90  
fisha21's Avatar
Senior Member
Thanks Meter: 4,304
 
More
Quote:
Originally Posted by he_stheone64

It`s not only the lockring, same issue with Rosie dock...

You will also have all xml`s decompiled with this workaround, but now compiling them successfully will be a bigger task. In any case now you have a base to start fixing issues, which is more likely then staring at a base of empty folders

Thanks for spending time on this, considering you don't even have a One X!

Just to confirm, the above approach works for .pngs and .9.pngs, thanks!

Now just trying to work out how to edit colors.xml. Since its in one of the hidden xml folders, I can't just drag and drop a recompiled edited version. I know resources .arsc contains the compiled xmls - is there any way to copy the info from the recompiled resources.arsc into the stock com.htc.resources.apk?
8th May 2012, 10:16 PM |#91  
fernando sor's Avatar
OP Recognized Themer
Flag north of the wall
Thanks Meter: 5,626
 
More
Just a reminder the apktool in the op is has the updated smali baksmali properties to decompile systemui. Just as instructed in the op make sure your resources are installed in apktool

Sent from my ADR6425LVW using xda premium
The Following User Says Thank You to fernando sor For This Useful Post: [ View ] Gift fernando sor Ad-Free
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes