Tuesday, August 22, 2017

How to Customize Lockscreen Shortcuts in Android Oreo Without Root

Android Oreo has finally launched, and much like the navigation bar, we can also customize lockscreen shortcuts! It's even easier than the navigation bar tutorial, as all you need is adb. With the launch of Android Oreo we are also going to look for many other tweaks that users like yourselves here at XDA can benefit from, so keep an eye on our news feed.

A bit of context is needed here. Lockscreen shortcuts are those small icons in the bottom left and right hand corner that you can access from the keyguard when you wake up the phone. You were previously able to customize them starting with the Android O Developer Previews, but in DP3 they removed this option. Still, it's possible to manually customize the lockscreen shortcuts because Google only removed the user-facing GUI for it rather than completely taking out the feature.

To get adb, install either "Minimal ADB & Fastboot" or the official binaries by Google and enable USB debugging. To enable USB debugging open settings, go to "About", tap "Build number" seven times and press the back key. You will now see a "Developer options" menu that you can enter and enable debugging in.

This guide requires Android Oreo which is only out on the Nexus 6P, Nexus 5X, Google Pixel, Google Pixel XL, Nexus Player and Google Pixel C. You can install the factory image now if you don't have it already!


How to Customize Lockscreen Shortcuts in Android Oreo

The ability to edit the lockscreen shortcuts existed too in the System UI tuner, exactly like the navigation bar tweaks. In that setting, you not only could change lockscreen shortcuts to a specific application, but you also could choose an activity too. It has since been removed along with other options, with the commit message stating "they aren't quite there yet". Thankfully we can still do that here, but with a bit more work than the graceful solution that Google used to offer. To launch adb, hold shift + right click in the folder containing adb and make sure your phone is connected to your PC with debugging enabled. While easy to edit the shortcuts, you will need to use the following commands to edit them.

For the left side:

  settings put secure sysui_keyguard_left "COMPONENT/NAME"  

For the right side:

  settings put secure sysui_keyguard_right "COMPONENT/NAME"  

Where "COMPONENT" is the application's package name and "NAME" is the name of the activity.

As an example, if I wanted to launch the Google Hangouts left pane by swiping from the left side, the command in adb I would input is the following.

  settings put secure sysui_keyguard_left "http://ift.tt/2sby6Yo"  

This works for any application and activity. To find application package names and activities, you can use Activity Launcher on the Play Store to find the name of the activity. You can play around with activities in that application and find the one you want.

Activity Launcher (Free, Google Play) →

Next, if you want to make the shortcut unlock the device you can do that too. Simply use the following commands:

  settings put secure sysui_keyguard_left_unlock 0/1  settings put secure sysui_keyguard_right_unlock 0/1  

Where 0 keeps the device locked when the shortcut is activated and 1 unlocks the device.


And that's it! There isn't much in the way of further customizing these shortcuts, but it's a nice way to speed up launching some of your favorite apps. Play around, see what you can do and let us know!



from xda-developers http://ift.tt/2vboXgu
via IFTTT

No comments:

Post a Comment