• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
  • Fill out your device list and let everyone know which phones you have!    Edit Your Device Inventory

[MOD][Xposed] AOSP Lockscreen

Status
Not open for further replies.
Search This thread

MohammadAG

Inactive Recognized Developer
Sep 7, 2009
1,080
5,504
27
Jerusalem
mohammadag.xceleo.org
Requires Xposed Framework!

Note: No further support will be given for this module, it'll work on most (if not all) 4.1 devices. 4.2+ versions of Android are not supported.

This mod replaces the Samsung lockscreen with the AOSP one.

Screenshot:
Before - After
BP0GyBal.jpg
TInjqHNl.jpg


Compatibility:
Tested on the Galaxy Note 2 but should also work on any Nature UX 4.1.2 device, this includes the SII and SIII.

Source:
The mod is open source, and licensed under GPLv3: https://github.com/MohammadAG/Xposed-AOSP-Lockscreen

Download:
http://mohammadag.xceleo.org/public/Android/Xposed/AOSPLockscreen_1.1.apk

Support development:
If you found this mod useful, consider donating with PayPal.

Thanks to rovo89 for his framework.
 
Last edited:

MohammadAG

Inactive Recognized Developer
Sep 7, 2009
1,080
5,504
27
Jerusalem
mohammadag.xceleo.org
I installed the module, activated it and rebooted twice but I still have the TouchWiz lockscreen. Would really like this to work!

Doesn't work either. :(

Doesn't work for me.. Is it beause of Simplistic Framewrok?

I got hold of a rooted Note 2. Bug fixed, at some point before putting it on github I edited the source without testing since I don't have the phone. That broke stuff. All fixed now, use the same download link and it should work.
 

Mano1982

Senior Member
May 17, 2010
1,167
191
Oslo
I got hold of a rooted Note 2. Bug fixed, at some point before putting it on github I edited the source without testing since I don't have the phone. That broke stuff. All fixed now, use the same download link and it should work.

Thanks :) It works perfectly now :) Awesome work man.. Thanks a lot :)
 

MohammadAG

Inactive Recognized Developer
Sep 7, 2009
1,080
5,504
27
Jerusalem
mohammadag.xceleo.org
[QUOTric1;44758638]works like a charm on jedix rom with ATT
can you port some other locks cause this is great work[/QUOTE]

The AOSP lockscreen wasn't removed in Samsung's code, they simple added another one and dused that. I'm not sure I can add whole classes in Xposed.

@MohammadAG is there some way to center the lock circle? Look at the picture and you'll know what I mean.

Heh. The reason I made this mod is because I used 240dpi on my phone and lockscreen shortcuts looked so small, but the reason I never released was exactly that; the circle isn't centered in other DPIs. I actually spent a lot of time on it but I eventually gave up. If you find a way to center it (some other mod that has it fixed), I'll gladly add it.
 

dalanik

Senior Member
Mar 25, 2009
1,418
347
Prague
Thanx for great module! I have a problem though - the camera and google button don't seem to work. If I slide unlock circle to the camera, nothing happens. I have to slide it again to UNLOCK and then it asks for pattern and runs camera. Is there a way to fix this?
 

MohammadAG

Inactive Recognized Developer
Sep 7, 2009
1,080
5,504
27
Jerusalem
mohammadag.xceleo.org
Thanx for great module! I have a problem though - the camera and google button don't seem to work. If I slide unlock circle to the camera, nothing happens. I have to slide it again to UNLOCK and then it asks for pattern and runs camera. Is there a way to fix this?

Check my signature, look for "Enable camera on lockscreen"
As for Google Now, you'll need to use the "Show when phone locked" option in Xposed App Settings.
 
  • Like
Reactions: estebanbiotec

Clorush

Senior Member
Aug 11, 2013
83
8
does not work with Galaxy Tab 2 p3110 JB 4.2.2

EDIT: My apologise, I missed it. This mod is for 4.1.2
 
Last edited:
Status
Not open for further replies.

Top Liked Posts

  • There are no posts matching your filters.
  • 56
    Requires Xposed Framework!

    Note: No further support will be given for this module, it'll work on most (if not all) 4.1 devices. 4.2+ versions of Android are not supported.

    This mod replaces the Samsung lockscreen with the AOSP one.

    Screenshot:
    Before - After
    BP0GyBal.jpg
    TInjqHNl.jpg


    Compatibility:
    Tested on the Galaxy Note 2 but should also work on any Nature UX 4.1.2 device, this includes the SII and SIII.

    Source:
    The mod is open source, and licensed under GPLv3: https://github.com/MohammadAG/Xposed-AOSP-Lockscreen

    Download:
    http://mohammadag.xceleo.org/public/Android/Xposed/AOSPLockscreen_1.1.apk

    Support development:
    If you found this mod useful, consider donating with PayPal.

    Thanks to rovo89 for his framework.
    2
    I installed the module, activated it and rebooted twice but I still have the TouchWiz lockscreen. Would really like this to work!

    Doesn't work either. :(

    Doesn't work for me.. Is it beause of Simplistic Framewrok?

    I got hold of a rooted Note 2. Bug fixed, at some point before putting it on github I edited the source without testing since I don't have the phone. That broke stuff. All fixed now, use the same download link and it should work.
    2
    Don't know if you'd be able to... But I'd love to have the AOSP lock screen on my Note 3 with 4.3 :D
    2
    Yes, please find a solution for Note3 4.3 - I hate the Samsung lockscreen.

    Although I still have my S4, it's on 4.2.2, and I've moved on to the Xperia Z1 due to the new efuse stuff. Plus Sony's UI isn't that heavy on system resources so I thought it'd be best if I try one of their devices.
    The only mod I promised support for is the S-View one, since there's a paid version on the store.
    Sorry, but you'll have to ask someone else :)

    In any case, if I ever do it for the Z1, it should be very trivial to port to the Note 3.

    Dear Developer

    I appreciate very much every single collaboration to the community, no matter how little or big,
    And p[lease take this comment with respect is not my intention to mock you work or anything, but im confused
    You create a mod that removes weather widget, lock screen short cuts and information tickers, and that is just to have a "clean" lock screen ?
    it's that all ? really?

    I feel im very confused and Im missing something
    or maybe to remove functionality just to look nice is a new trend that im a bit late to it?
    Again with the mayor of respects
    can you explain a bit more you mod
    because i dont get it and probably is me being an idiot

    cheers

    Actually, I prefer the look of the Samsung one, but it delays screen wake-up time by a considerable amount (weather/news refresh, and their stupid way of doing the ripple effect, it does some processing on the wallpaper each time the screen is turned on) of time compared to this, and that was the main motive behind this.

    @MohammadAG

    Hi ive seen ur work on the XDA Portal and
    wanted to port it to my device by adjusting small stuff :p

    however it fails and according to log it says this

    Code:
    java.lang.NoSuchMethodError: com.android.internal.policy.impl.FlipLockScreen(android.content.Context,android.content.res.Configuration,com.android.internal.widget.LockPatternUtils,com.android.internal.policy.impl.KeyguardUpdateMonitor,com.android.internal.policy.impl.KeyguardScreenCallback)#bestmatch
            at de.robv.android.xposed.XposedHelpers.findConstructorBestMatch(XposedHelpers.java:410)
            at com.mohammadag.aosplockscreen.AOSPLockScreen.handleLoadPackage(AOSPLockScreen.java:46)
            at de.robv.android.xposed.IXposedHookLoadPackage$Wrapper.handleLoadPackage(IXposedHookLoadPackage.java:20)
            at de.robv.android.xposed.callbacks.XC_LoadPackage.call(XC_LoadPackage.java:35)
            at de.robv.android.xposed.callbacks.XCallback.callAll(XCallback.java:69)
            at de.robv.android.xposed.XposedBridge$3.beforeHookedMethod(XposedBridge.java:170)
            at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:459)
            at com.android.server.ServerThread.run(Native Method)

    while i am pretty sure i have this smali
    ive attached my smali for u to look in it if u have time ;)

    Code:
    package com.mohammadag.aosplockscreen;
    
    import static de.robv.android.xposed.XposedHelpers.findClass;
    import static de.robv.android.xposed.XposedHelpers.getObjectField;
    
    import java.lang.reflect.Constructor;
    
    import de.robv.android.xposed.IXposedHookLoadPackage;
    import de.robv.android.xposed.XC_MethodHook;
    import de.robv.android.xposed.XC_MethodReplacement;
    import de.robv.android.xposed.XSharedPreferences;
    import de.robv.android.xposed.XposedHelpers;
    import de.robv.android.xposed.XC_MethodHook.MethodHookParam;
    import de.robv.android.xposed.callbacks.XC_LoadPackage.LoadPackageParam;
    
    public class AOSPLockScreen implements IXposedHookLoadPackage {
    
    	public static XSharedPreferences prefs;
    	
    	public void handleLoadPackage(LoadPackageParam lpparam) throws Throwable {
    		if (!lpparam.packageName.equals("android"))
    			return;
    		
    		prefs = new XSharedPreferences(AOSPLockScreen.class.getPackage().getName());
    		
    		XposedHelpers.findAndHookMethod("com.android.internal.policy.impl.LockScreen", lpparam.classLoader,
    				"shouldEnableMenuKey", new XC_MethodHook() {
        		@Override
        		protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
        			param.setResult(false);
        		}
    		});
    		
    		Class<?> lockPatternUtilsClass = findClass("com.android.internal.widget.LockPatternUtils", lpparam.classLoader);
    		Class<?> keyguardUpdateMonitorClass = findClass("com.android.internal.policy.impl.KeyguardUpdateMonitor", lpparam.classLoader);
    		Class<?> keyguardScreenCallbackClass = findClass("com.android.internal.policy.impl.KeyguardScreenCallback", lpparam.classLoader);
    		Class<?> contextClass = findClass("android.content.Context", lpparam.classLoader);
    		Class<?> configurationClass = findClass("android.content.res.Configuration", lpparam.classLoader);
    		
    		Class<?> aospLockScreenClass = findClass("com.android.internal.policy.impl.LockScreen", lpparam.classLoader);
    		Class<?> flipLockScreenClass = findClass("com.android.internal.policy.impl.FlipLockScreen", lpparam.classLoader);
    		
    		final Constructor<?> aospLockScreen = XposedHelpers.findConstructorBestMatch(aospLockScreenClass, contextClass, configurationClass,
    				lockPatternUtilsClass, keyguardUpdateMonitorClass, keyguardScreenCallbackClass);
    		
    		final Constructor<?> flipLockScreen = XposedHelpers.findConstructorBestMatch(flipLockScreenClass, contextClass, configurationClass,
    				lockPatternUtilsClass, keyguardUpdateMonitorClass, keyguardScreenCallbackClass);
    		
    		XposedHelpers.findAndHookMethod("com.android.internal.policy.impl.LockPatternKeyguardView",
    				lpparam.classLoader, "createLockScreen", new XC_MethodHook() {
    			
        		@Override
        		protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
        			Object lockView = null;
        			if (prefs.getBoolean("aosp-lockscreen", true)) {
        				lockView = aospLockScreen.newInstance(getObjectField(param.thisObject, "mContext"),
        		    	    getObjectField(param.thisObject, "mConfiguration"), getObjectField(param.thisObject, "mLockPatternUtils"),
        		    	    getObjectField(param.thisObject, "mUpdateMonitor"), getObjectField(param.thisObject, "mKeyguardScreenCallback"));
        			} else {
        				lockView = flipLockScreen.newInstance(getObjectField(param.thisObject, "mContext"),
            		    	    getObjectField(param.thisObject, "mConfiguration"), getObjectField(param.thisObject, "mLockPatternUtils"),
            		    	    getObjectField(param.thisObject, "mUpdateMonitor"), getObjectField(param.thisObject, "mKeyguardScreenCallback"));
        			}
        		    XposedHelpers.callMethod(param.thisObject, "initializeTransportControlView", lockView);
        		    param.setResult(lockView);
        		}
    		});
    	}
    	
    }

    Above are my modifications for my Acer S500 Cloudmobile rom

    I'll have a look at it :)
    1
    Very good!
    Waiting for a 4.3 compatible version too :D :D :D