How to set wallpaper for device?

Author: AiXanaduCreated Aug 8, 2023Updated Aug 31, 2026

I saw sbservices_get_home_screen_wallpaper_pngdata The wallpaper can be fetched from the device. But how do I set a new wallpaper for the device? I try to add a


LIBIMOBILEDEVICE_API sbservices_error_t sbservices_set_home_screen_wallpaper_pngdata(sbservices_client_t client, const char* pngdata, uint64_t pngsize)
{
	if (!client || !client->parent || !pngdata)
		return SBSERVICES_E_INVALID_ARG;

	sbservices_error_t res = SBSERVICES_E_UNKNOWN_ERROR;

	plist_t dict = plist_new_dict();
	plist_dict_set_item(dict, "command", plist_new_string("setHomeScreenWallpaperPNGData"));
	plist_dict_set_item(dict, "pngData", plist_new_data(pngdata, pngsize));

	sbservices_lock(client);

	res = sbservices_error(property_list_service_send_binary_plist(client->parent, dict));
	if (res != SBSERVICES_E_SUCCESS) {
		debug_info("could not send plist, error %d", res);
		goto leave_unlock;
	}
	plist_free(dict);
	dict = NULL;
	/* NO RESPONSE */

leave_unlock:
	if (dict) {
		plist_free(dict);
	}
	sbservices_unlock(client);
	return res;
}

function, but it doesn't do anything.

Source: libimobiledevice/libimobiledevice