How To: Activate the Hidden AOSP Lock Screen on Your HTC One M8

Activate the Hidden AOSP Lock Screen on Your HTC One M8

Sense 6 is great, don't get me wrong, but sometimes I start to miss the vanilla Android experience that comes with Nexus devices. You can always convert your M8 to the Google Play Edition, but then you'd have to ditch all the Sense exclusive features, and we wouldn't want that.

In this how-to, I'll be showing you how to get a fully featured AOSP lock screen on your HTC One M8 without having to flash any tweak or install any mods. For me, it's the perfect blend of Sense and stock Android.

What You'll Need

  • This guide is for rooted devices only, so make sure you have a superuser app installed on your M8.
  • You will need to have a computer that has ADB installed.
  • Must have USB debugging enabled on your device.
  • Lastly, you are going to need a file explorer app that has root permission. I'd recommend using ES File Explorer.

Step 1: Remove Your Old Lock Screen

The first thing we will need to do is stop your Sense lock screen from running altogether. To do that, we will need to rename it using a file explorer.

Open ES and browse to /system/priv-app/, then look for HtcLockScreen.apk and HtcLockScreen.odex. If you are using a custom ROM, chances are you don't have HtcLockScreen.odex, so don't worry if you can't find it.

After locating both, rename them by adding .bak to the end of the extension. If you did it right, it should look like the screenshot above. Once you have finished renaming the files, reboot your M8.

Step 2: Enable Widgets

After restarting, you will already have the AOSP lock screen enabled, but it will lack widget support. To get the camera or other widgets enabled, you'll need to run the Google Setup Wizard that comes hidden on your M8, but isn't utilized.

Since we can't just open the apk from /system/priv-app, we will need to run an ADB command in order to initiate the process. Plug your device into you computer, then open up a command prompt and type in the following commands.

adb shell
su
am start -n com.google.android.setupwizard/.WelcomeUserActivity

After the final command is input, you will see the setup wizard start up. Click Next a few times to get it to finish, and you'll be all set.

Going Back to the Sense Lock Screen

If you ever decide to go back to the Sense lock screen, all you'll need to do is remove the .bak you added to HtcLockScreen.apk and HtcLockScreen.odex, then restart your device. The AOSP lock screen will still be set up and ready to go, so you can always go back afterwards.

Limitations

Using the AOSP lock screen means that you'll lose the ability to unlock your device with gestures, but that functionality can be replaced by flashing a new kernel. Also, the camera widget, accessible by swiping right from the main lock screen, will only work with the new Google Camera, not the stock Sense camera.

Other than those few drawbacks, you will now have a feature packed AOSP lock screen on your M8, complete with camera shortcut and multiple widgets. Be sure to leave me a comment below if you run into any issues.

Just updated your iPhone? You'll find new emoji, enhanced security, podcast transcripts, Apple Cash virtual numbers, and other useful features. There are even new additions hidden within Safari. Find out what's new and changed on your iPhone with the iOS 17.4 update.

21 Comments

I've followed through with this tutorial and got the lockscreen but for some reason, that transparent black bar (on your sense screenshot below t-mobile) still appears on the google lockscreen. It's not transparent like the screenshot on the right

Do you perhaps know why that is?

i cant get this to work, i get a "cannot link executable" error

Im using the sense 6, and i have weaksauce root but no s-off

Did you already remove the old lockscreen and see the AOSP lockscreen instead?

Help me please, ES File Explorer won't let me rename my apk's for the lockscreen. How do I do ?

You have to be rooted and turn on R/W for /system/ under your root explorer options.

Every time I reboot I don't get the AOSP lockscreen. It just defaults back to the sense one.

Are you running the stock ROM? If so you would need to rename the odex file as well.

Will this new lock screen remove the factory reset if you get the password wrong ten times?

Yup, the AOSP lockscreen doesn't have that security feature. Only Sense has it.

thanks for this! worked like a charm. 1 thing, It won't let me edit/add another lockscreen widget. I ran the Google Setup Wizard successfully, but the clock won't edit (like if I drag down on it similar to my Nexus 5). When I did the Google Setup Wizard, I just said skip in the setting up account since I already had my google account setup... did I need to sign into Google again?

If you swipe the screen to the right a couple of times it doesn't show a an add widget icon?

You can also run it again and this time add your account. If you get a message saying it can't contact or something like that just skip it all together.

Thanks for the reply. I had forgot to turn on allow widgets on lock screen in security settings. All is working! Even have the HTC widget on LS and sliding right I get HTC camera. Great tutorial! Thanks!

Is there any way to install the sense kernel for gestures? I quite like they way that they work, and the other option for the Knock On isn't bad, but I wouldn't mind being able to do it the HTC way. I want to convert to the AOSP lock screen for notification's sake, since HTC really locked it down compared to stock android.

If I were to use the "Bulletproof" Kernel to add the gesture functionality, could I revert to stock as easily as reverting to stock lock screen?

Previous iOS user who misses the usefulness of lock screen notifications. Don't want to wait for HTC's Android L release in 4 months.

The stock kernel is flashed the same way bulletproof is so there shouldn't be an issue reverting back if you ever have the need to do so.

Is there any way to use the stock kernel and the AOSP lock screen? Would flashing the stock kernel do that? Or would that revert back to sense lock screen as well? Or has Bulletproof been updated further since the time you wrote the linked article to include even more features (will admit that I haven't really looked into it beyond the linked article because I'm tired on a sunday night)?

Not too familiar with what's what on android, despite the fact that I'm in school to be a computer engineer. I never really had to muck with anything on iPhone, since the notifications displayed for everything.

Thanks

The stock kernel will work with the AOSP lockscreen. You would only need bulletproof if you want to re-enable the wake up gestures.

So there's no way to have the Stock, HTC made wake up gestures on the AOSP lockscreen?

So there's no way to have the Stock, HTC made wake up gestures on the AOSP lockscreen?

Share Your Thoughts

  • Hot
  • Latest