Customizing the lock screen on CyanogenMod is generally pretty straight forward but while the team is working on implementing the proper front end for this, I wanted to show you exactly how to do it for any CM12 nightly that is going out right now.
CM12 nightlies are going strong for dozens of smartphones and tablets. The team behind CyanogenMod 12 recently added in the Theme Engine and lots of people are curious about how to customize the lock screen wallpaper. Most of us are used to seeing an option within the Settings titled Lock Screen and this is where we generally change the wallpaper for it.
Since CM12’s Theme Engine(and CM12 itself) is still in alpha stage, there isn’t a straight forward way to change the lock screen wallpaper right now.
However, as long as you’re willing to enable root, download a file explorer and then rename/move a file around, then I will show you exactly how to change the lock screen wallpaper for CM12. Again, the team behind CM12 will eventually make this process very easy and without having to do all of this, but for now this is how we can do it.
CM12 Lock Screen Wallpaper
- Enable Developer Mode
- Go to Settings, and Tap on Developer Mode
- Scroll Down and Enable Root for Apps Only
- Download and Install ES File Explorer from the Google Play Store
- Download Your Preferred Lock Screen Wallpaper to the Device
- Open ES File Explorer and Swipe from the Left to Expand the Menu
- Enable “Root Explorer” from the Tools Section and then Grant Root Access to ES File Explorer
- Close the ES File Explorer Menu then Browse to the Download Folder(or where ever you downloaded the preferred lock screen wallpaper)
- Press and Hold the Preferred Lock Screen Wallpaper and Tap on Rename(at the bottom)
- Rename the Preferred Lock Screen Wallpaper to. . .
- keyguard_wallpaper
- Without a File Extension
- Press and Hold the Preferred Lock Screen Wallpaper and Tap on Copy(at the bottom)
- Browse to. . .
- /data/system/users/0
- Paste the Preferred Lock Screen Wallpaper into that Folder
Explanation
The first thing you need to know is how to enable Developer Mode on Android. I have written a tutorial on this so just follow that if you are unfamiliar with this process. We need to do this in CM12 so that we can enable root access to applications(specifically the ES File Explorer app). Once we have enabled root for apps and then given ES File Explorer root access, then we can proceed.
You should have already downloaded your new custom lock screen wallpaper, just like it says in the tutorial above, and now you will need to rename it. Most images have a file extension of .jpg, .png, etc. However, when we rename the file, we need to remove that extension all together. The new name for the custom lock screen wallpaper should be “keyguard_wallpaper”. Without any quotes and without a file extension. After this has been done, we can copy it to the clipboard and then browse to the proper folder.
The folder that holds the image for the lock screen wallpaper is /data/system/users/0. We need to give ES File Explorer root access(just like it says in the tutorial) in order to access and modify this /data/ directory. You can use your own file explorer, it just needs to have root access. Once you paste the renamed image into that folder(you might need to overwrite a file that is already in there), you can simply turn off the display and turn it back on. Once you turn it back on, you should see the new custom lock screen wallpaper.
As always, if you have any questions, please leave a comment at the bottom of this article(or use the contact link at the top of this website). I prefer questions about tutorials I have written to be put in the comments so that all of the information is collected in one spot. This way, if someone else comes across the same issue you did, and I helped you, then they can just refer to the comments section to find out how to fix it.
thanks, this helped a lot! 🙂
You’re very welcome. I’m happy that it worked out for you
Great! Easy to! Worked straight away, no issues at all!
Its awesome and it worked but I wanted to know whether there is some method to show that electron beam shut down too.I love that and it is missing here.
What do you mean by ‘electron beam shut down’. Are you talking about a powering off animation or a screen lock animation/transition? Or are you still talking about a lock screen wallpaper?
yes i was talking about the powering off animation.
I don’t think this has been implemented into CM12 just yet(or if it ever will). I update CM12 fairly regularly though so if I ever see that it has been added, I’ll do my best to reply to one of your comments and let you know(or I might write up an article about it for you).
great!! You are one of the very few guys who reply to comments. Thanks for the great work and keep it up
I certainly understand that frustration and that is one of the reasons why I reply to as many comments as I can 🙂
WORKS LIKE A CHARM ☺ (y) ,
How do i change the Lock-screen Animation ?
Hi, I tried this on stock LP on my N5 and it’s not working, will this work for stock LP or just in CM? And also what permissions should I set?
Since this method only works because of CM’s implementation of the Theme Engine, it will only work on CM12(and possibly CM11).
When doing this on CM12, you shouldn’t have to change any file permissions
It didn’t work for me.. Using CM 12 Nightly for Moto G 4G (peregrine)
Which CM12 nightly build are you on?
cm-12-20150222-NIGHTLY-peregrine.
I’ve tried this on my Nexus 5 as well (also CM12) it didn’t work on that as well!
The latest version I have on my devices is the 18th(and this mod works fine). I’ll compile a new build today and see if things have changed.
Thanks for the feedback, I’m sorry it isn’t working out for you 🙁
Thanks for the replies!!! Eagerly waiting!
I just tested this on the CM12 nightly for the 25th on my AT&T LG G3 and I was able to configure the lock screen wallpaper with the steps included in this tutorial.
I can only guess that you aren’t doing something that is listed in the tutorial or maybe things are different for your device. I haven’t seen any other reports of issues though. . .so I assume this tutorial is working on all builds of CM12
I’m sorry that I cannot help you further 🙁 but everything seems to be working on my side
Thanks for all the help!! You guys at AndroidExplained were the only fellas who replied to me on this… For that I’m grateful!! I’ll update my phone today and try it again!
I’m just glad to help. I would say the only tricky part might be that when you rename the image, you need to remove the extension of it. So there isn’t a .jpg, no .png, no .anything.
As long as you do this and copy/move it into the proper directory then it should work
Thank you for describing where the lockscreen wallpaper is! Now I can finally use my own wallpaper everywhere.
Instead of providing dedicated file I decided to link it to wallpaper (
su –
cd /data/system/users/0/
rm keyguard_wallpaper
ln -s wallpaper keyguard_wallpaper
chown -h system:system keyguard_wallpaper
) in the console so now I just set the wallpaper and the lockscreen simply uses the same.
This is a great little trick. Thank you for including it in the comments. Hopefully this will help someone else in the future if they want to do the same thing on their device
Dude I have no idea what you mean. And I would really like that feature. Could you please dumb it down a bit for teh n00bz.
@sup.. I know it’s late, and you’ve probably already figured it out. But still..
install a console emulator for android (I use this one: https://play.google.com/store/apps/details?id=jackpal.androidterm)
Then simply type in the code @jorgemartinez gave line by line.
And you’re done. 🙂
Thank you so much. Just what I needed.
This actually helped me alot! (I am a rom dev and used it as a base for a solution for something there)
Hi would you pls attach a screenshot of the code entered in the console……would be of great help
Had to change permissions to get it working. Should of been stated above. Rw-rw-r–
That’s strange. I’ve changed lock screen wallpapers on my LG G3. All the way up to the nightly from February 25th and have never had to change any permissions. Either way, thanks for the feedback. I’ll look into this further
Its works but whenever I reboot my phone it puts the old lockscreen back and I have to do the process over again.
Its works until I reboot my device. Then I have to do the process all over again. I am using lg g2 (d801)
This is strange. . .it doesn’t reset back on my LG G3. There was another comment here from the user ‘DNA’ that said he had to change the permissions in order to get it to work. Maybe you can try to change your permissions to ‘Rw-rw-r–‘ like they had to do?
Works like a charm on the 1/22/15 CM12 port for jem! I wish CM12 would allow users to directly configure this from the settings app.
Nice! I’m glad it worked out for you. This is generally an option that CM has baked into their ROM so I can only imagine it will be added eventually. We have to remember that they are still doing nightlies and those aren’t really considered ‘stable’. While they might be stable enough for a daily driver, they are definitely lacking in features when compared to what typical CM builds have. The features will continue to pour in with each new nightly so it could be added in at any time
This is awesome man, thank you. I’ve discovered that if you just delete the file (keyguard_wallpaper), whatever you keep as you home screen wallpaper will be used for the lockscreen. Pretty neat.
That is a nice trick. Thank you for letting me know 🙂
worked great. I couldn’t get separate Lock Screen/ Home Screen, but with this I can have two different ones. Thanks!
You’re very welcome. I’m glad that I was able to help 🙂
Did not work on OnePlus One with CM12. I have a live wallpaper on desktop so I just renamed the keyguard_wallpaper but it still shows the wallpaper from the theme.
Are you trying to get a live wallpaper working on the lock screen?
Just go to themes>options>theme chooser>customise and add any pic to lock screen wallpaper there. There is no need for all this non sense
Where do you see ‘options’ in the Themes app?
it worked great with Nameless Rom for N7100 (based on CM 12.1)
worked like a charm. Thank you 🙂
I deleted the keyguard_wallpaper.xml text file on accident. how can I restore the text file?
The quickest way is to probably dirty flash your custom ROM
It didn’t work, on RR based on cm12.1
Either CM12.1 made some recent changes that stopped this, or the developers of RR did. I don’t use that custom ROM so I’m sorry that I can’t be of more assistance
theres an app on the playstore if you search cm12.1 lockscreen changer. it used to work but now cause of ads it doesn’t. Every time you press apply it doesn’t do anything cause ads show up. I’m at a loss and I don’t want to go back to touchwiz cause all it does is lag.
It sounds like the reason why the app doesn’t work anymore is the same reason why this tutorial might not work. If CM devs have changed the way the lock screen wallpaper works then we’ll have to find a new method to change it.
I’ll do a little research this week and see if I can come up with anything
From what I’m reading, the same file mentioned in the tutorial above is responsible for the lockscreen wallpaper
– https://www.reddit.com/r/cyanogenmod/comments/4av183/how_do_i_disable_this_lock_screen_wallpaper/d13y7n3
That has reportedly worked for another user so it should still work now with CM12.1. I have to think that your RR custom ROM has changed this and that is why it doesn’t work(even though it is based on CM, they can change things)
Works with jpg file, but not png. thanks for the info =)
Thanks great feedback! Thank you for letting us know
Thanks brother! <3