Check Your I/O Usage with Iotop for Android

Ever needed to check the I/O usage of apps? If so, you probably tried searching for an iotop … more

T-Mobile HTC One M8 Gets Selfie-Friendly Android 4.4.4 OTA

The T-Mobie variant of HTC One (M8) just now received an over-the-air update … more

Android L is for Lockdown

Root is, without a doubt, the (un)holy grail of the Android world. Those wonderful permissions that allow you as … more

XDA Xposed Tuesday: XHangouts Will Improve Your Hangouts

Ever since Google started supporting text messaging in Hangouts many people have … more
Post Reply

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

OP devilex94

13th February 2013, 03:44 PM   |  #1  
devilex94's Avatar
OP Senior Member
Thanks Meter: 275
 
283 posts
Join Date:Joined: Sep 2011
Donate to Me
More
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, 1023 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
 
10 posts
Join Date:Joined: Jul 2012
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 Nope. The NSA is watching. Simply NOPE
Thanks Meter: 69
 
250 posts
Join Date:Joined: Dec 2012
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: 275
 
283 posts
Join Date:Joined: Sep 2011
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
Flag Metz
Thanks Meter: 275
 
484 posts
Join Date:Joined: Mar 2011
Donate to Me
More
Great for this
Thx
17th February 2013, 10:08 PM   |  #6  
Junior Member
Thanks Meter: 1
 
3 posts
Join Date:Joined: Nov 2012
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: 20
 
65 posts
Join Date:Joined: Jan 2008
Working great in Galaxy S2 with Biftor Rom
18th February 2013, 04:08 AM   |  #8  
Member
Flag New Delhi
Thanks Meter: 19
 
56 posts
Join Date:Joined: Sep 2012
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
 
40 posts
Join Date:Joined: Apr 2012
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
 
102 posts
Join Date:Joined: Sep 2012
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:	943
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


Top Threads in Android Apps and Games by ThreadRank