5,595,815 Members 34,620 Now Online
XDA Developers Android and Mobile Development Forum

[MOD] How to: Infinite lock screen pages with all widgets enabled

Tip us?
 
enewman17
Old
(Last edited by enewman17; 10th December 2013 at 01:58 AM.)
#1  
enewman17's Avatar
Recognized Contributor - OP
Thanks Meter 5314
Posts: 2,320
Join Date: Sep 2010
Location: Fort Wayne, IN

 
DONATE TO ME
Default [MOD] How to: Infinite lock screen pages with all widgets enabled

How to: TouchWiz 4.3 and 4.2.2 Infinite lock screen pages with all widgets enabled.

decompile android.policy.jar

smali/com/android/internal/policy/impl/keyguard/KeyguardActivityLauncher.smali


search for .method public launchWidgetPicker(I)V

Code:
.method public launchWidgetPicker(I)V
    .locals 9
    .parameter "appWidgetId"

    .prologue
    const/4 v4, 0x0

    const/4 v8, 0x2      <---- change to 0x3

    const/4 v2, 0x0

    .line 124
    new-instance v7, Landroid/os/UserHandle;

    const/4 v0, -0x2

    invoke-direct {v7, v0}, Landroid/os/UserHandle;-><init>(I)V

Next: smali/com/android/internal/policy/impl/keyguard/KeyguardHostView.smali

Search for: .method private numWidgets()I

Code:
.method private numWidgets()I
    .locals 4

    .prologue
    .line 2009
    iget-object v3, p0, Lcom/android/internal/policy/impl/keyguard/KeyguardHostView;->mAppWidgetContainer:Lcom/android/internal/policy/impl/keyguard/KeyguardWidgetPager;

    invoke-virtual {v3}, Lcom/android/internal/policy/impl/keyguard/KeyguardWidgetPager;->getChildCount()I

    move-result v0

    .line 2010
    .local v0, childCount:I
    const/4 v2, 0x0

    .line 2011
    .local v2, widgetCount:I
    const/4 v1, 0x0

    .local v1, i:I
    :goto_0
    if-ge v1, v0, :cond_1

    .line 2012
    iget-object v3, p0, Lcom/android/internal/policy/impl/keyguard/KeyguardHostView;->mAppWidgetContainer:Lcom/android/internal/policy/impl/keyguard/KeyguardWidgetPager;

    invoke-virtual {v3, v1}, Lcom/android/internal/policy/impl/keyguard/KeyguardWidgetPager;->isWidgetPage(I)Z

    move-result v3

    if-eqz v3, :cond_0

    iget-object v3, p0, Lcom/android/internal/policy/impl/keyguard/KeyguardHostView;->mAppWidgetContainer:Lcom/android/internal/policy/impl/keyguard/KeyguardWidgetPager;

    invoke-virtual {v3, v1}, Lcom/android/internal/policy/impl/keyguard/KeyguardWidgetPager;->isContextualPage(I)Z

    move-result v3

    if-nez v3, :cond_0

    .line 2013
    add-int/lit8 v2, v2, 0x1

    .line 2011
    :cond_0
    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    .line 2016
    :cond_1
    return v2
.end method
Replace entire method with:

Code:
.method private numWidgets()I
    .locals 4
	
    const/4 v2, 0x0
    
    return v2
.end method

That's it. compile and enjoy.
The Following 12 Users Say Thank You to enewman17 For This Useful Post: [ Click to Expand ]
 
matrixzone
Old
#2  
matrixzone's Avatar
Senior Member
Thanks Meter 602
Posts: 1,978
Join Date: Mar 2012
First!!
If this is helpful or useful, please hit "Thanks" and its free
 
LeoDeos
Old
#3  
Member
Thanks Meter 63
Posts: 84
Join Date: Dec 2012
Location: Santeramo in Colle (Ba)
work fine on i9305 4.3
thanks
 
nickzan
Old
#4  
nickzan's Avatar
Member
Thanks Meter 23
Posts: 91
Join Date: Jan 2013
So umm. Couple questions. First off does this work on the note 3 running touchwiz 4.3?

Second what do you use to decompile and recompile?

P.s. just cus I don't know does not mean I am a moron and can't learn. However I am reluctant to Google as due to there nature of how much I could **** up my device I prefer to ask the source directly.

Sent from my SM-N900W8 using xda app-developers app
 
enewman17
Old
#5  
enewman17's Avatar
Recognized Contributor - OP
Thanks Meter 5314
Posts: 2,320
Join Date: Sep 2010
Location: Fort Wayne, IN

 
DONATE TO ME
Quote:
Originally Posted by nickzan View Post
So umm. Couple questions. First off does this work on the note 3 running touchwiz 4.3?

Second what do you use to decompile and recompile?

P.s. just cus I don't know does not mean I am a moron and can't learn. However I am reluctant to Google as due to there nature of how much I could **** up my device I prefer to ask the source directly.

Sent from my SM-N900W8 using xda app-developers app
I would assume it would work on the note 3 but I can't say for sure without looking at the android.policy.jar

You would use apktool 2.0.9b or maybe apk multi tool.

There is a lot to try and explain on how to mod apk and jar files. Unfortunately your going to need to do some reading up. There are a lot of tutorials on how to do it.

Sent from my SAMSUNG-SGH-I747 using Tapatalk
 
nickzan
Old
#6  
nickzan's Avatar
Member
Thanks Meter 23
Posts: 91
Join Date: Jan 2013
Quote:
Originally Posted by nickzan View Post
So umm. Couple questions. First off does this work on the note 3 running touchwiz 4.3?

Second what do you use to decompile and recompile?

P.s. just cus I don't know does not mean I am a moron and can't learn. However I am reluctant to Google as due to there nature of how much I could **** up my device I prefer to ask the source directly.

Sent from my SM-N900W8 using xda app-developers app
Perfect, thanks for pointing me in the right direction, this is the key information I was looking for and now I should be able to look up the rest!
Thanks again.
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


XDA PORTAL POSTS

Google Glass XE16 Update Factory Image and Rooted Bootloader Now Available

You may recall that early yesterday, we talked about the XE16 … more

Add Swipe Utilities to Your App with SimpleFingerGestures Library

Gestures have become an increasingly important element in smartphone UI … more

Android App Review: Lock it Down with Lockdown Pro – XDA Developer TV

Our smartphones are our lives. They store our contacts, emails, … more