Is there any terminal (ADB) command for Android to change the launcher wallpaper?
2 Answers
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
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.
am
) command.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)./data/system/users/0/
and making appropriate changes in wallpaper.xml file. You would also need to restart (soft/full) the device.