2

Is there any terminal (ADB) command for Android to change the launcher wallpaper?

4
  • 1
    If you mean your wallpaper, that will depend on the launcher app and Android version. You would need to know the specific Activity and method in the launcher app which deals with changing the wallpaper, and trigger it via the Activity Manager (am) command. May 16, 2016 at 12:01
  • yeah actually I mean wallpaper . my launcher is lenovo launcher & my android version is 4.4.2 May 16, 2016 at 16:33
  • I think the wallpaper is managed by the SystemUI's com.android.systemui.ImageWallpaper service. Try setting an image by using Activity Manager (am startservice) as @Tamoghna said with -d argument specifying the picture's path. I'm not sure what Intent Action to use (in -a argument).
    – Gokul NC
    May 17, 2016 at 16:46
  • One option (requires root access) is to replace the wallpaper file with your image but keeping the same name in the directory /data/system/users/0/ and making appropriate changes in wallpaper.xml file. You would also need to restart (soft/full) the device.
    – Firelord
    May 17, 2016 at 19:29

2 Answers 2

2

I know this thread is old and dead, but it came up when I was searching the same topic. So I'm posting a response anyway for posterity.

This works for me on Android 5.1

am start -d file:////data/local/tmp/black_white.png -a android.service.wallpaper.CROP_AND_SET_WALLPAPER -f 0x1 com.android.launcher3/.WallpaperCropActivity
1

file=/Users/Mantis/Desktop/yoshi.jpg
dest=/sdcard/Download/"${file##*/}"
adb push "$file" "$dest"
adb shell am start \
    -a android.intent.action.ATTACH_DATA \
    -c android.intent.category.DEFAULT \
    -d file://"$dest" \
    -t 'image/*' \
    -e mimeType 'image/*'

This was the method I used, file= declares the variable for bash, use the file path of the image you want from your computer here.

dest= declares the destination variable, or the location you want it on your device, I just did the sdcard > downloads.

Then the commands to initiate the push and update the wallpaper. Some devices may ask what you want to use to complete this action, "Wallpaper" should show up, at least it did for my devices and then you click on that to complete the task. My assumption is on certain devices it will default that action depending on your devices apps.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .