Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
runtime_Err0r
Old
(Last edited by runtime_Err0r; 15th May 2012 at 10:19 AM.)
#1  
Member - OP
Thanks Meter 19
Posts: 36
Join Date: Dec 2011
Default [Tutorial] How to use Lg Weather Widget on CM7 or Miui beta

Tutorial to add Lg classes to the framework.jar in order to make work the original weather widget of LG in every rom.

I have made this process successfully in the CyanogenMod 7.2RC1 and in the MIUI 2.1a.

I discovered this process thanks to doc3000, which created to me the framework.jar of CM7 with Lg classes. After a while researching, I discovered the process.

First of all, make a backup of your rom just in case something goes wrong, be able to recover the terminal restoring it from the recovery, given the fact that a wrong framework.jar will produce a bootlop.

The files you need are:

1) baksmali.jar y smali.jar ,which you can get it from here: http://code.google.com/p/smali/. I have used the .jar files

2) original LG framework.jar file, for example in whatever rom STOCK, available in “/system/framework/framework.jar”

3) framework.jar of the rom to which we want to add the LG classes, available in “/system/framework/framework.jar”

4) WeatherWidget.apk which you can get too from whatever STOCK rom, available in “/system/app/WeatherWidget.apk”

1) Open a console, then cd to the folder where you have the 4 files. Run:

Code:
java -jar baksmali.jar framework.jar -o outlg
This will make a folder named “outlg”, which it will have all the LG Classes of the framework.jar

2) Repeat the same with the framework.jar of the rom that we want to add the LG classes running the command

Code:
java -jar baksmali.jar framework.jar -o out
3) Go to the folder “outlg/com” and make a copy of the “lge” folder to the “out/com” folder.

4) Now run

Code:
java -jar smali.jar out -o classes.dex
5) Open the framework.jar of the rom that we want to add the LG Classes with Winzip / 7zip ... , and replace the file classes.dex from the inside by the one we just have created. (Don't use Winrar, it make an incorrect framework.jar with a bootloop as a result. I don't know if Winzip work, but I confirm 7zip yes)

6) Insert the modified framework.jar to the “/system/framework” overwritting the original file, and checking that it has group and owner “root” and the correct permissions ( To know the correct permissions, look the permissions of any file in the folder “/system/framework/”...)

7) Copy the file “WeatherWidget.apk” in “/system/app/” and put he same permissions as any apk in that directory, check that the group and the owner are “root” too

8) Restart the device, and here we have the original LG weather widget in our favourite rom.

This process should work in every rom in every device, not only in the Optimus Black, but I could not check it because I only have an Optimus Black.

Sorry for my english >.<

Cheers!!!
The Following 5 Users Say Thank You to runtime_Err0r For This Useful Post: [ Click to Expand ]
 
foggydisaster
Old
#2  
foggydisaster's Avatar
Senior Member
Thanks Meter 19
Posts: 176
Join Date: May 2012
Location: Dnepropetrovsk
Thank you i gonna try it out. but why it is in Q&A section? Maybe moderator could move this thread to themes&apps section? xD anyway thank you dude
 
runtime_Err0r
Old
#3  
Member - OP
Thanks Meter 19
Posts: 36
Join Date: Dec 2011
I have less than 10 posts, I can't post on Development forum, but you are right, apps and themes are the correct forum, sorry >.<

Enviado desde mi LG-P970 usando Tapatalk
 
foggydisaster
Old
#4  
foggydisaster's Avatar
Senior Member
Thanks Meter 19
Posts: 176
Join Date: May 2012
Location: Dnepropetrovsk
It ok maybe moderator can move it some day and more people find it? (:

Sent from my P970 using XDA
 
foggydisaster
Old
#5  
foggydisaster's Avatar
Senior Member
Thanks Meter 19
Posts: 176
Join Date: May 2012
Location: Dnepropetrovsk
Hang on, i got an idea. i can create thread for you and put link on this thred hows that?
 
fongnd
Old
#6  
Member
Thanks Meter 13
Posts: 78
Join Date: Mar 2007
Location: Toronto
Runtime,

Great toturial on getting stock weather widget to work with cm7.

Any way you could put all this into a flashable zip?
I have abandon stock rom for months now and dont want to go back to extract files. Just too much efforts.

Thanks,

Sent from my LG-P970 using XDA
 
foggydisaster
Old
#7  
foggydisaster's Avatar
Senior Member
Thanks Meter 19
Posts: 176
Join Date: May 2012
Location: Dnepropetrovsk
Quote:
Originally Posted by fongnd View Post
Runtime,

Great toturial on getting stock weather widget to work with cm7.

Any way you could put all this into a flashable zip?
I have abandon stock rom for months now and dont want to go back to extract files. Just too much efforts.

Thanks,

Sent from my LG-P970 using XDA
If i could make you a flashable zip i would make it for you. But i dont know how to. So ill just make you a zip containing all of needed files c: (btw it seems like the original poster of this left this thread D: )

Sent from my LG-P970 using XDA
The Following User Says Thank You to foggydisaster For This Useful Post: [ Click to Expand ]
 
runtime_Err0r
Old
#8  
Member - OP
Thanks Meter 19
Posts: 36
Join Date: Dec 2011
Hi all,

I can do a normal zip with all the files needed. This night I will do the zip.

A flashable zip is usseles when developers make a change involving "CyanogenMod/android_frameworks_base" because the framework.jar change. You need to do the process again to get a new framework.jar or you will get a bootlop.
 
foggydisaster
Old
#9  
foggydisaster's Avatar
Senior Member
Thanks Meter 19
Posts: 176
Join Date: May 2012
Location: Dnepropetrovsk
Since u back so i ask qustion again...
Do you want me to open thread for you in themes and apps and give a link to your post... i take no credit for ur work.. so want me to?
P.S. im making zip now
Sent from my LG-P970 using XDA
 
fongnd
Old
#10  
Member
Thanks Meter 13
Posts: 78
Join Date: Mar 2007
Location: Toronto
Quote:
Originally Posted by foggydisaster View Post
If i could make you a flashable zip i would make it for you. But i dont know how to. So ill just make you a zip containing all of needed files c: (btw it seems like the original poster of this left this thread D: )

Sent from my LG-P970 using XDA
thanks for offering me all necessary files.
I've just go through the tutorial again to rehearse all the command that I need to do.... I think I will screw up on this.... I have a busy life and I cant afford to have bootloop on phone. Just too time consuming.

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