Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,741,857 Members 45,426 Now Online
XDA Developers Android and Mobile Development Forum

(GUIDE)(MOD)Changeable Lockscreen text like Galaxy4.

Tip us?
 
SpaceCaker
Old
(Last edited by SpaceCaker; 12th February 2014 at 05:10 PM.)
#1  
SpaceCaker's Avatar
Recognized Themer / Contributor - OP
Thanks Meter 10507
Posts: 13,127
Join Date: Mar 2011
Location: netherlands
Default (GUIDE)(MOD)Changeable Lockscreen text like Galaxy4.

How to add the Lockscreen Text to any lockscreen.

As most know I have implemented this feature inside the Touchwiz Resurrection rom for galaxy ace i.
As seen below.



Basicly this mod was very easy to add .
What is inside the resources.zip ?
  1. LifeCompanionText.apk ( App to change the text )
  2. LifeCompanion smalis for the framework.jar
  3. SpaceFont.ttf for the CoolJazz font from S3/4

Basicly what you would need to do is:
  1. Download Resources Attachement.
  2. Extract it
  3. Decompile you’re framework.jar
  4. Go to the extract smali folder from the resources.zip and copy the smali folder to the smali folder of you’re framework.jar.
  5. Compile framework.jar
  6. Now we are going to add it to the frameworks location/allocate the text.
  7. Decompile framework-res.apk
  8. Find a lockscreen layout to you’re likes.
  9. I used “zzz_keyguard_screen_clockwidget.xml” but you would be able to put it inside : “keyguard_screen_tab_unlock.xml” for the normal sliding tab lockscreen and such.
  10. Open the layout you wanted and simply add this line above the clock layout or where you want
    Code:
    Select Code
    <com.touchwizres.lifecompaniontext.LifeCompanionTextView android:textSize="40.0dip" android:textColor="#ffffffff" android:id="@id/life_companion_tag" android:layout_width="wrap_content" android:layout_height="wrap_content" android:shadowColor="#7f000000" android:shadowDx="1.0" android:shadowDy="1.0" android:shadowRadius="2.0" />
    I placed this code just below
    Code:
    Select Code
    <view android:gravity="left" android:orientation="vertical" android:id="@id/clock_time_and_date" android:paddingLeft="7.0dip" android:paddingTop="2.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" class="com.android.internal.policy.impl.ClockWidget$TimeAndDate">
    of the "zzz_keyguard_screen_clockwidget.xml"
  11. Add this to the ids.xml
    Code:
    Select Code
    <item type="id" name="life_companion_tag">false</item>
  12. Compile framework-res.apk
  13. Decompile ur compiled framework-res.apk
  14. Now we are going to fix the ID Values. From the smali .
  15. Decompile ur compiled framework.jar
  16. Open
    Code:
    Select Code
    com/touchwizres/lifecompaniontext/LifeCompanionTextView.smali
    that’s inside the framework.jar
  17. Find
    Code:
    Select Code
    const v3, 0x10202cc
  18. This is the “life_companion_tag” ID (
    Code:
    Select Code
    <public type="id" name="life_companion_tag" id="0x010202cc" />
    ) inside public.xml
  19. We need to fix this to yours
  20. Now when u have changed the code from 0x10202cc to something like 0x1020299 or something depends on ur framework-res.apk
  21. U can compile the framework.jar
  22. Now zip the files together and make sure these are set properly.
  23. SpaceFont.ttf inside /system/fonts/**
  24. LifeCompanionText.apk inside /system/apps/**
  25. And then ofcourse you’re modified framework.jar and framework-res.apk inside /system/framework/**
  26. Now you are done
  27. Happy modding


On what roms can u apply this mod ?

Basicly it can be applied to ALL Roms atleast if u know what u are doing.
Attached Files
File Type: zip Resources.zip - [Click for QR Code] (1,011.7 KB, 641 views)
 

My Github Click Here
Github BroadcomCM Click Here
Github CyanoSpaceMod Click Here
Github MSR-Roms Click Here
Check My SoundCloud for my music remakes,mixes etc Click Here
Linux HP-Pavilion-G7 3.11.0-23-generic #40-Ubuntu SMP Wed Jun 4 21:05:23 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
The Following 21 Users Say Thank You to SpaceCaker For This Useful Post: [ Click to Expand ]
 
SpaceCaker
Old
(Last edited by SpaceCaker; 12th February 2014 at 07:06 PM.)
#2  
SpaceCaker's Avatar
Recognized Themer / Contributor - OP
Thanks Meter 10507
Posts: 13,127
Join Date: Mar 2011
Location: netherlands
As Most of you all know i am a HUGE HUGE Open Source fan so in this case i fully opensourced this aswell

Here is the sourcecode: https://github.com/spacecaker/LifeCo...Lockscreentext
  1. Import in Eclipse.
  2. Compile app.
  3. Export unsigned apk.
  4. Sign apk.
  5. Decompile apk.
  6. Retrieve ur smali codes.
  7. Implement in framework
Some helpers who helped me on some knowledge and ideas:
B16H22
MarioZaWa
Pineappleowl
and testers
 

My Github Click Here
Github BroadcomCM Click Here
Github CyanoSpaceMod Click Here
Github MSR-Roms Click Here
Check My SoundCloud for my music remakes,mixes etc Click Here
Linux HP-Pavilion-G7 3.11.0-23-generic #40-Ubuntu SMP Wed Jun 4 21:05:23 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
The Following 9 Users Say Thank You to SpaceCaker For This Useful Post: [ Click to Expand ]
 
MuSaddiq
Old
#3  
MuSaddiq's Avatar
Senior Member
Thanks Meter 886
Posts: 636
Join Date: Aug 2013
It is just awesome! :thumbup:
 
san122
Old
#4  
san122's Avatar
Senior Member
Thanks Meter 1542
Posts: 1,227
Join Date: Jan 2013
Location: Unavailable.


Sent from my GT-S5360 using Tapatalk 2
 
ocoot
Old
#5  
ocoot's Avatar
Senior Member
Thanks Meter 589
Posts: 548
Join Date: Apr 2012
Location: Semarang, Central Java
nice guide. will try it


Current Device: Galaxy Young GT-S6310
Rom: Purekat Touchwiz Version
Kernel: Tyrssdx Kernel (My own kernel, not published)

The Following User Says Thank You to ocoot For This Useful Post: [ Click to Expand ]
 
bangprovn
Old
#6  
Recognized Developer
Thanks Meter 422
Posts: 271
Join Date: May 2011
Location: HCM City
Can i include it in my ROM ? I need your permission :P
 
SpaceCaker
Old
#7  
SpaceCaker's Avatar
Recognized Themer / Contributor - OP
Thanks Meter 10507
Posts: 13,127
Join Date: Mar 2011
Location: netherlands
Quote:
Originally Posted by bangprovn View Post
Can i include it in my ROM ? I need your permission :P
sure
 

My Github Click Here
Github BroadcomCM Click Here
Github CyanoSpaceMod Click Here
Github MSR-Roms Click Here
Check My SoundCloud for my music remakes,mixes etc Click Here
Linux HP-Pavilion-G7 3.11.0-23-generic #40-Ubuntu SMP Wed Jun 4 21:05:23 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
 
MuSaddiq
Old
#8  
MuSaddiq's Avatar
Senior Member
Thanks Meter 886
Posts: 636
Join Date: Aug 2013
Working perfectly in AOSP.

 
SpaceCaker
Old
#9  
SpaceCaker's Avatar
Recognized Themer / Contributor - OP
Thanks Meter 10507
Posts: 13,127
Join Date: Mar 2011
Location: netherlands
Quote:
Originally Posted by MuSaddiq View Post
Working perfectly in AOSP.

Nice to see that someone else except me has implemented it and did it correctly to :thumbup:

Sent from my S500 using xda app-developers app
 

My Github Click Here
Github BroadcomCM Click Here
Github CyanoSpaceMod Click Here
Github MSR-Roms Click Here
Check My SoundCloud for my music remakes,mixes etc Click Here
Linux HP-Pavilion-G7 3.11.0-23-generic #40-Ubuntu SMP Wed Jun 4 21:05:23 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
The Following User Says Thank You to SpaceCaker For This Useful Post: [ Click to Expand ]
 
ocoot
Old
#10  
ocoot's Avatar
Senior Member
Thanks Meter 589
Posts: 548
Join Date: Apr 2012
Location: Semarang, Central Java
@SpaceCaker it will work on jellybean? o_O


Current Device: Galaxy Young GT-S6310
Rom: Purekat Touchwiz Version
Kernel: Tyrssdx Kernel (My own kernel, not published)


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes