Create Customized Lock Screen Shortcuts on Android Oreo

Edited by Jay, Maria Quinney, Visihow Admin, Argyris

NorthernTouch custom-lock-screen-shortcuts-00.png

Android Oreo opens up an excellent variety of customizable options and tweaks that were not accessible in previous versions. The focus of this VisiHow tutorial is changing the lock screen shortcuts from the default, which on Oreo is the Google assistant and the camera app (the two little icons in the bottom left and right corner on the lock screen). Being able to swap out the defaults for apps or functions that you'd rather have quick access to is quite convenient. Also, there is no need to worry about having root access, as we'll be using ADB (Android debug bridge) to customize our lock screen shortcuts.

If you're new to using ADB, please check out our article on Installing adb on Windows before proceeding.

This tutorial is broken into two sections:

  • Finding the application package and the application activity name.
  • Entering the commands to edit the left and right lock screen shortcuts.

Both of the above tasks can be completed using ADB which is a bonus for those of you who don't have access to root.

At the time of writing this tutorial, Android Oreo (8.1.0) is only available on Nexus and Pixel devices

For this article, we used a Google Pixel and a laptop running Windows 7.

Locate Application Package and Activity Name with ADB

NorthernTouch custom-lock-screen-shortcuts-00-appPack.png

Before getting into the command line tool, we need to enable USB debugging. Once you have access to developer options and USB debugging turned on, we need to choose which app shortcuts will replace the defaults, as well as get their application package and activity names. To do this, we'll use ADB (command line tool), our Pixel/Nexus device and the charging/data cable.

  1. 1
    Open the folder where you extracted the platform tools, hold the shift key + right click, then select "Open command window here".
    NorthernTouch custom-lock-screen-shortcuts-01.png
    Was this step helpful? Yes | No| I need help
  2. 2
    Plug your device into your PC with the charging/data cable
    .
    If you haven't granted access to this device before, you'll see the following pop-up.
    NorthernTouch custom-lock-screen-shortcuts-02.png
    Tap "OK", and select "Always allow from this computer" for quicker access in the future.
    Was this step helpful? Yes | No| I need help
  3. 3
    To make things a little easier, we're going to edit a few settings in the command window
    .
    Right-click in the command window title area, then click "Properties".
    NorthernTouch custom-lock-screen-shortcuts-03.png
    Was this step helpful? Yes | No| I need help
  4. 4
    In the Properties window, select the Options tab, then place a checkmark next to "QuickEdit Mode".
    NorthernTouch custom-lock-screen-shortcuts-04.png
    Was this step helpful? Yes | No| I need help
  5. 5
    While still in Properties, select the Layout tab
    .
    Next, change the window width to 90 or higher. The bigger the width, the more room you'll have for potentially long lines of text.
    NorthernTouch custom-lock-screen-shortcuts-05.png
    Having the command returns on a single line makes highlighting and copying less complicated later on.
    Was this step helpful? Yes | No| I need help
  6. 6
    Go to the command window and type
    :
    "adb devices" (without the quotation marks), then press Enter.
    NorthernTouch custom-lock-screen-shortcuts-06.png
    Was this step helpful? Yes | No| I need help
  7. 7
    If you granted access in step 2 (or in the past), you'll see the serial number of your phone/tablet under List of devices attached in the command window
    .
    NorthernTouch custom-lock-screen-shortcuts-07.png
    We're doing this to ensure ADB is communicating with your device correctly before proceeding.
    Was this step helpful? Yes | No| I need help
  8. 8
    Now it's time to get the application package and activity name for the shortcuts we'll be editing in the next section of this guide
    .
    In the same command window, type: "adb shell" (without the quotes) and press enter.
    NorthernTouch custom-lock-screen-shortcuts-08.png
    Was this step helpful? Yes | No| I need help
  9. 9
    On your device, open one of the applications you want to add a shortcut to on the lock screen
    .
    NorthernTouch custom-lock-screen-shortcuts-09.png
    Was this step helpful? Yes | No| I need help
  10. 10
    With the app open and visible, type or copy and paste the following line in the command window
    :
    dumpsys window windows | grep -E 'mCurrentFocus'
    NorthernTouch custom-lock-screen-shortcuts-10.png
    Hint, if you selected QuickEdit Mode at the beginning of this section, simply place the cursor where you want, and click the right mouse button to paste the above command and hit enter.
    Was this step helpful? Yes | No| I need help
  11. 11
    Now you'll see both the appPackage and appActivity displayed in the command window
    .
    The "/" separates the two, and the appPackage begins after the "u0".
    NorthernTouch custom-lock-screen-shortcuts-11.png
    Write these down or continue with the following steps to copy and paste them into a text file.
    Was this step helpful? Yes | No| I need help
  12. 12
    Highlight the appPackage with the cursor, right-click in the command window title bar, click "Edit", followed by "Copy".
    NorthernTouch custom-lock-screen-shortcuts-12.png
    Was this step helpful? Yes | No| I need help
  13. 13
    With the appPackage copied to the clipboard, paste it into a text file
    .
    Do this for both the appPackage and appActivity names, and remember to rerun the command in step 10 for your second lock screen shortcut.
    NorthernTouch custom-lock-screen-shortcuts-13.png
    Was this step helpful? Yes | No| I need help

Edit Lock Screen Shortcuts Via ADB

NorthernTouch custom-lock-screen-shortcuts-00-edit-ls-shortcut4.png

Now that we have successfully located and written down down the App Package and App Activity names for both of our new lock screen shortcuts, it's time to edit the following two lines of code in our command prompt window:

settings put secure sysui_keyguard_left "COMPONENT/NAME"

settings put secure sysui_keyguard_right "COMPONENT/NAME"

We will be replacing "COMPONENT" with the Application Package name and "NAME" with the Application Activity name. Do this in your text file before continuing with the following steps.

  1. 1
    With your device connected to your PC, open a command window from inside your platform-tools directory.
    NorthernTouch custom-lock-screen-shortcuts-01.png
    Was this step helpful? Yes | No| I need help
  2. 2
    In the command window, type
    :
    "adb devices (without the quotes), then press the enter key.
    NorthernTouch custom-lock-screen-shortcuts-14A.png
    Was this step helpful? Yes | No| I need help
  3. 3
    In the same command window, type
    :
    "adb shell" (without the quotes) and press enter.
    NorthernTouch custom-lock-screen-shortcuts-08.png
    Was this step helpful? Yes | No| I need help
  4. 4
    Next, go to your text file, and copy
    :
    settings put secure sysui_keyguard_left "COMPONENT/NAME". Remember to replace COMPONENT with App Package and NAME with the App Activity.
    NorthernTouch custom-lock-screen-shortcuts-15.png
    Was this step helpful? Yes | No| I need help
  5. 5
    Head back to your command window and paste the left-side shortcut text, then hit enter.
    NorthernTouch custom-lock-screen-shortcuts-16.png
    Line the cursor up and right-click on the mouse to copy what's on the clipboard.
    Was this step helpful? Yes | No| I need help
  6. 6
    Now go back to your text file and copy the right-side lock screen shortcut code to the clipboard.
    NorthernTouch custom-lock-screen-shortcuts-17.png
    Was this step helpful? Yes | No| I need help
  7. 7
    Back in the command window, type or paste the right-side shortcut code, then hit the enter key.
    NorthernTouch custom-lock-screen-shortcuts-18.png
    Was this step helpful? Yes | No| I need help
  8. 8
    No wake your device so you can see the lock screen
    .
    You'll see that the bottom left and right shortcut icons no represent the apps you chose earlier on in this tutorial.
    NorthernTouch custom-lock-screen-shortcuts-19.png
    Was this step helpful? Yes | No| I need help

Questions and Answers

I followed the process step by step but the Android 8.1.0 default shortcut apps remain

The shortcut apps which come by default i.e. camera and microphone are not being changed by following this method. My Android version is 8.1.0. Everything seemed to be going well - I did not have any issues with following the steps all the way through - but the process did not achieve the results that were described. I have tried: I have tried the entire process as described in the https://visihow.com/Create_Customized_Lock_Screen_Shortcuts_on_Android_Oreo article. When the phone is woken, as it states in the article, nothing has changed. I even tried restarting it in case this was needed. All the steps have been followed to the best of my knowledge. I think it was caused by: All the correct steps have been followed to the best of my knowledge.

VisiHow QnA. This section is not written yet. Want to join in? Click EDIT to write this answer.

If you have problems with any of the steps in this article, please ask a question for more help, or post in the comments section below.

Comments

Article Info

Categories : Software | Use Google Pixel and Pixel XL | Use Android Oreo

Recent edits by: Visihow Admin, Maria Quinney, Jay

Share this Article:

Thanks to all authors for creating a page that has been read 485 times.

x

Thank Our Volunteer Authors.

Would you like to give back to the community by fixing a spelling mistake? Yes | No