5,596,128 Members 34,040 Now Online
XDA Developers Android and Mobile Development Forum

[GUIDE] Compiling framework-res without bootloop

Tip us?
 
erorcun
Old
(Last edited by erorcun; 13th June 2013 at 10:52 PM.)
#1  
Senior Member - OP
Thanks Meter 1860
Posts: 545
Join Date: Oct 2012

 
DONATE TO ME
Default [GUIDE] Compiling framework-res without bootloop

Hi XZ owners!

I made this for XU / XSOLA JB port actually and currently they uses this method but later I discovered other JB Xperia's have this problem too.

Thanks to XperienceD for improving guide.

Workaround:

Firstly decompile your framework.jar, framework-res.apk and SemcGenericUxpRes.apk files, then download and extract this: framework-fix.zip

1- Copy the ColorizableDrawable.smali to "framework.jar/android/graphics/drawable".

2- Remove these lines from "framework.jar/android/graphics/drawable/Drawable.smali":

Code:
    const-string v3, "com.sonymobile"

    invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-eqz v3, :cond_109
3- In the drawable folder of your framework-res you need to find and change a number of xmls and the easiest way to do this is with Notepad++. Download and open it first, then in the drawable folder highlight all 150 xmls prefixed with semc_, and drop them into Notepad++ (You may want to do so many at a time depending on your Computers specs). Using the search and replace feature, replace...

Code:
somc:colorizable
for...

Code:
colorizable
...using the Replace All in All Opened Documents button...



...then you need to Replace this whole line...

Code:
android:color="@com.sonyericsson.uxp:color/semc_theme_accent_color" xmlns:somc="com.sonymobile"
...using the same method with...

Code:
android:color="#00000000"


I moved theme color part to smali, so "#00000000" is just a placholder in here and won't affect anything.

4- Open styles.xml in the values folder with Notepad++ and search for...

Code:
@com.sonyericsson.uxp:drawable/semc_bg
...there should be two, that one and then one with _bright, replace that line with...

Code:
@drawable/semc_bg
...and replace the other with...

Code:
@drawable/semc_bg_bright
Then copy from your drawable-hdpi and drawable-xhdpi folders in your decompiled SemcGenericUxpRes folder, semc_bg_bright.xml, semc_bg.xml, semc_bg_bright_tile.png and semc_bg_tile.png into the same folders in your decompiled framework folders.

Normally app backgrounds doesn't change with 2013 xperia themes in anyway but theme system still has this ability, if you want to keep this I fixed it too, search for "@com.sonyericsson.uxp:drawable/semc_bg" and change with "@drawable/semc_bg_new" then put semc_bg_new.xml to drawable folder from downloaded file and don't forget adding semc_bg_new to public.xml.

5- In your decompiled framework folder open apktool.yml with Notepad++ and remove the "-2" from the "usedFrameworks" code...



...then recompile your framework.jar and framework-res.apk, add the signatures in the usual manner, copy both files to the Phone, change permissions, reboot, and you should finally have a success boot.

This method is currently working on all JB Xperia's.

Enjoy!
The Following 45 Users Say Thank You to erorcun For This Useful Post: [ Click to Expand ]
 
XperienceD
Old
(Last edited by XperienceD; 12th June 2013 at 06:02 PM.)
#2  
XperienceD's Avatar
Senior Member
Thanks Meter 2257
Posts: 7,085
Join Date: Jul 2010
Location: Here =)
Going to test in a bit, thanks!
X10 -|- ARC -|- RAY -|- Z -|- Z1 COMPACT


Do XDA a favour and type your "how to -insert mod here" into Google before starting new threads.
 
erorcun
Old
#3  
Senior Member - OP
Thanks Meter 1860
Posts: 545
Join Date: Oct 2012

 
DONATE TO ME
@XperienceD

There is no drawable folder in framework.jar? And yeah you have to look each file which has semc_ prefix (I forgot to write that) on drawable folder unfortunately.
 
XperienceD
Old
#4  
XperienceD's Avatar
Senior Member
Thanks Meter 2257
Posts: 7,085
Join Date: Jul 2010
Location: Here =)
Quote:
Originally Posted by erorcun View Post
@XperienceD

There is no drawable folder in framework.jar?
Schoolboy error there.
Quote:
Originally Posted by erorcun View Post
And yeah you have to look each file which has semc_ prefix (I forgot to write that) on drawable folder unfortunately.
A search in Virtuous found 59 files in total, so what I've done is open all 150 SEMC files in Notepad++ and searched and replaced somc:colorizable for colorizable, and the same again for the android:color.
X10 -|- ARC -|- RAY -|- Z -|- Z1 COMPACT


Do XDA a favour and type your "how to -insert mod here" into Google before starting new threads.
 
erorcun
Old
#5  
Senior Member - OP
Thanks Meter 1860
Posts: 545
Join Date: Oct 2012

 
DONATE TO ME
Quote:
Originally Posted by XperienceD View Post
Schoolboy error there.

A search in Virtuous found 59 files in total, so what I've done is open all 150 SEMC files in Notepad++ and searched and replaced somc:colorizable for colorizable, and the same again for the android:color.
Yep but don't forget xmlns:somc tag at the end, you must delete it. And don't forget to put old signatures back.
 
XperienceD
Old
#6  
XperienceD's Avatar
Senior Member
Thanks Meter 2257
Posts: 7,085
Join Date: Jul 2010
Location: Here =)
Quote:
Originally Posted by erorcun View Post
Yep but don't forget xmlns:somc tag at the end, you must delete it.
Perhaps you could put a bit more effort into writing the OP, as the image names are incorrect too.
X10 -|- ARC -|- RAY -|- Z -|- Z1 COMPACT


Do XDA a favour and type your "how to -insert mod here" into Google before starting new threads.
 
erorcun
Old
(Last edited by erorcun; 12th June 2013 at 07:57 PM.)
#7  
Senior Member - OP
Thanks Meter 1860
Posts: 545
Join Date: Oct 2012

 
DONATE TO ME
@XperienceD

OP is okay and there's nothing wrong. You're doing something wrong. xmlns:somc part is already on OP.
The Following User Says Thank You to erorcun For This Useful Post: [ Click to Expand ]
 
peetr_
Old
#8  
Recognized Contributor
Thanks Meter 2075
Posts: 2,321
Join Date: Oct 2010
Going to test it on XT, when I will have some time.
___________________________________

Sony Xperia T owner

 
XperienceD
Old
#9  
XperienceD's Avatar
Senior Member
Thanks Meter 2257
Posts: 7,085
Join Date: Jul 2010
Location: Here =)
Quote:
Originally Posted by erorcun View Post
You're doing something wrong. xmlns:somc part is already on OP.
I got that part in the end, but it's still bootlooping. Perhaps you could take a look please? - Xperia_Z_307_fw.zip
X10 -|- ARC -|- RAY -|- Z -|- Z1 COMPACT


Do XDA a favour and type your "how to -insert mod here" into Google before starting new threads.
 
erorcun
Old
#10  
Senior Member - OP
Thanks Meter 1860
Posts: 545
Join Date: Oct 2012

 
DONATE TO ME
@XperienceD

Could you send your edited files?

The Following User Says Thank You to erorcun For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes