FORUMS

HTC’s New Ad Campaign And What It Really Means

HTC has just released three new blind test adverts comparing app loading … more

XDA Picks: Best Apps of the Week (June 27 – July 4)

Apps are at the front and center of any smartphone experience, and with over a … more

HTC One M9 Developer Edition Android 5.1 OTA

The Developer Edition of the HTC One M9 is receiving an over-the-air update to Android 5.1. … more

Index Project For XDA Device Subforums

Another ambitious project from the collaborative efforts of Recognized Contributors and Forum … more

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

354 posts
Thanks Meter: 415
 
By devilex94, Senior Member on 13th February 2013, 03:44 PM
Post Reply Subscribe to Thread 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, 1151 views)
Last edited by devilex94; 20th February 2013 at 05:43 PM.
The Following 25 Users Say Thank You to devilex94 For This Useful Post: [ View ]
 
 
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  
Alexander_the_B0ss's Avatar
Senior Member
Flag NSA HQ
Thanks Meter: 90
 
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 Alexander_the_B0ss For This Useful Post: [ View ]
15th February 2013, 10:58 AM |#4  
devilex94's Avatar
OP Senior Member
Thanks Meter: 415
 
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: 276
 
Donate to Me
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  
Member
Thanks Meter: 27
 
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: 6
 
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
Flag Mandaue
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:	962
Size:	44.6 KB
ID:	1739903  
Post Reply Subscribe to Thread

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

Advanced Search
Display Modes