Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,742,742 Members 37,364 Now Online
XDA Developers Android and Mobile Development Forum

[GUIDE] LG UI 2.0 weather widget porting guide to all roms

Tip us?
 
devilex94
Old
(Last edited by devilex94; 20th February 2013 at 05:43 PM.)
#1  
devilex94's Avatar
Senior Member - OP
Thanks Meter 269
Posts: 276
Join Date: Sep 2011

 
DONATE TO ME
Talking [GUIDE] LG UI 2.0 weather widget porting guide to all roms

Hi all
This is the guide to port LG weather widget found in optimus black to all roms like cm7

Requirements-
*A nice working rooted mobile phone
*A working PC with java installed
*apktool-[Simple guide by PulseDroid]


Note :This Guide is only for android 2.3 because many people having errors on android 4.0+. Sorry I have no workthrough . Try this widget . It's the widget from LG UI 3.0.

Procedure-
*Extract framework.jar from /system/framework/ through any root file manager.
*Decompile it through apktool, a newly created framework.jar.out will be there.

Code:
Select Code
apktool d framework.jar
*Download LG smali.zip from attachment and extract it
*Copy "lge" from com folder of LG smali and paste it in framework.jar.out/smali/com ( in apktool folder )
It must be like this "framework.jar.out/smali/com/lge"
*Compile framework.jar.out

Code:
Select Code
apktool b framework.jar.out
*Push the newly compiled framework.jar from apktool/framework.jar.out/dist into your phone's /system/framework directory
*Reboot your phone.Don't worry it will take time to reboot.
*Lastly Download the widget from here and install as regular app

Attached Files
File Type: zip LG smali.zip - [Click for QR Code] (1.50 MB, 972 views)
The Following 25 Users Say Thank You to devilex94 For This Useful Post: [ Click to Expand ]
 
Tsukidi
Old
#2  
Tsukidi's Avatar
Junior Member
Thanks Meter 0
Posts: 10
Join Date: Jul 2012
Hi devilex94. Thank you for post on the other thread about the solution to my problem, but after read your guide I got really confused .
I don't know how to use apktool (already looked on XDA and Google but nothing is easy to understand). Went to cmd but it says that the path isn't right (grrr)...
I believe this really helps who understands programming but I don't know how to change frameworks :-/ already root my device, already extracted framework.jar from system... but after that I got stuck
 
Alexander_the_B0ss
Old
#3  
Alexander_the_B0ss's Avatar
Senior Member
Thanks Meter 56
Posts: 211
Join Date: Dec 2012
Location: Behind you
Quote:
Originally Posted by Tsukidi View Post
Hi devilex94. Thank you for post on the other thread about the solution to my problem, but after read your guide I got really confused .
I don't know how to use apktool (already looked on XDA and Google but nothing is easy to understand). Went to cmd but it says that the path isn't right (grrr)...
I believe this really helps who understands programming but I don't know how to change frameworks :-/ already root my device, already extracted framework.jar from system... but after that I got stuck
in the first command he forgot an "r" : framewok instead of framework.

your problem is that you need to cd to the directory of apktools. If the apktools is in C drive , the command is cd C:\apktools or any folder that is it in. if you have it in a series of folders it should be cd C:\your path to apktools and then do this tut.
Proud user of:

LG Optimus L7 P700(NFC) | Galaxy Tab 2 7.0 GT-P3100 |

RIP: Galaxy Mini, HTC Touch Diamond, Sony Ericsson phones. If i helped you, do not forget to press the THANKS button.

The Following User Says Thank You to Alexander_the_B0ss For This Useful Post: [ Click to Expand ]
 
devilex94
Old
#4  
devilex94's Avatar
Senior Member - OP
Thanks Meter 269
Posts: 276
Join Date: Sep 2011

 
DONATE TO ME
Quote:
Originally Posted by Al3x_M1ni_B0ss View Post
in the first command he forgot an "r" : framewok instead of framework.

your problem is that you need to cd to the directory of apktools. If the apktools is in C drive , the command is cd C:\apktools or any folder that is it in. if you have it in a series of folders it should be cd C:\your path to apktools and then do this tut.
Thanks for telling me my mistake.
I have corrected my mistake
 
RM57380
Old
#5  
RM57380's Avatar
Senior Member
Thanks Meter 275
Posts: 484
Join Date: Mar 2011
Location: Metz

 
DONATE TO ME
Great for this
Thx

GT-i9100P : Dorimanx's kernel 9.36 - LQ6 Modem - R.R 4.0.5 2013-08-03

MY ROM



You like my work, you could buy me a beer
 
parambil
Old
#6  
Junior Member
Thanks Meter 0
Posts: 3
Join Date: Nov 2012
Default Getting following error.

Quote:
Originally Posted by RM57380 View Post
Great for this
Thx

C:\Android\apktool>apktool b framework.jar.out
I: Checking whether sources has changed...
I: Smaling...
Exception in thread "main" org.jf.dexlib.Util.ExceptionWithContext: method index
is too large.
at org.jf.dexlib.Util.ExceptionWithContext.withContex t(ExceptionWithCont
ext.java:54)
at org.jf.dexlib.Item.addExceptionContext(Item.java:1 76)
at org.jf.dexlib.Item.writeTo(Item.java:119)
at org.jf.dexlib.Section.writeTo(Section.java:119)
at org.jf.dexlib.DexFile.writeTo(DexFile.java:716)
at brut.androlib.src.DexFileBuilder.getAsByteArray(De xFileBuilder.java:7
5)
at brut.androlib.src.DexFileBuilder.writeTo(DexFileBu ilder.java:58)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder. java:50)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder. java:35)
at brut.androlib.Androlib.buildSourcesSmali(Androlib. java:222)
at brut.androlib.Androlib.buildSources(Androlib.java: 179)
at brut.androlib.Androlib.build(Androlib.java:170)
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: java.lang.RuntimeException: method index is too large.
at org.jf.dexlib.Code.Format.Instruction35c.writeInst ruction(Instruction
35c.java:102)
at org.jf.dexlib.Code.Instruction.write(Instruction.j ava:57)
at org.jf.dexlib.CodeItem.writeItem(CodeItem.java:258 )
at org.jf.dexlib.Item.writeTo(Item.java:116)
... 12 more
code_item @0x1b3274 (Landroid/Manifest$permission;-><init>()V)


C:\Android\apktool>
 
r4yv3n
Old
#7  
Member
Thanks Meter 20
Posts: 62
Join Date: Jan 2008
Working great in Galaxy S2 with Biftor Rom
 
raffmonster
Old
#8  
Member
Thanks Meter 19
Posts: 56
Join Date: Sep 2012
Location: New Delhi
Default framework.jar.out

When I decompile framework.jar, I only get apktool.yml in the out folder. There are no directories like smali. Do I need to create those and then copy the LGsmali?
 
Ciolouse
Old
#9  
Ciolouse's Avatar
Member
Thanks Meter 6
Posts: 37
Join Date: Apr 2012
Location: Bourges
Great ! this is really nice !

Do you have the same solution to port the Samsung Weather/Clock widget from GS3 to any roms ?

Thanks
 
y2quila
Old
#10  
y2quila's Avatar
Senior Member
Thanks Meter 27
Posts: 102
Join Date: Sep 2012
Location: Mandaue
Default Re: [GUIDE] LG UI 2.0 weather widget porting guide to all roms

I tried the tutorial, installed the apk after but widget doesn't seem to fully load???

Sent from my GT-I9300 using xda premium
Attached Thumbnails
Click image for larger version

Name:	uploadfromtaptalk1361179690147.jpg
Views:	941
Size:	44.6 KB
ID:	1739903  
Unit: Samsung GT-I9300
ROM: Latest CyanogenMod11 Temasek Kang on Android 4.4.2
Dual Boot ROM: Omega v51 Official on Android 4.3( using Googy-Max Kernel)
Daily Driver Kernel: Latest Temasek, Boeffla, No-ABB
Dual Boot Kernel: Googy-Max
Recovery: CWM Touch v6.0.4.4
Baseband: I9300DXELK1

A Proud


<=== Hit the Thanks button if I was of any help

Tags
guide, lg optimus weather widget, optimus black, port lg weather, widget
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


XDA PORTAL POSTS

Slide Dial Replacement Dialer Lets You Make Calls from Anywhere

If you frequently make phone calls, your dialer (aka phone app)is one of the … more

Navigate with Your Samsung Gear 2 Using DMA Navi Watch

Whether you’re travelling to a new destination or exploring some previously … more

Xperia Z1 Stereo Speaker Mod, Cell Phone Unlocking Legal Again! – XDA Developer TV

Cell Phone Unlocking is legal again!! That and much … more