FORUMS
Remove All Ads from XDA

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

357 posts
Thanks Meter: 423
 
By devilex94, Senior Member on 13th February 2013, 03:44 PM
Post Reply Email Thread
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:
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:
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, 1247 views)
The Following 25 Users Say Thank You to devilex94 For This Useful Post: [ View ] Gift devilex94 Ad-Free
 
 
13th February 2013, 09:32 PM |#2  
Tsukidi's Avatar
Junior Member
Thanks Meter: 0
 
More
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
14th February 2013, 06:37 PM |#3  
西村大一's Avatar
Senior Member
Flag Tōkyō
Thanks Meter: 194
 
Donate to Me
More
Quote:
Originally Posted by Tsukidi

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.
The Following User Says Thank You to 西村大一 For This Useful Post: [ View ] Gift 西村大一 Ad-Free
15th February 2013, 10:58 AM |#4  
devilex94's Avatar
OP Senior Member
Thanks Meter: 423
 
Donate to Me
More
Quote:
Originally Posted by Al3x_M1ni_B0ss

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
17th February 2013, 08:24 PM |#5  
RM57380's Avatar
Senior Member
Thanks Meter: 277
 
More
Great for this
Thx
17th February 2013, 10:08 PM |#6  
Junior Member
Thanks Meter: 1
 
More
Getting following error.
Quote:
Originally Posted by RM57380

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>
17th February 2013, 11:34 PM |#7  
Senior Member
Thanks Meter: 47
 
More
Working great in Galaxy S2 with Biftor Rom
18th February 2013, 04:08 AM |#8  
Member
Flag New Delhi
Thanks Meter: 20
 
More
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?
18th February 2013, 09:12 AM |#9  
Ciolouse's Avatar
Member
Flag Bourges
Thanks Meter: 9
 
More
Great ! this is really nice !

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

Thanks
18th February 2013, 09:25 AM |#10  
y2quila's Avatar
Senior Member
Thanks Meter: 27
 
More
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:	994
Size:	44.6 KB
ID:	1739903  
18th February 2013, 01:00 PM |#11  
Member
Thanks Meter: 0
 
More
"Dist" is not created in my case
*Push the newly compiled framework.jar from apktool/framework.jar.out/dist
************************************************** ************************************************** ********************
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\user>cd..

C:\Users>cd..

C:\>cd 'apktool'l/'directory'
The system cannot find the path specified.

C:\>cd android/apktool

C:\android\apktool>apktool d framework.jar
I: Baksmaling...
Exception in thread "main" java.lang.RuntimeException: bad magic value: 64 65 78
0a 30 33 36 00
at org.jf.dexlib.DexFile.<init>(DexFile.java:377)
at org.jf.dexlib.DexFile.<init>(DexFile.java:274)
at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder .java:44)
at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder .java:33)
at brut.androlib.Androlib.decodeSourcesSmali(Androlib .java:68)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:85 )
at brut.apktool.Main.cmdDecode(Main.java:128)
at brut.apktool.Main.main(Main.java:65)

C:\android\apktool>apktool b framework.jar.out
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathN
otExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Androlib.java: 142)
at brut.androlib.Androlib.build(Androlib.java:159)
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: brut.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(Abst ractDirectory.java:
103)
at brut.androlib.Androlib.readMetaFile(Androlib.java: 138)
... 4 more
************************************************** ************************************************** ****************************************
Is sumthng went wrong in above process?
Post Reply Subscribe to Thread

Tags
guide, lg optimus weather widget, optimus black, port lg weather, widget

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

Advanced Search
Display Modes