Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,807,340 Members 43,962 Now Online
XDA Developers Android and Mobile Development Forum

[Q] change live wallpaper with tasker

Tip us?
 
furious84
Old
#1  
Member - OP
Thanks Meter 5
Posts: 67
Join Date: Aug 2010
Location: spilimbergo (pn) italy
Default [Q] change live wallpaper with tasker

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.
HTC HD MINI nsourm rom with CHT AND SPB 3.5 + android
 
4ufak
Old
#2  
Junior Member
Thanks Meter 3
Posts: 3
Join Date: Sep 2010
Quote:
Originally Posted by furious84 View Post
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.
The Following User Says Thank You to 4ufak For This Useful Post: [ Click to Expand ]
 
furious84
Old
#3  
Member - OP
Thanks Meter 5
Posts: 67
Join Date: Aug 2010
Location: spilimbergo (pn) italy
Quote:
Originally Posted by 4ufak View Post
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
HTC HD MINI nsourm rom with CHT AND SPB 3.5 + android
 
4ufak
Old
#4  
Junior Member
Thanks Meter 3
Posts: 3
Join Date: Sep 2010
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.

lwmgr.txt
The Following User Says Thank You to 4ufak For This Useful Post: [ Click to Expand ]
 
4ufak
Old
#5  
Junior Member
Thanks Meter 3
Posts: 3
Join Date: Sep 2010
Quote:
Originally Posted by furious84 View Post
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
The Following User Says Thank You to 4ufak For This Useful Post: [ Click to Expand ]
 
Karmavore
Old
#6  
Member
Thanks Meter 3
Posts: 47
Join Date: Apr 2012
Default 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?
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes