[Q] change live wallpaper with tasker

Search This thread

furious84

Senior Member
Aug 26, 2010
82
5
spilimbergo (pn) italy
hi all,my question is:
is there a way to change live wallpaper using the app tasker?
for example have a live wallpaper for when i use n7 at home and one different for when i use in car.
 

4ufak

New member
Sep 2, 2010
3
6
hi all,my question is:
is there a way to change live wallpaper using the app tasker?
for example have a live wallpaper for when i use n7 at home and one different for when i use in car.


I've found solution! :3


This command sets live wallpaper¹:
Code:
service call wallpaper 2 i32 1 s16 "[package name]" s16 "[class name]"

This command allows to get name of active live wallpaper:
Code:
service call wallpaper 4

And this command disables it:
Code:
service call wallpaper 5


More details here²:
  • android/app/IWallpaperManager.java
  • com/android/server/WallpaperManagerService.java

¹ Application must have SET_WALLPAPER_COMPONENT permission, and this permission available only for applications from /system/. So, in your case you need superuser privileges.

² There were links to source code, but xda doesn't allow me to post it. You can found it yourself — just search "grepcode [filename]" in google.



Sorry for my english.
 

furious84

Senior Member
Aug 26, 2010
82
5
spilimbergo (pn) italy
I've found solution! :3


This command sets live wallpaper¹:
Code:
service call wallpaper 2 i32 1 s16 "[package name]" s16 "[class name]"

This command allows to get name of active live wallpaper:
Code:
service call wallpaper 4

And this command disables it:
Code:
service call wallpaper 5


More details here²:
  • android/app/IWallpaperManager.java
  • com/android/server/WallpaperManagerService.java

¹ Application must have SET_WALLPAPER_COMPONENT permission, and this permission available only for applications from /system/. So, in your case you need superuser privileges.

² There were links to source code, but xda doesn't allow me to post it. You can found it yourself — just search "grepcode [filename]" in google.



Sorry for my english.

Really Thank You very much, sincerelly i decided To use Car home ultra like home when n7 is plug in Car (then i didn t need wallpaper, But i will try.
Ps your English is better then mine. I m from italy, And you?

Inviato dal mio Nexus 7 utilizzando Tapatalk
 

4ufak

New member
Sep 2, 2010
3
6
Here's the script (.txt, because it is a very strange forum). Without arguments script disables live wallpapers, overwise sets livewallpaper - first arguments is package name, second is class name. For example:

Code:
/data/lwmgr.sh com.h6ah4i.android.music_visualizer2 com.h6ah4i.android.music_visualizer_wallpaper.MusicVisualizerWallpaperService

Don't forget to copy script into right place and set right permissions.

View attachment lwmgr.txt
 
  • Like
Reactions: n0j0e and furious84

4ufak

New member
Sep 2, 2010
3
6
Really Thank You very much, sincerelly i decided To use Car home ultra like home when n7 is plug in Car (then i didn t need wallpaper, But i will try.
Ps your English is better then mine. I m from italy, And you?

Inviato dal mio Nexus 7 utilizzando Tapatalk

It's my pleasure, glad to help. I'm from Russia. :3
 
  • Like
Reactions: furious84

Karmavore

Senior Member
Apr 24, 2012
55
8
Basic understanding of shell and Tasker

I really would like to get Live Wallpaper switching to work. I tried entering the txt into the shell but it doesn't work or return the correct values. Could you help me out?
 

quack75

Senior Member
Sep 24, 2012
258
96
Redmi K20 / Xiaomi Mi 9T
I found this solution really good until kitkat , but now with lollipop does not work anymore , someone is able to change the codes ? I use a rom based cm now but I tried it with the stock without any results .
knows maybe an alternative method ?
thanks for any help
 

JudgeDread11

Senior Member
Aug 17, 2014
885
500
Ao Nang, Krabi
The evaluation version doesn't work for me on lollipop. I didn't take to much time to look into it though since u found an other solution. The LW I use has its own ui so starting that and only 2 tasker input button clicks it sets it. Not a nice solution as the screen needs to come on and user input can disturb the action. But to have an other app running for just this purpose isn't a great solution too. Especially since I want to disabled my LW to save battery when it gets low.

---------- Post added at 07:34 AM ---------- Previous post was at 07:30 AM ----------

Hopefully somebody with more knowledge about these things then me will figure out three correct command line for lollipop and post it here :)
 

citkast

New member
Oct 15, 2015
1
2
Lollipop fix

If that isn't working on new versions like lollipop try just changing the 2 to a 3: service call wallpaper 3.. The addition of a function to set the keyguard wallpaper bumped it down to 3.
 

jjtimken

New member
Jan 16, 2008
3
0
baton rouge
how do you make it work on nougat?
it's throwing an "error: 10" at the end of the shell command. it does work on my old phone ( kitkat )
i've tried with both 3 as well as 2 and both give the error: 10
this is the last 3 lines of the output text.
add wait type shell1 done
add wait task
Error: 10

any ideas how to make it work ?
 

drsaidalavi

Senior Member
Jul 1, 2012
341
59
Not working on Samsung Galaxy Note 8 on Nougat 7.1.1 rooted

Hello,

I was using Tasker in my rooted Elephone running on android Marshmallow for automatically changing the live wallpaper on 'time+date'schedule using RUN SHELL command as described in this forum successfully.
Now I bought Samsung Galaxy Note 8 on Nougat 7.1.1 Stockrom, rooted using TWRP< superSU. Tasker has been granted SuperSU permission also. I have exported my tasker profiles from Elephone to Sansung, also it shows green lines at the end of each task. it fails to execute the task .I am very much disappointed. This is the only way to automate live wallpaper changing in Android.
So kindly help me how to solve this problem.
Thanking You

drsaidalavi
 

n0j0e

Senior Member
If that isn't working on new versions like lollipop try just changing the 2 to a 3: service call wallpaper 3.. The addition of a function to set the keyguard wallpaper bumped it down to 3.
Yeah! It's working on OnePlus 5T with OxygenOS beta 33 (pie).

Using Livewallaper Betta Fish:
Code:
service call wallpaper 3 i32 1 s16 "com.maxelus.livewallpaper.betta" s16 "com.maxelus.livewallpaper.betta.LiveWallpaperService"
 

aashir.s.shaikh

New member
Aug 14, 2019
1
1
Hello? I've tried doing the same things...
Just to test.... I have set that if I shake my device I want to change the Live Wallpaper (Magic Fluids)
But it's not working...


What I truly want is:
1) if my device is in landscape mode → change live wallpaper to "Transparent Screen LWP"
2) if my device is in Portrait mode → change live wallpaper to "Magic Fluids"

Please help ???
 
  • Like
Reactions: drsaidalavi

drsaidalavi

Senior Member
Jul 1, 2012
341
59
How to change live walpaper as per schedule in Oreo

Hello? I've tried doing the same things...
Just to test.... I have set that if I shake my device I want to change the Live Wallpaper (Magic Fluids)
But it's not working...


What I truly want is:
1) if my device is in landscape mode → change live wallpaper to "Transparent Screen LWP"
2) if my device is in Portrait mode → change live wallpaper to "Magic Fluids"

Please help
.
Here I will detail how I set up the automatic change of live wallpaper using Tasker. It can work only in rooted phone either by Magisk or SuperSu
First you have to install two applications from Play store
1-' Application Information'- to get the Package name of live wallpapers you have already installed
2- 'Disable service- to get the service name of the wallpaper. Some live wallpapers have more than one service name. The one comes with Wallpaper'in the last liine will be the one we have to enter in the Run Shell command. The other way to find it is just deselect the tick mark one by one in Disable service, then look for the disappearance of that live wallpaper from the live wallpaper picker screen. The service causing the disappearance is what we want to enter in the Run Shell command
Set up a profile - Name it -for Example LWC
then select 'EVENT'- select Date and time set- then it will ask for a task
Name the Task eg: Live wallpaper
Then it opens Task Edit
Select -RUN SHELL-
Put the following command in the Run Shell
service call wallpaper 5 i32 1 s16 ---------------------------- s16 --------------( fill the first dash area the package name you are copying from The Application Information APk, and the second one the service package obtained from the Disable Service Apk as described above. This number '5'is for Oreo rom, if you go downwards to Nougat make it '4', if you go above to Pie make it '6'.)
You have tick the root option in the next line
Then in then ' If', choose what variables you want to choose. As I choose date and time , I selected ' Day of the month' for the first variable then' equals' to the number of the day of the month eg:1 for the first day
Then again press the plus button of the variable, selected 'Time' made it 'greater than' -then put the time in this format- 09.00 for nine o' çlock in the morning. Tasker will only accept the time in 24 hour format
Those who have finger print or pattern lock, this may not work properly when the display off and phone locked. To make this work in this condition, we have to make another 2 profiles
Name of profile -anything you like- select State- Display -Display state edit- make it off
then add the task we already created eg: Live wallpaper in the this prfile
Make another profile- Name it- then select ' Event'- then 'Monitor'- then select the task 'live wallpaper changer
If you set up all these profile , you can see your live wallapapers changing according to a schedule you created.
Thank you
drsaidalavi
 

Attachments

  • Saidalavi.prf.xml
    97 KB · Views: 50

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    hi all,my question is:
    is there a way to change live wallpaper using the app tasker?
    for example have a live wallpaper for when i use n7 at home and one different for when i use in car.


    I've found solution! :3


    This command sets live wallpaper¹:
    Code:
    service call wallpaper 2 i32 1 s16 "[package name]" s16 "[class name]"

    This command allows to get name of active live wallpaper:
    Code:
    service call wallpaper 4

    And this command disables it:
    Code:
    service call wallpaper 5


    More details here²:
    • android/app/IWallpaperManager.java
    • com/android/server/WallpaperManagerService.java

    ¹ Application must have SET_WALLPAPER_COMPONENT permission, and this permission available only for applications from /system/. So, in your case you need superuser privileges.

    ² There were links to source code, but xda doesn't allow me to post it. You can found it yourself — just search "grepcode [filename]" in google.



    Sorry for my english.
    2
    Here's the script (.txt, because it is a very strange forum). Without arguments script disables live wallpapers, overwise sets livewallpaper - first arguments is package name, second is class name. For example:

    Code:
    /data/lwmgr.sh com.h6ah4i.android.music_visualizer2 com.h6ah4i.android.music_visualizer_wallpaper.MusicVisualizerWallpaperService

    Don't forget to copy script into right place and set right permissions.

    View attachment lwmgr.txt
    2
    Have you found a way for Lollipop yet?
    At least only with paid app and rooted phone, search Automagic, it work for my N4 with any Rom [emoji3]
    2
    Lollipop fix

    If that isn't working on new versions like lollipop try just changing the 2 to a 3: service call wallpaper 3.. The addition of a function to set the keyguard wallpaper bumped it down to 3.
    1
    Really Thank You very much, sincerelly i decided To use Car home ultra like home when n7 is plug in Car (then i didn t need wallpaper, But i will try.
    Ps your English is better then mine. I m from italy, And you?

    Inviato dal mio Nexus 7 utilizzando Tapatalk

    It's my pleasure, glad to help. I'm from Russia. :3