Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,805,022 Members 52,764 Now Online
XDA Developers Android and Mobile Development Forum

(guide how to add samsung clock widget on lockscreen Gb

Tip us?
 
Droidbuster
Old
(Last edited by Droidbuster; 12th August 2014 at 04:05 PM.) Reason: i got eror in files so updated my thread
#1  
Account currently disabled - OP
Thanks Meter 146
Posts: 86
Join Date: Jan 2014
Default (guide how to add samsung clock widget on lockscreen Gb

Samsung Note 3 clock widget on lockscreen .

Description

 



Steps

1.) Decompile framework-res.apk
2.) Download s4clokwidget.zip ,get the pngs and put it inside res/drawable of framework.

3.) Go to res/values/ids.xml and open it. And BEFORE </resources> put this code:


Code:
 <item type="id" name="first_digital">false</item>
    <item type="id" name="second_digital">false</item>
    <item type="id" name="dot_digital">false</item>
    <item type="id" name="third_digital">false</item>
    <item type="id" name="fouth_digital">false</item>
    <item type="id" name="current_date">false</item>
    <item type="id" name="time2">false</item>
Quote:
IT WILL BE LIKE THIS:
Code:
<item type="id" name="first_digital">false</item>
    <item type="id" name="second_digital">false</item>
    <item type="id" name="dot_digital">false</item>
    <item type="id" name="third_digital">false</item>
    <item type="id" name="fouth_digital">false</item>
    <item type="id" name="current_date">false</item>
    <item type="id" name="time2">false</item>
</resources>


and go to res/value/bool.xml open it add this code

Quote:
<bool name="config_lock_screen_battery_animation_horizon tal">true</bool>
before resources.

Now layout step
  1. open res/layout/keyguard_screen_unlock_portrait.xml :
  2. search for this
  3.  
    Code:
    <com.android.internal.widget.DigitalClock  android:id="@id/time" android:layout_width="wrap_content"  android:layout_height="wrap_content" android:layout_marginLeft="20.0dip"  android:layout_marginTop="15.0dip"  android:layout_alignParentLeft="true"  android:layout_alignParentTop="true">
                <TextView android:textAppearance="?textAppearanceMedium"  android:textSize="70.0sp" android:ellipsize="none"  android:gravity="bottom" android:id="@id/timeDisplay"  android:layout_width="wrap_content" android:layout_height="wrap_content"  android:layout_marginBottom="6.0dip" android:singleLine="true"  android:shadowColor="#c0000000" android:shadowDx="0.0"  android:shadowDy="0.0" android:shadowRadius="3.0" />
                <TextView android:textAppearance="?textAppearanceMedium"  android:textSize="18.0sp" android:ellipsize="none"  android:gravity="bottom" android:id="@id/am_pm"  android:visibility="gone" android:layout_width="wrap_content"  android:layout_height="fill_parent" android:layout_marginLeft="4.0dip"  android:singleLine="true" android:shadowColor="#c0000000"  android:shadowDx="0.0" android:shadowDy="0.0" android:shadowRadius="3.0"  />
            </com.android.internal.widget.DigitalClock>
  4. Replace it with
  5. Code:
       <com.ninjask.internal.policy.impl.LockScreenDigitalClock  android:gravity="center" android:layout_gravity="center"  android:orientation="vertical" android:id="@id/time"  android:layout_width="wrap_content" android:layout_height="wrap_content"  android:layout_marginLeft="25.0dip">
                        <LinearLayout android:id="@id/time2"  android:layout_width="wrap_content" android:layout_height="58.0dip"  android:layout_marginTop="40.0dip" android:layout_alignParentTop="true"  android:layout_centerHorizontal="true">
                            <ImageView android:id="@id/first_digital"  android:layout_width="wrap_content" android:layout_height="58.0dip"  />
                            <ImageView android:id="@id/second_digital"  android:layout_width="wrap_content" android:layout_height="58.0dip"  />
                            <ImageView android:id="@id/dot_digital"  android:layout_width="wrap_content" android:layout_height="wrap_content"  android:src="@drawable/zzz_unlock_clock_colon_s" />
                            <ImageView android:id="@id/third_digital"  android:layout_width="wrap_content" android:layout_height="58.0dip"  />
                            <ImageView android:id="@id/fouth_digital"  android:layout_width="wrap_content" android:layout_height="58.0dip"  />
                        </LinearLayout>
                        <TextView android:textSize="21.0sp"  android:textColor="#fff0ffbb" android:gravity="center"  android:id="@id/current_date" android:layout_width="fill_parent"  android:layout_height="wrap_content" android:shadowColor="#ff000000"  android:shadowDx="0.0" android:shadowDy="1.0" android:shadowRadius="2.5"  android:layout_below="@id/time2" android:layout_alignParentTop="true"  />
                    </com.ninjask.internal.policy.impl.LockScreenDigitalClock>
                </LinearLayout>
4.) Save and recompile it THEN get the recompiled framework-res.apk and decompile it AGAIN.

5.)Open framework-res/res/values/public.xml and REMEMBER this codes:

Code:
    <public type="id" name="first_digital" id="public1" />
    <public type="id" name="second_digital" id="public2" />
    <public type="id" name="third_digital" id="public3" />
    <public type="id" name="fouth_digital" id="public4" />
    <public type="id" name="current_date" id="public5" />
<public type="string" name="full_wday_month_day_no_year" id="public6" />
<public type="bool" name="config_lock_screen_battery_animation_horizontal" id="public7" />
    <public type="drawable" name="zzz_unlock_clock_0" id="clock0" />
    <public type="drawable" name="zzz_unlock_clock_1" id="clock1" />
    <public type="drawable" name="zzz_unlock_clock_2" id="clock2" />
    <public type="drawable" name="zzz_unlock_clock_3" id="clock3" />
    <public type="drawable" name="zzz_unlock_clock_4" id="clock4" />
    <public type="drawable" name="zzz_unlock_clock_5" id="clock5" />
    <public type="drawable" name="zzz_unlock_clock_6" id="clock6" />
    <public type="drawable" name="zzz_unlock_clock_7" id="clock7" />
    <public type="drawable" name="zzz_unlock_clock_8" id="clock8" />
    <public type="drawable" name="zzz_unlock_clock_9" id="clock8" />
REMEMBER THIS: when you remeber the public ids, remove the 0 next to x, (FOR EXAMPLE: 0x01234567 change it to this: 0x1234567).

6.) Decompile android.policy.jar.
7.) Download ninjask.zip and extract it to smali folder.
8.) Now..... (I hate this ids ids ids... xD) Open LockScreenDigitalClock.smali FIND this line and REPLACE the highlighted code:

 

Code:
const v2, 0x108048b
Quote:
REPLACE 0x 0x108048b with your YOUR clock0
Quote:
THEN AFTER THAT, FIND THIS LINE AND ALSO REPLACE THE HIGHLIGHTED CODE:
Code:
const v2, 0x108048c
Quote:
REPLACE 0x108048c with your YOUR clock1
Quote:
THEN AFTER THAT, FIND THIS LINE AND ALSO REPLACE THE HIGHLIGHTED CODE:
Code:
const v2, 0x108048d
Quote:
REPLACE 0x108048d with your YOUR clock2
Quote:
THEN AFTER THAT, FIND THIS LINE AND ALSO REPLACE THE HIGHLIGHTED CODE:
Code:
const v2, 0x108048e
Quote:
REPLACE 0x 0x108048ewith your YOUR clock3
Quote:
THEN AFTER THAT, FIND THIS LINE AND ALSO REPLACE THE HIGHLIGHTED CODE:
Code:
const v2, 0x108048f 
Quote:
REPLACE 0x 0x108048f with your YOUR clock4
Quote:
THEN AFTER THAT, FIND THIS LINE AND ALSO REPLACE THE HIGHLIGHTED CODE:
Code:
const v2, 0x1080490 
Quote:
REPLACE 0x 0x1080490 with your YOUR clock5
Quote:
THEN AFTER THAT, FIND THIS LINE AND ALSO REPLACE THE HIGHLIGHTED CODE:
Code:
const v2, 0x1080491 
Quote:
REPLACE 0x 0x1080491 with your YOUR clock6
Quote:
THEN AFTER THAT, FIND THIS LINE AND ALSO REPLACE THE HIGHLIGHTED CODE:
Code:
const v2, 0x1080492 
Quote:
REPLACE 0x 0x1080492 with your YOUR clock7
Quote:
THEN AFTER THAT, FIND THIS LINE AND ALSO REPLACE THE HIGHLIGHTED CODE:
Code:
const v2, 0x1080493 
Quote:
REPLACE 0x 0x1080493 with your YOUR clock8
Quote:
THEN AFTER THAT, FIND THIS LINE AND ALSO REPLACE THE HIGHLIGHTED CODE:
Code:
const v2, 0x1080494 
Quote:
REPLACE 0x 0x1080494 with your YOUR clock9
Quote:
THEN AFTER THAT, FIND THIS LINE AND ALSO REPLACE THE HIGHLIGHTED CODE:
Code:
const v8, 0x10400a7 
Quote:
REPLACE 0x10400a7 with your YOUR public6
Quote:
THEN AFTER THAT, FIND THIS LINE AND ALSO REPLACE THE HIGHLIGHTED CODE:
Code:
const v0, 0x1020254 
Quote:
REPLACE 0x1020254 with your YOUR public1
Quote:
THEN AFTER THAT, FIND THIS LINE AND ALSO REPLACE THE HIGHLIGHTED CODE:
Code:
const v0, 0x1020255 
Quote:
REPLACE 0x1020255 with your YOUR public2
Quote:
THEN AFTER THAT, FIND THIS LINE AND ALSO REPLACE THE HIGHLIGHTED CODE:
Code:
const v0, 0x1020257 
Quote:
REPLACE 0x1020257 with your YOUR public3
Quote:
THEN AFTER THAT, FIND THIS LINE AND ALSO REPLACE THE HIGHLIGHTED CODE:
Code:
const v0, 0x1020258 
Quote:
REPLACE 0x1020258 with your YOUR public4
Quote:
THEN AFTER THAT, FIND THIS LINE AND ALSO REPLACE THE HIGHLIGHTED CODE:
Code:
const v0, 0x1020259 
Quote:
REPLACE 0x1020259 with your YOUR public5
Quote:
THEN AFTER THAT, FIND THIS LINE AND ALSO REPLACE THE HIGHLIGHTED CODE:
Code:
const v1, 0x10d0021 
Quote:
REPLACE 0x10d0021 with your YOUR public7
Quote:
THEN AFTER THAT, FIND THIS LINE AND ALSO REPLACE THE HIGHLIGHTED CODE:


9.) Save LockScreenDigitalClock.smali.

10.) Almost There! recompile android.policy.jar.
11.) Flash your recompiled android.policy.jar and framework-res.apk
12.) If it works, JUMP! if not, tell me, maybe i forgot somethin




I provided this flashable zip you can use it for your Flashing lockscreen (FLASHABLE.ZIP)



Now thread is updated





1 .if you are using my work so plz give me credit . because i spend many night and days for getting success.

and

If you are porting this guide to To another inform me first . then i will create a seprate guide for your device.
by giving you credit and tester

















The Following 4 Users Say Thank You to Droidbuster For This Useful Post: [ Click to Expand ]
 
sssomnath474
Old
#2  
sssomnath474's Avatar
Senior Member
Thanks Meter 106
Posts: 173
Join Date: Mar 2012
Location: mars :P
nice guide trying tommorow
The Following 2 Users Say Thank You to sssomnath474 For This Useful Post: [ Click to Expand ]
 
pritish sahoo
Old
#3  
Member
Thanks Meter 79
Posts: 67
Join Date: Feb 2014
Location: jajpur

 
DONATE TO ME
Wink Great JOB

awesome guide bro
trying now & let me inform u whats the result
The Following 2 Users Say Thank You to pritish sahoo For This Useful Post: [ Click to Expand ]
 
Carl_47
Old
#4  
Junior Member
Thanks Meter 5
Posts: 23
Join Date: Jun 2014
Location: Ranchi
no link to download s4clokwidget.zip... ?
The Following User Says Thank You to Carl_47 For This Useful Post: [ Click to Expand ]
 
Droidbuster
Old
#5  
Account currently disabled - OP
Thanks Meter 146
Posts: 86
Join Date: Jan 2014
Default soory now link updated

Quote:
Originally Posted by Carl_47 View Post
no link to download s4clokwidget.zip... ?
sorry link updated now
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes